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 segment without an exact law (such as CUBIC) does not abort the whole layout. The segments around it still lower exactly; the refused one is recorded in PartialHorizontalLayout::refused with its authored type name and entity id. Seams are checked by the same rule as the strict path.

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, a zero-length segment before the end) still fail the whole call, because they mean the layout could not be read at all rather than that one segment resisted exact lowering.

The closing zero-length segment IFC4.3 requires is neither lowered nor refused: it adds no geometry, counts in PartialHorizontalLayout::segment_count and PartialHorizontalLayout::lowered_count, and its seam is reported on the last run when the segment before it was lowered.