pub enum Span {
Line,
Curve {
degree: usize,
knots: Vec<Scalar>,
middle: Vec<(Frame, Option<Scalar>)>,
},
Blend {
degree: usize,
knots: Vec<Scalar>,
middle: Vec<[(Frame, Scalar); 2]>,
},
Through {
degree: usize,
knots: Vec<Scalar>,
middle: Vec<Vec<(usize, Scalar)>>,
},
}Expand description
How the profile travels from one station to the next.
Variants§
Line
In a straight line: degree 1.
Curve
Along a NURBS of degree on the clamped knots over [0, 1], whose
inner control rows are the span’s first section placed by each of
middle, weighted by its weight (none: one): along circular arcs —
a rational quadratic (see Span::arc) — translated along a curve,
or along any other path, approximated by sections of the profile
skinned together (see [crate::path_sweep]).
Blend
From one section to another of a different shape, along a NURBS of
degree on the clamped knots over [0, 1], each inner control row
the sum of the span’s first section placed by the first frame and
its last section placed by the second, each times its weight: the
interior of a loft shaped by guide curves (see crate::loft).
Through
Along a NURBS of degree on the clamped knots over [0, 1], each
inner control row a sum of the sections at any stations — each
placed by its own station’s frame, times its coefficient: a loft
running smoothly through its sections, its tangent at each taken
from its neighbours (see crate::loft).