pub fn sweep_profile_along_chain(
profile: &[NurbsCurve],
path: &SweepPath,
twist_angle: f64,
name: Option<&str>,
anchor: Option<ProfileAnchor>,
placement_mode: SectionPlacement,
corner_advice: &str,
) -> Result<BrepSolid, KernelRefusal>Expand description
Sweep a CLOSED PLANAR profile along a CHAIN of path curves joined head-to-tail — the multi-segment entry point, with the twist and anchor options the single-curve family exposes as separate functions folded into one signature (the feature layer picks all three per loop, so splitting them four ways here would only push the same match into the caller).
path carries the chain AND its classification (SweepPath): the segment
names for the joint refusal (a short or empty name list degrades to
<unnamed> rather than failing), whether the run is CLOSED, the plane it lies
in if it lies in one, and the continuity of every joint. The refusals below
READ that classification rather than each re-deriving it — the corner gate no
longer measures its own tangent break while sampling, and closure is a
property of the path rather than something the sampler notices about its first
and last station.
corner_advice is appended to the cornered-joint refusal and is the CALLER’s
to write, because the builder has two callers with different answers: path
sweep sends the user to SW (a different feature), while SW’s own pathAlign
sends them to its translate mode. A builder that named one feature would be
telling half its users to switch to the feature they are already in.
A ONE-segment OPEN chain delegates to the single-curve builders unchanged, so the geometry every existing path sweep emits is untouched by this entry point existing — the multi-segment sampler is reached only by a path that actually has a joint. A one-segment CLOSED chain (a resident circular edge) does NOT delegate: the single-curve samplers cap both ends, which is exactly what a ring must not do.
A CORNER (a joint past MAX_JOINT_TANGENT_BREAK) selects the MITRE lane
when every segment is straight — see sweep_topology/miter.rs for the
construction and [CornerPolicy] for why this entry mitres while
sweep_profile_along_chain_with_stations refuses. A CLOSED cornered
polyline is a picture FRAME: its closing joint is a mitre like the rest and
the result has no caps. A corner at a CURVED segment is refused by name.