#[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 (including the inside of a Viennese bend
whose rotation point moves with neither rail held,
AlignmentError::Unsupported), 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).
A layout with a VIENNESEBEND also reads the model’s declared
precision (SeamTolerance::for_model), the tolerance its rotation
points are compared at, and refuses what that refuses.
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.
Each segment evaluates as cant_at does; a
VIENNESEBEND’s rotation points are compared at the model’s declared
precision, as the banked lowering compares them.
§Errors
Refuses a non-finite distance or one outside the profile’s span, and
everything cant_at refuses, including the
inside of a Viennese bend whose rotation point moves with neither
rail held.
Trait Implementations§
Source§impl Clone for CantLayout
impl Clone for CantLayout
Source§fn clone(&self) -> CantLayout
fn clone(&self) -> CantLayout
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more