pub struct SurfaceCurve<'m> { /* private fields */ }Expand description
A borrowed view of an IfcSurfaceCurve and its subtypes.
Implementations§
Source§impl<'m> SurfaceCurve<'m>
impl<'m> SurfaceCurve<'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 IfcSurfaceCurve subtype.
Sourcepub fn kind(&self) -> Option<SurfaceCurveKind>
pub fn kind(&self) -> Option<SurfaceCurveKind>
Which subtype this is, or None if the type name is not one of them.
Sourcepub fn curve_3d_ref(&self) -> GeometryResult<EntityId>
pub fn curve_3d_ref(&self) -> GeometryResult<EntityId>
The model-space curve.
Sourcepub fn associated_pcurve_refs(&self) -> GeometryResult<Vec<EntityId>>
pub fn associated_pcurve_refs(&self) -> GeometryResult<Vec<EntityId>>
The associated IfcPcurve references, one or two.
Cardinality is checked because IfcIntersectionCurve and
IfcSeamCurve both require exactly two, and a single-element list on
either means the second surface was lost.
Sourcepub fn master_representation(&self) -> PreferredSurfaceCurveRepresentation
pub fn master_representation(&self) -> PreferredSurfaceCurveRepresentation
Which representation is authoritative, defaulting to Curve3D.
The 3D curve is the safe default: it exists on every surface curve, whereas a p-curve index may point past the end of a short list.
Sourcepub fn master_curve_ref(&self) -> GeometryResult<EntityId>
pub fn master_curve_ref(&self) -> GeometryResult<EntityId>
The reference the MasterRepresentation actually names.
Resolves the enumeration against the real list length, so a file
naming PCURVE_S2 with only one p-curve fails here rather than
indexing out of bounds in a kernel.
Trait Implementations§
Source§impl<'m> Clone for SurfaceCurve<'m>
impl<'m> Clone for SurfaceCurve<'m>
Source§fn clone(&self) -> SurfaceCurve<'m>
fn clone(&self) -> SurfaceCurve<'m>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more