Вы находитесь на странице: 1из 8

ANSA

version 12.x

CAD-data Translators

Unix
and MS-Windows
Platforms

2005-07-19

BETA

CAE Systems S.A.

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

1.2. Using the GUI


The GUI provides an itegrated environment for the translation of CAD-data files. The main window is
devided into three sections:

In section 1 the user selects the "Translation Mode", in


other words, the CAD-data format of the input files.

files to be
translated
are listed in
this area

Depending on the translation mode set in section


1, section 2 lists the available options for this
particular CAD-format. The user should then select
which of these options will be used during the
translation.

Pressing "Add Files" the file manager window appears


so that the user can select the files to be translated.
These are then listed in section 3, with a "check mark"
appearing in front of each file.

Using the "check mark" allows the user to perform several


translations, each time using different options for different
files.

Translation options can be cleared, saved and


recalled using the corresponding buttons.
Finally, pressing the "Go" button perfroms the translation.

1.3. Available Options for CAD-data Translation


The following table summarizes the available options that control the CAD-data file translation, along with
the equivalent flag that should be used in a "command line"-driven translation.
Translation Option

Equivalent Flag

Clean geometry

-clean_geo

Topology between faces

-layer_topo

Include layers only

-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

BETA CAE Systems S.A.

page 2

CAD-data Translators

ANSA v.12.x

Equivalent Flag

Exclude layers

-xlayer <layers>

Translate visible layers

-layer_vis

Translates layers whose visibility flag is "on"

inactive

Read noshow

-read_noshow

Force the translation of hidden entities

inactive

Read 3D curves

-cur3d

Generate the 3D curves that define faces

inactive

Read construction surfaces

-read_construction_surfaces

Import untrimmed surfaces (ie. The ones


that are not used by a face)

active

Read hidden entities

-read_noshow
-blank (UG only)

Force the translation of hidden entities

inactive

Read free geometry

-freegeom

Force the translation of entities that are not


used to construct other geometry (eg. points,
free curves etc.)

inactive

Keep XML file

-keepxml

Keep the XML file generated by InterOp

inactive

-join

Join faces that belong to skins in a single


macro area

inactive

Join faces with skin


Create midsurface from solid
description

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

Translate different bodies to different PIDs

Color to pid

-col2pid

Use colour info to assign PIDs

inactive

Single pid

-singlepid

Assign all faces to a single PID

inactive

Layer to pid

-lay2pid

Use layer info to assign PIDs

inactive

Use extensive geometry check

-geomcheck

Force an extensive geometry check

inactive

Use material vector

-matvec

Use material vector to assign thickness to


faces

inactive

Use Unigraphics topology info

-use_ug_topo

Use topology information from Unigraphics

active

Use layer thickness lines

-layer_thick <layers>

Use orientation vector

-use_orient_vec <layers>

active

Acquire thickness and orientation


information through "thickness lines" on the
specified layers
Acquire orientation information through
"orientation vectors" on the specified layers

---

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.

BETA CAE Systems S.A.

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

BETA CAE Systems S.A.

page 4

CAD-data Translators

ANSA v.12.x

Case_2. With the dlname declaration in the USRENV.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","dlname_name"';
declaration in the "~/USRENV.dcls" file and type the command
> ansa_catiav4.sh [options] -i dlname/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
2.1.1 Translating a CATIA Session file into ANSA database
This example presents the steps that should be taken in order to translate a CATIA session file into
separate ANSA databases.
Hypothesis:
A CATIA session file is given:
session_filename.session
This file contains the following models:
model_name_1.model
model_name_2.model
model_name_3.model
............
............
model_name_n.model
Targets:
1. Translate the [.model] files included into the CATIA [.session] file into separate [.ansa] files.
2. Specify the characteristics of each part (ie. PID, MID, moduleID, thickness etc.) using ANSA_TRANSL
and [.attrib] files
Realization:
1. Identify the names of the models included into the CATIA [.session] file. In this case the names are:
model_name_1.model
model_name_2.model
model_name_3.model
............
............
model_name_n.model
2. For every model, create an "attributes" file describing the specific characteristics of the model. The
filename of each [.attrib] file should be the model_name followed by the .attr extension. In this
example, the corresponding attribute files are:
model_name_1.attr
model_name_2.attr
model_name_3.attr
............
............
model_name_n.attr
3. Use the command:
ansa_catiav4.sh [options] -i session_filename.session
The options are listed in paragraph 1.3
4. ANSA will create an [.ansa] file for every model in the CATIA session file. In this case:
BETA CAE Systems S.A.

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.

2.1.2 CATIA v4 file comments example and ANSA_TRANSL


######################################################################
IT IS MANDATORY TO COMPLETE SEC #1, #2 AND REVISION BLOCK (LAST SECT.)
---------------------------------------------------------------------SECTION 1: TITLE BLOCK INFORMATION
---------------------------------------------------------------------PART NO.: 04716987
MODEL: 1 OF 4
TRIM NO: X
TITLE: PAN-FLOOR (LWB) WIREFRAME
LAST CHANGE: P
STANDARD UNIT= MM
---------------------------------------------------------------------DATE STARTED: 01-14-95
YR-MOD: 97NS,GS
UPG CODE: 11A01A
DEPT NO.: 9510
VSC: 20110
DEPT NAME: MINIVAN BODY SHELL
DESIGNER: G.LUMETTA
CHECKER: N/A
ENGINEER: T.KUCHAREK
FILE NAME: NS VAUL
SENIOR ENG.: D.STEDMAN
MAINFRAME: CTC
---------------------------------------------------------------------MATERIAL TYPE: STEEL MATERIAL FIN: XXX
MATERIAL THK: 0.74 MIN. STK.
MAT'L DIRECTION SEE SECTION: X=1875
---------------------------------------------------------------------STANDARDS
ITEM !NUMBER
!NAME
!APVD
---------------------------------------------------------------------01!MS-264 035-SK
!HIGH STRENGTH STEEL
!AJA
02!PS-6763
!STAMPING
!AJA
03!PS-6013
!GD&T
!AJA
04!PS-8335 <P>
!QUALITY ASSURANCE PENTAGONS
!AJA
######################################################################
SECTION 2: CRITICAL CHARACTERISTICS
---------------------------------------------------------------------ANTI-THEFT (Y OR N): N
DIAMONDS(Y OR N): N
EMISSIONS (Y OR N): N
PENTAGONS(Y OR N): Y
SAFETY (Y OR N): N
######################################################################

BETA CAE Systems S.A.

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 ;

2.2. Translating CATIA V5 files


ansa_catia_v5 is the a CATIA_v5 reader used to translate CATPart and CATProduct files into ANSA
files. This product is provided by BETA CAE Systems S.A. and operates under the beta_lm licensing
scheme. Information about beta_lm licensing scheme is provided in a separate document.
The general usage of the CATIA v5 to ANSA translator is:
ansa_catia_v5
[options] -i <file>.CATPart -o <ansa_filename>
or
ansa_catia_v5
[options] -i <file>.CATProduct -o <ansa_filename>
The options are listed in paragraph 1.3

2.3. Translating UNIGRAPHICS files


ansa_UG is the UG NX and NX2 reader used to translate *prt files into ANSA files. This product is
provided by BETA CAE Systems S.A. and operates under the beta_lm licensing scheme. Information
about beta_lm licensing scheme is provided in a separate document.
The general usage of the UG to ANSA translator is:
ansa_UG
[options] -i <file>.prt

-o

<ansa_filename>

The options are listed in paragraph 1.3

BETA CAE Systems S.A.

page 7

Вам также может понравиться