Академический Документы
Профессиональный Документы
Культура Документы
version 12.x
CAD-data Translators
Unix
and MS-Windows
Platforms
2005-07-19
BETA
CAD-data Translators
ANSA v.12.x
Section 1.
Introduction to the GUI
1.1. Introduction & Supported CAD-data Formats
A Graphical User Interface is introduced in ANSA_v12.0 for the translation of CAD-data files into ANSA
format. Through this interface the user is able to select the format and location of the CAD-files, set the
specific translation options and proceed.
The translator is distributed with the
standard ANSA package and is installed
automatically during ANSA installation,
with no extra care from the user.
The translator is launched using the
following commands:
- Win2K, WinXP platforms:
ansa_transl_gui.bat
- Unix / Linux platforms:
ansa_transl_gui.sh
1.1.1. Supported CAD-data Formats
and Platforms
The supported CAD-data formats are:
CATIA V4 (1)
CATIA V5 (2)
UNIGRAPHICS (3)
Notes:
1. The ability to translate the above
depends on the current platform and OS
and are subject to specific license
requirements, see below.
2. Users can still operate CAD-data translation without using the GUI. All previous ANSA functionality
regarding CAD-data translation and available options are still valid ans are described at the end of this
document.
3. ANSA_TRANSL scripts may affect the results of the translation.
The following table summarizes the supported platforms where each CAD-data format can be translated:
Platform
CATIA V4(1)
CATIA V5(2)
UNIGRAPHICS(3)
HP - HP UX 11.00
YES
YES
YES
SGI - IRIX 6.5 and higher
Not Available
YES
Not Available
SUN - SOLARIS 5.8 and higher
YES
YES
YES
IBM - AIX 4.3 and higher
YES
YES
YES
Linux
Not Available
Not Available
Not Available
Windows - 2000/XP
Not Available
YES
YES
Remarks:
(1) - A valid CATIA V4 license and properly configured CATIA user environment are required in order to
perform a CATIA V4 file translation.
(2) - Ability to translate CATIA V5 files is provided by BETA CAE Systems SA under an additional license
key. No CATIA license is required.
(3) - A valid UG NX2 and UG/Open license is required in order to translate Unigraphics files.
BETA CAE Systems S.A.
page 1
CAD-data Translators
ANSA v.12.x
files to be
translated
are listed in
this area
Equivalent Flag
Clean geometry
-clean_geo
-layer_topo
-layer <layers>
Brief Description
Apply the HOT POINTS>CLEAN.G function of
ANSA at the end of the translation
Apply the FACEs>TOPO function of ANSA at
the end of the translation
Translate only the specified layer separated by
commas, eg. -layer 11,12,13
Default
Status
See
comment
See
comment
-continued
page 2
CAD-data Translators
ANSA v.12.x
Equivalent Flag
Exclude layers
-xlayer <layers>
-layer_vis
inactive
Read noshow
-read_noshow
inactive
Read 3D curves
-cur3d
inactive
-read_construction_surfaces
active
-read_noshow
-blank (UG only)
inactive
-freegeom
inactive
-keepxml
inactive
-join
inactive
Brief Description
Do not translate the specified layers,
separated by commas, eg. -xlayer
11,12,13
Default
Status
Translation Option
--
--
not used
Bodies to pid
-body2pid
Color to pid
-col2pid
inactive
Single pid
-singlepid
inactive
Layer to pid
-lay2pid
inactive
-geomcheck
inactive
-matvec
inactive
-use_ug_topo
active
-layer_thick <layers>
-use_orient_vec <layers>
active
---
DSNAME
--
Notes:
-clean_geo and layer_topo options are controlled through the ANSA.defaults file. By default ANSA
will try to clean the geometry and perform topology between the translated faces. However, if these
options are set to OFF within the ANSA.defaults file, the use of the -clean_geo and -layer_topo
flags will override this setting.
-layer and -xlayer options are mutually exclusive.
-singlepid, -lay2pid, -col2pid and -matvec options are mutually exclusive.
-geomcheck option will add an extra 10% delay in the translation process. It is suggested to use this
option only when geometric problems are identified in a "normal" translation.
page 3
ANSA v.12.x
CAD-data Translators
Section 2.
Command line driven CAD-data Translation
2.1. Translating CATIA V4 files
ANSA can read CATIA models directly. This is performed by issuing the ansa_catiav4.sh command:
> ansa_catiav4.sh [options] -i <catia_model_filename>
The options are listed in paragraph 1.3
Additional flags are:
-o : optional switch that allows the user to set the filename of the ANSA database that will be created,
with or without the .ansa extension.
A. Run CATIA.MODEL to ANSA database translator:
> ansa_catiav4.sh [options] -i <catia_model_filename> -o <ansa_filename>
where ansa.sh is the current ANSA executable or a script file able to accept option flags and
catia_model_filename is the full pathname or the dlname of a CATIA MODEL file, with or without the
.MODEL extension.
B. Run CATIA .SESSION files to ANSA database translator:
> ansa_catiav4.sh [options] -i <catia_session_filename>
In this case, sets of .MODEL files included into the CATIA .SESSION file are individualy converted into
.ansa databases.
NOTES:
-- The CATIA translation mode is available only in BATCH mode and ANSA will terminate right after the
CATIA MODEL translation.
-- In order to use ANSA with the -catia option, a valid CATIA license must be active and a complete
CATIA USER environment must be set from the user.
-- CATIA MODEL files must be in one of the directories listed in the "~/USRENV.dcls" file as
"catia.MODEL" directories. For example,
catia.MODEL='/home/catusr/db';
Alternatively, instead of the full pathname, the dlname declared in the "~/USRENV.dcls" file may be used:
catia.MODEL='"/home/catusr/db","dlname_name"';
EXAMPLES:
Case_1. Without the dlname declaration in the USERENV.dcls file
To convert the CATIA MODEL file assembly_demo_body.model that is located in the /home/catusr/db
directory, include the
catia.MODEL='/home/catusr/db';
declaration in the "~/USRENV.dcls" file and type the command
> ansa_catiav4.sh [options] -i /home/catusr/db/assembly_demo_body
ANSA will create an ANSA database with the same base name and the extension .ansa in the current
working directory:
assembly_demo_body.ansa
page 4
CAD-data Translators
ANSA v.12.x
page 5
CAD-data Translators
ANSA v.12.x
session_filename_model_name_1.ansa
session_filename_model_name_2.ansa
session_filename_model_name_3.ansa
............
............
session_filename_model_name_n.ansa
5. The characteristics (ie. PID, MID, moduleID, thickness etc.) of each part into the [.ansa] file will be the
ones set by the corresponding [.attr] file.
Note:
In step 3, the user can specify an output filename using the -o flag:
ansa_catiav4.sh [options] -i session_filename.session -o outname
In this case, the resulting [.ansa] files will be:
outname_model_name_1.ansa
outname_model_name_2.ansa
outname_model_name_3.ansa
............
............
outname_model_name_n.ansa
However, the [.attr] files should remain the same as in step 2.
page 6
CAD-data Translators
ANSA v.12.x
The correspodning ANSA_TRANSL script that read the above comments is:
TRANSLATIONS
: " "="_";
SEPARATORS
= ":;";
while(GET_NEXT_FILE_LINE(in_line)) {
if(!name && (i=match_string(in_line,"TITLE"))) {
if(j=match_separators(in_line(i:))) {
if(k=match_string(in_line,"SYM NO")) {
name=get_string(in_line(j+i:k-1));
if(j=match_separators(in_line(k:))) {
symmetry_number=get_int(in_line(j+k:));
}
}
else name=get_string(in_line(j+i:));
}
}
else if(!serial_number && (i=match_string(in_line,"PART NO."))) {
if(j=match_separators(in_line(i:))) serial_number=get_int(in_line(j+i:));
}
else if(!thickness && (i=match_string(in_line,"MATERIAL THK"))) {
if(j=match_separators(in_line(i:))) thickness=get_float(in_line(j+i:));
}
else if(!material_name && (i=match_string(in_line,"MATERIAL TYPE"))) {
if((j=match_separators(in_line(i:))) && (k=match_string(in_line,"MATERIAL FIN")))
material_name=get_string(in_line(j+i:k-1));
}
}
if(!model_name)
model_name
= "Unknown";
if(!name)
name
= FILENAME;
if(!position)
position
= "L";
if(!serial_number)
property_id
= 1;
else
property_id
= serial_number;
if(!thickness)
thickness
= 1.;
if(!material_id)
material_id
= 1;
if(!material_name)
material_name
= "Default Material MAT1";
if(serial_number && !symmetry_number)
symmetry_number
= serial_number;
PART_NAME
= serial_number%"_"%name ;
PART_MODEL_NAME
= model_name ;
PART_ID
= serial_number ;
SYMMETRY_PART_ID
= symmetry_number ;
PART_PROPERTY_NAME
= serial_number%"_"%name ;
PART_PROPERTY_ID
= property_id ;
SYMMETRY_PART_PID_OFFSET= 0;
PART_PROPERTY_THICKNESS
= thickness ;
PART_MATERIAL_NAME
= material_name ;
PART_MATERIAL_ID
= material_id ;
-o
<ansa_filename>
page 7