Skip to main content

VerticalLayout

Struct VerticalLayout 

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

One resolved, ordered vertical profile.

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.
§entity: EntityId

The IfcAlignmentVertical entity this layout was resolved from.

Implementations§

Source§

impl VerticalLayout

Source

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

Resolve IfcAlignmentVertical#entity’s nested IfcAlignmentSegment chain into an ordered profile.

Checks what the segments state directly: they are contiguous and ascending in StartDistAlong, at the SeamTolerance the model declares, and a zero-length segment stands only in last place. The height seam needs each segment’s elevation law and is checked by profile_law when the profile is lowered. A grade break is recorded in Self::seams, not refused: IFC4.3 does not require vertical seams to be tangential.

§Errors

Refuses a model that is not IFC4X3, an entity that is not an IfcAlignmentVertical, an invalid declared Precision, a layout nesting no segment, a segment that does not read, a gap or overlap (AlignmentError::InvalidSegment), and a zero-length segment that is not last or is the only one (AlignmentError::SemanticViolation).

Source

pub fn seams(&self) -> &[VerticalSeam]

Every seam between consecutive segments of positive length, in order, with how the grade continues across it.

Source

pub fn require_tangential(&self) -> AlignmentResult<()>

Demand a tangent profile: refuse the first grade break.

IFC4.3 does not require vertical seams to be tangential, so Self::resolve accepts grade breaks. A consumer whose model needs a continuous grade (a design check, say) asks for it here.

§Errors

AlignmentError::ProfileDiscontinuity with ProfileSeam::Gradient at the first grade break.

Source

pub fn segments(&self) -> &[VerticalSegment]

Segments in authored (distance-along) order.

Source

pub fn start_dist_along(&self) -> f64

Distance along where the profile starts.

Source

pub fn length(&self) -> f64

Total distance-along span covered by this profile.

Trait Implementations§

Source§

impl Clone for VerticalLayout

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 VerticalLayout

Source§

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

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

impl PartialEq for VerticalLayout

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 VerticalLayout

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.