pub struct IndexedPolyCurve<'m> { /* private fields */ }Expand description
A borrowed view of an IfcIndexedPolyCurve.
Implementations§
Source§impl<'m> IndexedPolyCurve<'m>
impl<'m> IndexedPolyCurve<'m>
Sourcepub fn new(id: EntityId, entity: &'m Entity) -> Self
pub fn new(id: EntityId, entity: &'m Entity) -> Self
Wrap an entity known to be an IfcIndexedPolyCurve.
Sourcepub fn points_ref(&self) -> GeometryResult<EntityId>
pub fn points_ref(&self) -> GeometryResult<EntityId>
The IfcCartesianPointList2D or IfcCartesianPointList3D reference.
Sourcepub fn points<'v>(
&self,
model: &'v Model,
) -> GeometryResult<CartesianPointList<'v>>
pub fn points<'v>( &self, model: &'v Model, ) -> GeometryResult<CartesianPointList<'v>>
The point list as a typed view, resolved from the model.
The concrete subtype fixes the dimension; see CartesianPointList.
Sourcepub fn self_intersect(&self) -> Option<bool>
pub fn self_intersect(&self) -> Option<bool>
The informational SelfIntersect flag, None when absent or .U..
Sourcepub fn has_explicit_segments(&self) -> bool
pub fn has_explicit_segments(&self) -> bool
Does the file supply an explicit segment list?
When it does not, the curve is every point joined in list order by
straight lines. That default is not stored anywhere, so a consumer
that only looks at Segments will draw nothing for a perfectly valid
curve.
Sourcepub fn segments(&self, point_count: usize) -> GeometryResult<Vec<PolySegment>>
pub fn segments(&self, point_count: usize) -> GeometryResult<Vec<PolySegment>>
The segments, with indices converted to zero-based and range-checked.
point_count is the length of the referenced IfcCartesianPointList
and is required because the index bound cannot be checked without it;
an out-of-range index would otherwise reach a kernel as a panic.
Returns an empty vector when Segments is absent. Use
Self::has_explicit_segments to distinguish that from an explicitly
empty list, and see Self::implicit_polyline_indices for the
implied all-points-in-order curve.
Sourcepub fn implicit_polyline_indices(point_count: usize) -> Vec<usize>
pub fn implicit_polyline_indices(point_count: usize) -> Vec<usize>
The zero-based indices implied when Segments is absent.
Simply 0..point_count, but naming it keeps the schema default in one
place instead of re-derived at every call site.
Trait Implementations§
Source§impl<'m> Clone for IndexedPolyCurve<'m>
impl<'m> Clone for IndexedPolyCurve<'m>
Source§fn clone(&self) -> IndexedPolyCurve<'m>
fn clone(&self) -> IndexedPolyCurve<'m>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more