Skip to main content

Module session

Module session 

Source
Expand description

One recursive lowering session over one shared graph builder.

§Why a session exists

Recursive lowering appends to a single session-owned builder, and family lowerers return NodeId instead of freezing isolated child graphs (tests/lower_session.rs pins this). That is not a style preference: a NodeId is owned by the graph that minted it, so handles from two independently finished graphs are mutually foreign. Every composite IFC family needs two children in one graph:

  • IfcBooleanResult references two operands,
  • IfcMappedItem reuses one source under many transforms,
  • a B-rep face set shares one surface across many faces,
  • IfcCsgSolid nests operations arbitrarily deep.

The session also carries the model and resolved unit scale that every lowerer needs. Approximation policy is deliberately absent: lowering emits exact neutral geometry, while execution providers own tessellation tolerance.

§What it guarantees

  • One graph. All nodes land in one builder, so any two lowered results are composable.
  • Memoization. A shared IFC entity lowered under the same frame yields the same node instead of a duplicate subtree.
  • Bounded recursion. Cyclic and over-deep chains produce typed errors rather than a stack overflow.
  • Located failures. Graph construction faults are translated into GeometryError values that name the offending IFC entity.

Structs§

LoweringSession
A single recursive lowering pass over one shared graph builder.
SessionLimits
Recursion budget for chained IFC references.

Enums§

DegenerateFacePolicy
What lowering does with an IfcPolyLoop face bound that collapses (#46).