pub fn make_loft_surface(
model: &mut Model,
sections: &[Shape],
closed: bool,
guides: &[Shape],
ruled: bool,
tol: Tolerances,
) -> OgeomResult<Built>Expand description
A sheet lofted through sections, in order.
The sections are edges or wires, open or closed, planar or not, each
taken in its own traversal sense from its own start (aligning those is
the caller’s authorship). Wires pair edge for edge, and the sheet has
one face per edge (one per edge and span between neighbouring sections
when ruled). Sections with different edge counts are matched by arc
length first: every section is split at the fractions of its length
where any section has a break (breaks closer than ten confusions along
the longest section are one), each piece the exact restriction of the
edge it came from, so the sections pair edge for edge. The sheet
passes through every section exactly. A smooth loft is the B-spline
interpolating the sections across, cubic from four sections up,
parameterized by the mean distance between their control points; a
ruled loft is degree one between each pair of neighbours.
With closed the sheet runs from the last section back to the first:
smoothly, with no seam in its slope, or ruled, with a last span. A
closed smooth loft spaces its sections evenly in its parameter.
The first and last sections (every section, when ruled) bound the sheet, and where they are edges of the model, not split to match, they are those edges.
With guides the sheet also follows each guide, an edge or a wire
crossing every section once, in the same order along every section and
in the sections’ order along itself. The guided sheet is built as a
Gordon surface: each section is paced so every guide crosses it at one
parameter, each guide so it crosses every section at one parameter, and
the skin across the sections is corrected along each guide by the
guide’s departure from it. Through sections of one edge it is one face,
and through closed sections its seam runs along the first guide.
Sections of several edges have one edge count, and a guide runs
through every corner where two edges meet, at the same corner of every
section: the sheet has one face per edge, the Gordon surface following
the guides through its two corners and those crossing the edge inside,
and neighbouring faces meet along the guide through their corner. The
sheet passes through every section exactly and through every guide to
within the distance by which the guide misses the sections; both are
measured on the built skin and held to ten confusions.
§Errors
OgeomError::Construction
with fewer than two sections, or three for a closed loft; if a section
is not an edge or a wire, or has a curve with no exact B-spline form (a
helix, an offset); if the sections differ in being closed; if they
differ in edge count and one has no length or their breaks fall too
close together to match; if two neighbouring sections coincide; or if
neighbouring edges of the sections carry weights at their shared corner
that would part their faces. With guides, also if the loft is ruled or closed, the
sections differ in edge count, a guide misses a section by more than ten
confusions, crosses the sections out of their order, or crosses some
sections at an end and others inside, or two guides cross the sections
in different orders; through sections of several edges, also if a
guide crosses the sections at different corners or edges, a corner
where two edges meet has no guide, or two guides run through one
corner.
OgeomError::NotDone if the guided
skin strays more than ten confusions from a section or a guide.