Skip to main content

MaterialView

Struct MaterialView 

Source
pub struct MaterialView<'m> { /* private fields */ }
Expand description

Borrowed MaterialResource interpretation of a model.

Implementations§

Source§

impl<'m> MaterialView<'m>

Source

pub fn constituents(self) -> impl Iterator<Item = MaterialConstituent<'m>> + 'm

Iterates every IfcMaterialConstituent instance in the model.

Source§

impl<'m> MaterialView<'m>

Source

pub fn constituent_sets( self, ) -> impl Iterator<Item = MaterialConstituentSet<'m>> + 'm

Iterates every IfcMaterialConstituentSet instance in the model.

Source§

impl<'m> MaterialView<'m>

Source

pub fn layers(self) -> impl Iterator<Item = MaterialLayer<'m>> + 'm

Iterates every IfcMaterialLayer instance in the model.

Source

pub fn layers_with_offsets( self, ) -> impl Iterator<Item = MaterialLayerWithOffsets<'m>> + 'm

Iterates every IfcMaterialLayerWithOffsets instance in the model.

Source§

impl<'m> MaterialView<'m>

Source

pub fn layer_sets(self) -> impl Iterator<Item = MaterialLayerSet<'m>> + 'm

Iterates every IfcMaterialLayerSet instance in the model.

Source

pub fn total_thickness(self, set: MaterialLayerSet<'m>) -> MaterialResult<f64>

Evaluate the normative IfcMlsTotalThickness function.

Source§

impl<'m> MaterialView<'m>

Source

pub fn layer_set_usages( self, ) -> impl Iterator<Item = MaterialLayerSetUsage<'m>> + 'm

Iterates every IfcMaterialLayerSetUsage instance in the model.

Source§

impl<'m> MaterialView<'m>

Source

pub fn materials(self) -> impl Iterator<Item = Material<'m>> + 'm

Iterates every IfcMaterial instance in the model.

Source§

impl<'m> MaterialView<'m>

Source

pub fn material_properties( self, ) -> impl Iterator<Item = MaterialProperties<'m>> + 'm

Iterates every IfcMaterialProperties instance in the model.

Source

pub fn properties_for( self, material: EntityId, ) -> impl Iterator<Item = MaterialResult<MaterialProperties<'m>>> + 'm

Iterates every IfcMaterialProperties whose Material attribute resolves to material, surfacing malformed records as errors rather than skipping them.

Source§

impl<'m> MaterialView<'m>

Source

pub fn classification_relationships( self, ) -> impl Iterator<Item = MaterialClassificationRelationship<'m>> + 'm

Iterates every IfcMaterialClassificationRelationship in the model.

Source

pub fn material_lists(self) -> impl Iterator<Item = MaterialList<'m>> + 'm

Iterates every IfcMaterialList instance in the model.

Source

pub fn material_relationships( self, ) -> impl Iterator<Item = MaterialRelationship<'m>> + 'm

Iterates every IfcMaterialRelationship instance in the model.

Source§

impl<'m> MaterialView<'m>

Source

pub fn profiles(self) -> impl Iterator<Item = MaterialProfile<'m>> + 'm

Iterates every IfcMaterialProfile instance in the model.

Source

pub fn profiles_with_offsets( self, ) -> impl Iterator<Item = MaterialProfileWithOffsets<'m>> + 'm

Iterates every IfcMaterialProfileWithOffsets instance in the model.

Source§

impl<'m> MaterialView<'m>

Source

pub fn profile_sets(self) -> impl Iterator<Item = MaterialProfileSet<'m>> + 'm

Iterates every IfcMaterialProfileSet instance in the model.

Source§

impl<'m> MaterialView<'m>

Source

pub fn profile_set_usages( self, ) -> impl Iterator<Item = MaterialProfileSetUsage<'m>> + 'm

Iterates every IfcMaterialProfileSetUsage instance in the model.

Source

pub fn tapering_profile_set_usages( self, ) -> impl Iterator<Item = MaterialProfileSetUsageTapering<'m>> + 'm

Iterates every IfcMaterialProfileSetUsageTapering instance in the model.

Source§

impl<'m> MaterialView<'m>

Source

pub fn assignments(self) -> impl Iterator<Item = MaterialAssignment<'m>> + 'm

Iterates every IfcRelAssociatesMaterial instance in the model.

Source

pub fn assignments_for( self, object: EntityId, ) -> MaterialResult<Vec<MaterialAssignment<'m>>>

Collects every IfcRelAssociatesMaterial whose RelatedObjects includes object. Multiple hits indicate an ambiguous direct assignment; callers that need a single answer should check the result length themselves or use assigned_material.

Source§

impl<'m> MaterialView<'m>

Source

pub fn material_definitions( self, ) -> impl Iterator<Item = MaterialDefinition<'m>> + 'm

Every concrete subtype of the abstract IfcMaterialDefinition.

Source

pub fn material_usage_definitions( self, ) -> impl Iterator<Item = MaterialUsageDefinition<'m>> + 'm

Every concrete subtype of the abstract IfcMaterialUsageDefinition.

Source

pub fn resolve_material_select( self, id: EntityId, ) -> MaterialResult<ResolvedMaterialSelect<'m>>

Resolves id as an IfcMaterialSelect branch by dispatching on its concrete IFC entity type. Fails with crate::MaterialError::WrongEntityType if id names an entity that is not a MaterialResource select member.

Source

pub fn assigned_material( self, object: EntityId, ) -> MaterialResult<Option<ResolvedAssignment<'m>>>

Resolves the single material that applies to object, preferring a direct IfcRelAssociatesMaterial on the object itself and falling back to the material assigned to its IfcTypeObject via IfcRelDefinesByType. Returns Ok(None) if neither exists. Fails with crate::MaterialError::AmbiguousAssignment or crate::MaterialError::AmbiguousType if more than one candidate is found at either level, and with crate::MaterialError::UnknownEntity if object is not in the model.

Source§

impl<'m> MaterialView<'m>

Source

pub fn new(model: &'m Model) -> Self

Wraps a model reference for MaterialResource projection.

Source

pub fn model(self) -> &'m Model

Returns the underlying model this view borrows from.

Trait Implementations§

Source§

impl<'m> Clone for MaterialView<'m>

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<'m> Copy for MaterialView<'m>

Source§

impl<'m> Debug for MaterialView<'m>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'m> Freeze for MaterialView<'m>

§

impl<'m> RefUnwindSafe for MaterialView<'m>

§

impl<'m> Send for MaterialView<'m>

§

impl<'m> Sync for MaterialView<'m>

§

impl<'m> Unpin for MaterialView<'m>

§

impl<'m> UnsafeUnpin for MaterialView<'m>

§

impl<'m> UnwindSafe for MaterialView<'m>

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.