pub struct AlignmentView<'m> { /* private fields */ }Expand description
A model whose declared schema has been pinned to IFC4X3 ADD2.
Holding the schema alongside the model lets traversal use is_a for
subtype-aware queries instead of exact type-name matching.
Implementations§
Source§impl<'m> AlignmentView<'m>
impl<'m> AlignmentView<'m>
Sourcepub fn alignments(&self) -> Vec<EntityId>
pub fn alignments(&self) -> Vec<EntityId>
Every IfcAlignment in the model, in file order.
Sourcepub fn hierarchy(
&self,
alignment: EntityId,
) -> AlignmentResult<AlignmentHierarchy>
pub fn hierarchy( &self, alignment: EntityId, ) -> AlignmentResult<AlignmentHierarchy>
The hierarchy of one IfcAlignment.
§Errors
Refuses an id that is missing or not an IfcAlignment
(AlignmentError::WrongType); a malformed or dangling relationship;
the same object nested twice; and an alignment aggregated by more
than one relationship (Decomposes is SET [0:1]).
Sourcepub fn parent_alignment(
&self,
alignment: EntityId,
) -> AlignmentResult<Option<EntityId>>
pub fn parent_alignment( &self, alignment: EntityId, ) -> AlignmentResult<Option<EntityId>>
Sourcepub fn governing_horizontal(
&self,
alignment: EntityId,
) -> AlignmentResult<Option<EntityId>>
pub fn governing_horizontal( &self, alignment: EntityId, ) -> AlignmentResult<Option<EntityId>>
The horizontal layout that governs alignment: its own, or, for a
child alignment that nests none, the nearest ancestor’s (“Alignment
Layout - Reusing Horizontal Layout”). None when no alignment on the
way up nests one.
§Errors
As Self::hierarchy, plus several horizontal layouts on the
governing alignment and an aggregation cycle.
Sourcepub fn layout_segments(
&self,
layout: EntityId,
) -> AlignmentResult<Vec<EntityId>>
pub fn layout_segments( &self, layout: EntityId, ) -> AlignmentResult<Vec<EntityId>>
The parameter segments of one layout (IfcAlignmentHorizontal,
IfcAlignmentVertical or IfcAlignmentCant), in nesting order.
Each id is the IfcAlignmentSegment.DesignParameters target, ready
for read_horizontal_segment, read_vertical_segment or
read_cant_segment.
§Errors
Refuses an id that is not one of the three layouts, a segment listed
twice, and a DesignParameters of the wrong family.
Source§impl<'m> AlignmentView<'m>
impl<'m> AlignmentView<'m>
Sourcepub fn for_model(model: &'m Model) -> AlignmentResult<Self>
pub fn for_model(model: &'m Model) -> AlignmentResult<Self>
Pin the model’s declared schema and confirm it is IFC4X3.