pub struct TriangulatedFaceSet<'m> { /* private fields */ }Expand description
IfcTriangulatedFaceSet: triangles indexed into a shared point list.
§Closed decides what this even is
Closed = TRUE means the set is a boundary representation, a solid.
Closed = FALSE or absent means it is a surface model with no interior.
Only a closed set is a legal boolean operand, and only a closed set has a
volume; treating an open one as a solid produces nonsense quantities.
§Normals
Normals is optional and, when present, is indexed per face or per
vertex depending on Closed – the schema ties the two. Rather than guess,
this view exposes the raw triples and leaves the choice to a consumer that
has read the rule for its case.
Implementations§
Source§impl<'m> TriangulatedFaceSet<'m>
impl<'m> TriangulatedFaceSet<'m>
Sourcepub fn new(id: EntityId, entity: &'m Entity) -> Self
pub fn new(id: EntityId, entity: &'m Entity) -> Self
Wrap an entity assumed to be an IfcTriangulatedFaceSet.
Sourcepub fn base(&self) -> TessellatedFaceSet<'m>
pub fn base(&self) -> TessellatedFaceSet<'m>
The inherited IfcTessellatedFaceSet attributes.
Sourcepub fn coordinates(&self) -> GeometryResult<EntityId>
pub fn coordinates(&self) -> GeometryResult<EntityId>
The IfcCartesianPointList3D reference holding the vertices.
Sourcepub fn closed(&self) -> Option<bool>
pub fn closed(&self) -> Option<bool>
Whether the mesh bounds a solid.
None means the file did not say. That is not the same as false
for a consumer deciding whether the set may be a boolean operand: an
unstated flag is a file defect worth reporting, not a licence to assume.
Sourcepub fn triangles_1based(&self) -> GeometryResult<Vec<[i64; 3]>>
pub fn triangles_1based(&self) -> GeometryResult<Vec<[i64; 3]>>
Triangles as the file wrote them: 1-based vertex indices.
Use this to round-trip or to diff against a file. To index a Rust slice,
use Self::triangles_0based instead.
Sourcepub fn triangles_0based(&self) -> GeometryResult<Vec<[usize; 3]>>
pub fn triangles_0based(&self) -> GeometryResult<Vec<[usize; 3]>>
Triangles as 0-based indices, ready to index a vertex Vec.
Applies PnIndex when it is present, so the result always addresses
Coordinates directly. Rejects a 0 or negative index rather than
wrapping it.
Sourcepub fn pn_index_1based(&self) -> Option<Vec<i64>>
pub fn pn_index_1based(&self) -> Option<Vec<i64>>
PnIndex exactly as written: 1-based positions in Coordinates.
Sourcepub fn pn_index_0based(&self) -> GeometryResult<Option<Vec<usize>>>
pub fn pn_index_0based(&self) -> GeometryResult<Option<Vec<usize>>>
PnIndex converted to 0-based, or None when absent.
When present, a CoordIndex value i selects PnIndex[i - 1], and
that is the position in Coordinates. Skipping the hop silently
permutes the mesh’s vertices.
Sourcepub fn triangle_count(&self) -> GeometryResult<usize>
pub fn triangle_count(&self) -> GeometryResult<usize>
How many triangles the set declares.
Trait Implementations§
Source§impl<'m> Clone for TriangulatedFaceSet<'m>
impl<'m> Clone for TriangulatedFaceSet<'m>
Source§fn clone(&self) -> TriangulatedFaceSet<'m>
fn clone(&self) -> TriangulatedFaceSet<'m>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more