pub struct TrimmedCurve<'m> { /* private fields */ }Expand description
A borrowed view of an IfcTrimmedCurve.
Implementations§
Source§impl<'m> TrimmedCurve<'m>
impl<'m> TrimmedCurve<'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 IfcTrimmedCurve.
Sourcepub fn basis_curve_ref(&self) -> GeometryResult<EntityId>
pub fn basis_curve_ref(&self) -> GeometryResult<EntityId>
The IfcCurve being trimmed.
May itself be trimmed, offset or composite; nesting is legal and this view does not follow the chain.
Sourcepub fn sense_agreement(&self) -> GeometryResult<bool>
pub fn sense_agreement(&self) -> GeometryResult<bool>
Does the trimmed curve follow the basis curve’s own direction?
Sourcepub fn master_representation(&self) -> TrimmingPreference
pub fn master_representation(&self) -> TrimmingPreference
Which trim form wins, defaulting to Unspecified when absent.
A missing or unreadable token is not worth failing the whole curve for:
Unspecified is the schema’s own “no preference” and callers already
have to handle it.
Sourcepub fn trim1(&self) -> GeometryResult<Trim>
pub fn trim1(&self) -> GeometryResult<Trim>
The start trim.
Sourcepub fn trim2(&self) -> GeometryResult<Trim>
pub fn trim2(&self) -> GeometryResult<Trim>
The end trim.
Sourcepub fn spec(&self) -> GeometryResult<TrimSpec>
pub fn spec(&self) -> GeometryResult<TrimSpec>
The whole trim, with nothing collapsed.
Prefer this over the individual accessors: a consumer that reads the
trims without also reading SenseAgreement will draw the wrong arc for
a closed basis curve, and gathering them together makes forgetting it
harder.
Trait Implementations§
Source§impl<'m> Clone for TrimmedCurve<'m>
impl<'m> Clone for TrimmedCurve<'m>
Source§fn clone(&self) -> TrimmedCurve<'m>
fn clone(&self) -> TrimmedCurve<'m>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more