Skip to main content

Stationing

Struct Stationing 

Source
#[non_exhaustive]
pub struct Stationing { pub alignment: EntityId, /* private fields */ }
Expand description

The stationing of one IfcAlignment: its station equations in distance order, and lookups across them.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§alignment: EntityId

The IfcAlignment this stationing belongs to.

Implementations§

Source§

impl Stationing

Source

pub fn resolve( model: &Model, alignment: EntityId, units: AlignmentUnits, ) -> AlignmentResult<Self>

Resolve the stationing of alignment from the referents it nests or positions.

Referents without Pset_Stationing (a bridge pier marker, say) are not part of the stationing and are skipped. An alignment with no stationing referent resolves to an empty table, whose lookups are refused.

§Errors

Refuses a model that is not IFC4X3, an alignment that is not an IfcAlignment, a malformed relationship or referent, two stationing referents at one distance, a non-finite station, and a station that contradicts the one carried from the previous referent.

Source

pub fn equations(&self) -> &[StationEquation]

The stationing referents, ascending in distance along.

Source

pub fn station_at(&self, distance_along: f64) -> AlignmentResult<f64>

The station at distance_along (metres along the alignment).

At an equation the station ahead of it applies.

§Errors

AlignmentError::OutOfRange for a non-finite distance, an empty table, or a distance before the first stationing referent.

Source

pub fn distances_at(&self, station: f64) -> AlignmentResult<Vec<f64>>

Every distance along labelled station, ascending.

Usually one. Several when an equation steps the station back, so that the same value occurs in two ranges.

§Errors

AlignmentError::OutOfRange for a non-finite station and a station no range reaches.

Source

pub fn distance_at(&self, station: f64) -> AlignmentResult<f64>

The one distance along labelled station.

§Errors

As Self::distances_at, and AlignmentError::AmbiguousStation when the station labels several distances.

Trait Implementations§

Source§

impl Clone for Stationing

Source§

fn clone(&self) -> Self

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 Debug for Stationing

Source§

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

Formats the value using the given formatter. Read more
Source§

impl PartialEq for Stationing

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Stationing

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

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

Source§

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.

Source§

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.