Skip to main content

IfcxModel

Struct IfcxModel 

Source
pub struct IfcxModel { /* private fields */ }
Expand description

IFC5 (IFCX) model

Implementations§

Source§

impl IfcxModel

Source

pub fn parse(content: &str) -> Result<Self>

Parse IFCX JSON content

Source

pub fn node(&self, id: EntityId) -> Option<&ComposedNode>

Get node by entity ID

Source

pub fn path(&self, id: EntityId) -> Option<&str>

Get path for entity ID

Source

pub fn id_for_path(&self, path: &str) -> Option<EntityId>

Get entity ID for path

Trait Implementations§

Source§

impl EntityResolver for IfcxModel

Source§

fn get(&self, id: EntityId) -> Option<Arc<DecodedEntity>>

Get entity by ID Read more
Source§

fn entities_by_type(&self, ifc_type: &IfcType) -> Vec<Arc<DecodedEntity>>

Get all entities of a specific type Read more
Source§

fn find_by_type_name(&self, type_name: &str) -> Vec<Arc<DecodedEntity>>

Find entities by type name string Read more
Source§

fn count_by_type(&self, ifc_type: &IfcType) -> usize

Count entities of a specific type Read more
Source§

fn all_ids(&self) -> Vec<EntityId>

Get all entity IDs in the model Read more
Source§

fn raw_bytes(&self, _id: EntityId) -> Option<&[u8]>

Fast raw bytes access for optimized parsing Read more
Source§

fn resolve_ref(&self, attr: &AttributeValue) -> Option<Arc<DecodedEntity>>

Resolve an entity reference from an attribute value Read more
Source§

fn resolve_ref_list(&self, attr: &AttributeValue) -> Vec<Arc<DecodedEntity>>

Resolve a list of entity references Read more
Source§

fn entity_count(&self) -> usize

Get total entity count
Source§

impl IfcModel for IfcxModel

Source§

fn resolver(&self) -> &dyn EntityResolver

Get entity resolver for entity lookups and reference resolution Read more
Source§

fn properties(&self) -> &dyn PropertyReader

Get property reader for accessing property sets and quantities Read more
Source§

fn spatial(&self) -> &dyn SpatialQuery

Get spatial query interface for hierarchy traversal Read more
Source§

fn unit_scale(&self) -> f64

Get unit scale factor (file units to meters) Read more
Source§

fn metadata(&self) -> &ModelMetadata

Get file metadata (schema version, originating system, etc.)
Source§

impl PropertyReader for IfcxModel

Source§

fn property_sets(&self, id: EntityId) -> Vec<PropertySet>

Get all property sets associated with an entity Read more
Source§

fn quantities(&self, _id: EntityId) -> Vec<Quantity>

Get all quantities associated with an entity Read more
Source§

fn global_id(&self, id: EntityId) -> Option<String>

Get entity’s GlobalId (GUID) Read more
Source§

fn name(&self, id: EntityId) -> Option<String>

Get entity’s Name attribute Read more
Source§

fn description(&self, id: EntityId) -> Option<String>

Get entity’s Description attribute Read more
Source§

fn get_property(&self, id: EntityId, name: &str) -> Option<Property>

Get a specific property by name Read more
Source§

fn get_quantity(&self, id: EntityId, name: &str) -> Option<Quantity>

Get a specific quantity by name Read more
Source§

fn object_type(&self, _id: EntityId) -> Option<String>

Get entity’s ObjectType attribute Read more
Source§

fn tag(&self, _id: EntityId) -> Option<String>

Get entity’s Tag attribute Read more
Source§

impl SpatialQuery for IfcxModel

Source§

fn spatial_tree(&self) -> Option<&SpatialNode>

Get the spatial hierarchy tree Read more
Source§

fn storeys(&self) -> Vec<StoreyInfo>

Get all building storeys Read more
Source§

fn elements_in_storey(&self, storey_id: EntityId) -> Vec<EntityId>

Get elements contained in a storey Read more
Source§

fn containing_storey(&self, element_id: EntityId) -> Option<EntityId>

Get the containing storey for an element Read more
Source§

fn search(&self, query: &str) -> Vec<EntityId>

Search entities by name or type Read more
Source§

fn elements_by_type(&self, ifc_type: &IfcType) -> Vec<EntityId>

Get elements of a specific type Read more
Source§

fn all_elements(&self) -> Vec<EntityId>

Get all building elements (walls, slabs, etc.) Read more
Source§

fn element_count(&self) -> usize

Get element count

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<T> EntityResolverExt for T
where T: EntityResolver + ?Sized,

Source§

fn get_by_u32(&self, id: u32) -> Option<Arc<DecodedEntity>>

Get entity by raw u32 ID
Source§

fn exists(&self, id: EntityId) -> bool

Check if an entity exists
Source§

fn get_or_err(&self, id: EntityId) -> Result<Arc<DecodedEntity>, ParseError>

Get entity or return error
Source§

fn resolve_ref_or_err( &self, entity_id: EntityId, attr_index: usize, attr: &AttributeValue, ) -> Result<Arc<DecodedEntity>, ParseError>

Resolve reference or return error
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, 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.