Skip to main content

CompositeCurveSegment

Struct CompositeCurveSegment 

Source
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>

Source

pub fn new(id: EntityId, entity: &'m Entity) -> Self

Wrap an entity known to be an IfcCompositeCurveSegment subtype.

Source

pub fn id(&self) -> EntityId

The entity id.

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub fn is_reparametrised(&self) -> bool

Is this the reparametrised subtype?

Trait Implementations§

Source§

impl<'m> Clone for CompositeCurveSegment<'m>

Source§

fn clone(&self) -> CompositeCurveSegment<'m>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'m> Copy for CompositeCurveSegment<'m>

Source§

impl<'m> Debug for CompositeCurveSegment<'m>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.