pub struct PartialHorizontalLayout {
pub runs: Vec<LoweredAlignmentCurve>,
pub refused: Vec<RefusedSegment>,
pub segment_count: usize,
}Expand description
A horizontal layout lowered as far as exactness allows.
Real railway and highway alignments interleave transition spirals between their lines and arcs, so an all-or-nothing lowering refuses essentially every production file. This result keeps what is exactly lowerable and names what is not, instead of collapsing both into one opaque error.
runs holds maximal stretches of consecutive lowerable segments, each
assembled into a single composite exactly as lower_horizontal_layout
would. A run ends wherever a segment is refused: continuity across a
segment this crate did not lower is not a fact it is entitled to assert.
Fields§
§runs: Vec<LoweredAlignmentCurve>Maximal runs of consecutive exactly-lowered segments, in authored order.
refused: Vec<RefusedSegment>Refused segments in authored order.
segment_count: usizeTotal segments nested by the layout, lowered or not.
Implementations§
Source§impl PartialHorizontalLayout
impl PartialHorizontalLayout
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Whether every segment lowered exactly.
When true the layout is covered by exactly one run, matching what
lower_horizontal_layout returns.
Sourcepub fn lowered_count(&self) -> usize
pub fn lowered_count(&self) -> usize
Number of segments lowered exactly.