Skip to main content

lower_horizontal_plan

Function lower_horizontal_plan 

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

Lower an IfcAlignmentHorizontal to one exact plan curve.

The curve is a Curve2::Intrinsic anchored at the first segment and carrying one curvature piece per segment, so it is parameterised by distance along the plan and needs no interior position. A single-segment layout yields that segment’s law without a piecewise wrapper. A layout with a CUBIC is a Curve2::Chain of the same pieces, the cubic as a parametric piece read by arc length.

cant is needed only by a VIENNESEBEND, whose law depends on the cant swing across it.

§Errors

Refuses a layout with no segments, any segment without an exact law (as lower_horizontal_layout does), a heading kink at any seam whose predecessor has a curvature law, and a position gap at a seam whose predecessor has a closed-form end point. A seam after a transition spiral or a CUBIC is not refused; it is reported in HorizontalPlan::seams as unverified.

The zero-length segment IFC4.3 requires at the end of a layout adds no piece; its start is checked against the curve’s end like any seam, and that seam is reported last. A zero-length segment anywhere else, or as the only segment, is refused (AlignmentError::SemanticViolation).