dymokomi/luced-3d
Source of release 0.11.9
0.11.9 / src / tool_sketch_plane.luc
## Redefine Sketch Plane (Fusion's), Edit CAD's step putting one of its
## sketches onto another flat face or an origin plane; the drawing keeps its
## own coordinates (edit_cad_sketches.luc). Its command makes the step,
## waiting for the face when none is selected.
from tool_record import Tool, ToolEntry, Pick, Invocation
from geometry_data import GeometryData
from edit_types import face_level
import pick_kinds
import edit_cad_sketches
import tool_sketch
import cad_cook
pub func entry() -> ToolEntry:
return ToolEntry(edit_cad_sketches.plane_verb, "Redefine Sketch Plane", "sketch-plane", "Sketch", [], [cad_cook.edit_kind], made)
func made() -> Tool:
return entry().tool("Create", "Sketch", "Put a sketch onto another flat face or an origin plane",
[Pick("Plane face", [face_level], "Click the flat face to put the sketch on (or choose an origin plane in the tool bar, then Enter); Esc cancels",
kind = pick_kinds.face, slot = pick_kinds.nowhere, step = 1)], tool_sketch.rows(), cook, gesture = "sketch")
func cook(call: Invocation, data: GeometryData, tag: str) -> GeometryData!:
return edit_cad_sketches.sketched(cad_cook.step_of(call), data)