Drawings SDK supports exporting a .dxf, .dwg, or .dgn file to a Collada format file (.dae file) and importing a Collada file into a .dwg or .dxf file. The export and import modules are single support modules for the Drawings SDK, and they are available in dynamic and static forms for Windows, Linux, and macOS (x86 and x64 versions). All source is available in the release packages.
The following components are available:
Supports exporting the geometry of 3D objects, lights, and materials.
There are two methods available.
The first method exports all entities in the active space of pDb to a file with the filename provided in pFileName:
virtual OdResult exportCollada(OdDbBaseDatabase *pDb, const OdString& pFileName, const ODCOLORREF* pPallete, int numColors = 256);
The second method exports a single entity defined by pEntity of pDb to a file with the filename provided in pFileName. The color palette used with export should be posted via pPallete and numColors. This method is used for setting up the correct pallete for an export device:
virtual OdResult exportCollada(OdDbBaseDatabase *pDb, const OdGiDrawable &pEntity, const OdString& pFileName, const ODCOLORREF* pPallete, int numColors = 256);
The command line format for the sample applications is:
usage: ExDgnColladaExport <input file> <output file>
<input file> - .dgn file
<output file> - .dae file
usage: OdColladaExport <input file> <output file>
<input file> - .dxf or .dwg file
<output file> - .dae file
Here you can find free Collada sample files:
For viewing .dae files you can use Collada viewing applications, for example Blender.
Working with Other File Formats
Importing Collada (.dae) Files
Copyright © 2002 – 2021. Open Design Alliance. All rights reserved.
|