#[non_exhaustive]pub struct CantLayout {
pub entity: EntityId,
pub rail_head_distance: f64,
/* private fields */
}Expand description
One resolved, ordered, continuity-checked cant 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 IfcAlignmentCant entity this layout was resolved from.
rail_head_distance: f64RailHeadDistance: track gauge used to convert cant to superelevation
angle, in metres.
Implementations§
Source§impl CantLayout
impl CantLayout
Sourcepub fn frame_at_distance(
&self,
distance_along: f64,
) -> AlignmentResult<CantFrame>
pub fn frame_at_distance( &self, distance_along: f64, ) -> AlignmentResult<CantFrame>
The cant cross-section at an absolute distance along.
§Errors
Refuses a distance outside the profile’s span, a segment whose cant
cannot be evaluated exactly, and a cant exceeding the
RailHeadDistance (|D| > b, no real bank angle).
Source§impl CantLayout
impl CantLayout
Sourcepub fn resolve(
model: &Model,
entity: EntityId,
units: AlignmentUnits,
) -> AlignmentResult<Self>
pub fn resolve( model: &Model, entity: EntityId, units: AlignmentUnits, ) -> AlignmentResult<Self>
Resolve IfcAlignmentCant#entity’s nested IfcAlignmentSegment
chain into an ordered, continuity-checked cant profile.
The zero-length segment IFC4.3 requires at the end of a layout is
kept in Self::segments; its station and start cant are checked
against the previous segment’s end like any seam. A zero-length
segment anywhere else, or as the only segment, is refused
(AlignmentError::SemanticViolation).
Sourcepub fn for_alignment(
model: &Model,
alignment: EntityId,
units: AlignmentUnits,
) -> AlignmentResult<Self>
pub fn for_alignment( model: &Model, alignment: EntityId, units: AlignmentUnits, ) -> AlignmentResult<Self>
The cant layout of IfcAlignment#alignment.
Unlike the gradient-curve composition, where a road without cant is
ordinary, this is the call for work that NEEDS cant (the section
frames, the IfcSegmentedReferenceCurve role), so its absence is a
refusal rather than None.
§Errors
Refuses a model that is not IFC4X3, an entity that is not an
IfcAlignment, an alignment nesting no IfcAlignmentCant or several
of them (SemanticViolation: picking one would silently choose a
track), and everything Self::resolve refuses.
Sourcepub fn segments(&self) -> &[CantSegment]
pub fn segments(&self) -> &[CantSegment]
Segments in authored (distance-along) order.
Sourcepub fn cant_at_distance(
&self,
distance_along: f64,
) -> AlignmentResult<CantAtStation>
pub fn cant_at_distance( &self, distance_along: f64, ) -> AlignmentResult<CantAtStation>
Cant at an absolute distance-along value within this profile’s span.