Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[ice-dev] IGES file format specification

Here is a much more complete file format specification for the IGES format. It does not look too difficult to parse and read, although we might have to do some work with the model to get it to work properly.

Here is IGES version 6.0 full specification: https://filemonger.com/specs/igs/devdept.com/version6.pdf

attached is my summary. It is still somewhat technical, but contains all the necessary information to start looking at parsing the IGES file format.





		Note: This is a brief summary of the IGES file format specification for use with ICE. The file format has 5 sections, a header, a global section, directory entries, parameter data, and terminal section. Every line is exactly 80 ASCII characters, with string literals specified in Hollerith format. The header gives some basic overview information, like author and file name, and the global section holds things like notes and constants. The data is in the Directory entry (DE) and Parameter Data (PD) sections. First, entities are specified or declared in the DE section, with two lines per entity. The lines are split up into 10, 8 character sections. Thus each entity has a DE specification of 20 fields. Below I have listed out the exact meaning of these 20 fields. 

	First: the entity list. This gives a description of all the entities likely encountered in standard IGES files. I have listed a brief description, but most importantly I have listed the parameter data entries in order afterward. The paramater data is in the PD section, where every line ends with P and the line number for this section. The entries are specified by the entitiy type, followed by comma separated values defining the data. These comma seperated values are what I have listed after each entity below. The entity's parameters end after a semi-colon (;). 


Entities:

	100: Circular arc- can give new plane, at xT,yT, given by transforming current coordinate system by a tranformation matrix.
		Data: gives center x,y,z and a start and end point

	102: Composite curve- ordered list, point, connected point, and parameterized curve entities
		data- # of elements, pointers to elements

	104: Conic arc - A,B,C,D,E,F, x1,y1,z1, x2,y2,z2 - Where the curve is Axt^2 + Bxtyt + Cyt^2 + Dxt + Eyt + F = 0, and x1,y1,z1 is the start point and x2,y2,z2 is the end point of the curve. The direction is counterclockwise.

-->> The definitions of the terms ellipse, parabola, and hyperbola are given in terms of the quantities
Q1,Q2, andQ3. These quantities are:
 	    |  A   B/2  D/2 |	Q2 = |  A   B/2 |
	Q1= | B/2   C   E/2 |	     | B/2   C  |
	    | D/2  E/2   F  |

		Q3 = A + C

		A parent conic curve is:

		An ellipse if
		Q2 > 0 and Q1Q3 < 0.
		A hyperbola if 
		Q2 < 0 and Q1 != 0.
		A parabola if
		Q2 = 0 and Q1 != 0.

	106: Copious data- Interpretation- 1 -> xy pairs, 2 -> x,y,z pairs, 3 -> x,y,z pairs followed by correspoinding i,j,k vector values. After interpretation integer, # of points, then the points (for 1, first will be common z value)

	108: Plane - A,B,C,D (pointer), X,Y,Z, Size - Gives plane by Ax + by + cz = d, and has display symbol located at x,y,z with size size. Pointer gives pointer to closed curve that bounds the plane

	110: line- start point and end point, x1,y1,z1,x2,y2,z2

	112: Parametric spline curve - Derivative spline type: 1=linear, 2=quadratic, 3=cubic, 4=wilson-fowler, 5=modified wilson fowler, 6=b-spline. Then degree of continuity (0,1,or 2). Number of dimentions (either 2 or 3). Number of segments. Break point of peicewise.- for each: ax, bx, cx, dx, ay, by, cy, dy, az, bz, cz, dz. Afterward- for last segment: x, x', x''/2!, x'''/3!, y, y', y''/2!, y'''/3!, z, z', z''/2!, z'''/3!

	114: Parametric spline surface - Spline type: .. Patch type(1=cartesian product, 2=unspecified), Num of U segments, Num of V segments, u values, v values, A,B,C,D,E,F,G,H,K,L,M,N,P,Q,R,S coeficents for patch 1,1, then patch 1,2, then patch 1,3 .. patch 1,N, patch 2,1, patch 2,2 .. patch M,N. - Some arbitaray values.

	116: Point- x,y,z, optional stuff here as well -pointer to display entity

	118: Ruled surface - Pointer to first curve, pointer to second, dir flag(0= join first to first, last to last, 1= opposite), dev flag(0=is dev, 1=not)

	120: Surface of Revolution- Axis of rotation is a line entity, generatrix may be a conic arc, line, circular arc, or a composite curve.
		Angle of rotation are counterclockwise about the positive direction of rotation axis- given start and stop angles (RAD)

	122: Tabulated Cylinder - Pointer to diretrix, x,y,z of terminate point for generatrix

	123: Direction- Non-zero vector in 3D, three components of vx,vy,vz. Can be used as normal vector

	124: Transformation matrix- gives R11, R12, R13, T1, R21, R22, R23, T2, R31, R32, R33, T3. R11-R33 are matrix values, and T1,T2,T3 are vector values for translating the arc to the proper coordinates. 

	126: Rational B-Spline curve - K- upper index of sum. M- Degree of basis functions. Prop1- (0=nonplanar, 1=planar), prop2(0=open, 1=closed), prop3(0=rational, 1=polynomial), prop4(0=nonperiodic, 1=periodic). values at 7 through 9+2K+M give the knot squence. The next K+1 values give the weights, and the next 3K+3 values give the control points. Then the starting and ending parameter values, followed by the x,y,z normal (if curve is planar). 

	128: Rational B-Spline Surface Same format as curve- Reads in K1, K2, - upper index of first and second sum. M1, M2- Degree of first and second set of basis functions. Prop1(1=Closed in first dir), prop2(closed in 2nd dir), prop3(1=rational), prop4(1=Periodic in first dir), prop5(1=Periodic in 2nd dir). Then has knot sequence (next 1+K1+M1), then second knot sequence(next 1+k2+M2). Then weights, then control points. Finally, start and end points for parametric directions.

	130: Offset Curve Pointer to curve to be offset, Distance flag(1=single value offset, 2=vary linear, 3=specified funtion), Pointer to curve describing offset(or 0), int giving coordinate of previous pointer, offset flag(1=arc length, 2=parameter), final offset distance, arc length or parameter value, second offset distance, arc length value, x, y, z of normal vector to plane, offset curve start and offset curve end value

	140: Offset Surface - x, y, z of offset indicator. Distance by which surface is normally offset, pointer to the surface entity to be offset

	141: Boundary - Type- 1=reference only model space, 1=boundary entities reference model pasce curves and associated parameter space curve collections. pref-trimming curves (0= Unspecified, 1=model space, 2=parameter space, 3=prepresentations are of equal preference) Pointer to untrimmed surface entity to be bounded. # of curves in boundary. Pointer to first model space curve entity. Flag- 1=direction of model space curve does not require reversal, 2=needs to be reversed. # of associated parameter space curves. Pointer to first associated parameter space entity curve for the model space curve.. to the last pointer. continue until the last pointer to the last model space3 curve entity in this boundary entity (pointer, flag, #, for each in #, pointer).  

	142: Curve on a parametric Surface Flag- indicate how this curve was made(0=unspecified, 1=projection of a given curve, 2=intersection of two surfaces, 3=isoparametric curve). Pointer to the surface, pointer to the entity the contains the definition of the mapping, and a pointer to the curve C. Give preprestentation(0=unspecified, 1=SoB is prefered, 2=C is preferred, 3=C and SoB are preferred).

	143: Bounded Surface - Flag(type of surface: 0=reference model space curves, 1=reference both model space and parameter space locations), Pointer to untrimmed surface entity, # of boundary entities, Pointer to first boundary entity ... pointer to last boundary entity. 

	144: Trimmed Surface Pointer to surface entity that is to be trimmed. flag(0=outer boundary is the boundary of the surface, 1=otherwise). Num indicates # closed curves make up inner boundary. Pointer to curve on a parametric surface entity that constitutes outer boundary (or 0). Pointer to first simple closed inner boundary curve entity.. to last pointer to closed inner boundary curve entity. 

	150: Block - lx,ly,lz, corner x,y,z, univ vector for local x: i,j,k, and unit vector for local z: i,j,k
 
	152: Right angular wedge- lx, ly, lz, ltx(length in the local x direction at distance ly from local x-axis), x,y,z (corner), i,j,k(x axis), i,j,k(z axis)

	154: Right circular cylinder- H, R, x,y,z of the face, i,j,k of unit vector in axis direction.

	156: Right circular cone- H, Large radius, small radius, larger face center x,y,z, unit vector in axis direction i,j,k

	158: Sphere - R, x,y,z

	160: Torus - Radius- center to middle of solid, radius of torus's solid, x,y,z center of object, i,j,k vector in direction of axis

	186: Manifold Solid B-Rep object- Pointer to the shell, Orientation flag of shell with respect to underlying faces (true=agrees), # of void shells, or 0, Pointer to first void shell, orientation of first void shell... to pointer of last void shell, orientation flag of last void shell. 

	190: Plane surface- Defined by a point entity and a normal vector to the plane (like a Direction 123 entity). Possible to have pointer to reference direction.

	192: Right circular cylindrical surface- Point on axis of the cylinder, direction of the axis, and radius. Possible to have pointer to reference direction.

	194: Right Circular Conical Surface- Pointer to point on axis, Pointer to axis direction (Direction 123 entity), value of radius at axis point, value of semi-angle in degrees. Can have reference direction.

	196: Sphereical Surface - Pointer to center point, value of radius. Can have axis direction and ref direction as well.

	198: Toroidal Surface - Pointer to center point, pionter to axis direction. Value of major radius, value of minor radius. Can have ref direction as well.

	308: Subfigure Definition - has multiple instanciation of defined collection of entities. has: depth, name, # of entities in subfigure, pointers to the subentities. 

	408: Singular Subfigure Instance - Pointer to a subfigure definition, x,y,z of translation, s of scaling. 
P
	502: Vertex list- used to determin the bounds of the object. # of vertex tuples, x1,y1,z1 .. xn,yn,zn

	504: Edge list- uses vertex list to define bounds of object # of edge tuples, Pointer to first model space curve, Pointer to vertx list entity (for first start vertex), int- list index of the first start vertex in the vertex list entity, Pointer to the Vertex list entity for the first terminate vertx, int- index of first terminate index in that vertex list, and repeat until all edges in the list are defined. 

	508: Loop- determine loops involved in the faces of object. # of edge tuples, int type(0=edge, 1=vertex). Pointer to first vertex list or edge list. int-list index for vertex or edge. Int- number of underlying parameter space curves, or 0. Bool- isoparametric flag (true = curve is isoparametric), pointer to first parameter space curve .. to isoparametric flag of last parameter space curve, and pointer to that last parameter space curve. Repeate for all edges or verticies. 

	510: Face- Determine the faces. Pointer to underlying surface. # of loops. Bool- outer loop flag(true = loop identified by LOOP1 is to be considered the outer loop, false=no outer loop). Pointer to first loop... pointer to last loop. 

	514: Shell- Edge connected, oriented. Like a face. # of faces, pointer to first face. Orientation flag(true = agrees with direction of underlying face). ... to pointer of last face and that orientation flag. 




	There are both CSG and B-Rep ways of expressing geometries using IGES. The Vertex, Edge, Face, Shell, and Manifold Solid B-Rep Object all represent data using Boundary Representation. But, the classes using Torus, Sphere, Block, Right Circular Cylinder, etc. represent geometries specified using Constructive Solid Geometry. 



	Data Entry Section:



		Data Entry Section: Has 20 8 Character fields

	
     110       5       0       1       0       0       0       0       1D      9
     110       1       3       1       0                               0D     10


	Entity type (110),  Parameter Data Pointer (5),  Structure (0),  Line Font Pattern (1),  Level (0), View (0), Transformation matrix (0), Label Display Associativity (0), Status Number (1), Section code and Sequence Number (D       9), 

	Entity type (110),  Line weight number (1), color number (3), parameter line count (1), form number (0), reserved field, reserved field, entity label , Entity Subscript number (0), section code and sequence Number (D      10)
	
	Entity Type: specifies the type of entity

	Parameter Data Pointer: gives the index of the parameter data for this entity (in the PD section)- will be index of first line this entity appears in PD section

	Structure- should be left at 0

	Line font pattern- 0=none, 1=solid, 2=dashed, 3=phantom, 4=centerline, 5=dotted

	Level- usually ignored

	View- usually ignored

	Transformation matrix- gives the poiner to a transformation matrix that this entity uses

	Label display associativity- Gives reference to label display associativity entity

	Status number- gives the status of this entry.

	Section code/sequence number- will be D_____## for the line number in the DE section

	Entity Type: same as first field

	Line weight number: thickness for displaying entity. 0 is default

	Color number: 0=none, 1=black, 2=red, 3=green, 4=blue, 5=yellow, 6=majenta, 7=cyan, 8=white

	Parameter line count number: quantity of lines in the PD section for this entity

	Indicates which version of this particular entity this is. Entities can have many different forms. I only described the most common (0 or 1) entity forms above. 

	Reserved field

	Reserved field

	Entity Label: application specified alphanumeric identifier or name for this entity. usually 0

	Subscript number: Numeric qualifier for the entity label

	Section code and Sequence number (again)

	

	







	

	

Back to the top