Skip to main content

Module feature

Module feature 

Source
Expand description

Sub-object (face/edge) topology for direct modeling.

CSG trees have no persistent face/edge identity: meshes are regenerated wholesale and carry no provenance. This module derives that identity analytically from the tree itself — faces are named per-primitive (FaceTag), leaves are addressed by structural LeafPaths, and geom evaluates rays/membership against the tree exactly, independent of the active render backend (mesh or SDF ray-march).

Modules§

edge
Analytic edge resolution: turn a pair of leaf faces into a verified edge curve on the final solid, or a typed rejection.
geom
Analytic ray/membership evaluation of a DynamicObject tree.
lower
Lower an EdgeFeatureData into pure-CSG masks against its child.

Structs§

CircularEdge
A verified full-circle edge (rim), in frame coordinates.
CsgLeaves
Flattened analytic model of one tree: primitive leaves + boolean structure.
EdgeFeatureData
Payload of an EdgeFeature node: which edges to feature and how. Edges are re-resolved against the current child geometry every evaluation, so the feature follows parameter edits; unresolvable edges are skipped.
EdgeSel
An edge, identified as the intersection curve of two faces. Stored in canonical (sorted) order so the same edge always compares equal.
FaceRef
A face of a specific leaf, addressed structurally (survives node-id churn and scene save/load).
GeomLeaf
A primitive leaf with its accumulated world transform.
HitBoundary
One surface crossing along a ray.
HitSpan
A solid stretch of the ray: enter.t < exit.t.
LeafPath
Structural address of a leaf inside a subtree, independent of node ids.
LowerReport
What a lowering pass did — callers log/report the skip count.
LoweredMasks
Masks for one lowering pass, in the child’s frame: sub cuts material (chamfers, convex fillets), add fills it in (concave ring fillets).
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.
CsgExpr
Boolean structure over leaf indices into CsgLeaves::leaves.
EdgeFeatureKind
Which feature an EdgeFeature node applies to its edges.
EdgeGeom
Resolved edge geometry, in the evaluation frame.
EdgeReject
Why an edge candidate did not resolve. Frontends surface message verbatim.
FaceTag
A face of a supported primitive, named in the primitive’s local frame.
LeafPrim
A supported primitive in its local frame.

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).
lower
Lower data against child: subtract the cut masks, union the fill masks, or pass the child through unchanged when nothing resolves.
lower_masks
The masks for data against child, in the child’s frame. Unresolvable/unsupported edges are skipped and counted.
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.

Type Aliases§

AabbHint
Callback supplying a conservative local-space AABB for a subtree this module cannot evaluate analytically (sketch/extrude/revolve/offset based). Returning None drops the subtree from the model (it stops occluding).