pub fn sweep_profile_along_path(
profile: &[NurbsCurve],
path: &NurbsCurve,
name: Option<&str>,
) -> Result<BrepSolid, KernelRefusal>Expand description
Sweep a CLOSED PLANAR profile loop along a path curve (§3.3/§5.7),
TRANSPLANTING the profile onto the path — see SectionPlacement for the
other reading, and for why the choice changes the solid.
Reuses the loft builder rather than a bespoke swept surface: the path is
sampled at STATIONS uniform stations, a rotation-minimizing frame is
propagated along it (double-reflection RMF, Wang et al. 2008 — the frame
does NOT spin at inflections the way raw Frenet does), a rigidly
transformed copy of the profile is placed at each station (identical
degree/knots/weights, only the control points moved — which guarantees
loft’s per-section compatibility), and the stations are lofted through
to produce the tube plus planar end caps.
Guards return a clear Err on an open/non-planar profile, a degenerate
path tangent, or a loft failure. A path that bends TIGHTER than the section
reaches is refused by name before the loft (ρκ ≥ 1, §4c of
[sweep_sections_through_samples]); it used to be out of scope and the
caller’s problem, and what the caller got instead was a wall that passed
through itself.