Multi-format ingest — register any
ModelLoader (DotBIM, IFC, glTF,
LAZ, …) and the converter wires it into the pipeline.
Multi-format export — same for
ModelExporters (XGF, DotBIM,
DataModel JSON, …).
Declarative pipelines — pipelines.X = { inputs, outputs }
pre-binds a named conversion (e.g. dotbim2xgf); the runtime
resolves which loader / exporter to use from the registered
maps.
Reports — per-conversion inspection (validation
findings), manifest (file inventory), and stats (timings,
counts, sizes) reports are emitted alongside the outputs for
downstream tooling.
Programmatic API + CLI — same converter wraps inside the
xeoconvert CLI binary; use either
the class directly in a build pipeline or the binary from a
shell script.
exporters: a map of exporter instances (keyed by id)
pipelines: a map of pipeline configs (keyed by pipeline id)
Note: outputs and reports in ModelConverterRequest are currently required by the type,
but the converter does not automatically write files to disk. The converted file data is returned on
ModelConverterResult.outputs, and it’s up to you to persist it (e.g., using fs.writeFile).
Converting a DotBIM file to XGF and DataModelParams JSON
xeokit Multi-Format Model Converter
An extensible tool for converting 3D models between various formats.
This module provides the ModelConverter class for converting 3D model data between multiple file formats.
Shape
Features
pipelines.X = { inputs, outputs }pre-binds a named conversion (e.g.dotbim2xgf); the runtime resolves which loader / exporter to use from the registered maps.inspection(validation findings),manifest(file inventory), andstats(timings, counts, sizes) reports are emitted alongside the outputs for downstream tooling.Installation
Install the xeokit SDK:
Usage
Using the ModelConverter class
The ModelConverter manages conversions using:
You configure the converter with ModelConverterParams:
loaders: a map of loader instances (keyed by id)exporters: a map of exporter instances (keyed by id)pipelines: a map of pipeline configs (keyed by pipeline id)Converting a DotBIM file to XGF and DataModelParams JSON
1) Import dependencies
2) Set up the converter
Create a ModelConverter configured with loaders/exporters and a
dotbim2xgfpipeline:.bim.xgf3) Perform the conversion
Provide the input via
fileData(or usefilePathto let the converter read it). Outputs are returned in result.outputs.Converting XGF and DataModelParams JSON back to DotBIM
1) Import dependencies
2) Set up the converter
Configure loaders for XGF + DataModelParams, and a DotBIM exporter:
3) Perform the conversion
Advanced usage
Sharing models across multiple inputs and outputs
Use
sceneModel/dataModelids to make multiple inputs populate the same models, and multiple outputs export from those same models.