Skip to main content

make_helical_sweep

Function make_helical_sweep 

Source
pub fn make_helical_sweep(
    model: &mut Model,
    profile: &Shape,
    axis: Axis,
    pitch: f64,
    turns: f64,
    left_handed: bool,
    taper_per_turn: f64,
    tol: Tolerances,
) -> OgeomResult<Built>
Expand description

Sweep a planar profile along a helix about axis: a screw motion, every point of the profile running its own helix. The thread and spring operation, with the profile in a plane through the axis; a profile in any other plane clear of the axis (square to it, a ramp or a stair’s tread) climbs the same way.

pitch is the advance per turn along axis, turns how far the profile turns, left_handed turns it the other way about the axis for the same advance, and taper_per_turn moves every point away from the axis by that much per turn (a conical helix; zero for a cylindrical one). A pitch of zero with a taper is a flat spiral, every point turning in its plane square to the axis while moving out. The walls are fitted through each profile edge’s exact screw images; the caps are the profile where it starts and where it ends.

§Errors

OgeomError::Construction if the profile is not a planar face, meets the axis, would meet itself one turn on (its extent along the axis is not less than the pitch, or for a flat spiral its extent away from the axis not less than the taper), is carried partly forward through its own plane and partly back, or tapers onto the axis; if a taper is asked of a profile whose plane neither holds the axis nor stands square to it; if turns is not positive, pitch is negative, or both pitch and the taper are zero. OgeomError::NotDone if a wall cannot be fitted.