A small CLI that extracts the spatial hierarchy of an IFC file as xeokit-sdk-compatible metadata JSON.
It replaces the .NET-based
opf/xeokit-metadata (a fork of
bimspot/xeokit-metadata).
Built on web-ifc, which:
- supports IFC2x3, IFC4 and IFC4x3 (incl. Add2);
- requires only Node.js at runtime (no .NET, no Python);
- is actively maintained by That Open Company.
npm install -g @openproject/web-ifc-xeokit-metadata
web-ifc-xeokit-metadata path/to/model.ifc path/to/model.jsonThe output JSON matches the schema produced by the previous .NET tool and is
consumed by gltf2xkt in the OpenProject BIM conversion pipeline (see
modules/bim/app/services/bim/ifc_models/view_converter_service.rb in
opf/openproject).
npm install
npm run dev # tsx watch on src/index.ts
npm test # vitest
npm run lint
npm run build # compiles src/ to dist/Releases use changesets. Each pull
request that changes the package needs a changeset. Run npx changeset and
commit the generated file. Pull requests that should not cause a release get
the skip changeset label.
After a merge to main, the Release workflow opens or updates a
"Version Packages" pull request that bumps the version and the changelog.
Merging that pull request publishes the package to npm with provenance, tags
vX.Y.Z and creates a GitHub release.
See test/fixtures/README.md for the source and
license of every .ifc file shipped in this repository.