Converts a CAD file to CDXWEB format used in Web Toolkit.
The CDXWEB Converter shows how to import models from different formats and export their data to CDXWEB format, which can be used to display CAD models in the web browser with the help of Web Toolkit.
Export to CDXWEB 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 CDXWEB file format:
You can try this example with the following model:
./examples/models/Radial_Engine.jt
CDXWEB model usually consists of multiple files. When ModelData_Model::Save() is called with "scenegraph.cdxweb", a few auxiliary files will be created next to scenegraph.cdxweb. Therefore writing multiple CDXWEB models to a single directory might make it hard to navigate. It is recommended to save each CDXWEB 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/cdxwebconverter/Radial_Engine.jt.cdxweb/scenegraph.cdxweb