Skip to main content

make_pipe

Function make_pipe 

Source
pub fn make_pipe(
    model: &mut Model,
    spine: &Shape,
    radius: f64,
    tol: Tolerances,
) -> OgeomResult<Built>
Expand description

Sweep a circular profile of radius along a spine edge or wire.

A straight spine gives a cylinder, a full circular spine a torus, an arc a torus segment. A wire of lines and arcs, open or closed, is the make_pipe_shell of the disc standing square to its start under the rotation-minimizing frame, its sharp corners mitred, wherever that is exact: legs meeting tangent are the cylinders and torus segments they sweep, fused on the sections they share, straight legs are mitred on the planes halving their corners, and a corner between two lines or turning in the plane of the arcs beside it is the legs’ union with their straight run-ons outside the turn, cut on the plane halving it. The history generates the solid from the spine.

§Errors

OgeomError::Construction if the spine is not straight or circular, the profile radius is not usable, or the tube would swallow its own spine; for a wire, if an edge is neither a line nor an arc (which make_pipe_skinned sweeps to a stated tolerance), where make_pipe_shell refuses the wire, or where it would sweep a face of the pipe as a skin, which it does to a stated tolerance.