Clfile Formats

This section describes:

CATIA Clfile Format

A clfile is a set of cldata type records. This type of record consists of a series of logic words. Record length is variable, up to a maximum of 245 words.

The general structure of a record is as follows:

W1 = record sequence number (integer)

W2 = record type (integer)

W3 to Wn = data depending on the record type.

The first three words are of the same length (4 bytes) and are integers.

The following words 4 to 245 have the same length (8 bytes) and may represent either an integer, a real number or a group of six characters.

Record Types Generated by the Application

The following record types are generated by the application:
1000
, 2000, 3000, 5000, 6000, 9000, 10000, 14000, 15000, 28000 and 29000.

Type 1000 Record

Type 1000 gives the record sequence number.

Type 2000 Record

Type 2000 gives the post-processor instructions.

Type 3000 Record

For circular interpolation, type 3000 gives the canonical form of the circle followed by the tool tip. A type 3000 record is followed by one or more type 5000 records to describe the tool path.

Type 5000 Record

For 40 points, point and axis information is given:

For 80 points, only point information is given:

Type 6000 Record

Type 6000 contains either data on the tool geometry or the machining tolerances.

Machining tolerances:

Tool data:

Type 9000 Record

Type 9000 indicates either tool axis orientation in the machining axis system in 3-axis mode or the multi-axis operating mode in multi-axis mode.

Multi-axis mode (multi-axis operating mode):

3-axis mode (tool axis orientation):

Type 10000 Record

Used with type 5000 for specifying radial cutter compensation data. Please refer to Radial Compensation in Clfiles.

NORM_DS in 3-axis mode:

NORM_DS in 5-axis mode:

NORM_PS:

Type 14000 Record

Type 14000 indicates the end of the cldata records.

Type 15000 Record

For circular interpolation, type 15000 specifies the unsegmented circular path followed by the tool tip.

The direction of the path is determined by the circle axis unit vector (W12 to W14). It corresponds to an angular movement W16 which is positive if the direction is counterclockwise or negative if the direction is clockwise.

Type 28000 Record

Type 28000 specifies the components of the axis system in which the tool path is given. It is specified at the start of the clfile and at each change of machining axis system.

task targetType 29000 Record

For helical interpolation, type 29000 gives the canonical form of the helical motion followed by the tool tip.
The required parameters are set in the following format.

Radial Compensation in Clfiles

Radial compensation data (PLANAR, NORM_DS, and NORM_PS) is managed in clfile records.

The various compensation cases are as follows:

Where:
X, Y, Z: Tip Point
I, J, K: Tool Axis Vector
Xp, Yp, Zp: Profile Point
Xc, Yc, Zc: Contact Point
In, Jn, Kn: Part surface Normal Vector
P, Q, R: Compensation Vector.

Tip Point, Tool Axis Vector and Profile Point data are stored in 5000 type records according to the standard.

A specific type of record, Type number 10000, allows storing Contact Point, Part surface Normal Vector and Compensation Vector data.

This 10000 record is written in the clfile just before the corresponding 5000 record when required.
When continuation records need to be generated for 10000 and 5000 type records, all 10000 type records are written before all associated 5000 type records.
A single 1000 type record will precede the couple of records (10000 + 5000). In case of continuation record for this couple of records, no additional 1000 record is added.

The record length of the 5000 and 10000 type records is 1948 bytes, but the 28 first bytes are used to define the type of the record. The remaining 1920 bytes allow defining data corresponding to 40 or 80 positions depending on the number of bytes used for one position.

In the table above:
Cases 1 and 2:
A 5000 type record is enough to store data corresponding to these cases, for up to 80 tool positions.

Cases 3 and 5:
A 5000 type record allows storing tip or profile coordinates, for up to 80 tool positions.
A 10000 type record (sub-type: 0) allows storing P, Q, R data for these tool positions.

Cases 4 and 6:
A 5000 type record allows storing tip or profile coordinates and associates tool axis vector components, for up to 40 tool positions (48 bytes per tool position).
A 10000 type record (sub-type: 0) allows storing P, Q, R data for these tool positions (48 bytes per tool position; the 3 first doubles are set to 0).

Case 7:
A 10000 type record (sub-type: 1) allows storing Contact coordinates and Normal Vector components for up to 40 tool positions (48 bytes per tool position).
A 5000 type record allows storing tip or profile coordinates for these tool positions.
The maximum number of tool positions to be stored in both 5000 and 10000 type records is defined by the 10000 type record.

Case 8:
A 5000 type record allows storing tip or profile coordinates and associates tool axis vector components, for up to 40 tool positions (48 bytes per tool position).
A 10000 type record (sub-type: 1) allows storing Contact coordinates and Normal Vector components for these tool positions (48 bytes per tool position).

Case 9:
A 10000 type record (sub-type: 2) allows storing Contact coordinates and Normal Vector components for up to 40 tool positions (48 bytes per tool position).
Sub-type 2 is similar to sub-type 1 used in previous cases, but the sub-type value allows to define if a 5000 type record is associated to the 10000 (value 1) or not (value 2).
No data needs to be stored in a 5000 type record.

Case 10:
A 10000 type record (sub-type: 3) allows storing Contact coordinates and Normal Vector components for up to 40 tool positions (48 bytes per tool position).
Sub-type 3 is similar to sub-type 1 used in previous cases, but the sub-type value allows to define if the following 5000 type record associated to the 10000 contains x, y, z, i, j, k information (value 1) or only tool axis vector components (value 3).
A 5000 type record allows storing tool axis vector components, for these tool positions.

Converting CATIA Clfiles Between Unix and Intel Platforms

There is a Clfile coding difference between Windows and Unix stations. Clfiles generated by CATIA are always stored in Unix format. Therefore using a Clfile created by CATIA on Windows requires a conversion.

A module called MfgClfileConvExe is delivered that allows the conversion of CATIA clfiles between the Unix and Intel platforms. 

The module recognizes automatically the format of the clfile and converts it into the other format. 

To run the conversion, use the following command: 

MfgClfileConvExe -i input_clfile [-o output_clfile] [-rep]

where:

-i input_clfile is the clfile to be converted, with access path (required)
-o output_clfile is the resulting clfile, with access path (optional)
If -o is not used, the resulting file will be written in the temp folder and called ConvertedClfile.clfile
-rep, if present, write is done in replace mode.

The module does not generate messages, but a return code is given with the following values:

0: OK
1: No input clfile (required)
2: No PP words table (required)
3: The input clfile does not exist
4: PP words table loading problem
5: Problem opening the input clfile 
6: The output clfile exists but cannot be replaced
7: The output clfile exists but there is no access permission
8: The output clfile exists but cannot be deleted
9: Problem opening the output clfile
10: Problem closing the output clfile
11: Problem closing the input clfile
12: Internal error
13: Problem reading a record of the input clfile
14: Conversion direction undetermined
15: Write problem on record length
16: Write problem on record