TOC PREV NEXT

DG:20.2 CAD FORMATS


Ȧã§ãX§ã

Some types are

CGM - A US defense department product, related to polygon modeling
CIF - For Integrated Circuit Design by layered polygon definition
DMC - Digital Mapping for Customers - for transmitting maps
DXF - Primarily developed by Autodesk (for Autocad) to transfer geometry using ASCII definitions
EDIF - Electronic Design Interchange Format supports VLSI design, and is expected to incorporate Circuit Boards soon
IISF - A format Developed by Intergraph for their CAD systems
SET - Standard d'Echange et de Transfert - Made to be more compact than IGES
STEP and PDES (Standard for the Exchange of Product model data and Product Data Exchange Specification) An attempt to model other attributes of a product, in addition to geometry, such as tolerancing. This is the emerging standard, but it is not widely available yet.
VDA-FS (DIN 66301) A German approach for modelling surfaces
VDA-IS - A German subset of IGES for the auto industry
UNV - Ideas Universal File

DG:20.2.1 Proprietary "Standard" Formats

As mentioned before, these should be treated as non-standard formats, but they will increase some of the transferability of data.

For marketing reasons most major vendors of CAD systems attempt to define their own "standards". Examples include `DXF' for Autocad, `CADL' for Cadkey, `SAT' for ACIS.

An example of a proprietary format is the CADL file produced by Cadkey for transferring geometric entities through the use of an ASCII file. Such entities may be lines, points, arcs, splines, etc.



DG:20.2.2 Standard Formats

A device independent format is based on public standards that are controlled by non-commercial bodies.

examples of these include

STEP (Standard for Exchange of Product Data)
SET (Standard d'Exchange et de Transfer)
PDES (Product Data Exchange Specification)
IGES (Initial Graphics Exchange Specification)

DG:20.2.2.1 - IGES

IGES was first developed by the National Bureau of Standards, Boeing Corporation, and General Electric Corporation and published by the National Bureau of Standards in 1980.

Initially the only data that could be exchanged were basic entity types such as points, lines, arcs, and circles.

September 1981, IGES version 2.0 was approved by the American National Standards Institute as ANSI standard Y14.26M for CAD/CAM communications.

More recent versions of IGES contain the ability to transfer constructive solid geometry and boundary representations of solid models.

The IGES can be in either binary or ASCII format. In ASCII the file is easy to read and modify by hand but it tends to be larger.

There are two formats

- a fixed 80 character line length format
- a compressed line length free format.

In the fixed formatted data, there are several sections that must be entered in a highly structured approach. Data must be right justified within the specified column locations, and these locations must occupy the columns between 1 and 80, inclusive. The following is a brief outline of some rules that must be followed in creating the IGES file.

1. Blanks: Blanks are only significant in string constants. A numeric filed of blanks is considered to denote the default value for that field. No blanks are allowed between the beginning of a numeric constant and the end of that constant. Leading blanks in numeric constants are ignored. Blanks between the end of any constant and the delimiter following the constant are not allowed.

2. Numeric Constants: Embedded commas in numeric constants are not permitted. The absolute magnitude of a numeric constant may not exceed the value of , where N is the number of bits used to represent an integer of a real value. Real constants may be double or single precision. Valid integer constants can be expressed as:
1   150   -24567   23457   +23456.
Valid real constants can be expressed as:
346.098   0.   -.34   0.1E-3   1.E+4.

3. String Constants: A string constant is defined as an arbitrary sequence of ASCII characters. Blanks, commas, and numbers are treated as characters within the string. String constants are represented in Hollerith notation. This form consists of a non-zero integer constant (i.e. the number of characters in the string), followed immediately by the letter H, followed by the character string. Valid string constants can be expressed as:
3Hr45   12H Hello There   9Htime;.erw

4. Sequence numbers: A sequence number is a string of up to seven digits and is used for indexing the lines within the various sections of the IGES file. Sequence numbers begin ar 1, (i.e. 0000001) in each section and continue sequentially without interruption to the end of that section. This is primarily used to indicate the number of physical lines of the particular section, or may be thought of as section line counters. Sequence numbers must be used in each section of the IGES file. These numbers are right justified in the columns 74 to 80. Sequence numbers may have leading zeros (0) or blanks.

An IGES file consists of six (6) sub-sections that must appear as follows:

1. flag section
2. start section
3. global section
4. directory entry section
5. parameter data section
6. terminate section

DG:20.2.2.1.1 - Flag section (optional)

This section identifies whether the IGES file is written as a bit string binary file, or as a "compressed" ASCII file. If this section is ignored, then the default format for the IGES file is ASCII.

DG:20.2.2.1.2 - Start section

This section of the IGES file is to provide a readable prologue to the file. There must be at least one (1) start record. All records must have the letter "S" in the 73rd column and a sequence number in columns 74 to 80. Information in columns 1 to 72 are ASCII characters. Figure 3



DG:20.2.2.2 - Global section

The global section contains information regarding the IGES pre-processor, and any information that is required by the IGES post-processor. There are 24 parameters that must be entered. These include:

Parameter Data Type Description
1 string parameter delimiter character
2 string record delimiter character
3 string product ID from sending system
4 string file name
5 string system ID
6 string IGES pre-processor version
7 integer no. of bits for integers
8 integer single precision magnitude
9 integer single precision significance
10 integer double precision magnitude
11 integer double precision significance
12 string product ID for receiving system
13 real model space scale
14 integer unit flag
15 string unit description (mm, m, in, etc.)
16 integer no. of line weight gradations
17 real size of max. line width
18 string data and time of file generation
19 real min. user intended resolution
20 real approx. max. coordinate value
21 string name of author of file
22 string name of organization
23 integer IGES version
24 integer applicable drafting standard

Parameters of the global section (All string constants are represents in Hollerith notation).

1. Parameter delimiter character: Indicates which character is used to separate values in free formatted data (including the global section). Default is a comma (,).
2. Record delimiter: Indicates which character is used to indicate the end of a list of parameters in free formatted data sections (including the global section). Default is a period (.).
3. Product ID from sending system: Name of the product as referenced from the sending system.
4. File name: Name of the IGES file.
5. System ID: Name and version of software containing the pre-processor which created the IGES file.
6. IGES pre-processor version: Version of the pre-processor which created the IGES file.
7. No. of bits for integers: No. of bits present in the integer representation of the sending system.
8. Single precision magnitude: Maximum power of 10 which may be represented as a single precision floating point number from the sending system.
9. Single precision significance: No. of significant digits of a single precision floating point number on the sending system.
10. Double precision magnitude: Maximum power of 10 which may be represented as a double precision floating point number from the sending system.
11. Double precision significance: No. of significant digits of a double precision floating point number on the sending system.
12. Product ID for receiver: Name of product intended to be used by the receiving system.
13. Model space scale: Ratio of model space to real space (e.g. 0.125 indicates a ratio of 1 unit model space to 8 units real space).
14. Unit flag: Integer value denoting the measuring system used in the file.
unit flag = 1 (inches)
= 2 (millimeters)
= 3 (see parameter 15 for name of units)
= 4 (feet)
= 5 (miles)
= 6 (metres)
= 7 (kilometers)
= 8 (mils, i.e. 0.001 inches)
= 9 (microns)
= 10 (centimeters)
= 11 (microinches)
A value of "3" should only be used when the receiving system is using the same units. In this case, parameter 15 must be used to provide additional information as to those units.
15. Unit description: A string constant naming the units in the system.
2HIN or 4HINCH (model units are inches)
2HMM (model units are millimeters)
2HFT (model units are feet)
2HMI (model units are miles)
1HM (model units are metres)
2HKM (model units are kilometers)
3HMIL (model units are mils)
2HUM (model units are microns)
2HCM (model units are centimeters)
3HUIN (model units are microinches)
When a unit flag of "3" is used, the string constant naming the desired unit should conform to MIL-STD-12D (DOD12D), or ANSI/IEEE 260 (IEEE260).
16. Maximum no. of line weight gradations: Number of equal subdivisions of line thickness.
17. Size of Max. line width: Width of the thickest line possible in the (scaled) file.
18. Date and time of file generation: Time stamp of when the file was created.
19. Minimum user intended resolution: Smallest distance in model space units that is discernible by the system.
20. Approximate Max. coordinate value: Upper bound on the values of all coordinate data occurring in this model.
21. Name of author of file: Name of person who generated the data contained in the IGES file.
22. Name of organization: Name of organization who generated the data contained in the IGES file.
23. IGES version: Integer number representing the corresponding version of IGES used to create the file.
1 - IGES version 1.0
2 - ANSI Y14.26M-1981,
3 - IGES version 2.0
4 - IGES version 3.0
Default is 3 (i.e. IGES version 2.0).
24. Applicable drafting standard: Integer number representing the drafting standard to which the data in the IGES file was specified.
0 - no standard
1 - ISO (International Organization for Standardization)
2 - AFNOR (French Association for Standardization)
3 - ANSI (American National Standards Institute)
4 - BSI (British Standards Institute)
5 - CSA (Canadian Standards Association)
6 - DIN (German Institute for Standardization)
7 - JIS (Japanese Institute for Standardization)

A sample of the global section is given below,



DG:20.2.2.3 - Directory entry sections

provides attribute information for each entity entered in the parameter section

each directory entry consists of two, 80 character, fixed formatted lines

An example is given below,



1. Entity type number: An integer value identifying the type of geometric entity.
2. Parameter data: Sequence number of the parameter data record for this entity.
3. Structure: Not discussed here. For more information, consult the IGES text.
4. Line font pattern: Integer value indicating the pattern to be used in displaying the geometric entity.
1 - solid
2 - dashed
3 - phantom
4 - centreline
5. Level: An integer value indicating the graphic display level, or layer, to be associated with the entity.
6. View: Specifies the type of entity view desired. This value is a pointer to the directory entry of a view entity (type 410). It can also be a pointer to an associativity instance. A value of zero (0) indicates the entity is displayed with the same characteristics in all views.
7. Transformation matrix: This value is either a pointer to the directory entry of a transformation matrix used in defining this entity, or a zero indicating the identity matrix used in defining this entity, or a zero indicating the identity matrix for rotation (zero rotation) and zero translation.
8. Label display associativity: Pointer to the directory entry of a label display associativity which defines how the entity's label and subscript are to be displayed in different view.
9. Status number: This is an 8 digit number relaying 4 pieces of entity information, described as follows:
Blank status - defines whether the entity is meant to be visible on the output device of the receiving system. A value of 00 implies the entity is displayed, a value of 01 indicates the entity is not to be displayed.
Subordinate entity switch - indicates if an entity is referenced by another entity in the file. A value if 00 indicates the entity is independent, and not referenced by other entities. A value of 01 indicates the entity is dependent on some other parent entity. A dependent on some other entity. A dependent entity cannot exist without its parent entity.
Entity use flag - indicates the use of the entity. A value of 00 indicates the geometry, 01 indicates annotation (descriptive purposes), 02 indicates an entity used in definition of structures of data, 03 indicates all other used for entities such as defining structural features in the file, 04 indicates logical or positional entities and 05 indicates 2D parametric entities defined by a mathematical parametric equation.
Hierarchy - indicates the relationship between entities in a hierarchical structure and is used to determine which entity's directory entry attributes should be applied. Applies to line font, view, entity level, blank status, line weight, and color number. A value of 00 indicates all the above directory entry attributes apply to this entity.
10. Sequence number: The sequence number for the position of the directory entry line in the IGES file. This sequence number will always be an odd number.
11. Entity type number: Same as in 1.
12. Line weight number: Denotes the width for which an entity is to be displayed. Largest line thickness is specified in global parameter 16, smallest thickness is specified in global parameter 17. A value of zero (0) indicates the default line weight as specified by the receiving system.
13. Color number: This value specifies the color of the entity.
1 - black
2 - red
3 - green
4 - blue
5 - yellow
6 - magenta
7 - cyan
8 - white
0 - no color specified
14. Parameter line count number: The number of lines in the parameter data section which contain the entity whose attributes are described in the directory entry section.
15. Form number: A value of zero (0) causes individual interpretation of the entity type entered in the parameter data section.
16. Reserved field: This filed is reserved for future use and should be left blank.
17. Reserved field: Same as 16.
18. Entity label: This is an alphanumeric identified for the particular entity type in consideration.
19. Entity subscript number: A numeric qualifier for the entity label in 18.
20. Sequence number: The sequence number for the position of the directory entry line in the IGES file. This sequence number will always be even.

A sample of a directory section is given below,



DG:20.2.2.4 - Parameter entry section

This section of the IGES file provides entity identification and coordinates to be plotted on the receiving system. The following is a partial list of some common entities:

Entity Type No. Entity Type
100 circular arc
102 composite curve
108 plane
110 line
112 parametric spline curve
114 parametric spline surface
116 point
124 transformation matrix
126 rational B-spline curve
128 rational B-spline surface
136 finite element

The structure is a free formatted data entry from columns 1 to 64. Each line of free formatted data consists of the entity type number followed by the parameter data describing the entity. Columns 65 to 72 are reserved for a parameter data index which is an odd number counter, right justified in the field, which begins at the number 1 and progresses in odd increments for each entity entered. Column 73 is reserved for the letter `P' to indicate the data element belongs to the parameter data section. Columns 74 to 80 are reserved for the sequence number. Each line of data corresponds to the entity type as specified in the global section. For example, the first entity element of the global section corresponds to the first line of coordinates in the parameter data section. Each portion of data in the global section is matched with its coordinate counterpart in the parameter data section.

Circular arc entity parameter data:

Index Name Type Description
1 zt real parallel zt displace. of arc from xt, yt plane
2 x1 real arc centre x coordinate
3 y1 real arc centre y coordinate
4 x2 real start point x coordinate
5 y2 real start point y coordinate
6 x3 real terminate point x coordinate
7 y3 real terminate point y coordinate

Line entity parameter data:


Index Name Type Description
1 x1 real start point x coordinate
2 y1 real start point y coordinate
3 z1 real start point z coordinate
4 x2 real terminate point x coordinate
5 y2 real terminate point y coordinate
6 z2 real terminate point z coordinate

Point entity parameter data:

Index Name Type Description
1 x real x coordinate of point
2 y real y coordinate of point
3 z real z coordinate of point
4 PTR pointer pointer to directory entry of subfigure insta-
nce specifying the display symbol. If zero (0),
then no display symbol is specified.

A sample of a data section is given below,



DG:20.2.2.5 - Terminate section

This section provides information needed by the post-processor to properly signal the end of the IGES file. The information that is relayed to the receiving system is the number of lines in each of the sections of the IGES file.

A sample of the termination section is given below,



DG:20.2.2.6 - A Sample IGES File

A Sample IGES File (Note: the columns are out of alignment)


This is a sample IGES file generated from a drawing done using CADKEY. S 1
This is simply a drawing of a two boxes: one larger box and one smaller S 2
box placed on top of the larger one. The size of the larger box is S 3
100x150x50 and the size of the smaller box is 80x60x50 units. S 4
Viewed from the top view, the origin is located on the top of the large S 5
r box. S 6
,,7Hbox.prt,7Hbox.prt,14HMCS.CADKEY 3.0,9HC2IG 3.0B,16,8,24,11,53, G 1
7Hbox.prt,1.,2,2HMM,1,1.,13H911001.075746,.0005,,17HDouglas M. A. Lee, G 2
33HThe University of Western Ontario,4,0; G 3
124 1 1 0 0 0 01000000D 1
124 0 0 1 0 Matrix D 2
124 2 1 0 0 0 01000000D 3
124 0 0 1 0 Matrix D 4
124 3 1 0 0 0 01000000D 5
124 0 0 2 0 Matrix D 6
124 5 1 0 0 0 01000000D 7
124 0 0 2 0 Matrix D 8
124 7 1 0 0 0 01000000D 9
124 0 0 2 0 Matrix D 10
124 9 1 0 0 0 01000000D 11
124 0 0 2 0 Matrix D 12
124 11 1 0 0 0 01000000D 13
124 0 0 2 0 Matrix D 14
124 13 1 0 0 0 01000000D 15
124 0 0 2 0 Matrix D 16
110 15 1 1 0 0 00000000D 17
110 0 3 1 0 Line D 18
110 16 1 1 0 0 00000000D 19
110 0 3 1 0 Line D 20
110 17 1 1 0 0 00000000D 21
110 0 3 1 0 Line D 22
110 18 1 1 0 0 00000000D 23
110 0 3 1 0 Line D 24
110 19 1 1 0 0 00000000D 25
110 0 3 1 0 Line D 26
110 20 1 1 0 0 00000000D 27
110 0 3 1 0 Line D 28
110 21 1 1 0 0 00000000D 29
110 0 3 1 0 Line D 30
110 22 1 1 0 0 00000000D 31
110 0 3 1 0 Line D 32
110 23 1 1 0 0 00000000D 33
110 0 3 1 0 Line D 34
110 24 1 1 0 0 00000000D 35
110 0 3 1 0 Line D 36
110 25 1 1 0 0 00000000D 37
110 0 3 1 0 Line D 38
110 26 1 1 0 0 00000000D 39
110 0 3 1 0 Line D 40
110 27 1 1 0 0 00000000D 41
110 0 3 1 0 Line D 42
110 28 1 1 0 0 00000000D 43
110 0 3 1 0 Line D 44
110 29 1 1 0 0 00000000D 45
110 0 3 1 0 Line D 46
110 30 1 1 0 0 00000000D 47
110 0 3 1 0 Line D 48
110 31 1 1 0 0 00000000D 49
110 0 3 1 0 Line D 50
110 32 1 1 0 0 00000000D 51
110 0 3 1 0 Line D 52
110 33 1 1 0 0 00000000D 53
110 0 3 1 0 Line D 54
110 34 1 1 0 0 00000000D 55
110 0 3 1 0 Line D 56
110 35 1 1 0 0 00000000D 57
110 0 3 1 0 Line D 58
110 36 1 1 0 0 00000000D 59
110 0 3 1 0 Line D 60
110 37 1 1 0 0 00000000D 61
110 0 3 1 0 Line D 62
110 38 1 1 0 0 00000000D 63
110 0 3 1 0 Line D 64
124,1.,0.,0.,0.,0.,1.,0.,0.,0.,0.,1.,0.; 1P 1
124,1.,0.,0.,0.,0.,6.125742E-017,-1.,0.,0.,1.,6.125742E-017,0.; 3P 2
124,-1.,0.,-1.225148E-016,0.,-1.225148E-016,6.125742E-017,1.,0., 5P 3
7.504944E-033,1.,-6.125742E-017,0.; 5P 4
124,-1.,0.,-1.225148E-016,0.,0.,1.,0.,0.,1.225148E-016,0.,-1., 7P 5
0.; 7P 6
124,6.125742E-017,0.,1.,0.,1.,6.125742E-017,-6.125742E-017,0., 9P 7
-6.125742E-017,1.,3.752472E-033,0.; 9P 8
124,6.125742E-017,0.,-1.,0.,-1.,6.125742E-017,-6.125742E-017,0., 11P 9
6.125742E-017,1.,3.752472E-033,0.; 11P 10
124,.707107,-.408202,.577383,0.,.707107,.408202,-.577383,0., 13P 11
-4.331554E-017,.816543,.577285,0.; 13P 12
124,.5,.5,.707107,0.,-.853553,.146447,.5,0.,.146447,-.853553,.5, 15P 13
0.; 15P 14
110,0.,0.,0.,100.,0.,0.; 17P 15
110,100.,0.,0.,100.,150.,0.; 19P 16
110,100.,150.,0.,0.,150.,0.; 21P 17
110,0.,150.,0.,0.,0.,0.; 23P 18
110,0.,0.,-50.,100.,0.,-50.; 25P 19
110,0.,0.,0.,0.,0.,-50.; 27P 20
110,100.,0.,0.,100.,0.,-50.; 29P 21
110,100.,0.,-50.,100.,150.,-50.; 31P 22
110,100.,150.,0.,100.,150.,-50.; 33P 23
110,100.,150.,-50.,0.,150.,-50.; 35P 24
110,0.,150.,0.,0.,150.,-50.; 37P 25
110,0.,150.,-50.,0.,0.,-50.; 39P 26
110,10.,70.,0.,90.,70.,0.; 41P 27
110,90.,70.,0.,90.,130.,0.; 43P 28
110,90.,130.,0.,10.,130.,0.; 45P 29
110,10.,130.,0.,10.,70.,0.; 47P 30
110,10.,70.,50.,90.,70.,50.; 49P 31
110,10.,70.,0.,10.,70.,50.; 51P 32
110,90.,70.,0.,90.,70.,50.; 53P 33
110,90.,70.,50.,90.,130.,50.; 55P 34
110,90.,130.,0.,90.,130.,50.; 57P 35
110,90.,130.,50.,10.,130.,50.; 59P 36
110,10.,130.,0.,10.,130.,50.; 61P 37
110,10.,130.,50.,10.,70.,50.; 63P 38
S 6G 3D 64P 38 T 1

LINE 0.0000, 0.0000, 0.0000, 100.0000, 0.0000, 0.0000, 1, 1, 1, 0, 0, 1, 1
LINE 100.0000, 0.0000, 0.0000, 100.0000, 150.0000, 0.0000, 1, 1, 1, 0, 0, 1, 1
LINE 100.0000, 150.0000, 0.0000, 0.0000, 150.0000, 0.0000, 1, 1, 1, 0, 0, 1, 1
LINE 0.0000, 150.0000, 0.0000, 0.0000, 0.0000, 0.0000, 1, 1, 1, 0, 0, 1, 1
LINE 0.0000, 0.0000, -50.0000, 100.0000, 0.0000, -50.0000, 1, 1, 1, 0, 0, 1, 1
LINE 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, -50.0000, 1, 1, 1, 0, 0, 1, 1
LINE 100.0000, 0.0000, 0.0000, 100.0000, 0.0000, -50.0000, 1, 1, 1, 0, 0, 1, 1
LINE 100.0000, 0.0000, -50.0000, 100.0000, 150.0000, -50.0000, 1, 1, 1, 0, 0, 1, 1
LINE 100.0000, 150.0000, 0.0000, 100.0000, 150.0000, -50.0000, 1, 1, 1, 0, 0, 1, 1
LINE 100.0000, 150.0000, -50.0000, 0.0000, 150.0000, -50.0000, 1, 1, 1, 0, 0, 1, 1
LINE 0.0000, 150.0000, 0.0000, 0.0000, 150.0000, -50.0000, 1, 1, 1, 0, 0, 1, 1
LINE 0.0000, 150.0000, -50.0000, 0.0000, 0.0000, -50.0000, 1, 1, 1, 0, 0, 1, 1
LINE 10.0000, 70.0000, 0.0000, 90.0000, 70.0000, 0.0000, 1, 1, 1, 0, 0, 1, 1
LINE 90.0000, 70.0000, 0.0000, 90.0000, 130.0000, 0.0000, 1, 1, 1, 0, 0, 1, 1
LINE 90.0000, 130.0000, 0.0000, 10.0000, 130.0000, 0.0000, 1, 1, 1, 0, 0, 1, 1
LINE 10.0000, 130.0000, 0.0000, 10.0000, 70.0000, 0.0000, 1, 1, 1, 0, 0, 1, 1
LINE 10.0000, 70.0000, 50.0000, 90.0000, 70.0000, 50.0000, 1, 1, 1, 0, 0, 1, 1
LINE 10.0000, 70.0000, 0.0000, 10.0000, 70.0000, 50.0000, 1, 1, 1, 0, 0, 1, 1
LINE 90.0000, 70.0000, 0.0000, 90.0000, 70.0000, 50.0000, 1, 1, 1, 0, 0, 1, 1
LINE 90.0000, 70.0000, 50.0000, 90.0000, 130.0000, 50.0000, 1, 1, 1, 0, 0, 1, 1
LINE 90.0000, 130.0000, 0.0000, 90.0000, 130.0000, 50.0000, 1, 1, 1, 0, 0, 1, 1
LINE 90.0000, 130.0000, 50.0000, 10.0000, 130.0000, 50.0000, 1, 1, 1, 0, 0, 1, 1
LINE 10.0000, 130.0000, 0.0000, 10.0000, 130.0000, 50.0000, 1, 1, 1, 0, 0, 1, 1
LINE 10.0000, 130.0000, 50.0000, 10.0000, 70.0000, 50.0000, 1, 1, 1, 0, 0, 1, 1

DG:20.2.3 A DXF File

The DXF file below is shown only for illustration (Not for casual reading)

TOC PREV NEXT