Skip to main content

lower_horizontal_layout_partial

Function lower_horizontal_layout_partial 

Source
pub fn lower_horizontal_layout_partial(
    model: &Model,
    entity: EntityId,
    units: AlignmentUnits,
    cant: Option<&CantLayout>,
) -> AlignmentResult<PartialHorizontalLayout>
Expand description

Lower a horizontal layout as far as exactness allows, reporting refusals.

Unlike lower_horizontal_layout, a transition spiral does not abort the whole layout. Lines and circular arcs around it still lower exactly; the spiral is recorded in PartialHorizontalLayout::refused with its authored type name and entity id.

Nothing here is approximated. A refused segment stays refused – this reports the boundary per segment instead of collapsing an entire production alignment into one opaque error.

Errors that are not a lowering refusal (a wrong entity type, a malformed attribute, an empty layout) still fail the whole call, because they mean the layout could not be read at all rather than that one segment resisted exact lowering.