pub struct CompositeCurveSegment<'m> { /* private fields */ }Expand description
A borrowed view of an IfcCompositeCurveSegment.
Also covers IfcReparametrisedCompositeCurveSegment, whose extra
ParamLength is read by Self::param_length. An IFC4X3
IfcCurveSegment has a different slot layout; every slot read refuses it
with CURVE_SEGMENT_UNREAD.
Implementations§
Source§impl<'m> CompositeCurveSegment<'m>
impl<'m> CompositeCurveSegment<'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 IfcCompositeCurveSegment subtype.
Sourcepub fn parent_curve_ref(&self) -> GeometryResult<EntityId>
pub fn parent_curve_ref(&self) -> GeometryResult<EntityId>
The curve this segment is a piece of.
Frequently shared with other segments and other composite curves, which
is precisely why Self::same_sense exists.
Sourcepub fn same_sense(&self) -> GeometryResult<bool>
pub fn same_sense(&self) -> GeometryResult<bool>
Is the segment traversed along the parent curve’s own direction?
false means reverse it before joining it to its neighbours.
Sourcepub fn transition(&self) -> GeometryResult<TransitionCode>
pub fn transition(&self) -> GeometryResult<TransitionCode>
The continuity asserted at the joint with the next segment.
Note “next”: the code describes the transition at the end of this
segment, so the last segment of an open curve says DISCONTINUOUS.
Sourcepub fn param_length(&self) -> GeometryResult<Option<f64>>
pub fn param_length(&self) -> GeometryResult<Option<f64>>
ParamLength, present only on IfcReparametrisedCompositeCurveSegment.
Returns None for a plain IfcCompositeCurveSegment. When present it
rescales the segment’s parameter range to [0, ParamLength], so a
consumer that ignores it will evaluate the parent curve at the wrong
parameters. Values must be positive.
Sourcepub fn is_reparametrised(&self) -> bool
pub fn is_reparametrised(&self) -> bool
Is this the reparametrised subtype?
Trait Implementations§
Source§impl<'m> Clone for CompositeCurveSegment<'m>
impl<'m> Clone for CompositeCurveSegment<'m>
Source§fn clone(&self) -> CompositeCurveSegment<'m>
fn clone(&self) -> CompositeCurveSegment<'m>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more