Expand description
Spatial hierarchy extraction.
Split across three files (#3965 follow-up, to stay under the module-size
ratchet): this file builds the relationship maps (canonical_parent,
spatial_children_map, element_containment_map) and drives the
orphan-fill pass; spatial_tree.rs walks those maps into SpatialNodes
with the cycle/depth guards; spatial_elevation.rs reads
IfcBuildingStorey.Elevation. spatial_tests.rs stays attached to this
file and exercises functions from all three via use super::* plus the
re-exports below.
Modulesยง
- spatial_
canonical_ ๐parent - Cycle-safe canonical-parent resolution, split out of
spatial.rs(same reasonspatial_elevation.rs,spatial_invariant.rsandspatial_tree.rsalready are: stay under the module-size ratchet). Mirrorspackages/parser/src/spatial-hierarchy-canonical-parent.ts, which split the same concern out ofspatial-hierarchy-builder.tsfor the same reason. - spatial_
elevation ๐ - Storey-elevation extraction, split out of
spatial.rs(#3965 follow-up): readingIfcBuildingStorey.Elevation, with theObjectPlacementZ fallback, is a self-contained concern the tree-building code merely calls into.spatial_tests.rs(attached to the parentspatialmodule, not this one) exercises these functions directly viause super::*. - spatial_
invariant ๐ - Structural invariant over a finished spatial-node set, split out of
spatial.rsto stay under the module-size ratchet (the same reasonspatial_tree.rsandspatial_elevation.rsexist). - spatial_
lookups ๐ - The element -> spatial-container lookup tables of
SpatialHierarchyData(element_to_storeyand friends), split out ofspatial.rsfor the module-size ratchet. Built after the node tree so the storey ruling can tell a project-reachable storey from a rescued orphan (#4310). - spatial_
tree ๐ - Cycle- and depth-guarded spatial-tree assembly, split out of
spatial.rs(#3965 follow-up): walkingspatial_children_mapintoSpatialNodes is a self-contained concern once the relationship maps have been built.spatial_tests.rs(attached to the parentspatialmodule, not this one) exercisesbuild_spatial_nodes_recursivedirectly viause super::*.
Functionsยง
- build_
spatial_ ๐hierarchy - Build spatial hierarchy from relationships.