pub fn make_pipe_shell_laws(
model: &mut Model,
profile: &Shape,
spine: &Shape,
law: &PipeLaw<'_>,
laws: &PipeLaws,
corners: PipeCorners,
tolerance: f64,
tol: Tolerances,
) -> OgeomResult<Built>Expand description
make_pipe_shell_evolving with a law of its own for the scale and
for the twist: at each point of the spine the section is the profile
scaled about the spine by laws.scale and turned about it by
laws.twist, each read at the share of the spine’s length run there,
then carried by law.
Linear laws build as make_pipe_shell_evolving does. Any other law
skins each loop through its placed sections, held to tolerance
against the laws; round a smooth closed spine the twist may follow any
law that ends where a linear one may, unscaled. A scale law through
values is above naught all along: a cubic span keeps between its ends.
A law given as a function is read wherever the sweep places a section
or checks its skin, and is never taken as standing still: every run it
moves along is skinned, and round a closed spine it twists only, as a
scale it is refused there.
Where laws.contact asks, the profile is first moved rigidly onto the
spine’s start as PipeContact defines, and the moved profile is
swept as above; the history records the given profile as generating
the result.
Round sharp corners a face sweeps run by run as
make_pipe_shell_with does, each corner turned as corners asks:
each smooth run is swept under the laws over its share of the spine’s
length, from the section it starts with (a run the laws neither scale
nor turn is the prism or pipe shell of that section), and the runs
meet at each corner on the section the laws give there.
§Errors
As make_pipe_shell_evolving and, round sharp corners, as
make_pipe_shell_with; and
OgeomError::Construction if a
law’s shares do not rise strictly to one, a value is not finite, a
scale law through values reaches naught or below, or a law given as a
function does not give the start value at the spine’s start or, as a
scale, gives naught or below where it is read; and, where
laws.contact moves the profile, if the profile is not planar, or its
plane holds the spine’s start tangent under a correction.