pub enum ElementRole {
Segment,
Fitting,
Terminal,
Controller,
MovingDevice,
StorageDevice,
TreatmentDevice,
EnergyConversionDevice,
Other,
}Expand description
What kind of flow element this is, by schema ancestry.
Variants§
Segment
IfcFlowSegment – pipe, duct, cable. Carries flow between two points.
Fitting
IfcFlowFitting – elbow, tee, reducer. Joins segments.
Terminal
IfcFlowTerminal – radiator, diffuser, outlet. An endpoint.
Controller
IfcFlowController – valve, damper, switch.
MovingDevice
IfcFlowMovingDevice – pump, fan.
StorageDevice
IfcFlowStorageDevice – tank, cylinder.
TreatmentDevice
IfcFlowTreatmentDevice – filter, interceptor.
EnergyConversionDevice
IfcEnergyConversionDevice – boiler, chiller, heat exchanger.
Other
A distribution element with no more specific flow role.
Implementations§
Source§impl ElementRole
impl ElementRole
Sourcepub fn of(
model: &Model,
element: EntityId,
) -> Result<Option<Self>, SchemaResolutionError>
pub fn of( model: &Model, element: EntityId, ) -> Result<Option<Self>, SchemaResolutionError>
Classify an element by walking its supertype chain.
Ancestry, not exact type: a file states IfcPipeSegment, never
IfcFlowSegment, because the concrete subtypes are what exporters
write. An exact-type match finds nothing in a real file.
Ancestry is read against the release the model declares. IFC2X3 has
no IfcPipeSegment: its files state IfcFlowSegment itself, and a
record name the declared release does not define has no role.
Ok(None) when element is absent or not a distribution element.
§Errors
SchemaResolutionError when the model’s FILE_SCHEMA binds no
release this crate is verified for (see crate::schema_of).
Sourcepub fn is_endpoint(self) -> bool
pub fn is_endpoint(self) -> bool
Whether this role is expected to terminate a run rather than pass through.
Advisory only. A terminal with two ports is unusual, not illegal, and this is used to describe a file rather than to reject one.