dymokomi/luced-3d
Source of release 0.11.7
0.11.7 / src / tool_surface_fillet.luc
## Surface Fillet (Alias's): a rolling-ball blend between two sets of faces,
## G1 to G3, trimmed into them (blend_ops.luc).
## A node keeps its picks as words (curves by name, edges by their face and
## where they were clicked); an Edit CAD step takes what is picked, in the
## order picked, and waits for more (edit_cad_build.luc).
from tool_record import Tool, ToolEntry, Pick
from edit_types import face_level, patch_level
import pick_kinds
import blend_ops
import edit_cad_build
import cad_cook
pub func entry() -> ToolEntry:
return ToolEntry(blend_ops.fillet_verb, blend_ops.fillet_verb, "surface-fillet", "Surfaces", [cad_cook.context], [cad_cook.edit_kind], made)
func made() -> Tool:
return entry().tool("Modify", "Surface Blends", "A rolling-ball blend between two sets of faces", picks(), blend_ops.rows(blend_ops.fillet_verb), edit_cad_build.cook,
numbers = blend_ops.starting(blend_ops.fillet_verb), waits = waits)
func picks() -> list[Pick]:
return [Pick("First faces", [face_level, patch_level], kind = pick_kinds.words, slot = blend_ops.first_text, step = blend_ops.first_text, doc = "The first set: the faces the ball rolls on one side, kept by their names."),
Pick("Second faces", [face_level, patch_level], kind = pick_kinds.words, slot = blend_ops.second_text, step = blend_ops.second_text, doc = "The second set.")]
func waits(values: list[float], texts: list[str], wired: bool) -> str:
return blend_ops.waits_for(blend_ops.fillet_verb, texts)