pub enum GeometryError {
Show 20 variants
Empty,
InvalidThickness {
index: usize,
thickness_m: f64,
},
NoMaterials,
ZeroDimension {
axis: usize,
},
InvalidSpacing {
axis: usize,
spacing_m: f64,
},
TooManyVoxels {
dims: [usize; 3],
},
CellCountMismatch {
expected: usize,
actual: usize,
},
MaterialIndexOutOfRange {
cell: usize,
index: u32,
n_materials: usize,
},
NoSolids,
SolidMaterialOutOfRange {
solid: usize,
index: u32,
n_materials: usize,
},
MeshParse {
format: &'static str,
line: usize,
message: String,
},
MeshInvalidScale {
unit_m: f64,
},
MeshEmpty,
MeshNonFinite {
triangle: usize,
},
MeshDegenerateTriangle {
triangle: usize,
vertices: [[f64; 3]; 3],
},
MeshEdgeNotShared {
edge: [[f64; 3]; 2],
},
MeshInconsistentOrientation {
edge: [[f64; 3]; 2],
},
MeshNotOutward {
volume_m3: f64,
},
CsgInvalid {
solid: usize,
reason: &'static str,
},
CsgUnbounded {
solid: usize,
},
}Expand description
Errors from building a Stack, a VoxelGrid, a MeshGeometry or a
CsgGeometry.
Variants§
Empty
No layers and no substrate.
InvalidThickness
A layer thickness was zero, negative or not finite.
NoMaterials
A voxel grid needs at least one material.
ZeroDimension
A voxel grid dimension was zero.
InvalidSpacing
A voxel spacing was zero, negative, not finite, or so large that the grid extent overflows.
TooManyVoxels
The number of voxels does not fit in usize.
CellCountMismatch
The material-index array does not have one entry per voxel.
MaterialIndexOutOfRange
A voxel names a material that does not exist.
Fields
NoSolids
A mesh or CSG geometry needs at least one solid.
SolidMaterialOutOfRange
A solid names a material that does not exist.
Fields
MeshParse
A mesh file could not be parsed. line is 1-based (0 for a binary file).
Fields
MeshInvalidScale
The file-unit scale of a mesh loader was not finite and positive.
MeshEmpty
A mesh has no triangles.
MeshNonFinite
A mesh vertex coordinate is NaN or infinite.
MeshDegenerateTriangle
A triangle has zero (or negligible) area.
Fields
An edge belongs to only one triangle: the mesh is not watertight.
MeshInconsistentOrientation
Two triangles traverse an edge in the same direction (inconsistent orientation, or more than two triangles on the edge).
MeshNotOutward
The signed volume is not positive: the normals point inward.
CsgInvalid
A CSG solid has an invalid primitive (non-finite or non-positive size, zero axis or normal), an empty union or intersection, or an empty bounding box.
CsgUnbounded
A top-level CSG solid is unbounded (a half-space not bounded by the
combination it is in; see the csg module docs).
Trait Implementations§
Source§impl Clone for GeometryError
impl Clone for GeometryError
Source§fn clone(&self) -> GeometryError
fn clone(&self) -> GeometryError
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 GeometryError
impl Debug for GeometryError
Source§impl Display for GeometryError
impl Display for GeometryError
Source§impl Error for GeometryError
impl Error for GeometryError
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 From<GeometryError> for DynamicError
impl From<GeometryError> for DynamicError
Source§fn from(source: GeometryError) -> Self
fn from(source: GeometryError) -> Self
Source§impl PartialEq for GeometryError
impl PartialEq for GeometryError
impl StructuralPartialEq for GeometryError
Auto Trait Implementations§
impl Freeze for GeometryError
impl RefUnwindSafe for GeometryError
impl Send for GeometryError
impl Sync for GeometryError
impl Unpin for GeometryError
impl UnsafeUnpin for GeometryError
impl UnwindSafe for GeometryError
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