pub struct ProfileLoop {
pub edges: Vec<ProfileEdge>,
}Expand description
A closed chain of curves, each ending where the next starts.
Fields§
§edges: Vec<ProfileEdge>Implementations§
Source§impl ProfileLoop
impl ProfileLoop
Sourcepub fn reversed(&self) -> ProfileLoop
pub fn reversed(&self) -> ProfileLoop
The same loop traversed the other way.
Sourcepub fn to_nurbs<S: Scalar>(
&self,
sketch: &Sketch,
positions: &Positions,
) -> GeopResult<Vec<ProfilePiece<S>>>
pub fn to_nurbs<S: Scalar>( &self, sketch: &Sketch, positions: &Positions, ) -> GeopResult<Vec<ProfilePiece<S>>>
The loop as NURBS pieces, each on the domain [0, 1], each starting
exactly where the previous one ends, with the sketch’s points placed
at positions (the sketch’s own positions, or a rigid,
orientation-preserving motion of them).
Arcs are split into pieces of at most a quarter turn — a rational
quadratic’s middle weight cos(sweep / 2) must stay positive — and
circles into four quarters. A loop of a single piece (a closed spline)
is split in two, so every loop has at least two joints. Each piece
records which sketch curve it is part of and which joints it runs
between (see ProfilePiece).
Also used for an open chain (a revolve profile): the pieces then
simply don’t close up, and the last one’s end is the chain’s end.
Trait Implementations§
Source§impl Clone for ProfileLoop
impl Clone for ProfileLoop
Source§fn clone(&self) -> ProfileLoop
fn clone(&self) -> ProfileLoop
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProfileLoop
impl Debug for ProfileLoop
impl Eq for ProfileLoop
Source§impl PartialEq for ProfileLoop
impl PartialEq for ProfileLoop
Source§fn eq(&self, other: &ProfileLoop) -> bool
fn eq(&self, other: &ProfileLoop) -> bool
self and other values to be equal, and is used by ==.