Skip to main content

make_loft_solid

Function make_loft_solid 

Source
pub fn make_loft_solid(
    model: &mut Model,
    sections: &[Shape],
    guides: &[Shape],
    ruled: bool,
    tol: Tolerances,
) -> OgeomResult<Built>
Expand description

Loft a solid through closed sections, in order, its ends capped by the first and last sections’ planes.

The walls are make_loft_surface through the sections, open in the loft direction: with ruled straight between each pair of neighbouring sections, otherwise the smooth skin through them all, and with guides the Gordon surface that also follows each guide (through sections of several edges, a guide through every corner, one wall per edge between the guides through its corners). Sections of different edge counts, lines and arcs and splines mixed, are first split to match by arc length from each section’s own start, every piece keeping its exact form, and the pieces pair point to point at one fraction of their exact parameters. A ruled solid between a square and a circle is so exact: its walls are the degree-one surfaces between the square’s sides and the quarter arcs they pair with, and its caps the two sections’ planes. Aligning the sections’ starts is the caller’s authorship.

§Errors

OgeomError::Construction if a section is not a closed edge or wire, if the first or last section is not planar, if the walls and caps do not close into one shell, and as make_loft_surface refuses the sections or the guides (fewer than two sections; with guides, a ruled loft, or sections of several edges with a corner no guide runs through). OgeomError::NotDone as make_loft_surface.