Skip to main content

Crate bimifc_parser

Crate bimifc_parser 

Source
Expand description

BIMIFC Parser - High-performance IFC parser

This crate provides a fast, memory-efficient parser for IFC (STEP) files. It implements the traits defined in bimifc-model for a clean abstraction.

§Features

  • Fast tokenization using nom combinators
  • SIMD-accelerated scanning using memchr
  • Lazy entity decoding - only parse entities when needed
  • Arc-based caching - efficient memory sharing
  • Progress reporting for large files

§Example

use bimifc_parser::StepParser;
use bimifc_model::IfcParser;

let parser = StepParser::new();
let model = parser.parse(ifc_content)?;

// Access entities
let walls = model.resolver().find_by_type_name("IFCWALL");
println!("Found {} walls", walls.len());

Re-exports§

pub use ifcx::is_ifcx_format;
pub use ifcx::IfcxGeometry;
pub use ifcx::IfcxModel;
pub use lighting::export_to_json;
pub use lighting::extract_lighting_data;
pub use lighting::goniometric_to_eulumdat;
pub use lighting::goniometric_to_ldt;
pub use lighting::light_source_to_eulumdat;
pub use lighting::light_source_to_ldt;
pub use lighting::DistributionPlane;
pub use lighting::LightDistributionData;
pub use lighting::LightFixtureData;
pub use lighting::LightSourceData;
pub use lighting::LightingExport;

Modules§

ifcx
IFC5 (IFCX) JSON format parser
lighting
Lighting data extraction from IFC files

Structs§

EntityDecoder
Lazy entity decoder with caching
EntityScanner
Fast entity scanner for IFC files
ParsedModel
Parsed IFC model implementing the IfcModel trait
StepParser
Main STEP/IFC parser implementing IfcParser trait
UnifiedParser
Unified parser that auto-detects format

Enums§

Token
Raw token from STEP file (before conversion to AttributeValue)

Functions§

parse
Quick parse function for simple use cases
parse_auto
Auto-detect format and parse (IFC4 STEP or IFC5 IFCX)
parse_entity
Parse a complete entity definition
parse_with_progress
Parse with progress reporting