Replace .NET xeokit-metadata with a web-ifc-based Node CLI#23469
Draft
wielinde wants to merge 1 commit into
Conversation
Drops the .NET 6 runtime dependency from the BIM IFC conversion pipeline. The new extractor lives at extensions/web-ifc-xeokit-metadata and supports IFC2X3, IFC4 and IFC4X3_ADD2 -- the latter being the schema family the legacy .NET tool cannot parse. For the IFC2X3 and IFC4 fixtures, a parity test compares the new tool's output against reference JSON files produced by the .NET tool. The IFC4X3_ADD2 fixtures cannot be compared this way (the .NET tool fails to parse them), so they are only validated structurally: valid JSON, correct schema field, parent links form a tree. Refs: https://community.openproject.org/wp/75484 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Work package: #75484
Goals
dotnet-runtime-6.0(and the abandonedopf/xeokit-metadatafork) on the image was the IFC metadata extractor that walks the spatial hierarchy and emits a JSON tree for the xeokit viewer.IFC4X3_ADD2). The legacy .NET tool fails to parse IFC4X3 files outright —Xbim.Ifc.IfcStore.Openthrows on the schema — which would block adopting IFC4.3 for infrastructure projects (bridges, roads, rail, etc.).What changed
The metadata extractor is reimplemented as a small Node.js CLI built on
web-ifc(MPL-2.0, actively maintained by That Open Company). That Open Company and the xeokit project are independent vendors, but xeokit-sdk itself ships aWebIFCLoaderPluginbuilt on top of web-ifc — so adopting web-ifc as our parser stays within an ecosystem the viewer side already supports.extensions/web-ifc-xeokit-metadata/, sitting alongsideop-blocknote-hocuspocus. TypeScript, vitest, ESLint — same conventions as the existing extension.<input.ifc> <output.json>), identical output JSON shape ({ id, projectId, author, createdAt, schema, creatingApplication, metaObjects[] }). The view conversion service swaps one constant string.(id, name, type, parent)tuples.schemafield, parent links form a tree rooted at the project.minimal.ifc, IFC2X3) + 3 from buildingSMART's official PCERT samples (Building-Architecture in IFC4 and IFC4X3_ADD2 for schema-parity comparison, plus Infra-Rail in IFC4X3_ADD2 for infrastructure entities). All buildingSMART fixtures licensed CC BY 4.0 with attribution intest/fixtures/README.md.docker/prod/setup/preinstall-common.sh— removed the .NET tarball download.docker/prod/setup/postinstall-common.sh— installs the extension's runtime deps vianpm install --omit=devand writes a/usr/local/bin/web-ifc-xeokit-metadatawrapper.docker/dev/backend/scripts/setup-bim— same pattern for the dev container.modules/bim/bin/setup_dev.sh— same for native host setup. Also removes thedotnet-runtime-6.0apt install.Schema support after this PR (metadata side only)
Out of scope — logical next step
This PR only fixes the metadata side of the BIM conversion pipeline. The geometry side still uses
IfcConvert 0.7.11, which also cannot parse IFC4.3 ADD2. To get full end-to-end IFC4.3 ADD2 support we need a follow-up:IfcConvertto IfcOpenShell 0.8.5 (current latest in the 0.8 series, where IFC4x3 parsing landed).Infra-Rail-IFC4X3.ifcis included specifically to exercise IFC4X3-only entities (e.g.IfcRailway) that don't exist in IFC4.This is intentionally separated because the IfcConvert upgrade has its own risk surface (no formal changelog, reported regressions vs 0.7.x on edge-case files) and benefits from being reviewed in isolation.
Test plan
cd extensions/web-ifc-xeokit-metadata && npm install && npm test— 18 tests passnpm run lint— cleandocker compose exec -u root backend docker/dev/backend/scripts/setup-bimsucceeds;which web-ifc-xeokit-metadatareturns/usr/local/bin/web-ifc-xeokit-metadatawhich xeokit-metadatareturns nothing (legacy tool gone)BIM_SUPPORT=trueand confirm final image size shrank (no .NET runtime)🤖 Generated with Claude Code