Converts a CAD file to CDXFB format used in CAD Exchanger Web Toolkit.
The CDXFB Converter shows how to import models from different formats and export their data to CDXFB format, which can be used to display CAD models in the web browser with the help of CAD Exchanger Web Toolkit.
Export to CDXFB format is enabled using ModelData_WriterParameters:
The options below can be used to optimize the export. In this snippet the parameters are set to default values explicitly. Assign them the values you need for customization.
Let's call ModelData_Model::Save() method to store data in CDXFB file format:
You can try this example with the following model:
./examples/models/Radial_Engine.jt
CDXFB model usually consists of multiple files. When ModelData_Model::Save() is called with "scenegraph.cdxfb", a few auxiliary files will be created next to scenegraph.cdxfb. Therefore writing multiple CDXFB models to a single directory might make it hard to navigate. It is recommended to save each CDXFB model to a separate folder. Any folders you specify in the output path that are not yet present in the filesystem will be created automatically.
Save the model to the source folder for this example:
./examples/cxx/conversion/cdxfbconverter/Radial_Engine.jt.cdxfb/scenegraph.cdxfb