pub enum RegionRefusal {
Show 15 variants
NoSuchRegion(RegionId),
SameRegion(RegionId),
NotAdjacent(RegionId, RegionId),
PathTooShort,
NotAnEdgeOfTheRegion(u32, u32),
DoesNotCut {
pieces: usize,
},
ConstraintDoesNotApply {
kind: SurfaceKind,
constraint: &'static str,
},
InvalidRadius(f64),
TooFewVertices {
kind: SurfaceKind,
needed: usize,
found: usize,
},
NoFit(SurfaceKind),
DoesNotVerify {
kind: SurfaceKind,
deviation: f64,
distance: f64,
},
TriangleOffTheSurface {
kind: SurfaceKind,
triangle: usize,
},
NotADisk,
TooNarrowForAPatch,
PatchDoesNotVerify,
}Expand description
Why a step on the regions was refused. The regions are unchanged.
Variants§
NoSuchRegion(RegionId)
No region has this name, or it holds no triangle (a merge retired it).
SameRegion(RegionId)
A region cannot be merged with itself.
NotAdjacent(RegionId, RegionId)
The two regions share no mesh edge.
PathTooShort
A path needs at least two vertices.
NotAnEdgeOfTheRegion(u32, u32)
Two consecutive vertices of the path are not the ends of an edge of the region’s triangles.
DoesNotCut
Cut along the path, the region falls into this many pieces, not two.
ConstraintDoesNotApply
The kind of surface has no such thing to hold fixed.
Fields
kind: SurfaceKindThe kind asked for.
InvalidRadius(f64)
A fixed radius that is not a finite positive distance.
TooFewVertices
The region has too few vertices to determine the kind.
Fields
kind: SurfaceKindThe kind asked for.
NoFit(SurfaceKind)
No surface of the kind could be fitted to the vertices at all.
DoesNotVerify
The fitted surface misses a vertex by more than the coplanar distance.
Fields
kind: SurfaceKindThe kind asked for.
TriangleOffTheSurface
A triangle’s middle stands off the fitted surface by more than its sag allows: its corners are on the surface and it spans off it.
Fields
kind: SurfaceKindThe kind asked for.
triangle: usizeThe triangle, an index into MeshRegions::triangles.
NotADisk
A patch needs a region that is one disk bounded by one loop; this one has a hole or touches itself.
TooNarrowForAPatch
Too few of the region’s vertices lie inside its boundary to hold a patch across it.
PatchDoesNotVerify
No patch fitted to the region passed the verification: within the coplanar distance of every vertex and across every triangle, its normal agreeing with theirs.
Trait Implementations§
Source§impl Clone for RegionRefusal
impl Clone for RegionRefusal
Source§impl Debug for RegionRefusal
impl Debug for RegionRefusal
Source§impl Display for RegionRefusal
impl Display for RegionRefusal
Source§impl Error for RegionRefusal
impl Error for RegionRefusal
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl PartialEq for RegionRefusal
impl PartialEq for RegionRefusal
impl StructuralPartialEq for RegionRefusal
Auto Trait Implementations§
impl Freeze for RegionRefusal
impl RefUnwindSafe for RegionRefusal
impl Send for RegionRefusal
impl Sync for RegionRefusal
impl Unpin for RegionRefusal
impl UnsafeUnpin for RegionRefusal
impl UnwindSafe for RegionRefusal
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
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>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
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
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.