Hide menu
No Matches
Transfer with Parameters Example

Table of Contents

Configures the conversion and maps a file from one CAD format to another.


The workflow implemented in this example is basically the same as in Transfer Example. The difference lies in that the parameters are specified for multiple readers and multiple writers, showcasing how one might set up ModelData_ModelReader and ModelData_ModelWriter for multi-format use.

The key parts are the specifications of parameters for STEP and JT readers:

ModelData_ModelReader aReader;
// Let's set new parameters
STEP_ReaderParameters aSTEPReaderParams;
aSTEPReaderParams.PreferredBRepRepresentationType() = STEP_ReaderParameters::AdvancedBRep;
aReader.SetReaderParameters (aSTEPReaderParams);
JT_ReaderParameters aJTReaderParams;
aJTReaderParams.LayerConversionMode() = JT_ReaderParameters::LayerFilter;
aReader.SetReaderParameters (aJTReaderParams);

The parameters also provided for OBJ and JT writers:

ModelData_ModelWriter aWriter;
OBJ_WriterParameters anOBJParams;
// Set some writer parameters
anOBJParams.LengthUnit() = Base_LengthUnit::Base_LU_Centimeters;
anOBJParams.ToGenerateMtlFile() = true;
aWriter.SetWriterParameters (anOBJParams);
JT_WriterParameters aJTParams;
aJTParams.SetFileSplitMode (JT_WriterParameters::PerPart);
aWriter.SetWriterParameters (aJTParams);


CAD Exchanger SDK provides a lot of packages for model data conversion. It's possible to read, write and transfer almost every existing model data format simply using algorithm described above.

To learn more about conversion possibilities please visit the Converter Details.