CAD Exchanger technical specification: CLI settings file

Table of Contents

  1. Introduction
  2. File syntax
  3. Parameters description
    1. Common settings
    2. B-Rep tessellation settings
    3. Format-specific settings
  4. Appendix A. Settings file template

Introduction

Behavior of CAD Exchanger Command Line Interface (CLI) can be controlled with the help of user-defined parameters. These parameters can be stored in a specific configuration file which is provided as an additional command line argument as follows:

ExchangerConv.exe -i myfile.jt -e myfile.stp -s settings.ini

Baseline version of the settings file is provided in the Appendix.

File syntax

The settings file follows the .ini format and has the following syntax:

[section1]
<parameter11>=<value11>
<parameter12>=<value12>

[section2]
<parameter21> =<value21>

The settings file provided via command line is not required to contain all parameters. If only a subset of parameters is specified the rest will be taken using their default values or (in the case of existing files in the above mentioned locations) values specified in those files. The latter can happen if CAD Exchanger GUI was launched at least once on the given machine.

Parameters description

Descriptions of the key parameters and allowed values are provided below. Not documented parameters normally should not be modified.

3.a Common settings

NameValuesDescription
[common] section
version integer Specifies version of the settings file. Should be >= 208.
concurrent true or false Specifies whether parallel computations can be used on multi-core systems. When enabled allows to increase performance compute-intensive operations.

3.b B-Rep tessellation settings

NameValuesDescription
[triangulation] section
granularity 0-3 Granularity level used to tessellate B-Rep models:
0 – Coarse
1 – Medium
2 – Fine
3 – Custom
Affects quality of the generated mesh when converting B-Rep models (e.g. STEP, IGES, etc) into mesh formats (STL, VRML, X3D, etc).
The parameters below are only used when granularity has value 3. For values 0-2 predefined values of respective parameters are used.
angularprecision double, 0-? Value in radians defining angular precision (maximal differences between curve tangents when tessellating edges). Only used when ‘granularity’ equals 3.
precision double, (0-1) Specifies a relative value (in percentage of bounding box) of the chordal deviation. The chordal deviation is maximum deviation between edge curve and chord when tessellating the B-Rep. Only used when ‘granularity’ equals 3 and ‘isrelative’ equals true.
absprecision double, >0 Specifies an absolute value of chordal deviation in mm. Only used when ‘granularity’ equals 3 and ‘isrelative’ equals false.
isrelative true or false Specifies whether the value of chordal precision (see ‘precision’ parameter) specifies an absolute value (in mm) or relative (percentage of a bounding box).
Only used when ‘granularity’ equals 3.

3.c Format-specific settings

[%7B5129dc5b-43dc-4a18-a041-964a7440339e%7D] section (JT exporter)
split 0-2 Specifies mode of writing JT file with external references:
0 – monolithic JT file
1 – per part, central file with scene graph with each part in own file
2 – shattered, each sub-assembly in own file which may refer another file
savebrep true or false Specifies whether part B-Rep representations should be saved.
savepoly true or false Specifies whether polygonal representations should be saved.
[%7B3bafd3b1-b3ed-4b97-b396-6218cebf4d6d%7D] section (OBJ importer)
units 0-10 Defines length units which to interpret the input file in:
0 - millimeters
1 – centimeters
2 – meters
3 – inches
4 – feet
5 – yards
6 - micrometers
7 – decimeters
8 - kilometers
9 – mils
10 – miles
[%7B8d6be5e6-c724-4d69-822e-c11df1faac7f%7D] section (OBJ exporter)
mtlgeneration.mode true or false Specifies whether a separate .mtl file (with material library) should be created.
If true then an .mtl file is created. It will have the same base file name as the resulting .obj file.
If false then no colors will be stored and no .mtl file will be created.
[%7B1186b46f-b3fc-4ae6-92a1-62a4409e0870%7D] section (Rhino importer)
meshindex 0-3 Specifies the type of the mesh to import. Rhino files can contain more than one polygonal representations. The one which will be imported is selected considering the parameter:
0 (default)- the most comprehensive representation is selected automatically, usually this is Render mesh.
1 - Render mesh
2 - Analysis mesh
3 - Preview mesh
hiddenobjects.mode true or false Specifies whether hidden objects should be imported. Each Rhino entity has visibility property, which determines if it is visible or not. Depending on parameter invisible entities will be imported (true) or not (false, default).
[%7B2d3d3a68-5a9d-443d-824a-054f80186e2e%7D] section (Rhino exporter)
units 0-10 Specifies length unit. Refer to OBJ importer for description.
savebrep true or false Specifies whether part B-Rep representations should be saved.
savepoly true or false Specifies whether polygonal representations should be saved.
[%7Bef0714ca-fd0e-4d98-9fd5-94648099af56%7D] Section (STL exporter)
ascii.mode true or false Specifies whether generated STL files should be written in text form (true) or binary form (false).
units 0-10 Specifies length unit. Refer to OBJ importer for description.

4 Appendix A.
Settings file template

[common]
version=208
concurrent=true

[triangulation]
granularity=2
isrelative=true
absprecision=1
precision=0.004
angularprecision=0.3490658503988659

[%7B1186b46f-b3fc-4ae6-92a1-62a4409e0870%7D]
displayname=Rhino importer
meshindex=0
hiddenobjects.mode=false

[%7B62c7c279-ae3a-47ac-9342-d471ec37c2b8%7D]
displayname=ACIS exporter
format=1

[%7Bef0714ca-fd0e-4d98-9fd5-94648099af56%7D]
displayname=STL exporter
ascii.mode=false

[%7B5129dc5b-43dc-4a18-a041-964a7440339e%7D]
displayname=JT exporter
split=0
savebrep=true
savepoly=true

[%7B8d6be5e6-c724-4d69-822e-c11df1faac7f%7D]
displayname=OBJ exporter
mtlgeneration.mode=true

[%7B2d3d3a68-5a9d-443d-824a-054f80186e2e%7D]
displayname=Rhino exporter
units=0
savebrep.mode=true
savepoly.mode=true