pub struct Chain {
pub pieces: Vec<Piece>,
pub joints: Vec<String>,
pub smooth: Vec<bool>,
pub closed: bool,
}Expand description
A chain of pieces, each starting where the one before ends — closed if
the last ends where the first starts — and the names of its joints:
joints[i] where piece i starts, and for an open chain one more, its
end.
Fields§
§pieces: Vec<Piece>§joints: Vec<String>§smooth: Vec<bool>Per piece, whether the chain is known to run on smoothly into it from the piece before — as the faces of a solid say, where a traced piece’s tangent only encloses its direction. Where not, its pieces’ tangents decide.
closed: boolImplementations§
Source§impl Chain
impl Chain
Sourcepub fn offset(&self, distance: Scalar) -> GeopResult<Vec<NurbCurve2D>>
pub fn offset(&self, distance: Scalar) -> GeopResult<Vec<NurbCurve2D>>
The chain moved distance to its left — negative: to its right —
see the module docs.
Sourcepub fn band(&self, near: Scalar, far: Scalar) -> GeopResult<Vec<Profile>>
pub fn band(&self, near: Scalar, far: Scalar) -> GeopResult<Vec<Profile>>
The band between the chain moved near and far to its left
(near < far; zero for the chain itself) as the loops of a region,
the outer one first and counter-clockwise, named after the pieces
and joints: X and P for the near side, X,far and P,far for
the far one, first and last the ends of an open chain.