dymokomi/luced-3d
Source of release 0.11.8
## Close (Alias's): a curve closed, a G2 blend span bridging the gap with
## Preserve shape, else its ends meeting halfway (G1).
## An Edit CAD step on the curves picked at the Curves level
## (edit_cad_curves.luc).
from tool_record import Tool, ToolEntry, Pick
from parameter_rows import Parameter, toggle
from edit_types import curve_level
import pick_kinds
import edit_cad_curves
import cad_cook
pub func entry() -> ToolEntry:
return ToolEntry(edit_cad_curves.close_verb, edit_cad_curves.close_verb, "close-curve", "Curves", [], [cad_cook.edit_kind], made, verb = edit_cad_curves.close_verb)
func made() -> Tool:
return entry().tool("Modify", "Curves", "Close a curve, keeping its shape with a blend span or meeting its ends halfway", [Pick("Curves", [curve_level], kind = pick_kinds.curves, slot = pick_kinds.nowhere)], rows(), edit_cad_curves.cook,
numbers = [1.0])
func rows() -> list[Parameter]:
return [toggle("Preserve shape", 0, 1.0, "On: a G2 blend span closes the gap and the curve keeps its shape. Off: its ends move to meet halfway (G1).")]