dymokomi/luced-3d
Source of release 0.11.8
0.11.8 / src / tool_cv_curve.luc
## CV Curve (Alias's): clicks place a curve's control points, Enter
## finishes; degree 5 by default.
## An Edit CAD step (edit_cad_curves.luc): with nothing selected the
## clicks place its points (placing_commands.luc).
from tool_record import Tool, ToolEntry, Pick
from parameter_rows import Parameter, whole
import pick_kinds
import edit_cad_curves
import cad_cook
pub func entry() -> ToolEntry:
return ToolEntry(edit_cad_curves.cv_verb, edit_cad_curves.cv_verb, "cv-curve", "Curves", [], [cad_cook.edit_kind], made)
func made() -> Tool:
let rows: list[Parameter] = [whole("Degree", 0, 5.0, 1.0, 11.0, "The curve's degree (lowered to what its points allow): 5 by default, Alias's 3 or 7 on request.")]
return entry().tool("Create", "Curves", "A curve through clicked control points, degree 5 by default", [Pick("Points", [-1], kind = pick_kinds.components, slot = pick_kinds.nowhere)], rows, edit_cad_curves.cook,
numbers = [5.0], gesture = "place")