Skip to main content

sweep_closure

Function sweep_closure 

Source
pub fn sweep_closure(
    profile: &[NurbsCurve],
    path: &SweepPath,
    placement_mode: SectionPlacement,
    stations: usize,
    twist_angle: f64,
) -> Result<Option<SweepClosure>, KernelRefusal>
Expand description

The CLOSURE a sweep of profile along path applies — the frame-closure policy’s report, exposed so a caller can read the twist a closed sweep laid down (see SweepClosure). None for an OPEN path, which has no lap to close.

Reads the very construction the sweep builds, not a second measurement of it: a cornered polyline asks the mitre lane’s own frame plan (its placed section, its rings, its weld floor), and any other closed path asks the smooth lane’s own stations and frames at stations — the budget the sweep was given (32 for sweep_profile_along_chain untwisted, the caller’s for sweep_profile_along_chain_with_stations). Whatever the builder would refuse, this refuses with the same words, a requested twist_angle that does not close included.