Uvodna (Header) datoteka vsebuje definicije konstant in spremenljivk pri predstavitvi z mejami. Definirane so velikosti vozlov v vseh treh seznamih (toèke, krivulje in povr¹ine) in struktura podatkov v teh vozlih.
#define SURFACE_NODE_SIZE 128
#define CURVE_NODE_SIZE 256
#define POINT_NODE_SIZE 256
/* required by nurbs library */
#define NURB
#include "nurbh.h"
#include "nurbfns.h"
/*
* Structures definition for POINTS
*/
typedef struct pointListElementSt {
int ID; /* unique ID of point */
PR_pts *nurbs; /* pointer to NURBS struct of point */
int dumped; /* was current point drawn or not */
} pointListElement ;
typedef struct pointListNodeSt {
pointListElement point[POINT_NODE_SIZE]; /* array of points in current
node */
int filled; /* nubmer of filled elem.*/
struct pointListNodeSt *prev; /* pointer to prev node */
struct pointListNodeSt *next; /* pointer to next node */
} pointListNode ;
/*
* Structures definition for CURVES
*/
typedef struct curveListElementSt {
int ID; /* curve unique ID */
PR_nurb *nurbs; /* pointer to NURBS struct of curve */
int ok; /* is len of the curve calculated */
double len; /* length of the curve */
int dumped; /* was current curve drawn or not */
} curveListElement ;
typedef struct curveListNodeSt {
curveListElement curve[CURVE_NODE_SIZE]; /* array of curves in current
node */
int filled; /* nubmer of filled elem.*/
struct curveListNodeSt *prev; /* pointer to prev node */
struct curveListNodeSt *next; /* pointer to next node */
} curveListNode;
/*
* Structures definition for SURFACES
*/
typedef struct surfaceListElementSt {
int ID; /* unique ID of surface */
PR_nurb *nurbs; /* pointer to NURBS structure of surface */
double edgeLen; /* length of edges */
double area; /* area of the surface */
int ok; /* are the area and edge length
calculated */
int dumped; /* was current curface drawn or not */
} surfaceListElement ;
typedef struct surfaceListNodeSt {
surfaceListElement surface[SURFACE_NODE_SIZE]; /* array of surfaces */
int filled; /* nubmer of filled elem.*/
struct surfaceListNodeSt *prev; /* pointer to prev node */
struct surfaceListNodeSt *next; /* pointer to next node */
} surfaceListNode;
typedef struct edgeBrepSt {
curveListElement *curve ; /* pointer to curve in list of curves */
pointListElement *startPoint; /* start point of edge */
pointListElement *endPoint ; /* end point of edge */
struct edgeBrepSt *nextEdge; /* pointer to next edge */
} edgeBrep;
typedef struct faceBrepSt {
surfaceListElement *surface; /* pointer to surface in list of surfaces*/
int noEdges; /* number of edges of current face */
edgeBrep *edge; /* pointer to list of edges */
struct faceBrepSt *nextFace; /* pointer to next face */
} faceBrep;
typedef struct BrepSt {
int noFaces; /* number of faces of current object */
faceBrep *face; /* pointer to list of faces */
} Brep ;