pub enum SpatialKind {
Project,
Site,
Building,
Storey,
Space,
OtherContainer,
Element,
}Expand description
The spatial role of an entity, as far as containment is concerned.
This is a structural classification, not a schema subtype check: it asks
“can this contain things, and roughly at what level”, which is what tree
assembly needs. A full subtype test needs ifc-schema and belongs in a
validation pass.
Variants§
Project
IfcProject – the root. A conformant file has exactly one.
Site
IfcSite.
Building
IfcBuilding.
Storey
IfcBuildingStorey.
Space
IfcSpace.
OtherContainer
Any other spatial container, including IFC4x3 facility types such as
IfcBridge and IfcRoad, which are recognised by suffix so this crate
does not need a per-version type list.
Element
A physical element: wall, door, slab. Contained, never a container.
Implementations§
Source§impl SpatialKind
impl SpatialKind
Sourcepub fn classify(type_name: &str) -> Self
pub fn classify(type_name: &str) -> Self
Classify a STEP type name.
Unknown types are Element: an entity that no
relationship names as a container is a leaf, and treating it as one
keeps unfamiliar IFC4x3 or vendor types in the tree rather than
dropping them.
Sourcepub const fn is_container(self) -> bool
pub const fn is_container(self) -> bool
Whether entities of this kind can contain others.