dymokomi/luced-3d
Source of release 0.11.7
0.11.7 / src / tool_square.luc
## Square (Alias's): a surface through four boundaries (curves, edges or
## isoparms), each Free, G0, G1, G2, Implied tangent or curvature, or at a
## Tangent angle, Blend Linear or Cubic (build_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 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.square_verb, build_ops.square_verb, "square-surface", "Surfaces", [cad_cook.context], [cad_cook.edit_kind], made)
func made() -> Tool:
return entry().tool("Modify", "Surface Build", "A surface from four boundaries, each Free, G0, G1, G2, implied or at a tangent angle", picks(), build_ops.rows(build_ops.square_verb), edit_cad_build.cook,
numbers = build_ops.starting(build_ops.square_verb), waits = waits)
func picks() -> list[Pick]:
return [Pick("Boundaries", [curve_level, edge_level], kind = pick_kinds.words, slot = build_ops.curves_text, step = build_ops.curves_text, most = 4, doc = "The four boundaries, curves or edges (or isoparms), in the order the Boundary rows follow.")]
func waits(values: list[float], texts: list[str], wired: bool) -> str:
return build_ops.waits_for(build_ops.square_verb, texts, build_ops.spined(build_ops.square_verb, values))