Skip to main content

cant_at

Function cant_at 

Source
pub fn cant_at(
    segment: &CantSegment,
    xi: f64,
    rail_head_distance: Option<f64>,
) -> AlignmentResult<CantAtStation>
Expand description

Evaluate a cant segment’s exact D(ξ) for both rails.

xi is the normalized position along the segment, 0.0 at StartDistAlong and 1.0 at StartDistAlong + HorizontalLength, matching the spec’s own ξ = s / L parameterization.

rail_head_distance is the parent IfcAlignmentCant.RailHeadDistance; only VIENNESEBEND uses it, but every caller passes the parent’s declared value so a caller building a chain cannot forget it for the one type that needs it.

A VIENNESEBEND is evaluated for the section’s cant D = left - right and its rails placed about a rotation point that stays put, or held on a rail that keeps its height (see the module documentation). Here the heights are compared to floating-point rounding (SeamTolerance::strict); CantLayout::cant_at_distance compares them at the model’s declared precision, as the banked lowering does.

§Errors