Skip to main content

Module edge

Module edge 

Source
Expand description

Analytic edge resolution: turn a pair of leaf faces into a verified edge curve on the final solid, or a typed rejection.

Supported curves (v1): straight lines (plane ∩ plane, incl. cube edges) and full circles (cylinder/cone rims, plane ∩ cylinder-side with the plane ⊥ axis, plane ∩ sphere, plane ∩ cone-side ⊥ axis). Everything else is rejected with a reason a frontend can show (EdgeReject::message).

Leaf transforms may scale round surfaces arbitrarily: axisymmetric scale about the leaf’s own axis keeps the curves circular in the evaluation frame ([axisymmetric_scale]); anisotropic scale makes them elliptical, so resolution retries in the leaf’s local frame where they are exact circles again, and the result carries that frame (CircularEdge::frame — the world curve is its affine image). Only pairs mixing two differently anisotropic round leaves reject (EdgeReject::NonUniformScale).

Resolution is verified against the final solid, not just the two surfaces: sample points along the candidate curve must lie on the actual boundary (membership probes straddling the edge bisector), and the surviving side of each face is found by probing — so an edge fully consumed by a boolean resolves to nothing, and a partially consumed straight edge is trimmed to its longest surviving run. Circles must survive at every sample (no partial-arc features in v1).

Convexity is classified geometrically from the probed face directions: with d̂A pointing along face A’s surviving surface away from the edge, the edge is convex iff d̂A·n̂B < 0 (the faces bend away from each other). Both faces must agree. Straight concave edges are rejected in v1; concave circles (boss-base rings) resolve fine — fillet lowering uses them.

Structs§

CircularEdge
A verified full-circle edge (rim), in frame coordinates.
StraightEdge
A verified straight edge on the final solid, in the evaluation frame.

Enums§

Convexity
Whether material bends away from (convex) or wraps around (concave) an edge, on the final solid.
EdgeGeom
Resolved edge geometry, in the evaluation frame.
EdgeReject
Why an edge candidate did not resolve. Frontends surface message verbatim.

Functions§

csg_aabb
Evaluation-frame AABB over every leaf (probe scaling).
leaf_face_tags
Face tags a leaf primitive exposes (candidate enumeration).
leaf_flipped
Per-leaf orientation: true when the leaf sits under an odd number of Difference subtrahend positions, so its surfaces bound the final solid with inverted normals (hole walls).
resolve_edge
Resolve the edge where faces (leaf_a, face_a) and (leaf_b, face_b) meet on the final solid. See the module docs for what resolves and why things reject.