CLI tool that drives the canonical "IFC → glTF/MetaModel → XGF /
DataModel" pipeline, producing xeokit's compact
XGF
geometry format plus matching DataModel JSON for streamed loading.
Bridges the two-stage conversion that BIM workflows typically run:
IFC → glTF + MetaModel — done by an external converter
(e.g. ifc2gltfcxconverter); produces a JSON manifest listing
every output chunk.
glTF + MetaModel → XGF + DataModel — done by xgf (this
CLI); batch-loads the manifest and emits xeokit-native chunks.
Pair the output with
ModelChunksLoader for
streamed loading in a Viewer.
Shape
%%{init:{"theme":"dark"}}%%
flowchart LR
A[model.ifc] --> B[ifc2gltf — external]
B --> C[ifc2gltfManifest.json<br/>+ model.glb + model.json chunks]
C --> D[xgf CLI]
D --> E[xgfManifest.json<br/>+ model.xgf + model.json chunks]
E --> F[ModelChunksLoader]
F --> G[SceneModel + DataModel<br/>in browser]
C -. convertIfc2gltfManifest .-> H[ModelChunksManifestParams]
H --> F
%%{init:{"theme":"default"}}%%
flowchart LR
A[model.ifc] --> B[ifc2gltf — external]
B --> C[ifc2gltfManifest.json<br/>+ model.glb + model.json chunks]
C --> D[xgf CLI]
D --> E[xgfManifest.json<br/>+ model.xgf + model.json chunks]
E --> F[ModelChunksLoader]
F --> G[SceneModel + DataModel<br/>in browser]
C -. convertIfc2gltfManifest .-> H[ModelChunksManifestParams]
H --> F
flowchart LR
A[model.ifc] --> B[ifc2gltf — external]
B --> C[ifc2gltfManifest.json<br/>+ model.glb + model.json chunks]
C --> D[xgf CLI]
D --> E[xgfManifest.json<br/>+ model.xgf + model.json chunks]
E --> F[ModelChunksLoader]
F --> G[SceneModel + DataModel<br/>in browser]
C -. convertIfc2gltfManifest .-> H[ModelChunksManifestParams]
H --> F
Features
Batch-converts a manifest — point xgf at an IFC→glTF
manifest and the CLI walks every chunk, emitting matching XGF
geometry + DataModel JSON.
Manifest adapter — convertIfc2gltfManifest converts
the IFC-converter manifest shape into the
model!streaming.ModelChunksManifestParams | ModelChunksManifestParams
shape, so the browser-side loader can consume both manifest
styles uniformly.
XGF version selection — -f / --format chooses the target
XGF format version; the CLI registers every supported XGF
exporter so older viewer releases stay compatible.
Optimised geometry — XGF is xeokit's compact binary
format; chunks are smaller than the glTF source and load
~10× faster in the viewer.
Installation
npminstall@xeokit/sdk
Usage
Converting a Batch of glTF + MetaModel Files
Use the xgf tool to convert a batch of glTF+MetaModel files into a batch of XGF+DataModel files.
xeokit gltf → XGF Converter
CLI tool that drives the canonical "IFC → glTF/MetaModel → XGF / DataModel" pipeline, producing xeokit's compact XGF geometry format plus matching DataModel JSON for streamed loading.
Bridges the two-stage conversion that BIM workflows typically run:
ifc2gltfcxconverter); produces a JSON manifest listing every output chunk.xgf(this CLI); batch-loads the manifest and emits xeokit-native chunks.Pair the output with ModelChunksLoader for streamed loading in a Viewer.
Shape
Features
xgfat an IFC→glTF manifest and the CLI walks every chunk, emitting matching XGF geometry + DataModel JSON.-f / --formatchooses the target XGF format version; the CLI registers every supported XGF exporter so older viewer releases stay compatible.Installation
Usage
Converting a Batch of glTF + MetaModel Files
Use the
xgftool to convert a batch of glTF+MetaModel files into a batch of XGF+DataModel files.The input manifest,
ifc2gltfManifest.json, follows this structure:Convert to XGF using:
To load
ifc2gltfManifest.jsoninto a SceneModel and DataModel:The generated
xgfManifest.json:To load
xgfManifest.json: