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.
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.