Expand description
Project solid edges into a sketch as fixed construction references.
Projected polylines become lines, circles, arcs, or line-chain fallbacks. Ground constraints pin the generated points. Edge names identify persisted references, so picking an edge again updates its coordinates in place.
Structs§
- External
Ref - A per-session external-reference mapping: the linked scene edge (by name + owning
solid) and the sketch entities materialized for it. Persisted to / loaded from
persistentData.externalRefsso a linked edge round-trips a commit + re-enter.
Enums§
- Edge
Link - The classification of a projected edge polyline, in plane
(u, v)coordinates.
Functions§
- add_
external_ ref - Materialize an
EdgeLinkinto the doc: push external-ref points (fixed,construction,externalReference) with a⏚ground each, then the construction geometry referencing them. Returns(point_ids, geom_ids). - classify_
uv - Classify a projected polyline (in plane
(u, v)) as a straight line, a circle / arc, or a polyline fallback. Tolerances are RELATIVE to the polyline’s extent so the same thresholds work at any sketch scale: - link_
or_ update - Link (or update) a picked scene edge into the sketch as an external reference.
- project_
polyline - Project a world-space polyline into the plane’s
(u, v)frame (orthogonal projection; the off-plane component is dropped). Mirrors the previous world→UV projection applied per vertex. - prune_
dead_ refs - Drop every external-reference entry whose materialized entities no longer resolve
in
doc— i.e. the linked edge’s points / geometry were deleted. A dropped entry frees itsedge_nameso the SAME edge can be RE-LINKED: without this, the stale entry (keyed byedge_name, holding now-danglingpoint_ids) makeslink_or_update’s dedup take the “structure matches” branch, find every point missing (doc.point_mut→None), and returnfalse— permanently blocking the re-link. Called both after a delete AND on sketch-enter (to heal docs already poisoned by that pre-fix delete). Returns whether any entry was pruned.