pub enum Geometry {
Mesh(Mesh),
Components(Components),
SliceStack(ResourceId),
VolumetricStack(ResourceId),
BooleanShape(BooleanShape),
DisplacementMesh(DisplacementMesh),
}Expand description
The geometric data contained in an object.
Represents the different types of geometry that can be stored in a 3MF object. The basic types are meshes and component assemblies, with various extensions adding support for slices, voxels, boolean operations, and displacement mapping.
Variants§
Mesh(Mesh)
A triangle mesh (the most common geometry type).
Components(Components)
A hierarchical assembly of other objects via components.
SliceStack(ResourceId)
A stack of 2D slices for layer-based printing (Slice Extension). References a slice stack resource by ID.
VolumetricStack(ResourceId)
Voxel-based volumetric data (Volumetric Extension). References a volumetric stack resource by ID.
BooleanShape(BooleanShape)
Constructive solid geometry from boolean operations (Boolean Operations Extension).
DisplacementMesh(DisplacementMesh)
A mesh with displacement mapping for fine surface detail (Displacement Extension).
Implementations§
Source§impl Geometry
impl Geometry
Sourcepub fn has_content(&self) -> bool
pub fn has_content(&self) -> bool
Returns true if this geometry contains actual content (non-empty mesh, components, boolean shapes, or displacement meshes).
A default-constructed Geometry::Mesh(Mesh::default()) has no content
(no vertices, no triangles). This is the default return from
parse_object_geometry when no <mesh> or <components> child element
is present.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Geometry
impl<'de> Deserialize<'de> for Geometry
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl StructuralPartialEq for Geometry
Auto Trait Implementations§
impl Freeze for Geometry
impl RefUnwindSafe for Geometry
impl Send for Geometry
impl Sync for Geometry
impl Unpin for Geometry
impl UnwindSafe for Geometry
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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,
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