dymokomi/luced-3d
Source of release 0.11.7
0.11.7 / src / tool_extend.luc
## Extend (Alias's): a surface's edge or a curve's end carried on, Linear,
## Natural, Soft or Reflective, by a distance or a percentage
## (build_ops.luc). The node keeps its edge as its face and where it was
## clicked; an Edit CAD step extends the edge or curve end picked.
from tool_record import Tool, ToolEntry, Pick
from edit_types import edge_level, curve_level
import pick_kinds
import build_ops
import edit_cad_build
import cad_cook
pub func entry() -> ToolEntry:
return ToolEntry(build_ops.extend_verb, build_ops.extend_verb, "extend-surface", "Surfaces", [cad_cook.context], [cad_cook.edit_kind], made)
func made() -> Tool:
return entry().tool("Modify", "Surface Build", "Carry a surface's edge or a curve's end on, by a distance or a percentage", picks(), build_ops.rows(build_ops.extend_verb), edit_cad_build.cook,
numbers = build_ops.starting(build_ops.extend_verb), waits = waits)
func picks() -> list[Pick]:
return [Pick("Edge", [edge_level, curve_level], "Extend: select a surface's edge (Edges level) or a curve near its end (Curves level) first", kind = pick_kinds.align_input,
slot = build_ops.curves_text, step = build_ops.curves_text,
doc = "The surface's edge to carry on (at the Curves level, a curve's end), kept as its face and where it was clicked.")]
func waits(values: list[float], texts: list[str], wired: bool) -> str:
return build_ops.waits_for(build_ops.extend_verb, texts)