pub struct Segments {
pub tolerance: f64,
pub corners: bool,
pub axis_snap: Option<f64>,
pub min_bow: f64,
pub closed: bool,
}Expand description
How a polyline is split into lines and arcs.
Fields§
§tolerance: f64Every input point lies within this distance of its piece.
corners: boolWhether pieces turning against each other meet where their curves cross, bringing back the sharp corner the polyline rounds off, rather than midway between their nearest points to the input point they share.
axis_snap: Option<f64>Lines within this angle of the x or the y axis, in radians up
to a quarter turn, are turned onto it where they still hold their
points.
min_bow: f64An arc bowing from its chord by no more than this is taken as lines. Arcs are only fitted where a line does not hold the points, so this matters only above the tolerance.
closed: boolWhether the polyline closes back to its first point, which it then need not repeat.
Trait Implementations§
impl Copy for Segments
impl StructuralPartialEq for Segments
Auto Trait Implementations§
impl Freeze for Segments
impl RefUnwindSafe for Segments
impl Send for Segments
impl Sync for Segments
impl Unpin for Segments
impl UnsafeUnpin for Segments
impl UnwindSafe for Segments
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Scalar for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.