pub fn make_pipe_shell(
model: &mut Model,
profile: &Shape,
spine: &Shape,
frenet: bool,
tolerance: f64,
tol: Tolerances,
) -> OgeomResult<Built>Expand description
Sweep a planar profile (a wire, or a face whose holes ride along) down an arbitrary spine, one skinned wall per profile loop.
The spine may be a single edge or a wire of edges of any curve the
vocabulary evaluates: lines, arcs, splines, helices. Frames along it are
rotation-minimizing by default (the double-reflection construction), so
the profile neither twists nor kinks where the spine bends; frenet
asks for the Frenet frame instead, which turns with the spine’s own
curvature, the law a thread wants. Stations are placed by each edge’s
own turning, the skin holds every transported section to tolerance,
and the caps sit perpendicular to the spine’s ends, holes and all.
Each spine edge skins its own run of wall, and neighbouring runs share the section where their edges meet, so a join where the curvature steps (an arc running on into its tangent line) is followed exactly rather than smoothed by one fit across it. A run whose sections all lie in one plane is that plane.
A sharp corner is mitred. Between straight legs the mitre is a plane and each wall is sheared onto it; where a leg is curved the two legs’ walls end on the crossing of their generators (each profile point’s own path down either leg, run straight on past the corner), which is exact where the corner turns in the leg’s plane. Where it turns a curved leg out of its plane the generators miss, and the spine is swept in pieces instead: each side runs on straight past the corner, is trimmed by the mitre plane, and the pieces are fused, the difference between their sections standing as a face of the mitre plane.
§Errors
OgeomError::Construction if the
profile is not planar, leans along the spine, or does not sit at the
spine’s start; if frenet is asked of a spine that never bends, or of a
cornered one; if a wire (not a face) is swept round a corner that turns
a curved leg out of its plane, which only solid pieces can mitre; if the
spine all but doubles back at a corner; or if a leg is shorter than its
corner’s reach.
OgeomError::NotDone if the skin
cannot reach the tolerance.