Skip to content

About

Terminal BIM file inspector in pure Rust. Custom STEP/ISO-10303 parser, audits 45 MB files in 2 seconds.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

31 Commits

Folders and files

Repository files navigation

IFC Inspector

A pure-Rust terminal inspector for IFC/BIM models — custom STEP parser, type browser, instance-level GlobalIds, zero external IFC dependencies.

IFC Inspector Demo

Rust License: MIT CI


Why this exists

Opening an IFC file usually means Revit, Solibri, or a cloud viewer — heavy tools for lightweight questions:

Question IFC Inspector
How many wall types are in this export? Category → Types panel
Do doors have fire ratings in the property set? Type Detail → properties
Which GlobalId belongs to this instance? Instance browser → copy GUID
What changed between two coordination drops? --json export → diff

IFC Inspector answers these in a terminal: parse locally, browse by storey and category, drill into types and instances, export to CSV/JSON.

Built by an architect who writes parsers — not a generic viewer wrapper.


Highlights

  • Custom STEP/IFC parser in pure Rust (#![forbid(unsafe_code)]) — no ifc-rs, no C bindings
  • Type-first browsing — families/types with instance counts, aligned with how BIM coordinators think
  • Storey filtering — three-panel dashboard: Levels → Categories → Types
  • Instance-level inspection — per-instance GlobalId, properties, storey assignment
  • Untyped detection — elements without IfcRelDefinesByType surface in an Untyped category
  • Stable JSON export — ExportProject DTO designed for Power BI and scripts, not internal maps
  • Tested & CI — 17 tests, fixture IFC model, GitHub Actions (fmt + clippy + test)

Quick start

# Install from source
git clone https://github.com/Bochyn/ifc-inspector
cd ifc-inspector
cargo build --release

# Interactive TUI
./target/release/ifc-inspector model.ifc

# Export only (no terminal UI)
./target/release/ifc-inspector model.ifc --csv types.csv --json report.json

Or: cargo install ifc-inspector


Documentation

Document Audience Contents
Usage Guide BIM users, QA CLI, TUI navigation, export formats, workflows
IFC Domain Everyone What the parser extracts and why it matters
Architecture Engineers Modules, data flow, parsing pipeline
Design Decisions Reviewers Trade-offs, scope, engineering rationale
API Reference Rust developers Library types, examples, query layer

Full index: docs/index.md


Keyboard reference

View Keys
Dashboard ← → / h l switch panel · ↑ ↓ / j k navigate · Enter type detail · q quit
Type Detail ← → instance · ↑ ↓ scroll props · Enter instance browser · Esc back
Instance Browser ↑ ↓ navigate · Esc / Enter back

Details and ASCII layouts: Usage Guide → Interactive Mode


Library example

use ifc_inspector::parser::{parse_ifc_file, parse_step, extract_model};
use ifc_inspector::model::ProjectView;
use ifc_inspector::export::ExportProject;

fn inspect(path: &str) -> Result<(), Box<dyn std::error::Error>> {
    // One-shot from disk
    let project = parse_ifc_file(path)?;

    // Or testable pipeline without filesystem
    // let step = parse_step(&std::fs::read_to_string(path)?)?;
    // let project = extract_model(&step, path);

    println!("{} · {} · {} instances",
        project.name, project.schema, project.total_elements());

    // Filter by first storey (index 1; 0 = All)
    let view = ProjectView::new(&project, 1);
    if let Some(walls) = project.categories.iter().find(|c| c.name == "Walls") {
        println!("Wall types on selected level: {}", view.filtered_types(walls).len());
    }

    // Stable export schema
    let export = ExportProject::from_project(&project);
    println!("Export summary: {:?}", export.summary);

    Ok(())
}

More: API Reference


Tech stack

Layer Choice
Language Rust 2021, #![forbid(unsafe_code)]
CLI clap 4.x
TUI ratatui 0.29 + crossterm
Errors thiserror + color-eyre
Export serde / csv
Quality Clippy pedantic (deny warnings), rustfmt, CI

Supported IFC coverage

Schemas: IFC2X3, IFC4 (including legacy IfcDoorStyle / IfcWindowStyle)

Priority categories: Walls, Doors, Windows, Furniture, Fixtures

Also extracted: Slabs, Columns, Beams, Stairs, Railings, Roofs, Coverings, Curtain Walls, Untyped orphans

Property sources: IfcPropertySet, IfcElementQuantity (Length / Area / Volume)

Full entity mapping: IFC Domain → Supported entities


Contributing

cargo test
cargo clippy --all-targets -- -D warnings
cargo fmt --all -- --check

See Design Decisions before large changes.


License

MIT — LICENSE

Author

Mateusz Bochyński · Architect · Developer · Creative Technologist

GitHub · LinkedIn

About

Terminal BIM file inspector in pure Rust. Custom STEP/ISO-10303 parser, audits 45 MB files in 2 seconds.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages