#[non_exhaustive]pub struct CompiledMesh {
pub mesh: TriMesh,
pub closure: MeshClosure,
}Expand description
A compiled mesh and whether it bounds a solid.
IFC distinguishes solids (IfcFacetedBrep, IfcExtrudedAreaSolid,
IfcPolygonalFaceSet with Closed) from surface models
(IfcShellBasedSurfaceModel, IfcFaceBasedSurfaceModel), and a surface
model has an area but no volume – even when its shells happen to close.
A bare TriMesh cannot say which one it is, so a caller summing a
divergence volume over every compiled product silently reports a volume
for surfaces. closure carries the backend’s answer instead.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.mesh: TriMeshThe triangles.
closure: MeshClosureMeshClosure::Solid when the mesh bounds a volume the file
declared, MeshClosure::Surface for a surface model, and
MeshClosure::Unknown when the backend does not report it.
Implementations§
Source§impl CompiledMesh
impl CompiledMesh
Sourcepub fn solid_mesh(&self, product: EntityId) -> GeometryResult<&TriMesh>
pub fn solid_mesh(&self, product: EntityId) -> GeometryResult<&TriMesh>
The mesh, only when it bounds a declared solid.
Use this, not mesh, before measuring a volume or feeding a boolean.
§Errors
GeometryError::NotASolid naming product for a surface model, and
for a backend that does not report closure: an unknown closure is not
evidence of a solid.
Trait Implementations§
Source§impl Clone for CompiledMesh
impl Clone for CompiledMesh
Source§fn clone(&self) -> CompiledMesh
fn clone(&self) -> CompiledMesh
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more