bimifc-model 0.2.0

Trait definitions and shared types for BIM IFC parsing
Documentation
  • Coverage
  • 49.15%
    232 out of 472 items documented0 out of 136 items with examples
  • Size
  • Source code size: 85.71 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 15.03 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 27s Average build duration of successful builds.
  • all releases: 28s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • holg/bimifc
    18 1 1
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • holg

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:

  • [IfcParser] - Entry point for parsing IFC content
  • [IfcModel] - Read-only access to a parsed IFC model
  • [EntityResolver] - Entity lookup and reference resolution
  • [PropertyReader] - Access to property sets and quantities
  • [SpatialQuery] - Spatial hierarchy traversal and search
  • [GeometrySource] - Geometry data for rendering (optional extension)

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);
}