MAX_MAPPED_ITEM_DEPTH

Constant MAX_MAPPED_ITEM_DEPTH 

Source
pub const MAX_MAPPED_ITEM_DEPTH: u32 = 32;
Expand description

Maximum IfcMappedItem → IfcRepresentationMap → MappedRepresentation.Items nesting any walk in this workspace will follow.

Shared because three crates walk the SAME chain and their bounds must agree: ifc_lite_processing::element, ifc_lite_geometry::router::processing and ifc-lite-wasm’s styling colour resolver.

Disagreement fails SILENTLY, which is why it is worth making structural. A mid-review revision of #2864 held 16 against the router’s 32: an element whose chain was 17 to 32 links long would have rendered its geometry and quietly lost its authored colour. That was caught before merge and never shipped — the point is that nothing except a reviewer’s attention was stopping it.

ifc_lite_processing::symbolic::item_walk::MAX_ITEM_DEPTH also walks this chain and asserts equality with this constant, but deliberately keeps its own name: it charges depth + 1 for IfcGeometricSet elements and IfcCompositeCurve segments as well, so an equal number does not mean equal reach. It is never more permissive than this one.

A walk over this chain also needs a cycle guard; the cap alone is not sufficient (see the module docs above for which kind).