#[non_exhaustive]pub enum ProfileFinding {
Show 13 variants
NotLowered(GeomError),
TooFewSegments {
contour: ContourRef,
count: usize,
},
UnsupportedSegment {
contour: ContourRef,
segment: usize,
kind: &'static str,
},
DegenerateSegment {
contour: ContourRef,
segment: usize,
reason: &'static str,
},
Gap {
contour: ContourRef,
segment: usize,
gap: f64,
},
DegenerateRing {
contour: ContourRef,
error: OverlayError,
},
SelfContact {
contour: ContourRef,
segments: [usize; 2],
at: DVec2,
},
BoundaryOverlap {
contours: [ContourRef; 2],
},
HoleOutsideOuter {
hole: usize,
},
DisconnectedInterior {
contours: Vec<ContourRef>,
},
Polygon(ArcPolygonDefect),
HolesOverlap {
holes: [usize; 2],
},
Clearance {
segments: [(ContourRef, usize); 2],
lower_bound: f64,
undecided: bool,
},
}Expand description
Why a profile is not valid as the exact path would build it.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NotLowered(GeomError)
The profile does not lower to a contour (family or dimensions); nothing else was checked.
TooFewSegments
The segments lower to fewer than two ring vertices (a polyline or a
full circle is a whole ring by itself); count is the segments.
UnsupportedSegment
A segment family the exact lowering refuses (ellipse, B-spline, …),
or an arc of more than a whole turn: kind names it.
DegenerateSegment
Degenerate frame or empty parameter range.
Gap
The end of segment and the start of the next ((segment + 1) % n,
so n - 1 is the closing joint) are gap apart, beyond the slack.
DegenerateRing
A validate_arc_ring refusal of the lowered ring.
SelfContact
Two segments of one contour share a point other than the joint
between consecutive ones. segments are segment indices, ascending;
both name one segment when a single arc touches itself. at is the
first such point, rounded once.
BoundaryOverlap
Two contours share a stretch of boundary. contours ascending.
Fields
contours: [ContourRef; 2]HoleOutsideOuter
Part of a hole lies outside the outer contour.
DisconnectedInterior
Contacts between contours cut the interior into separate pieces.
contours ascending, every contour of the cut component.
Fields
contours: Vec<ContourRef>Polygon(ArcPolygonDefect)
A defect of the arc polygon check this version does not map to a
finding of its own, such as NestingUndecided: nesting could not be
decided, so the profile is not valid.
HolesOverlap
Two holes’ interiors meet. holes ascending.
Clearance
Two segments are closer than the requested clearance
(ExactProfileValidator::validate_with): their distance has a
local minimum strictly between zero and it away from their meeting
points, or they form an exact cusp (they meet and leave in the same
direction). The neighbourhood of a meeting point at a nonzero angle (a
narrow wedge) is not reported. segments are
(contour, segment) pairs, ascending. lower_bound is a certified
lower bound on their distance; undecided is false when the exact
test proved the distance is below the clearance and true when it
could not decide and the pair is reported rather than cleared.
Trait Implementations§
Source§impl Clone for ProfileFinding
impl Clone for ProfileFinding
Source§fn clone(&self) -> ProfileFinding
fn clone(&self) -> ProfileFinding
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 ProfileFinding
impl Debug for ProfileFinding
Source§impl PartialEq for ProfileFinding
impl PartialEq for ProfileFinding
impl StructuralPartialEq for ProfileFinding
Auto Trait Implementations§
impl Freeze for ProfileFinding
impl RefUnwindSafe for ProfileFinding
impl Send for ProfileFinding
impl Sync for ProfileFinding
impl Unpin for ProfileFinding
impl UnsafeUnpin for ProfileFinding
impl UnwindSafe for ProfileFinding
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more