LTplus-AG/ifc-lite
Parse, view, query, edit, validate and export building models. Browser-first WebGPU viewer, TypeScript SDK, CLI, MCP server and Rust/WASM core with dual exact-arithmetic & SMlib geometry kernels.
IFClite – A full‑stack toolkit for working with IFC building‑information models
What it is – IFClite is a collection of open‑source libraries and tools that let developers parse, query, edit, validate, render and export Industry Foundation Classes (IFC) files. The heavy‑lifting (STEP parsing, exact‑arithmetic geometry, export formats) lives in a Rust core compiled to WebAssembly, while thin JavaScript/TypeScript wrappers expose the functionality as modular npm packages. A WebGPU‑based viewer runs entirely in the browser, and a CLI/server layer makes the same capabilities available from the terminal, CI pipelines or AI agents.
Core pieces (the "packages")
| Piece | What it does | Typical use |
|---|---|---|
@ifc-lite/parser |
Fast STEP tokenisation and column‑arithmetic parsing of IFC2X3, IFC4/4X3 and IFC5 (IFCX). | Load a model in a browser or Node script. |
@ifc-lite/geometry |
Exact‑arithmetic CSG kernel; streams mesh batches, can export glTF/GLB, CSV, JSON‑LD, Parquet. | Turn raw IFC data into renderable meshes. |
@ifc-lite/renderer |
WebGPU viewer that can load meshes, pick entities and display a 3‑D scene. | Stand‑alone browser viewer (create-ifc-lite). |
@ifc-lite/query |
High‑level BIM query API (bim.query()) plus optional DuckDB‑WASM SQL interface. |
Find doors, walls, or run ad‑hoc analytics. |
@ifc-lite/ids |
Parse IDS (Information Delivery Specification) XML and validate a model against it. | Quality‑control for BIM delivery. |
@ifc-lite/mutations |
Editable property view with undo history. | Programmatic BIM editing. |
@ifc-lite/export |
Export to STEP, IFC5/IFCX, glTF/GLB, CSV, JSON‑LD, Parquet. | Interoperability with other tools. |
@ifc-lite/cli |
Full‑toolkit command‑line wrapper (info, query, schedule, clash, diff, merge, convert, view, …). | Scripting, CI, AI‑agent integration. |
@ifc-lite/mcp |
Model Context Protocol server (stdio or HTTP) that lets external agents query/edit BIM data. | Plug‑in AI assistants. |
| …and many optional add‑ons** (threejs, babylonjs, collab, bcf, drawing‑2d, etc.)** | Provide glue code for popular 3‑D engines, real‑time collaboration, clash detection, etc. |
How you would use it
1. Quick start in the browser
npx create-ifc-lite my-viewer --template react
cd my-viewer && npm install && npm run dev
A React app with a WebGPU canvas appears; drag‑and‑drop an .ifc file and you get an interactive 3‑D view with picking support.
2. Headless processing (Node / CI)
import { openModel } from '@ifc-lite/sdk/headless';
const model = await openModel(await readFile('model.ifc'));
console.log(model.bim.query().byType('IfcDoor').count());
model.close();
The SDK gives you a bim API for queries, plus a report object that tells you whether the file was parsed completely.
3. Custom rendering (Three.js / Babylon.js)
Parse with @ifc-lite/parser → feed the mesh array returned by GeometryProcessor.processAdaptive into your favourite engine. The README shows a minimal Three.js integration.
4. Validation & export
import { parseIDS, validateIDS } from '@ifc-lite/ids';
const ids = parseIDS(xml);
const report = await validateIDS(ids, createDataAccessor(store), modelInfo);
After validation you can export to STEP, glTF, Parquet, or the newer IFC5/IFCX JSON+USD format.
Performance highlights (as claimed in the README)
- Streaming first‑render – geometry batches are sent to the GPU while the file is still being parsed, so a model becomes visible almost instantly.
- Exact‑arithmetic CSG – guarantees 99.9 %+ agreement with the reference IfcOpenShell benchmark.
- Parse speed – STEP tokenisation ~1.2 GB /s; full parse ~50 MB /s.
- Footprint – a lazily‑loaded WASM module of ~2.6 MiB gzipped plus tiny JS wrappers.
- Full schema coverage – 100 % of IFC4 (776 entities) and IFC4X3 (876 entities).
Who might benefit?
| Audience | Why it matters |
|---|---|
| Web developers building BIM viewers – get a ready‑made WebGPU viewer or plug the geometry into Three.js/Babylon.js. | |
| Backend engineers / CI pipelines – use the CLI or the headless SDK to automate quality checks, generate schedules, or run clash detection without a GUI. | |
Data scientists / Python users – the ifclite-geom wheel runs the same Rust geometry kernel inside NumPy, enabling large‑scale analysis. |
|
AI/agent developers – the mcp server lets LLM‑based agents ask natural‑language questions (ifc-lite ask model.ifc "how many walls?") or edit BIM data programmatically. |
|
Collaborative platform builders – optional CRDT‑based collaboration packages (@ifc-lite/collab) for real‑time multi‑user editing. |
Getting the code & contributing
- Build prerequisites – Rust nightly with
wasm32-unknown-unknowntarget,wasm-pack, and Node (pnpm). The repo builds the WASM bundle fromrust/on every CI run. - Typical dev flow
curl -sSf https://sh.rustup.rs | sh # install Rust cargo install wasm-pack git clone https://github.com/LTplus-AG/ifc-lite.git cd ifc-lite pnpm install && pnpm build && pnpm dev # launches local viewer - Test fixtures –
pnpm fixturesdownloads a curated set of IFC models used for benchmarks and regression tests. - Community – GitHub Discussions, Issues, and a regular release changelog. License is MPL‑2.0, allowing commercial use with the usual copyleft requirements.
TL;DR
IFClite is a real, production‑grade open‑source BIM toolkit that covers the entire IFC workflow—from parsing STEP files in the browser to server‑side batch processing, validation against IDS, geometry export, and even AI‑agent integration. Its modular design (Rust‑WASM core + npm packages) makes it easy to pick just the pieces you need, whether you are building a web viewer, a CI quality‑gate, or a Python data‑science pipeline.
Related
- Project
- Project
- Project
- Project