CAD Exchanger SDK
The reader can read files with external .mtl (material library) files, files with both multiple and single parts. In the case of multiple parts they are created as roots of the resulting model (ModelData_Model).
The OBJ import parameters are controlled by OBJ_ReaderParameters. The following table contains a list of parameters for OBJ import:
Specifies the measurement unit to interpret coordinates in the input .obj file.
The value is a scale coefficient to millimeters. For instance to interpret file coordinates in meters, the value of 1000. must be used. By default, coordinates values are interpreted in millimeters.
The OBJ export parameters are controlled by OBJ_WriterParameters. The following table contains a list of parameters for OBJ export:
Specifies whether a separate .mtl file (with material library) should be created.
If the value is true then an .mtl file is created. The .mtl file will have the same base file name as the resulting .obj file.
If the value is false then no colors will be stored and no .mtl file will be created.
Specifies whether vertex normals should be saved in a resulting .obj file.
If the value is true then normals are stored in the file. In this case, third-party viewers may display 3D models in smooth shading. If the value is false then normals are not stored in the .obj file, and the third-party viewers may display 3D models in flat shading.