#[non_exhaustive]pub struct VerticalLayout {
pub entity: EntityId,
/* private fields */
}Expand description
One resolved, ordered vertical profile.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.entity: EntityIdThe IfcAlignmentVertical entity this layout was resolved from.
Implementations§
Source§impl VerticalLayout
impl VerticalLayout
Sourcepub fn resolve(
model: &Model,
entity: EntityId,
units: AlignmentUnits,
) -> AlignmentResult<Self>
pub fn resolve( model: &Model, entity: EntityId, units: AlignmentUnits, ) -> AlignmentResult<Self>
Resolve IfcAlignmentVertical#entity’s nested IfcAlignmentSegment
chain into an ordered profile.
Checks what the segments state directly: they are contiguous and
ascending in StartDistAlong, at the SeamTolerance the model
declares, and a zero-length segment stands only in last place. The
height seam needs each segment’s elevation law and is checked by
profile_law when the profile is lowered. A grade break is recorded
in Self::seams, not refused: IFC4.3 does not require vertical
seams to be tangential.
§Errors
Refuses a model that is not IFC4X3, an entity that is not an
IfcAlignmentVertical, an invalid declared Precision, a layout
nesting no segment, a segment that does not read, a gap or overlap
(AlignmentError::InvalidSegment), and a zero-length segment that
is not last or is the only one (AlignmentError::SemanticViolation).
Sourcepub fn seams(&self) -> &[VerticalSeam]
pub fn seams(&self) -> &[VerticalSeam]
Every seam between consecutive segments of positive length, in order, with how the grade continues across it.
Sourcepub fn require_tangential(&self) -> AlignmentResult<()>
pub fn require_tangential(&self) -> AlignmentResult<()>
Demand a tangent profile: refuse the first grade break.
IFC4.3 does not require vertical seams to be tangential, so
Self::resolve accepts grade breaks. A consumer whose model needs
a continuous grade (a design check, say) asks for it here.
§Errors
AlignmentError::ProfileDiscontinuity with
ProfileSeam::Gradient at the first grade break.
Sourcepub fn segments(&self) -> &[VerticalSegment]
pub fn segments(&self) -> &[VerticalSegment]
Segments in authored (distance-along) order.
Sourcepub fn start_dist_along(&self) -> f64
pub fn start_dist_along(&self) -> f64
Distance along where the profile starts.