Skip to main content

plane_extrusion_at_rims

Function plane_extrusion_at_rims 

Source
pub fn plane_extrusion_at_rims(
    a: &SurfaceGeometry,
    b: &SurfaceGeometry,
    tol: Tolerances,
) -> Option<Vec<SectionCurve>>
Expand description

Where a plane meets an extrusion of a B-spline profile whose heights to the plane straddle an end of the sweep, the section split where it crosses the rim there: None for any other pair, which intersect_surfaces answers as before, and where a crossing is not resolved cleanly.

The profile’s crossings with the plane moved to the sweep’s end are the roots of a polynomial B-spline, isolated on its Bernstein coefficients and bisected to rounding; each stretch of the profile whose height stays within the sweep is carried onto the plane in closed form and ends exactly on the rim, and a stretch past the end, where the section leaves the extrusion, is dropped.