#[non_exhaustive]pub enum SystemAnomaly {
Dangling {
relation: EntityId,
missing: EntityId,
},
ZoneMemberNotSpatial {
relation: EntityId,
zone: EntityId,
member: EntityId,
type_name: String,
},
ContainedTwice {
element: EntityId,
first: EntityId,
second: EntityId,
},
PortAttachedTwice {
port: EntityId,
kept: EntityId,
rejected: EntityId,
},
NotAPort {
relation: EntityId,
entity: EntityId,
type_name: String,
},
NotASystem {
relation: EntityId,
group: EntityId,
type_name: String,
},
ServicesBuildingsTwice {
system: EntityId,
kept: EntityId,
rejected: EntityId,
},
ServicedNotSpatial {
relation: EntityId,
target: EntityId,
type_name: String,
},
}Expand description
A system membership the file states but cannot support.
Anomalies are collected instead of rejected: a file with one broken relationship still has a usable system graph, and refusing the whole model would make the crate useless on real exports.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Dangling
A relationship names an entity that is not in the file.
Fields
ZoneMemberNotSpatial
An IfcZone member that WR1 does not permit.
WR1 restricts zone members to IfcZone, IfcSpace and
IfcSpatialZone. Anything else makes the file invalid, so it is
reported and excluded rather than silently listed as zone content.
Fields
ContainedTwice
An element contained by two different spatial structures.
ContainedInStructure is SET [0:1]: an element has one home. Two
cannot both be true, so the first by id wins and the conflict is
stated rather than silently resolved.
Fields
PortAttachedTwice
A port is attached to two different elements.
IfcPort.ContainedIn is SET [0:1] in the schema, so this cannot be
expressed by a valid file. It happens when an exporter writes both an
IfcRelNests and a legacy IfcRelConnectsPortToElement that disagree.
The first attachment in file order is kept so the result stays
deterministic, and the conflict is reported rather than hidden.
Fields
NotAPort
A connection names a port that is not an IfcPort subtype.
IfcRelConnectsPorts is typed to IfcPort in the schema, so this is a
malformed file rather than a modelling choice.
Fields
NotASystem
IfcRelAssignsToGroup whose RelatingGroup is not a system, or an
IfcRelServicesBuildings whose RelatingSystem is not one.
The group relationship is shared with every other kind of group, so a membership may legitimately point at something this crate does not model. It is recorded rather than silently dropped.
Fields
ServicesBuildingsTwice
A system states more than one IfcRelServicesBuildings (#230).
IfcSystem.ServicesBuildings is SET [0:1] in IFC2X3, IFC4 and
IFC4X3. The lowest relationship id is kept so the result is
deterministic, and every further one is reported here and not read.
Fields
ServicedNotSpatial
A system-service relationship names a served structure the declared release does not admit there (#230).
IfcRelServicesBuildings.RelatedBuildings takes an
IfcSpatialStructureElement in IFC2X3 and an IfcSpatialElement in
IFC4 and IFC4X3; the IFC4X3 ServicesFacilities reference’s
RelatingStructure takes an IfcSpatialElement. The target is
reported and left out.