0% found this document useful (0 votes)
23 views

Cad Data Translators

The CAD to ANSA Translators by BETA CAE Systems facilitate the translation of various CAD formats into ANSA, supporting platforms like Windows, Linux, and Mac OS. The document outlines installation procedures, licensing requirements, and details on using the translators through command-line or GUI. It also highlights compatibility notes and additional requirements for successful translations.

Uploaded by

zyi1457075692
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views

Cad Data Translators

The CAD to ANSA Translators by BETA CAE Systems facilitate the translation of various CAD formats into ANSA, supporting platforms like Windows, Linux, and Mac OS. The document outlines installation procedures, licensing requirements, and details on using the translators through command-line or GUI. It also highlights compatibility notes and additional requirements for successful translations.

Uploaded by

zyi1457075692
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

CAD to ANSA Translators

V21.0.x

CATIA, NX, JT, PTC Creo Elements/Parametric,


SolidWorks, Inventor, Parasolid, Rhino
CAD to ANSA Translators

Table of Contents

SECTION 1. INTRODUCTION TO THE CAD TO ANSA TRANSLATORS &


SUPPORTED PLATFORMS ........................................................................................... 2
1.1. General ......................................................................................................................................................... 2
1.2. Supported Platforms .................................................................................................................................... 3
1.3. Additional Requirements ............................................................................................................................. 4
1.3.1. Notes regarding incompatibilities that may occur with some outdated Windows platforms ....................... 4
1.3.2. Notes regarding specifying NX installation directories............................................................................. 4
By default, the latest version of NXOpen libraries installed are used by ANSA. In case more than one NX
versions are installed in the machine performing the translation, the UGII_BASE_DIR and
UGII_ROOT_DIR environment variables can be edited and set to point to the desired NX version.1.4.
Licensing Issues.................................................................................................................................................... 4
1.4.1. Licensing of the CATIA V5 translation feature ........................................................................................ 5
1.4.2. Licensing of the JT translator .................................................................................................................. 5
1.4.3. Licensing of the PTC Creo Parametric (Pro/ENGINEER) translation feature............................................ 5
1.4.4. Licensing of the SolidWorks translation feature ....................................................................................... 5

SECTION 2. INSTALLATION OF THE CAD TO ANSA TRANSLATORS ...................... 6


2.1. Installation of the CAD to ANSA Translators ............................................................................................. 6
2.1.1. Notes regarding incompatibilities that may occur with some outdated Windows platforms ....................... 6

SECTION 3. USING THE CAD TO ANSA TRANSLATORS .......................................... 7


3.1. Command-line driven translation ................................................................................................................ 7
3.2. GUI driven translation ................................................................................................................................. 9
3.3. Available options for the translation of CAD data .....................................................................................14
3.3.1. Options controlling file I/O ....................................................................................................................15
3.3.2. Options controlling what to read from the CAD data file ........................................................................15
3.3.3. Options controlling how to read the contents of the CAD data file ..........................................................16
3.3.4. Options controlling the build-up of the ANSA database ..........................................................................17
3.3.5. A note on the orientation of translated parts/faces ...................................................................................18
3.3.6. A note on the extraction of thickness information ...................................................................................19
3.3.7. A note on the translation of NX files by using the NXOpen based translator ...........................................20
3.3.8. A note on reading extra attributes, which have been defined inside native CAD files ...............................20
3.4. The existence of the translators.defaults file ................................................................................................21
3.5. Messages during translation .......................................................................................................................24
3.5.1. Messages about the existence of the ANSA.defaults and translators.defaults file......................................24
3.5.2. Messages about the existence of the ANSA_TRANSL and ANSA_TRANSL.py file...............................24
3.5.3. Messages related to the settings, progress and result of the translation process ........................................25
3.5.4. Additional messages and Exiting Codes .................................................................................................26

BETA CAE Systems 1


CAD to ANSA Translators

Section 1.
Introduction to the CAD to ANSA Translators
& supported platforms
1.1. General
The CAD to ANSA Translators developed by BETA CAE Systems are a part of the complete BETA suite.
The supported CAD-data formats handled by the CAD to ANSA Translators are listed below:

Source of CAD format data File types

CATIA V5 (R7 – V5-R29) [.CATPart] and [.CATProduct]


Catia Graphical Representation ( tesselated data ) [.cgr]

CATIA V6 (2011x-2013x) [.3Dxml]

3DExperience (2014-2018x) [.3Dxml]

NX (CT based, Unigraphics V11.0 – NX1872) [.prt]

NX (UGOpen based, NX9 (only through CT),


[.prt]
NX10, NX11, NX12 and NX1899)

Parasolid (all-31) [.xmt_txt], [.xmt_bin], [.x_b] and [.x_t]

Pro/ENGINEER (from WF 3 to WF 5)
PTC Creo Parametric 2.0 M140
PTC Creo Parametric 3.0 M020
PTC Creo Parametric 3.0 M030
PTC Creo Parametric 3.0 M040 [.prt] and [.asm]
PTC Creo Parametric 3.0 M090
PTC Creo Parametric 4.0 F000
PTC Creo Parametric 5.0
PTC Creo Parametric 6.0

SolidWorks (2007-2020) [.sldprt] and [.sldasm]

JT (JTOpen Toolkit based, v8-v10) [.jt]

Inventor (2010-2020) [.ipt] and [.iam]

CoreTechnologie [.ctp] and [.cta]

Rhino (up to v6) [.3dm]

ACIS (R27) [.sat]

CAD-data translation can be achieved through command-line, scripts or through a graphical user
interface (GUI) that integrates the different translators and their respective options into a single
environment. Details on these are given in later paragraphs.

BETA CAE Systems 2


CAD to ANSA Translators

1.2. Supported Platforms


The tables below show which translator executables are available for each platform:

CATIA, PTC Creo Translators' JT Open NX


Parametric, NX, GUI Toolkit (NXOpen based
SolidWorks, translation)
Inventor
(CT based translation)

ansa_cad.* ansa_transl_gui.* ansa_jt.* ansa_ug.*

Windows
32 bit NO NO NO NO

64 bit YES YES YES YES


Linux
glibc 2.3 – 32 bit NO NO NO NO

64 bit YES YES YES YES


Mac OS
32 bit NO NO NO NO

64 bit YES YES YES NO

BETA CAE Systems 3


CAD to ANSA Translators

1.3. Additional Requirements


Users of the CAD to ANSA Translators should have in mind the following:

NX (NXOpen based)
The translation of NX files with the use of NXOpen libraries requires a valid NX installation, which
must be accessible by the machine performing the translation.
Parasolid (NXOpen based)
The translation of parasolid files with the use of NXOpen libraries requires a valid NX installation,
which must be accessible by the machine performing the translation.
JT (NXOpen based)
The translation of JT files with the use of NXOpen libraries requires a valid NX installation, which
must be accessible by the machine performing the translation.
JT
The translation of JT files on Windows systems requires the run-time components of the Microsoft
Visual C++ 2005 SP1 Redistributable Package, version 8.0.50727.762 or any later updated version.

1.3.1. Notes regarding incompatibilities that may occur with some outdated Windows platforms
On some older or outdated Windows platforms, specific system errors may pop up when trying to perform
a translation or even launching the translator's user interface. These system errors usually inform the user
for some missing system libraries. This is usually due to the fact that some Microsoft Visual C++
Redistributable Packages might be missing from the operating system. These need to be installed on
the platform as well, and users are prompted to download these from Microsoft's website:

Windows 32bit:
Do a search for "Microsoft Visual C++ 2005 Redistributable Package (x86)".

Windows 64bit:
Do a search for "Microsoft Visual C++ 2005 Redistributable Package (x64)".

Windows 32bit:
Do a search for "Microsoft Visual C++ 2008 Redistributable Package (x86)".

Windows 64bit:
Do a search for "Microsoft Visual C++ 2008 Redistributable Package (x64)".

Windows 32bit:
Do a search for "Microsoft Visual C++ 2010 x86 Redistributable Package".

Windows 64bit:
Do a search for "Microsoft Visual C++ 2010 x64 Redistributable Package".

1.3.2. Notes regarding specifying NX installation directories


When translation of NX files is set to be performed with the use of NXOpen libraries, the CAD to ANSA
Translator searches for specific environment variables in the machine performing the translation, in order
to locate these NXOpen libraries.

By default, the latest version of NXOpen libraries installed are used by ANSA. In case more than one NX
versions are installed in the machine performing the translation, the UGII_BASE_DIR and
UGII_ROOT_DIR environment variables can be edited and set to point to the desired NX version.

BETA CAE Systems 4


CAD to ANSA Translators

1.4. Licensing Issues


The licensing of the CAD to ANSA Translators features varies according to the CAD-data formats that the
customer wants to translate. The following table summarizes the licensing requirements for each format:

PTC Creo
NX/ Parametric Core
CATIA V4 CATIA V5 (Pro/
SolidWorks JT Inventor
Technologie
Parasolid
ENGINEER)

Included in the
Standard ANSA
package; no extra YES -- YES -- -- -- YES YES
license/ fee is
required
Additional feature is YES YES YES YES
required. feature adds feature adds (requires the feature adds
-- an extra of -- an extra of CATIA V5 an extra of -- --
See notes for 25 credits 100 credits feature) 25 credits
details (not shared) (not shared) . (not shared)

PTC Creo
NX/ Parametric Core
CATIA V4 CATIA V5 (Pro/
SolidWorks JT Inventor
Technologie
Parasolid
ENGINEER)

Credits that need to 25 25 25 100 25 25 25 25


be available at the (pre-post (extra credits) (pre-post (extra credits) (extra credits) (extra credits) (pre-post (pre-post
package . package . . . package package
time of translation credits) . credits) . . . credits) credits)
(weight)

Note:
All additional features are marketed separately upon request and require additional PO, fee
and license keys.

1.4.1. Licensing of the CATIA V5 translation feature


An extra fee is required for the feature of CATIA V5 to ANSA translation (NEW_ANSA_CATIA_V5).
License is prepared using the server information provided by the customer, as this is described in the
respective documentation about beta_lm.

1.4.2. Licensing of the JT translator


An extra fee is required for τhe feature for the translation of JT files (ANSA_JT_OPEN). License is
prepared using the server information provided by the customer, as this is described in the respective
documentation about beta_lm.

1.4.3. Licensing of the PTC Creo Parametric (Pro/ENGINEER) translation feature


An extra fee is required for the feature of ProEngineer to ANSA translation (ANSA_PROE). License is
prepared using the server information provided by the customer, as this is described in the respective
documentation about beta_lm.

1.4.4. Licensing of the SolidWorks translation feature


Translation of SolidWorks files requires the feature for the translation of CATIA V5 files. Hence, the
feature for the translation of CATIA V5 files (NEW_ANSA_CATIA_V5) must exist in the ANSA license file,
in order for the translation of SolidWorks files to be executed flawlessly.

BETA CAE Systems 5


CAD to ANSA Translators

Section 2.
Installation of the CAD to ANSA Translators
2.1. Installation of the CAD to ANSA Translators
The CAD to ANSA Translators are installed along with the BETA Suite [ANSA-EPILYSIS-META software
products]. The entire BETA Suite is installed using a single installation file. The appropriate one must be
selected for download, depending on the operating system on which the installation process will take
place.

By default, all features of the suite are selected for installation (ANSA, CAD to ANSA Translation, ANSA
NX Translation, ANSA JT Translation, META, etc.), but it is possible to selectively disable the
unnecessary ones during the installation process.

Please refer to the BETA Suite Set-Up Guide pdf document for complete and detailed instructions on
installing our complete software suite.

2.1.1. Notes regarding incompatibilities that may occur with some outdated Windows platforms
On some older or outdated Windows platforms, specific system errors may pop up when trying to perform
a translation or even when launching the translator's user interface. These system errors usually inform
the user for some missing system libraries. This is usually due to the fact that some Microsoft Visual
C++ Redistributable Packages might be missing from the operating system. These need to be installed
on the platform as well, and users are prompted to download these from Microsoft's website:

Windows 32bit:
Do a search for "Microsoft Visual C++ 2005 Redistributable Package (x86)".

Windows 64bit:
Do a search for "Microsoft Visual C++ 2005 Redistributable Package (x64)".

Windows 32bit:
Do a search for "Microsoft Visual C++ 2008 Redistributable Package (x86)".

Windows 64bit:
Do a search for "Microsoft Visual C++ 2008 Redistributable Package (x64)".

Windows 32bit:
Do a search for "Microsoft Visual C++ 2010 x86 Redistributable Package".

Windows 64bit:
Do a search for "Microsoft Visual C++ 2010 x64 Redistributable Package".

BETA CAE Systems 6


CAD to ANSA Translators

Section 3.
Using the CAD to ANSA Translators
3.1. Command-line driven translation
The CAD to ANSA Translators are launched by running the appropriate executable file. Depending on the
platform open a command shell/ prompt and type in the following :

Platform Command
Linux/ Mac OS

For CATIA V4, V5, NX (CT based),


Pro/ENGINEER, SolidWorks, Inventor
& CoreTechnologie translations
64bit: ansa_cad.sh [-options] -i [CAD_data_filename] -o [ansa_filename]

Windows

For CATIA V4, V5, NX (CT based)


Pro/ENGINEER, SolidWorks, Inventor
& CoreTechnologie translations 64bit: ansa_cad64.bat [-options] -i [CAD_data_filename] -o [ansa_filename]

Platform Command
Linux/ Mac OS

For NX (NXOpen based)


translations 64bit: ansa_ug.sh [-options] -i [ug_filename] -o [ansa_filename]

For JT translations 64bit: ansa_jt.sh [-options] -i [jt_filename] -o [ansa_filename]

Windows

For NX (NXOpen based)


translations 64bit: ansa_ug64.bat [-options] -i [ug_filename] -o [ansa_filename]

For JT translations 64bit: ansa_jt64.bat [-options] -i [jt_filename] -o [ansa_filename]

where -i is the input CAD-data file and -o is the ANSA database filename to be saved (optional). The
option -odir can also be used in order to state the directory where the ANSA files will be saved (optional).
The default output directory is the same as the source directory.

The available [-options] are listed in a later paragraph.

Important Note:
On Windows platforms please make sure that the paths you insert in your command prompt
do not contain blanks. In case your paths contain blanks then you have to include your
absolute paths inside quotes (" "). Otherwise you will get an error and no translation will be
performed.

BETA CAE Systems 7


CAD to ANSA Translators

WARNING:
A directory named "work" is generated temporarily in the user’s home directory everytime the ansa_cad
executable is run. This directory is generated by our vendor’s libraries (CoreTechnologie libraries) and its
generation is necessary for the unhindered operation of the translator in conjunction with the CT libraries.
The following environment variables are searched sequentially, in order to find a place for this directory to
be temporarily generated:
TMP,
TMPDIR,
TEMP,
TEMPDIR,
HOME,
PWD
The first environment variable to be found is the location to be used for the temporary generation of this
directory. Towards the end of the translation process, this directory is automatically erased by the
translator. Therefore, it is highly unlikely for this directory to be noticed by the user as a left over from the
translation.

BETA CAE Systems 8


CAD to ANSA Translators

3.2. GUI driven translation


The GUI provides an integrated environment for the translation of CAD or neutral data files. It integrates
all translation modes along with their respective translation options into a single environment.

As derived from the image above, the graphical


user interface is divided into a horizontal top
menu and two vertical sections. The left vertical
section provides the list of files to be translated
and a window where all the translation output
messages are printed. The list of files and the
info window are both expandable widgets
(pushing on the Shift button and dragging the
mouse while keeping the middle mouse-button
pushed will make the widgets expand).

The layout of the left vertical section actually


indicates the essential first step a user has to do
when performing a translation process:

- To add selected CAD files in the list of CAD


files to be translated. This can be done either by
double clicking on the empty list or by right
mouse button clicking and selecting "Add files",
"Add directory" or "Add files from PLMXML file".

Notes:

1. - There is no restriction regarding the format of the selected CAD files. Different types of CAD
format files can be selected at once and added in the list of files to be translated.

2. - Selecting to read a PLMXML file will automatically extract and add all the CAD files referenced
in the PLMXML file in the list of files to be translated.

BETA CAE Systems 9


CAD to ANSA Translators

The right vertical section of the interface is where


all the translation options will appear as soon as
some CAD files are loaded in the list of files. In
case files of different CAD formats are loaded, the
translation options available for each CAD format
will appear automatically in the form of tabs (the
translation options available for each format are
explained in detail in the following chapters).

Notes:

1. - Please note that in the tabs, next to the CAD


format, after the slash, there is also info about
the library that the translator is going to operate
with for translating this specific CAD format.

2. - There is the option to choose between two


different libraries for the JT, the NX, the
Parasolid and for the neutral format files.

3. - The libraries that the translator will be using


for translating the above mentioned formats are
recommended to be set prior the translation
process. These can be set through the File
associations card, which will be discussed
further below.

Basically, the layout of the right vertical section actually directs the user to the final two steps he will have
to go through when performing a translation process:

- the selection of the desired translation options


and the
- push of the "Translate" button.

The equivalent python code and command line options to the selected translation options can be seen at
any time simply by pressing the "Script/Cmd >" button. The automatically generated code snippet can be
readily used inside an external python script and the command line options can be readily used in a
command in the case the user is performing the same translation via a command prompt.

BETA CAE Systems 10


CAD to ANSA Translators

The translation options that have been selected can be saved in the translators.defaults file, so that
they can be used again in future translation jobs. This can be done simply by pressing the Save settings
button which exists in Tools>Preferences. The translators.defaults file is saved in the directory:
/home/user/.BETA/Translators/version_17.0.0/

and it is read everytime the interface is launched.


Moreover, the dimensions of the interface, size of windows, selected fonts etc., in other words the look
and feel of the application’s interface, is also automatically saved everytime the application is exited.
These preferred GUI settings are saved in an xml file, named translators.xml. This xml file is also
created automatically in the directory:
/home/user/.BETA/Translators/version_17.0.0/

Additional settings which affect the translation process can be found under Tools>Preferences.
These "preferred" settings are not directly accessible like the translation options, since they may not be
frequently changed between translation jobs. For example, specifying the location where the translated
files are going to be saved. By default, the translated files are saved in "the same directory with source
file(s)", but there is also the option to specify a different destination directory ("a single directory") or a
single output file ("a single ANSA file").

The destination directory can also be specified by directly editing the line fields under the "Destination file
path" column. If the "Destination file path" column is edited directly, then this takes precedence over the
setting in the Preferences>Settings>[Destination output] card.

As already mentioned, the translator offers the option to translate several of the supported CAD formats
with different translation libraries. The preferred libraries that the translator will be using for the translation
of these formats must be set prior the translation process through the File associations card.

BETA CAE Systems 11


CAD to ANSA Translators

Moreover, the interface offers the option to set up additional actions to be executed after the translation of
each part file or to be executed once after all part files have been translated. These additional actions
must be in the form of script functions described in script files. These custom scripts can be loaded
through the Post Actions card.

Accordingly, if additional treatment needs to be performed after the translation of each part file, then the
user would have to activate the "Per part" option, load the script file and finally select the function to be
executed. The list of available functions is automatically populated as soon as the script file is loaded. In
this case, the post script function needs one single argument, the part itself.

If additional treatment needs to be performed only once after all part files have been translated, then the
user would have to activate the "For all parts" option, load the desired script file and finally select the
function to be executed. The list of functions is automatically populated as soon as the script file is
loaded. When using this option the post script function needs no arguments at all.

BETA CAE Systems 12


CAD to ANSA Translators

Additional settings, which affect the database that will be finally saved are the Resolution, Tolerances and
Units values. These can be found in the Resolution/Tolerances/Units card.

In case a translation process needs to be performed with specific resolution and tolerances values, then
the preferred values need to be set here before the translation process starts.

Important Note:

These values are different from the Resolution and Tolerances values used by ANSA. The values
set here are used only whenever a translation process is taking place, whether the translation is
performed when a CAD file is opened in ANSA or whether the translation process is performed
via a script.

BETA CAE Systems 13


CAD to ANSA Translators

3.3. Available options for the translation of CAD data


The list of available options for the translation of CAD data is given in this section. These options affect
the outcome of the translation process in the following way:

Important Notes:

1. - The options that affect the translation are the options used in the command-line plus the options
that are set within the translators.defaults file.

2. - The following terminal command brings up a list of all the available translation options:
On Unix platforms
../ansa_v17.0.0/ansa64.sh -help --cad-options
or
../ansa_v17.0.0/ansa_cad.sh -help --cad-options

On Windows platforms
../ansa_v17.0.0/ansa64.bat -help --cad-options
or
../ansa_v17.0.0/ansa_cad64.bat -help --cad-options

BETA CAE Systems 14


CAD to ANSA Translators

3.3.1. Options controlling file I/O


Command-line option Description

[ -o outname ] The ANSA database filename to be saved (optional).


[ -i modelname] The input CAD-data file (required).

I/O
[ -idir indirname ] CATIA ONLY: where to read CATIA files from.
The directory where the ANSA files will be saved (optional)
[ -odir outdirname ]
(Default directory is the same as the source directory).

[ -timeout <minutes> ] Terminate translation after given minutes.

3.3.2. Options controlling what to read from the CAD data file
Command-line option Description
[ -read_noshow ] Read hidden entities.
[ -notread_noshow ] Do not read hidden entities (default).
[ -layer #ln1,#ln2,... ] Read entities only from these layers. ( ie. -layer 1,2,3 )
[ -xlayer #ln1,#ln2,... ] Do not read entities from these layers. ( ie. -xlayer 1,2,3 )
[ -layer_vis ] Read entities only from visible layers.
[ -notlayer_vis ] Read entities from all layers (default).
Read any extra attributes of entities, which may have been defined
[ -read_attr ]
in the native CAD files.
Do not read any extra attributes of entities, which may have been
defined in the native CAD files. (This is the default for all entities
[ -notread_attr ]
except from ANSA Parts and Properties. The attributes of Parts
and Properties are read by default.)
[ -read_anno ] Read annotations which may have been defined in the model.
[ -notread_anno ] Do not read annotations (default).
CATIA option only : Read any CATIA publications which may exist
[ -publications ]
in the CATIA file.
[ -notpublications ] CATIA option only : Do not read CATIA publications (default).
[ -freegeom ] Read free geometry (free surfaces).

What to read from the CAD file


[ -notfreegeom ] Do not read free geometry (free surfaces) (default).

NX option only : Specify which categories to read from an NX file.


[ -categories #c1,#c2,… ]
Only the entities from the specified categories will be read.

[ -read_mode geometry ] Read only geometrical information.


[ -read_mode facetted_data ] Read only facetted data.
[ -read_mode both ] Read both geometrical information and FE data (default).

[ -facetted_data all ] JT option only : Read all data which exist in the facetted data
container (read facets, points and curves).

JT option only : Read specified data from the facetted data


container ( ie. -facetted_data points,curves
[ -facetted_data will translate only the points and curves from the facetted data
facets,points,curves ] container ).
The default is to read only the facets from the facetted data
container. ( ie. -facetted_data facets ).

JT option only : Translates only the parts in the default JT layer


[ -layer_filters default ]
filter.
JT option only : Translates all parts from all JT layer filters which
[ -layer_filters all ]
may exist in the file (default).
JT option only : Translates only the parts of the specified JT layer
[ -layer_filters "specific filters. The names of the JT layer filters must be inside " " (double
filters" ] quotes) and separated by comma ( , ).

[ -geom_mode solids ] JT option only : Read only the solids of an XTBrep model.
[ -geom_mode shells ] JT option only : Read only the shells of an XTBrep model.
JT option only : Read both the solids and the shells of an XTBrep
[ -geom_mode both ] model (default).

BETA CAE Systems 15


CAD to ANSA Translators

JT option only : Read all the LODs, where LOD is an abbreviation


[ -read_lod all ]
for Level Of Detail.
JT option only : Read user specified LOD (default is –read_lod 0
[ -read_lod (number) ] ). This information needs to be reported to the CAE analyst by the
CAD designer who exported the JT files.
[ -wireframe ] JT option only : Read the Wireframe data of the model.
JT option only : Do not read the Wireframe data of the model
[ -notwireframe ]
(default).
JT option only : Read Product Manufacturing Information as
[ -read_pmi ]
attributes.
JT option only : Do not read Product Manufacturing Information
[ -notread_pmi ]
(default).

3.3.3. Options controlling how to read the contents of the CAD data file
Command-line option Description

[ -cur3d ] Create a 3d CURVE for every CONS.


[ -notcur3d ] Do not create a 3d CURVE for every CONS (default).
[ -read_construction_surfaces ] Create faces from construction surfaces.
[-notread_construction_surfaces ] Do not create faces from construction surfaces (default).
[ -col2pid ] Create a separate PID for each color.
[ -notcol2pid ] Do not Create a separate PID for each color (default).
Create a separate PID for each part (default is to create a PID for
[ -part2pid ]
each Body or Open Shell)
[ -notpart2pid ] Do not Create a separate PID for each part (default).
Create a separate PID for each layer (default is to create a PID for
[ -lay2pid ]
each Body or Open Shell).
[ -notlay2pid ] Do not Create a separate PID for each layer (default).
[ -singlepid ] Assign the specified PID for all geometry.

How to treat the contents of the CAD file


[ -notsinglepid ] Do not create a single PID for all geometry (default).
[ -flatten ] Create a single file for assemblies.
[ -notflatten ] Create multiple files for assemblies (default).
Create a single file for assemblies containing only hierarchy (no
[ -preview ]
geometry)
Do not create a single file for assemblies containing only hierarchy
[ -notpreview ]
(no geometry) (default).
[ -features ] Read in FEATURES mode (geometric sets/publications).
[ -notfeatures ] Do not read in FEATURES mode (default).
[ -single_part ] Create a single part database even for assemblies
[ -notsingle_part ] Do not create single part database for assemblies (default).
[ -volumes ] Create volume entities of CATIA solids (default).
[ -notvolumes ] Do not create volume entities of CATIA solids
[ -create_sets ] Create sets of named entities.
[ -notcreate_sets ] Do not create sets of named entities (default).
Assign a different color to each body PID. Let ANSA decide what
[ -ANSAcolor ]
colors to use for PIDs.
[ -notANSAcolor ] Use the CAD color for each body PID (default).
[ -layer_thic #ln ] The layer where the thickness lines are.
[ -notlayer_thic ] Do not use layer thickness lines for orientation of faces (default).
[ -use_orient_vec #ln ] The layer where the material orientation vector lies.
[ -notuse_orient_vec ] Do not try to identify a vector for the orientation of faces (default).
Use a specific line (curve) in CATIA to get thickness and
[ -matvec ]
orientation information.
[ -notmatvec ] Do not extract thickness / orientation information (default).

BETA CAE Systems 16


CAD to ANSA Translators

IMPORTANT:
1.- Regarding the [ -flatten ] flag:
- If active, then a single ANSA DB will be created containing the parts of the CATIA
Session/Product file in the correct position and with all instances.
- If not active, then each part referenced in the CATIA Session/Product file will become a
separate ANSA DB. In addition one more "master" ANSA DB will be created having the name of
the Session/Product file. This "master" ANSA DB is empty of any geometry, and contains only the
assembly structure described in the Session/Product file. In this case, if a user desires to recover
the complete assembly of the Session/Product file, he should follow these actions:
(a) open the "master" ANSA DB
(b) merge the ANSA DBs of the individual parts into the "master" ANSA DB, activating
the "auto position parts" flag
(c) open the Part Manager and "synchronize" the merged parts in order to get the correct
instantiation.
2.- The [ -layer ] and [ -xlayer ] options are mutually exclusive.
3.- The [ -singlepid ], [ -lay2pid ], [ -col2pid ], [ -part2pid ] options are mutually exclusive.
4.- The [ -free_geom ] and [ -read_construction_surfaces ] options must be used to translate CATIA V4
files that contain free surfaces with "no loops" (which are essentially untrimmed surfaces). Otherwise the
message "Faces with zero loops" appears and no face is created and the result might be empty ANSA
databases.
5.- In NX assemblies, a Part having the name of the *prt file plus the word "GEOM" at the end, specifies
the geometry lying in an assembly or subassembly. NX permits the use of geometry within an assembly
file together with links to other parts.

3.3.4. Options controlling the build-up of the ANSA database

Command-line option Description

[ -perf_topo ] Perform topology actions. Same as using TOPO in ANSA.


[ -notperf_topo ] Do not perform ANSA topology (default).

What to consider in building the ANSA database with the


[ -layer_topo ] Paste FACES that belong in different PIDs.
[ -notlayer_topo ] Do not paste FACES that belong in different PIDs (default).
[ -parts_topo ] Perform topology between different parts.
[ -notparts_topo ] Do not perform topology between different parts (default).
[ -clean_geo ] Try to clean the geometry.

translated data
[ -notclean_geo ] Do not try to clean the geometry (default).
[ -respect_file_topo ] Respect the topology info found in the CAD file (default).
[ -notrespect_file_topo ] Do not respect the topology info found in the CAD file.

[ -heal ] Force healing of model. Currently NOT saved in the ANSA.defaults file.

[ -notheal ] Do not use any healing function. Currently NOT saved in the ANSA.defaults file (default).

[ -log ] Create log file, named as: <name of file>_<unique system id>.log. (default) See note.
[ -notlog ] Do not create log file.
Options listed here are passed to ANSA_TRANSL and can be used to call user defined
[ user options ]
functions that affect the translation. See note.
When used, an ANSA file containing the assembly structure but NO geometry will be
[ -preview ] / [ -notpreview ]
created. (default is -notpreview).

Note on Extra Options:


Extra Options should be used in conjuction with the script function ProgramArguments(). When this
function is called in an ANSA_TRANSL file, it returns all options used for the translation of the CAD-files,
including the user options that were written in the "Extra Options" field. In this way, the user can signal to
the ANSA_TRANSL file the execution of a specific code.
For example, imagine that a user has developed a routine called "my_routine" and has placed it inside an
ANSA_TRANSL file. Then, the user can selectively execute "my_routine" when a specific flag is used in
the "Extra Options" field, for example "do_it". To achieve this, the user should type "do_it" in the "Extra
Options" field and use a small piece of code inside the ANSA_TRANSL, in order to read the "do_it" flag:

BETA CAE Systems 17


CAD to ANSA Translators

m = ProgramArguments();
len = MatLen(m);
for(i=0;i<len;i++)
{
Print(m[i]);
if(MatchString(m[i],"do_it"))
my_routine();
}

Note on log files:


Log file names are formed by the translator execution script. Log files are named after the names of the
files to be translated plus a unique system id after the name. A log file is written for every time the
translator is initiated/run. In the case of an assembly file (.CATProduct, .asm, top body, etc.), only one log
file will be written containing all the information messages for each part/file participating in the assembly.
Log files are always saved in the home directory of the user and only when the HOME
environment variable is not set, then they are saved in the current working directory.

3.3.5. A note on the orientation of translated parts/faces


The orientation information of parts/faces generated in CATIA V4 & V5 can be read directly from the CAD
source data during the translation, so these parts/faces will appear in ANSA having uniform and correct
orientation. This is achieved provided that the designer has taken extra care so as to use specific design
rules within the CATIA file.
Orientation information can be extracted in various ways:
(a) using the material vector information
(b) using thickness lines from a specific layer, and
(c) using the orientation vector from a specific layer

IMPORTANT:
During CATIA to ANSA translation, the translator will "connect" individual faces using the topological
information (if any) already described in the CATIA file, and then will apply uniform orientation based
on the rules above. However, in case of doubt about the existence of topology information within the
CATIA file, it is strongly suggested to use the [ -perf_topo ] option in order to get uniform orientation.

The orientation options are discussed in this paragraph with the aid of the following three examples:

Example 1 - Material Vector, option [ -matvec ]

The design rule behind the "use material


vector" option works only for open shell
descriptions. If this option is active, the user
is prompted to specify the name of the curve
that corresponds to the material vector.
Then:
- The translator will search within the CATIA
model file to partially match the given name
with the name of a curve. Note that if no
name is given, then by default the translator
looks for a curve named "Materialstaerken-
Vektor" in the CATIA model file.
- The outward direction of the above curve
indicates the orientation of the face and the
1/100 of its length indicates the thickness of
the part.

Warning:

The orientation of faces might be applied incorrectly, if the material vector is found near the edges of a
face and not in the middle of the face.

BETA CAE Systems 18


CAD to ANSA Translators

Example 2 - Thickness Lines, option [ -layer_thick xx ]

The design rule for this option uses two


parallel lines: the first line lies on the actual
surface of the face and the second extends
parallel to it at a specific distance. The
direction vector from the first line to the
second indicates the orientation of the face.
If this design rule exists on layer xx, then the
option [ - layer_thic xx ] will extract this info
and orient the respective face accordingly.

Note:
The distance between the two parallel
lines indicates the thickness of the part.

Example 3 - Orientation Vector, option [ -use_orient_vec xx ]

The option works on the following design


rule: the CATIA designer can draw an arrow-
shaped curve on a specific layer, like the
one shown on the picture on the left. The
arrow-shaped curve is supposed to start on
the surface of the part and extend towards
the orientation of the part.
For example, if this design rule exists on
layer xx and the [ - use_orient_vec xx ]
option is used during translation, then the
translator will read the curves from this layer
as orientation vectors. Then it will check to
which face each vector belongs to, and if the
vector has the opposite direction compared
to the geometry orientation, then the face is
inverted.

3.3.6. A note on the extraction of thickness information


The thickness information of Catia files (if any such information actually exists in your Catia file) can also
be extracted through the material vector, which is invoked through the option [ -matvec ]. The respective
script function to be used is the function MatVecThickness. It accepts no arguments and returns the
thickness as defined in the cad file. This script function actually returns the 1/100 of the length of the
specified material vector curve. After getting the value, extra care must be taken in order to pass this
information into the appropriate fields of a PSHELL card.

BETA CAE Systems 19


CAD to ANSA Translators

3.3.7. A note on the translation of NX files by using the NXOpen based translator
In order for the NXOpen-based translator to work properly with assemblies, you need to inform the
translator about which directories to search, in order to find the files that make up the assembly. There
are three ways of specifying the search directories:
a) By defining the UGII_SEARCHDIRS environment variable. Lists all the directories, just like
windows paths.
b) By defining the UGII_DIRFILE environment variable, i.e. specifying the name of a file which
contains the directories (one directory in each line of the file).
c) By specifying the directories through the graphical user interface of the translator. Option named
"Directories".

The translator tries these three options sequentially. The first time it succeeds, it stops looking for the
next option. That is, if the UGII_SEARCHDIRS environment variable is found, the translator does not
look for the UGII_DIRFILE environment variable.

3.3.8. A note on reading extra attributes, which have been defined inside native CAD files
This information is usually extra attributes like names of Parts, Properties, Materials, Curves and Points.

The attributes of Parts and Properties are always read by the translator by default. For all other entities
(free geometric entities), the user must use the option "Read attributes" in combination with the option
"Read free geometry". The equivalent shell command options are [ -read_attr ] and [ -freegeom ].
These extra attributes will be written into the "Comment" field of the corresponding ANSA entity card
with the form:

ATTRIBUTE: sample filled in text
Value: sample filled in text

By using an ANSA_TRANSL script file, the user can then retrieve the value of interest from the
"Comment" field and assign it to the respective field of the corresponding ANSA entity card. For further
details and examples of ANSA_TRANSL.py script files, please also refer to the API documentation which
is available within ANSA in the form of html pages.

BETA CAE Systems 20


CAD to ANSA Translators

3.4. The existence of the translators.defaults file


The translators.defaults file contains all settings that ANSA considers as being "defaults" when reading a
CAD-data file. The keywords (without postfix) along with their respective default values are given below:

TRANSL_FLATTEN_ASSEMBLIES = false
TRANSL_PREVIEW = false
TRANSL_LOG = true
TRANSL_SINGLE_PART = false
TRANSL_FEATURE_MODE = false
TRANSL_HIDDEN = false
TRANSL_LAYER_VIS = false
TRANSL_INCLUDE_LAYERS = false
TRANSL_INCLUDED_LAYERS =
TRANSL_EXCLUDE_LAYERS = false
TRANSL_EXCLUDED_LAYERS =
TRANSL_INCLUDE_CATEGORIES = false
TRANSL_INCLUDED_CATEGORIES =
TRANSL_FREE_GEOMETRY = false
TRANSL_ATTRIBUTES = false
TRANSL_ANNOTATIONS = false
TRANSL_PUBLICATIONS = false
TRANSL_GENERATE_3D_CURVES = false
TRANSL_CONSTRUCTION_SURFACES = false
TRANSL_ANSACOLOR = false
TRANSL_PART2PID = false
TRANSL_LAYER2PID = false
TRANSL_COLOR2PID = false
TRANSL_SINGLEPID = false
TRANSL_SINGLEPID_VALUE = 1
TRANSL_CREATE_VOLUMES = true
TRANSL_CREATE_SETS = false
TRANSL_ORIENT_VEC = false
TRANSL_ORIENT_VEC_VALUE = 1
TRANSL_THICKNESS_LINES = false
TRANSL_THICKNESS_LINES_VALUE = 1
TRANSL_MATERIAL_VECTOR = false
TRANSL_MATERIAL_VECTOR_VALUE =
TRANSL_EXTERN_HEAL = false
TRANSL_PERFORM_TOPOLOGY = false
TRANSL_TOPO_BETWEEN_LAYERS = false
TRANSL_TOPO_BETWEEN_PARTS = false
TRANSL_RESPECT_FILE_TOPO = true
TRANSL_GEOMETRY_CLEAN_UP = false
TRANSL_TIMEOUT = false
TRANSL_TIMEOUT_VALUE = 1
TRANSL_EXTRA_OPTIONS = false
TRANSL_EXTRA_OPTIONS_VALUE =
TRANSL_REPRESENTATION = COMPARE
TRANSL_FILTERS = all
TRANSL_READ_MODE = both
TRANSL_LOD = 0
TRANSL_GEOM_MODE = both
TRANSL_WIREFRAME = false
TRANSL_PMI = false
TRANSL_FACETTED_DATA = 1, 0, 0

TRANSL_NTOLERANCE = 0.05
TRANSL_CTOLERANCE = 0.02
TRANSL_TOLERANCE_MODE = middle
TRANSL_CURVES_RESOLUTION = 10
TRANSL_PERIMETER_LENGTH = 20
TRANSL_DISTORTION_DISTANCE = 20%
TRANSL_DISTORTION_ANGLE = 50

The above default settings can also be edited from within ANSA ( Windows>Settings>Translators ) by
selecting the preferred options and by clicking on the Save settings>[ Translators ] button.

BETA CAE Systems 21


CAD to ANSA Translators

The effect of the translators.defaults file is reflected in two levels: (a) in a level that refers to "what is read
from the CAD-file" and (b) in a level that refers to "topology actions taken in ANSA":

(a) The translators.defaults settings that control "what is read from the CAD-file" are:

GUI-driven translation
translators.defaults setting Command-line translation option
option
1. TRANSL_LAYER_VIS "Read visible layers" [ -layer_vis ] / [ -notlayer_vis ]

2. TRANSL_HIDDEN "Read hidden entities" [ -read_noshow ] / [ -notread_noshow ]

3. TRANSL_ATTRIBUTES "Read attributes" [ -read_attr ] / [ -notread_attr ]

4. TRANSL_ANNOTATIONS "Read annotations" [ -read_anno ] / [ -notread_anno ]

5. TRANSL_PUBLICATIONS "Read publications" [ -publications ] / [ -notpublications ]

6. TRANSL_FREE_GEOMETRY "Read free geometry" [ -freegeom ] / [ -notfreegeom ]

TRANSL_INCLUDED_CATEGORIES [ -categories ]
7. "Categories"
ie. -categories <c1>,<c2>,…

[ -layer_filters default ] /
[ -layer_filters all ] (default) /
TRANSL_FILTERS [ -layer_filters "specific filters" ]
8. "Layer filters"
names of specific filters must be inside
("double quotes") and separated by
comma (,))

[ -read_mode ]
9. TRANSL_READ_MODE "Read mode"
"geometry" reads geometry only,
"facets" reads facets only,
"both" reads both (default)

[-read_lod ]
10. TRANSL_LOD "Level of detail (LOD)"
"all" reads all the LODs,
"(number)" reads the specific LOD

[-geom_mode ]

"both" reads both the solids and the


11. TRANSL_GEOM_MODE "Geometry mode" shells of an XTBrep model (default),
"solids" reads only the solids of an
XTBrep model,
"shells" reads only the shells of an
XTBrep model
12. TRANSL_WIREFRAME "Read wireframe" [ -wireframe ] / [ -notwireframe ]

13. TRANSL_PMI "Read PMI" [ -read_pmi ] / [ -notread_pmi ]

"Read facets"
[ -facetted_data all ]
"Read curves (from
TRANSL_FACETTED_DATA "all" reads all data which exist in the
14. facetted data container)"
facetted data container (i.e. facets,
points and curves).
"Read points (from
facetted data container)"
[ -facetted_data facets,points,curves ]

For the above settings any options that are given through the command-line take precedence over the
equivalent settings in the translators.defaults file. This means that:
The options given in the command line take precedence over the equivalent settings in the
translators.defaults file. For example, consider a command-driven CATIA-file translation where the
TRANSL_HIDDEN in the translators.defaults is set equal to true, but the user types the [ -
notread_noshow ] option in the command line. In this case, the hidden entities will not be translated.
On the other hand, if the user does not add any option concerning the hidden entities, then these will
be translated as dictated by the translators.defaults setting.

BETA CAE Systems 22


CAD to ANSA Translators

(b) The translators.defaults settings that control the "topology actions taken in ANSA" are:

translators.defaults setting Command-line translation option

TRANSL_PERFORM_TOPOLOGY [ -perf_topo ] /
1.
[ -notperf_topo ] (default)
[ -layer_topo ] /
2. TRANSL_TOPO_BETWEEN_LAYERS
[ -notlayer_topo ] (default)
TRANSL_TOPO_BETWEEN_PARTS [ -parts_topo ] /
3.
[ -notparts_topo ] (default)
TRANSL_RESPECT_FILE_TOPO [ -respect_file_topo ] (default) /
4.
[ -notrespect_file_topo ]
[ -clean_geo ] /
5. TRANSL_GEOMETRY_CLEAN_UP
[ -notclean_geo ] (default)
TRANSL_EXTERN_HEAL [ -heal ] /
6.
[ -notheal ] (default)

Settings 2 to 5 follow the general rules given earlier. This means that any options that are given through
the Command-line take precedence over the equivalent settings in the translators.defaults file.

Setting No. 1 has a GLOBAL effect: it determines whether ANY topological actions will be taken AT ALL
when the native CAD files are translated into ANSA databases. During this "topology" step, ANSA
decides on the connectivity of the geometric entities, so that adjacent Faces are connected along their
common boundaries. The result of this action depends also on the current tolerance settings.

IMPORTANT:
By default, the TRANSL_PERFORM_TOPOLOGY setting is set to "false". This means that ANSA will not
take any actions with respect to topology, regardless of options 2 to 5 being set to true.
Hence, if any "connectivity" is seen in the ANSA database, it is not a result of ANSA topology actions,
but it was already prescribed in the native CAD file itself.

BETA CAE Systems 23


CAD to ANSA Translators

3.5. Messages during translation


When a translation process is initiated by pressing the "Translate" button, a series of messages start to
appear in the text window on the bottom left of the graphical interface. This is where the translator prints
all error and warning messages and all information necessary for monitoring the progress of a translation
process. The same messages appear in the command window.
The messages printed in the text window can be categorized in the following:
(a) checking license on server
(b) system info
(c) ANSA version info

(d) existence of ANSA.defaults and translators.defaults file


(e) existence of ANSA_TRANSL and ANSA_TRANSL.py file
(f) messages related to the progress and the result of the translation process

Items d) to f) are discussed in the following paragraphs.

3.5.1. Messages about the existence of the ANSA.defaults and translators.defaults file
The translator will look for the ANSA.defaults file and the translators.defaults file in all designated
locations and the relative messages will be displayed. Regardless of this, the translation process will
continue normally, ignoring any settings that were to be found within the translators.defaults file.

Note the detailed information on the effect of the translators.defaults settings to the result of a translation
process given in paragraph 3.4.

3.5.2. Messages about the existence of the ANSA_TRANSL and ANSA_TRANSL.py file
The ANSA script loader will look for the ANSA_TRANSL and ANSA_TRANSL.py file in all designated
locations, in order to read any extra information for the manipulation of the CAD-data contents or any
additional instruction for the handling of the CAD files to be translated.
This additional info or instruction goes into an ANSA_TRANSL file in the form of scripts. Additionally,
post-translation functionality may also be included in an ANSA_TRANSL file.
For further details and examples of ANSA_TRANSL files, please also refer to the API documentation
which is available within ANSA in the form of html pages.

BETA CAE Systems 24


CAD to ANSA Translators

IMPORTANT:
- If an ANSA_TRANSL or ANSA_TRANSL.py file is not found in any of the designated locations, then
a NOTICE message will appear. This notice is irrelevant to the progress of the translation process,
which will continue normally, ignoring any scripts that were to be found in an ANSA_TRANSL or
ANSA_TRANSL.py file.

3.5.3. Messages related to the settings, progress and result of the translation process
The translation options selected for the current translation job are printed in the info window as "Current
options" in the form of a list.

Moreover, messages about the progress of the translation phases are also printed. Finally, information
about the contents of the saved database is also displayed, along with the location path where the ansa
database is saved.

BETA CAE Systems 25


CAD to ANSA Translators

The above translation output messages may differ slightly depending on the format of the CAD file and
the library selected to accomplish the translation. Note that the same output messages can also be seen
in the terminal window.

3.5.4. Additional messages and Exiting Codes


Additional messages related to licensing as well as warnings/errors related to the progress of the
translation process are displayed. At the end of the process, the translator returns the following exiting
codes:

Exit Code Description


-1 Licensing related problems: server down, no valid/expired license etc.
0 OK: Translation process terminated normally.
1 No input filename or error in reading the input file.
2 Unsupported input file format.
3 Translation library initialization errors.

BETA CAE Systems 26

You might also like