Variable ifcSpatialHierarchyConst

ifcSpatialHierarchy: inspect.dataModel.Inspection = ...

Opt-in via InspectDataModelParams.checkIfcSpatialHierarchy.

Walks the IFC spatial-structure chain and checks:

  • Exactly one IfcProject. Zero is IFC_NO_PROJECT; more than one is IFC_MULTIPLE_PROJECTS.
  • IfcProject is the root — never a child in any aggregation relationship (IFC_PROJECT_HAS_PARENT).
  • Each IfcSite / IfcBuilding / IfcBuildingStorey / IfcSpace has a parent of an allowed type (IFC_SPATIAL_PARENT_TYPE_MISMATCH), or no parent at all (IFC_SPATIAL_ORPHAN).

Allowed-parents map defaults to the canonical IFC4 chain:

IfcSiteIfcProject
IfcBuildingIfcSite, IfcProject
IfcBuildingStoreyIfcBuilding
IfcSpaceIfcBuildingStorey, IfcBuilding

Override per-project via InspectDataModelParams.ifcSpatialParents.