Skip to main content

Crate bimifc_model

Crate bimifc_model 

Source
Expand description

BIMIFC Model - Trait definitions and shared types for IFC parsing

This crate provides the core abstractions for working with IFC (Industry Foundation Classes) files. It defines traits that can be implemented by different parser backends, allowing consumers to work with IFC data in a backend-agnostic way.

§Architecture

The crate is organized around several key traits:

§Example

use bimifc_model::{IfcParser, IfcModel, EntityId};

// Use any parser that implements IfcParser
let parser: Box<dyn IfcParser> = get_parser();
let model = parser.parse(ifc_content)?;

// Access data through trait interfaces
let resolver = model.resolver();
if let Some(entity) = resolver.get(EntityId(123)) {
    println!("Entity type: {:?}", entity.ifc_type);
}

Re-exports§

pub use error::*;
pub use geometry::*;
pub use properties::*;
pub use resolver::*;
pub use spatial::*;
pub use traits::*;
pub use types::*;

Modules§

error
Error types for IFC parsing operations
geometry
Geometry source trait for 3D rendering
properties
Property and quantity access for IFC entities
resolver
Entity resolution trait for looking up and resolving IFC entities
spatial
Spatial structure and hierarchy traversal
traits
Core traits for IFC parsing
types
Core types for IFC data representation