## AttrFreeObjectAttribute

(prsr_lib/attribut.c:604)
Prototype:

      void AttrFreeObjectAttribute(IPObjectStruct *PObj, char *Name)

Description:
Free one or all attributes of an object PObj and its descendants.
Parameters:

PObj: | Object to free attributes from.
--- | ---
Name: | Name of attribute to delete, or all attributes if NULL.

Returned Value:

void

See Also:
AttrFreeOneAttribute AttrFreeAttributes
Keywords:

## AttrGetObjAttrib

(prsr_lib/attribut.c:576)
Prototype:

      IPObjectStruct *AttrGetObjAttrib(IPAttributeStruct *Attrs, char *Name)

Description:
Routine to get an object attribute.
Parameters:

Attrs: | Attribute list to search for requested attribute.
--- | ---
Name: | Name of requested attribute.

Returned Value:

IPObjectStruct *: Found attribute, or NULL if not found.

See Also:
AttrSetObjectIntAttrib AttrGetObjectIntAttrib AttrSetObjectPtrAttrib AttrGetObjectPtrAttrib AttrSetObjectRealAttrib AttrGetObjectRealAttrib AttrSetObjectStrAttrib AttrGetObjectStrAttrib AttrSetObjectObjAttrib AttrSetObjAttrib AttrGetObjectObjAttrib
Keywords:
attributes

## AttrGetObjectColor

(prsr_lib/attribut.c:60)
Prototype:

      int AttrGetObjectColor(IPObjectStruct *PObj)

Description:
Routine to return the color of an object.
Parameters:

PObj: | For which we would like to know the color of.
--- | ---

Returned Value:

int: Color of PObj or IP_ATTR_NO_COLOR if no color set.

See Also:
AttrSetObjectColor AttrSetObjectRGBColor AttrGetObjectRGBColor AttrGetObjectWidth AttrSetObjectWidth AttrSetObjectRealAttrib AttrgetColor
Keywords:
attributes color

## AttrGetObjectIntAttrib

(prsr_lib/attribut.c:227)
Prototype:

      int AttrGetObjectIntAttrib(IPObjectStruct *PObj, char *Name)

Description:
Routine to get an integer attribute from an object.
Parameters:

PObj: | Object from which to get an ingeter attribute.
--- | ---
Name: | Name of integer attribute.

Returned Value:

int: Found attribute, or IP_ATTR_BAD_INT if not found.

See Also:
AttrSetObjectIntAttrib AttrSetObjectPtrAttrib AttrGetObjectPtrAttrib AttrSetObjectRealAttrib AttrGetObjectRealAttrib AttrSetObjectStrAttrib AttrGetObjectStrAttrib AttrSetObjectObjAttrib AttrSetObjAttrib AttrGetObjectObjAttrib AttrGetObjAttrib
Keywords:
attributes

## AttrGetObjectObjAttrib

(prsr_lib/attribut.c:551)
Prototype:

      IPObjectStruct *AttrGetObjectObjAttrib(IPObjectStruct *PObj, char *Name)

Description:
Routine to get an object attribute from an object.
Parameters:

PObj: | Object from which to get a object attribute.
--- | ---
Name: | Name of object attribute.

Returned Value:

IPObjectStruct *: Found attribute, or NULL if not found.

See Also:
AttrSetObjectIntAttrib AttrGetObjectIntAttrib AttrSetObjectPtrAttrib AttrGetObjectPtrAttrib AttrSetObjectRealAttrib AttrGetObjectRealAttrib AttrSetObjectStrAttrib AttrGetObjectStrAttrib AttrSetObjectObjAttrib AttrSetObjAttrib AttrGetObjAttrib
Keywords:
attributes

## AttrGetObjectPtrAttrib

(prsr_lib/attribut.c:295)
Prototype:

      VoidPtr AttrGetObjectPtrAttrib(IPObjectStruct *PObj, char *Name)

Description:
Routine to get a pointer attribute from an object.
Parameters:

PObj: | Object from which to get a pointer attribute.
--- | ---
Name: | Name of pointer attribute.

Returned Value:

VoidPtr: Found attribute, or NULL if not found.

See Also:
AttrSetObjectIntAttrib AttrGetObjectIntAttrib AttrSetObjectPtrAttrib AttrSetObjectRealAttrib AttrGetObjectRealAttrib AttrSetObjectStrAttrib AttrGetObjectStrAttrib AttrSetObjectObjAttrib AttrSetObjAttrib AttrGetObjectObjAttrib AttrGetObjAttrib
Keywords:
attributes

## AttrGetObjectRGBColor

(prsr_lib/attribut.c:111)
Prototype:

      int AttrGetObjectRGBColor(IPObjectStruct *PObj,
                                int *Red,
                                int *Green,
                                int *Blue)

Description:
Routine to return the RGB color of an object.
Parameters:

PObj: | Object to get its RGB color.
--- | ---
Red, Green, Blue: | Component of color to initialize.

Returned Value:

int: TRUE if PObj does have an RGB color attribute, FALSE otherwise.

See Also:
AttrSetObjectColor AttrGetObjectColor AttrSetObjectRGBColor AttrGetObjectWidth AttrSetObjectWidth AttrSetObjectRealAttrib AttrGetRGBColor
Keywords:
attributes color rgb

## AttrGetObjectRealAttrib

(prsr_lib/attribut.c:363)
Prototype:

      RealType AttrGetObjectRealAttrib(IPObjectStruct *PObj, char *Name)

Description:
Routine to get a real attribute from an object.
Parameters:

PObj: | Object from which to get a real attribute.
--- | ---
Name: | Name of real attribute.

Returned Value:

RealType: Found attribute, or IP_ATTR_BAD_REAL if not found.

See Also:
AttrSetObjectIntAttrib AttrGetObjectIntAttrib AttrSetObjectPtrAttrib AttrGetObjectPtrAttrib AttrSetObjectRealAttrib AttrSetObjectStrAttrib AttrGetObjectStrAttrib AttrSetObjectObjAttrib AttrSetObjAttrib AttrGetObjectObjAttrib AttrGetObjAttrib
Keywords:
attributes

## AttrGetObjectStrAttrib

(prsr_lib/attribut.c:431)
Prototype:

      char *AttrGetObjectStrAttrib(IPObjectStruct *PObj, char *Name)

Description:
Routine to get a string attribute from an object.
Parameters:

PObj: | Object from which to get a string attribute.
--- | ---
Name: | Name of string attribute.

Returned Value:

char *: Found attribute, or NULL if not found.

See Also:
AttrSetObjectIntAttrib AttrGetObjectIntAttrib AttrSetObjectPtrAttrib AttrGetObjectPtrAttrib AttrSetObjectRealAttrib AttrGetObjectRealAttrib AttrSetObjectStrAttrib AttrSetObjectObjAttrib AttrSetObjAttrib AttrGetObjectObjAttrib AttrGetObjAttrib
Keywords:
attributes

## AttrGetObjectWidth

(prsr_lib/attribut.c:159)
Prototype:

      RealType AttrGetObjectWidth(IPObjectStruct *PObj)

Description:
Routine to return the width of an object.
Parameters:

PObj: | For which we would like to know the width of.
--- | ---

Returned Value:

RealType: Width of PObj or IP_ATTR_NO_WIDTH if no width set.

See Also:
AttrSetObjectColor AttrGetObjectColor AttrSetObjectRGBColor AttrGetObjectRGBColor AttrSetObjectWidth AttrGetObjectRealAttrib AttrSetWidth
Keywords:
attributes width

## AttrSetObjAttrib

(prsr_lib/attribut.c:511)
Prototype:

      void AttrSetObjAttrib(IPAttributeStruct **Attrs,
                            char *Name,
                            IPObjectStruct *Data,
                            int CopyData)

Description:
Routine to set an object attribute.
Parameters:

Attrs: | Attribute list where to place new attribute.
--- | ---
Name: | Name of thely introducedattribute
Data: | Pointer attribute to save.
CopyData: | If TRUE, object Data is duplicated first.

Returned Value:

void

See Also:
AttrSetObjectIntAttrib AttrGetObjectIntAttrib AttrSetObjectPtrAttrib AttrGetObjectPtrAttrib AttrSetObjectRealAttrib AttrGetObjectRealAttrib AttrSetObjectStrAttrib AttrGetObjectStrAttrib AttrSetObjectObjAttrib AttrGetObjectObjAttrib AttrGetObjAttrib
Keywords:
attributes

## AttrSetObjectColor

(prsr_lib/attribut.c:36)
Prototype:

      void AttrSetObjectColor(IPObjectStruct *PObj, int Color)

Description:
Routine to set the color of an object.
Parameters:

PObj: | Object to set its color to Color.
--- | ---
Color: | New color for PObj.

Returned Value:

void

See Also:
AttrGetObjectColor AttrSetObjectRGBColor AttrGetObjectRGBColor AttrGetObjectWidth AttrSetObjectWidth AttrSetObjectIntAttrib AttrSetColor
Keywords:
attributes color

## AttrSetObjectIntAttrib

(prsr_lib/attribut.c:185)
Prototype:

      void AttrSetObjectIntAttrib(IPObjectStruct *PObj, char *Name, int Data)

Description:
Routine to set an integer attribute for an object.
Parameters:

PObj: | To add an integer attribute for.
--- | ---
Name: | Name of attribute.
Data: | Content of attribute.

Returned Value:

void

See Also:
AttrGetObjectIntAttrib AttrSetObjectPtrAttrib AttrGetObjectPtrAttrib AttrSetObjectRealAttrib AttrGetObjectRealAttrib AttrSetObjectStrAttrib AttrGetObjectStrAttrib AttrSetObjectObjAttrib AttrSetObjAttrib AttrGetObjectObjAttrib AttrGetObjAttrib
Keywords:
attributes

## AttrSetObjectObjAttrib

(prsr_lib/attribut.c:461)
Prototype:

      void AttrSetObjectObjAttrib(IPObjectStruct *PObj,
                                  char *Name,
                                  IPObjectStruct *Data,
                                  int CopyData)

Description:
Routine to set an object attribute for an object.
Parameters:

PObj: | To add an object attribute for.
--- | ---
Name: | Name of attribute.
Data: | Content of attribute.
CopyData: | f TRUE, Data object is duplicated first.

Returned Value:

void

See Also:
AttrSetObjectIntAttrib AttrGetObjectIntAttrib AttrSetObjectPtrAttrib AttrGetObjectPtrAttrib AttrSetObjectRealAttrib AttrGetObjectRealAttrib AttrSetObjectStrAttrib AttrGetObjectStrAttrib AttrSetObjAttrib AttrGetObjectObjAttrib AttrGetObjAttrib
Keywords:
attributes

## AttrSetObjectPtrAttrib

(prsr_lib/attribut.c:253)
Prototype:

      void AttrSetObjectPtrAttrib(IPObjectStruct *PObj, char *Name, VoidPtr Data)

Description:
Routine to set a pointer attribute for an object.
Parameters:

PObj: | To add a pointer attribute for.
--- | ---
Name: | Name of attribute.
Data: | Content of attribute.

Returned Value:

void

See Also:
AttrSetObjectIntAttrib AttrGetObjectIntAttrib AttrGetObjectPtrAttrib AttrSetObjectRealAttrib AttrGetObjectRealAttrib AttrSetObjectStrAttrib AttrGetObjectStrAttrib AttrSetObjectObjAttrib AttrSetObjAttrib AttrGetObjectObjAttrib AttrGetObjAttrib
Keywords:
attributes

## AttrSetObjectRGBColor

(prsr_lib/attribut.c:84)
Prototype:

      void AttrSetObjectRGBColor(IPObjectStruct *PObj, int Red, int Green, int Blue)

Description:
Routine to set the RGB color of an object.
Parameters:

PObj: | Object to set its RGB color.
--- | ---
Red, Green, Blue: | Component of color.

Returned Value:

void

See Also:
AttrSetObjectColor AttrGetObjectColor AttrGetObjectRGBColor AttrGetObjectWidth AttrSetObjectWidth AttrSetObjectRealAttrib AttrSetRGBColor
Keywords:
attributes color rgb

## AttrSetObjectRealAttrib

(prsr_lib/attribut.c:321)
Prototype:

      void AttrSetObjectRealAttrib(IPObjectStruct *PObj, char *Name, RealType Data)

Description:
Routine to set a real attribute for an object.
Parameters:

PObj: | To add a real attribute for.
--- | ---
Name: | Name of attribute.
Data: | Content of attribute.

Returned Value:

void

See Also:
AttrSetObjectIntAttrib AttrGetObjectIntAttrib AttrSetObjectPtrAttrib AttrGetObjectPtrAttrib AttrGetObjectRealAttrib AttrSetObjectStrAttrib AttrGetObjectStrAttrib AttrSetObjectObjAttrib AttrSetObjAttrib AttrGetObjectObjAttrib AttrGetObjAttrib
Keywords:
attributes

## AttrSetObjectStrAttrib

(prsr_lib/attribut.c:389)
Prototype:

      void AttrSetObjectStrAttrib(IPObjectStruct *PObj, char *Name, char *Data)

Description:
Routine to set a string attribute for an object.
Parameters:

PObj: | To add a string attribute for.
--- | ---
Name: | Name of attribute.
Data: | Content of attribute.

Returned Value:

void

See Also:
AttrSetObjectIntAttrib AttrGetObjectIntAttrib AttrSetObjectPtrAttrib AttrGetObjectPtrAttrib AttrSetObjectRealAttrib AttrGetObjectRealAttrib AttrGetObjectStrAttrib AttrSetObjectObjAttrib AttrSetObjAttrib AttrGetObjectObjAttrib AttrGetObjAttrib
Keywords:
attributes

## AttrSetObjectWidth

(prsr_lib/attribut.c:135)
Prototype:

      void AttrSetObjectWidth(IPObjectStruct *PObj, RealType Width)

Description:
Routine to set the width of an object.
Parameters:

PObj: | Object to set its width to Width.
--- | ---
Width: | New width for PObj.

Returned Value:

void

See Also:
AttrSetObjectColor AttrGetObjectColor AttrSetObjectRGBColor AttrGetObjectRGBColor AttrGetObjectWidth AttrSetObjectRealAttrib AttrSetWidth
Keywords:
attributes width

## BspCrvReadFromFile

(prsr_lib/bsp_read.c:32)
Prototype:

      CagdCrvStruct *BspCrvReadFromFile(char *FileName, char **ErrStr, int *ErrLine)

Description:
Reads from a file Bspline curve(s). If error is detected in reading the file, ErrStr is set to a string describing the error and Line to the line it occured in file. If no error is detected *ErrStr = NULL.
Parameters:

FileName: | To read the Bspline curve from.
--- | ---
ErrStr: | Will be initialized if an error has occured.
ErrLine: | Line number in file FileName of the error, if occured.

Returned Value:

CagdCrvStruct *: The read curve, or NULL if an error occured.

Keywords:
files read

## BspCrvReadFromFile2

(prsr_lib/bsp_read.c:95)
Prototype:

      CagdCrvStruct *BspCrvReadFromFile2(int Handler,
                                         CagdBType NameWasRead,
                                         char **ErrStr,
                                         int *ErrLine)

Description:
Reads from a file a Bspline curve. If NameWasRead is TRUE, it is assumed prefix "[CURVE BSPLINE" has already been read. This is useful for a global parser which invokes this routine to read from a file several times as a parent controller. For exactly this reason, the given file descriptor is NOT closed in the end. If error is found in reading the file, ErrStr is set to a string describing it and ErrLine to line it occured in file relative to begining of curve. If no error is detected *ErrStr is set to NULL.
Parameters:

Handler: | A handler to the open stream.
--- | ---
NameWasRead: | RUE if "[CURVE BSPLINE" has been read, FALSE otherwise.
ErrStr: | Will be initialized if an error has occured.
ErrLine: | Line number in file FileName of the error, if occured.

Returned Value:

CagdCrvStruct *: The read curve, or NULL if an error occured.

Keywords:
files read stream

## BspCrvWriteToFile

(prsr_lib/bsp_wrt.c:39)
Prototype:

      int BspCrvWriteToFile(CagdCrvStruct *Crvs,
                            char *FileName,
                            int Indent,
                            char *Comment,
                            char **ErrStr)

Description:
Writes Bspline curve(s) list into file. Returns TRUE if succesful, FALSE otherwise. If Comment is NULL, no comment is wrriten, if "" only internal comment is written.
Parameters:

Crvs: | To write to file FileName.
--- | ---
FileName: | Name of file to open so we can write Crvs in.
Indent: | Primary indentation. All information will be written from the column specified by Indent.
Comment: | Optional, to describe the geometry.
ErrStr: | If an error occurs, to describe the error.

Returned Value:

int: TRUE if succesful, FALSE otherwise.

Keywords:
files write

## BspCrvWriteToFile2

(prsr_lib/bsp_wrt.c:84)
Prototype:

      int BspCrvWriteToFile2(CagdCrvStruct *Crvs,
                             int Handler,
                             int Indent,
                             char *Comment,
                             char **ErrStr)

Description:
Writes Bspline curve(s) list into file. Returns TRUE if succesful, FALSE otherwise. The file descriptor is not closed. If Comment is NULL, no comment is wrriten, if "" only internal comment is written.
Parameters:

Crvs: | To write to open stream.
--- | ---
Handler: | A handler to the open stream.
Indent: | Primary indentation. All information will be written from the column specified by Indent.
Comment: | Optional, to describe the geometry.
ErrStr: | If an error occurs, to describe the error.

Returned Value:

int: TRUE if succesful, FALSE otherwise.

Keywords:
files write

## BspSrfReadFromFile

(prsr_lib/bsp_read.c:263)
Prototype:

      CagdSrfStruct *BspSrfReadFromFile(char *FileName, char **ErrStr, int *ErrLine)

Description:
Reads from a file Bspline surface(s). If error is detected in reading the file, ErrStr is set to a string describing the error and Line to the line it occured in file. If no error is detected *ErrStr = NULL.
Parameters:

FileName: | To read the Bspline surface from.
--- | ---
ErrStr: | Will be initialized if an error has occured.
ErrLine: | Line number in file FileName of the error, if occured.

Returned Value:

CagdSrfStruct *: The read surface, or NULL if an error occured.

Keywords:
files read

## BspSrfReadFromFile2

(prsr_lib/bsp_read.c:326)
Prototype:

      CagdSrfStruct *BspSrfReadFromFile2(int Handler,
                                         CagdBType NameWasRead,
                                         char **ErrStr,
                                         int *ErrLine)

Description:
Reads from a file a Bspline surface. If NameWasRead is TRUE, it is assumed prefix "[SURFACE BSPLINE" has already been read. This is useful for a global parser which invokes this routine to read from a file several times as a parent controller. For exactly this reason, the given file descriptor is NOT closed in the end. If error is found in reading the file, ErrStr is set to a string describing it and ErrLine to line it occured in file relative to begining of surface. If no error is detected *ErrStr is set to NULL.
Parameters:

Handler: | A handler to the open stream.
--- | ---
NameWasRead: | TRUE if "[SURFACE BSPLINE" hasbeen read, FALSE otherwise.
ErrStr: | Will be initialized if an error has occured.
ErrLine: | Line number in file FileName of the error, if occured.

Returned Value:

CagdSrfStruct *: The read surface, or NULL if an error occured.

Keywords:
files read stream

## BspSrfWriteToFile

(prsr_lib/bsp_wrt.c:173)
Prototype:

      int BspSrfWriteToFile(CagdSrfStruct *Srfs,
                            char *FileName,
                            int Indent,
                            char *Comment,
                            char **ErrStr)

Description:
Writes Bspline surface(s) list into file. Returns TRUE if succesful, FALSE otherwise. If Comment is NULL, no comment is wrriten, if "" only internal comment is written.
Parameters:

Srfs: | To write to file FileName.
--- | ---
FileName: | Name of file to open so we can write Srfs in.
Indent: | Primary indentation. All information will be written from the column specified by Indent.
Comment: | Optional, to describe the geometry.
ErrStr: | If an error occurs, to describe the error.

Returned Value:

int: TRUE if succesful, FALSE otherwise.

Keywords:
files write

## BspSrfWriteToFile2

(prsr_lib/bsp_wrt.c:218)
Prototype:

      int BspSrfWriteToFile2(CagdSrfStruct *Srfs,
                             int Handler,
                             int Indent,
                             char *Comment,
                             char **ErrStr)

Description:
Writes Bspline surface(s) list into file. Returns TRUE if succesful, FALSE otherwise. The file descriptor is not closed. If Comment is NULL, no comment is wrriten, if "" only internal comment is written.
Parameters:

Srfs: | To write to open stream.
--- | ---
Handler: | A handler to the open stream.
Indent: | Primary indentation. All information will be written from the column specified by Indent.
Comment: | Optional, to describe the geometry.
ErrStr: | If an error occurs, to describe the error.

Returned Value:

int: TRUE if succesful, FALSE otherwise.

Keywords:
files write

## BzrCrvReadFromFile

(prsr_lib/bzr_read.c:32)
Prototype:

      CagdCrvStruct *BzrCrvReadFromFile(char *FileName, char **ErrStr, int *ErrLine)

Description:
Reads from a file Bezier curve(s). If error is detected in reading the file, ErrStr is set to a string describing the error and Line to the line it occured in file. If no error is detected *ErrStr = NULL.
Parameters:

FileName: | To read the Bezier curve from.
--- | ---
ErrStr: | Will be initialized if an error has occured.
ErrLine: | Line number in file FileName of the error, if occured.

Returned Value:

CagdCrvStruct *: The read curve, or NULL if an error occured.

Keywords:
files read

## BzrCrvReadFromFile2

(prsr_lib/bzr_read.c:95)
Prototype:

      CagdCrvStruct *BzrCrvReadFromFile2(int Handler,
                                         CagdBType NameWasRead,
                                         char **ErrStr,
                                         int *ErrLine)

Description:
Reads from a file a Bezier curve. If NameWasRead is TRUE, it is assumed prefix "[CURVE BEZIER" has already been read. This is useful for a global parser which invokes this routine to read from a file several times as a parent controller. For exactly this reason, the given file descriptor is NOT closed in the end. If error is found in reading the file, ErrStr is set to a string describing it and ErrLine to line it occured in file relative to begining of curve. If no error is detected *ErrStr is set to NULL.
Parameters:

Handler: | A handler to the open stream.
--- | ---
NameWasRead: | TRUE if "[CURVE BEZIER" hasbeen read, FALSE otherwise.
ErrStr: | Will be initialized if an error has occured.
ErrLine: | Line number in file FileName of the error, if occured.

Returned Value:

CagdCrvStruct *: The read curve, or NULL if an error occured.

Keywords:
files read stream

## BzrCrvWriteToFile

(prsr_lib/bzr_wrt.c:39)
Prototype:

      int BzrCrvWriteToFile(CagdCrvStruct *Crvs,
                            char *FileName,
                            int Indent,
                            char *Comment,
                            char **ErrStr)

Description:
Writes Bezier curve(s) list into file. Returns TRUE if succesful, FALSE otherwise. If Comment is NULL, no comment is wrriten, if "" only internal comment is written.
Parameters:

Crvs: | To write to file FileName.
--- | ---
FileName: | Name of file to open so we can write Crvs in.
Indent: | Primary indentation. All information will be written from the column specified by Indent.
Comment: | Optional, to describe the geometry.
ErrStr: | If an error occurs, to describe the error.

Returned Value:

int: TRUE if succesful, FALSE otherwise.

Keywords:
files write

## BzrCrvWriteToFile2

(prsr_lib/bzr_wrt.c:84)
Prototype:

      int BzrCrvWriteToFile2(CagdCrvStruct *Crvs,
                             int Handler,
                             int Indent,
                             char *Comment,
                             char **ErrStr)

Description:
Writes Bezier curve(s) list into file. Returns TRUE if succesful, FALSE otherwise. The file descriptor is not closed. If Comment is NULL, no comment is wrriten, if "" only internal comment is written.
Parameters:

Crvs: | To write to open stream.
--- | ---
Handler: | A handler to the open stream.
Indent: | Primary indentation. All information will be written from the column specified by Indent.
Comment: | Optional, to describe the geometry.
ErrStr: | If an error occurs, to describe the error.

Returned Value:

int: TRUE if succesful, FALSE otherwise.

Keywords:
files write

## BzrSrfReadFromFile

(prsr_lib/bzr_read.c:219)
Prototype:

      CagdSrfStruct *BzrSrfReadFromFile(char *FileName, char **ErrStr, int *ErrLine)

Description:
Reads from a file Bezier surface(s). If error is detected in reading the file, ErrStr is set to a string describing the error and Line to the line it occured in file. If no error is detected *ErrStr = NULL.
Parameters:

FileName: | To read the Bezier surface from.
--- | ---
ErrStr: | Will be initialized if an error has occured.
ErrLine: | Line number in file FileName of the error, if occured.

Returned Value:

CagdSrfStruct *: The read surface, or NULL if an error occured.

Keywords:
files read

## BzrSrfReadFromFile2

(prsr_lib/bzr_read.c:282)
Prototype:

      CagdSrfStruct *BzrSrfReadFromFile2(int Handler,
                                         CagdBType NameWasRead,
                                         char **ErrStr,
                                         int *ErrLine)

Description:
Reads from a file a Bezier surface. If NameWasRead is TRUE, it is assumed prefix "[SURFACE BEZIER" has already been read. This is useful for a global parser which invokes this routine to read from a file several times as a parent controller. For exactly this reason, the given file descriptor is NOT closed in the end. If error is found in reading the file, ErrStr is set to a string describing it and ErrLine to line it occured in file relative to begining of surface. If no error is detected *ErrStr is set to NULL.
Parameters:

Handler: | A handler to the open stream.
--- | ---
NameWasRead: | RUE if "[SURFACE BEZIER" hasbeen read, FALSE otherwise.
ErrStr: | Will be initialized if an error has occured.
ErrLine: | Line number in file FileName of the error, if occured.

Returned Value:

CagdSrfStruct *: The read surface, or NULL if an error occured.

Keywords:
files read stream

## BzrSrfWriteToFile

(prsr_lib/bzr_wrt.c:156)
Prototype:

      int BzrSrfWriteToFile(CagdSrfStruct *Srfs,
                            char *FileName,
                            int Indent,
                            char *Comment,
                            char **ErrStr)

Description:
Writes Bezier surface(s) list into file. Returns TRUE if succesful, FALSE otherwise. If Comment is NULL, no comment is wrriten, if "" only internal comment is written.
Parameters:

Srfs: | To write to file FileName.
--- | ---
FileName: | Name of file to open so we can write Srfs in.
Indent: | Primary indentation. All information will be written from the column specified by Indent.
Comment: | Optional, to describe the geometry.
ErrStr: | If an error occurs, to describe the error.

Returned Value:

int: TRUE if succesful, FALSE otherwise.

Keywords:
files write

## BzrSrfWriteToFile2

(prsr_lib/bzr_wrt.c:201)
Prototype:

      int BzrSrfWriteToFile2(CagdSrfStruct *Srfs,
                             int Handler,
                             int Indent,
                             char *Comment,
                             char **ErrStr)

Description:
Writes Bezier surface(s) list into file. Returns TRUE if succesful, FALSE otherwise. The file descriptor is not closed. If Comment is NULL, no comment is wrriten, if "" only internal comment is written.
Parameters:

Srfs: | To write to open stream.
--- | ---
Handler: | A handler to the open stream.
Indent: | Primary indentation. All information will be written from the column specified by Indent.
Comment: | Optional, to describe the geometry.
ErrStr: | If an error occurs, to describe the error.

Returned Value:

int: TRUE if succesful, FALSE otherwise.

Keywords:
files write

## CagdCrvReadFromFile

(prsr_lib/cagdread.c:29)
Prototype:

      CagdCrvStruct *CagdCrvReadFromFile(char *FileName, char **ErrStr, int *ErrLine)

Description:
Reads from a file curve(s). If error is detected in reading the file, ErrStr is set to a string describing the error and Line to the line it occured in file. If no error is detected *ErrStr = NULL.
Parameters:

FileName: | To read the curve from.
--- | ---
ErrStr: | Will be initialized if an error has occured.
ErrLine: | Line number in file FileName of the error, if occured.

Returned Value:

CagdCrvStruct *: The read curve, or NULL if an error occured.

Keywords:
files read

## CagdCrvReadFromFile2

(prsr_lib/cagdread.c:152)
Prototype:

      CagdCrvStruct *CagdCrvReadFromFile2(int Handler, char **ErrStr, int *ErrLine)

Description:
Reads from a stream a curve. It is assumed prefix "[CURVE" has already been read. This is useful for a global parser which invokes this routine to read from a stream several times as a parent controller. For exactly this reason, the given stream descriptor is NOT closed in the end. If error is found in reading the stream, ErrStr is set to a string describing it and ErrLine to line it occured in stream relative to begining of curve. If no error is detected *ErrStr is set to NULL.
Parameters:

Handler: | A handler to the open stream.
--- | ---
ErrStr: | Will be initialized if an error has occured.
ErrLine: | Line number in strea of the error, if occured.

Returned Value:

CagdCrvStruct *: The read curve, or NULL if an error occured.

Keywords:
files read stream

## CagdCrvWriteToFile

(prsr_lib/cagd_wrt.c:41)
Prototype:

      int CagdCrvWriteToFile(CagdCrvStruct *Crvs,
                             char *FileName,
                             int Indent,
                             char *Comment,
                             char **ErrStr)

Description:
Generic routine to write curve(s) to the given file. If Comment is NULL, no comment is printed, if "" only internal comment.
Parameters:

Crvs: | To be saved in file f.
--- | ---
FileName: | File name where output should go to.
Indent: | Column in which all printing starts at.
Comment: | Optional comment to describe the geometry.
ErrStr: | If failed, ErrStr will be set to describe the problem.

Returned Value:

int: TRUE if succesful, FALSE otherwise.

Keywords:
files write

## CagdCrvWriteToFile2

(prsr_lib/cagd_wrt.c:94)
Prototype:

      int CagdCrvWriteToFile2(CagdCrvStruct *Crvs,
                              int Handler,
                              int Indent,
                              char *Comment,
                              char **ErrStr)

Description:
Generic routine to write curve(s) to the given stream. If Comment is NULL, no comment is printed, if "" only internal comment.
Parameters:

Crvs: | To be saved in stream.
--- | ---
Handler: | A handler to the open stream.
Indent: | Column in which all printing starts at.
Comment: | Optional comment to describe the geometry.
ErrStr: | If failed, ErrStr will be set to describe the problem.

Returned Value:

int: TRUE if succesful, FALSE otherwise.

Keywords:
files write

## CagdCrvWriteToFile3

(prsr_lib/cagd_wrt.c:148)
Prototype:

      int CagdCrvWriteToFile3(CagdCrvStruct *Crvs,
                              FILE *f,
                              int Indent,
                              char *Comment,
                              char **ErrStr)

Description:
Generic routine to write curve(s) to the given file. If Comment is NULL, no comment is printed, if "" only internal comment.
Parameters:

Crvs: | To be saved in file f.
--- | ---
f: | File descriptor where output should go to.
Indent: | Column in which all printing starts at.
Comment: | Optional comment to describe the geometry.
ErrStr: | If failed, ErrStr will be set to describe the problem.

Returned Value:

int: TRUE if succesful, FALSE otherwise.

Keywords:
files write

## CagdSrfReadFromFile

(prsr_lib/cagdread.c:88)
Prototype:

      CagdSrfStruct *CagdSrfReadFromFile(char *FileName, char **ErrStr, int *ErrLine)

Description:
Reads from a file surface(s). If error is detected in reading the file, ErrStr is set to a string describing the error and Line to the line it occured in file. If no error is detected *ErrStr = NULL.
Parameters:

FileName: | To read the surface from.
--- | ---
ErrStr: | Will be initialized if an error has occured.
ErrLine: | Line number in file FileName of the error, if occured.

Returned Value:

CagdSrfStruct *: The read surface, or NULL if an error occured.

Keywords:
files read

## CagdSrfReadFromFile2

(prsr_lib/cagdread.c:192)
Prototype:

      CagdSrfStruct *CagdSrfReadFromFile2(int Handler, char **ErrStr, int *ErrLine)

Description:
Reads from a stream a surface. It is assumed prefix "[SURFACE" has already been read. This is useful for a global parser which invokes this routine to read from a stream several times as a parent controller. For exactly this reason, the given stream descriptor is NOT closed in the end. If error is found in reading the stream, ErrStr is set to a string describing it and ErrLine to line it occured in stream relative to begining of surface. If no error is detected *ErrStr is set to NULL.
Parameters:

Handler: | A handler to the open stream.
--- | ---
ErrStr: | Will be initialized if an error has occured.
ErrLine: | Line number in stream of the error, if occured.

Returned Value:

CagdSrfStruct *: The read surface, or NULL if an error occured.

Keywords:
files read stream

## CagdSrfWriteToFile

(prsr_lib/cagd_wrt.c:180)
Prototype:

      int CagdSrfWriteToFile(CagdSrfStruct *Srfs,
                             char *FileName,
                             int Indent,
                             char *Comment,
                             char **ErrStr)

Description:
Generic routine to write surface(s) to the given file. If Comment is NULL, no comment is printed, if "" only internal comment.
Parameters:

Srfs: | To be saved in file f.
--- | ---
FileName: | File name where output should go to.
Indent: | Column in which all printing starts at.
Comment: | Optional comment to describe the geometry.
ErrStr: | If failed, ErrStr will be set to describe the problem.

Returned Value:

int: TRUE if succesful, FALSE otherwise.

Keywords:
files write

## CagdSrfWriteToFile2

(prsr_lib/cagd_wrt.c:234)
Prototype:

      int CagdSrfWriteToFile2(CagdSrfStruct *Srfs,
                              int Handler,
                              int Indent,
                              char *Comment,
                              char **ErrStr)

Description:
Generic routine to write surface(s) to the given stream. If Comment is NULL, no comment is printed, if "" only internal comment.
Parameters:

Srfs: | To be saved in stream.
--- | ---
Handler: | A handler to the open stream.
Indent: | Column in which all printing starts at.
Comment: | Optional comment to describe the geometry.
ErrStr: | If failed, ErrStr will be set to describe the problem.

Returned Value:

int: TRUE if succesful, FALSE otherwise.

Keywords:
files write stream

## CagdSrfWriteToFile3

(prsr_lib/cagd_wrt.c:288)
Prototype:

      int CagdSrfWriteToFile3(CagdSrfStruct *Srfs,
                              FILE *f,
                              int Indent,
                              char *Comment,
                              char **ErrStr)

Description:
Generic routine to write surface(s) to the given file. If Comment is NULL, no comment is printed, if "" only internal comment.
Parameters:

Srfs: | To be saved in file f.
--- | ---
f: | File descriptor where output should go to.
Indent: | Column in which all printing starts at.
Comment: | Optional comment to describe the geometry.
ErrStr: | If failed, ErrStr will be set to describe the problem.

Returned Value:

int: TRUE if succesful, FALSE otherwise.

Keywords:
files write

## CagdSrfWriteToFile3

(prsr_lib/trim_wrt.c:145)
Prototype:

      int TrimWriteTrimmedSrfToFile3(TrimSrfStruct *TrimSrfs,
                                     FILE *f,
                                     int Indent,
                                     char *Comment,
                                     char **ErrStr)

Description:
Generic routine to write trimmed surface(s) to the given stream. If Comment is NULL, no comment is printed, if "" only internal comment.
Parameters:

TrimSrfs: | To be saved in stream.
--- | ---
f: | File descriptor where output should go to.
Indent: | Column in which all printing starts at.
Comment: | Optional comment to describe the geometry.
ErrStr: | If failed, ErrStr will be set to describe the problem.

Returned Value:

int: TRUE if succesful, FALSE otherwise.

Keywords:
files write

## CopyObject

(prsr_lib/allocate.c:1537)
Prototype:

      IPObjectStruct *CopyObject(IPObjectStruct *Dest,
                                 IPObjectStruct *Src,
                                 int CopyAll)

Description:
Routine to create a whole new copy of an object Src into Dest. If Dest is NULL, new object is allocated, otherwise Dest itself is updated to hold the new copy. If CopyAll then all the record is copied, otherwise, only its invariant elements arebeen copied (i.e. no Name/Pnext copying).
Parameters:

Dest: | Destination object, possibly NULL.
--- | ---
Src: | Source object.
CopyAll: | Do we want a complete identical copy?

Returned Value:

IPObjectStruct *: Duplicate of Src, same as Dest if Dest != NULL.

Keywords:
copy

## CopyObjectList

(prsr_lib/allocate.c:1663)
Prototype:

      IPObjectStruct *CopyObjectList(IPObjectStruct *PObjs, int CopyAll)

Description:
Routine to create a new copy of an object list.
Parameters:

Pobjs: | Source objects.
--- | ---
CopyAll: | Do we want a complete identical copy?

Returned Value:

IPObjectStruct *: Duplicated list of PObjs.

Keywords:
copy

## CopyPolygonList

(prsr_lib/allocate.c:1694)
Prototype:

      IPPolygonStruct *CopyPolygonList(IPPolygonStruct *Src)

Description:
Routine to create a new copy of an object polygon list.
Parameters:

Src: | A polygon list to copy.
--- | ---

Returned Value:

IPPolygonStruct *: Duplicated list of polygons.

Keywords:
copy

## CopyVertexList

(prsr_lib/allocate.c:1735)
Prototype:

      IPVertexStruct *CopyVertexList(IPVertexStruct *Src)

Description:
Routine to create a new copy of a polygon vertices list.
Parameters:

Src: | A vertex list to copy.
--- | ---

Returned Value:

IPVertexStruct *: Duplicated list of vertices.

Keywords:
copy

## GenCRVObject

(prsr_lib/allocate.c:835)
Prototype:

      IPObjectStruct *GenCRVObject(CagdCrvStruct *Crv)

Description:
Creates one curve object.
Parameters:

Crv: | Curves to place in object.
--- | ---

Returned Value:

IPObjectStruct *: A newly created curve object.

Keywords:
allocation

## GenCTLPTObject

(prsr_lib/allocate.c:1180)
Prototype:

      IPObjectStruct *GenCTLPTObject(CagdPointType PtType,
                                     CagdRType *CagdCoords,
                                     RealType *Coords)

Description:
Creates one control point object. Only one of CagdCoords/Coords should be specified.
Parameters:

PtType: | Point type of created control point (E2, P3, etc.).
--- | ---
CagdCoords: | If specified, used as coefficients of new control point.
Coords: | If specified, used as coefficients of new control point.

Returned Value:

IPObjectStruct *: A newly created control point object.

Keywords:
allocation

## GenCrvObject

(prsr_lib/allocate.c:811)
Prototype:

      IPObjectStruct *GenCrvObject(char *Name,
                                   CagdCrvStruct *Crv,
                                   IPObjectStruct *Pnext)

Description:
Creates one curve object.
Parameters:

Name: | Name of polygonal object.
--- | ---
Crv: | Curves to place in object.
Pnext: | Entry into the object structure.

Returned Value:

IPObjectStruct *: A newly created curve object.

Keywords:
allocation

## GenCtlPtObject

(prsr_lib/allocate.c:1139)
Prototype:

      IPObjectStruct *GenCtlPtObject(char *Name,
                                     CagdPointType PtType,
                                     CagdRType *CagdCoords,
                                     RealType *Coords,
                                     IPObjectStruct *Pnext)

Description:
Creates one control point object. Only one of CagdCoords/Coords should be specified.
Parameters:

Name: | Name of polygonal object.
--- | ---
PtType: | Point type of created control point (E2, P3, etc.).
CagdCoords: | If specified, used as coefficients of new control point.
Coords: | If specified, used as coefficients of new control point.
Pnext: | Entry into the object structure.

Returned Value:

IPObjectStruct *: A newly created control point object.

Keywords:
allocation

## GenINSTNCObject

(prsr_lib/allocate.c:1112)
Prototype:

      IPObjectStruct *GenINSTNCObject(char *InstncName)

Description:
Creates one instance object.
Parameters:

InstncName: | Object name of original.
--- | ---

Returned Value:

IPObjectStruct *: A newly created instance object.

Keywords:
allocation

## GenInstncObject

(prsr_lib/allocate.c:1087)
Prototype:

      IPObjectStruct *GenInstncObject(char *Name,
                                      char *InstncName,
                                      IPObjectStruct *Pnext)

Description:
Creates one instance object.
Parameters:

Name: | Name of polygonal object.
--- | ---
InstncName: | Object name of original.
Pnext: | Entry into the object structure.

Returned Value:

IPObjectStruct *: A newly created instance object.

Keywords:
allocation

## GenMATObject

(prsr_lib/allocate.c:1488)
Prototype:

      IPObjectStruct *GenMATObject(MatrixType Mat)

Description:
Creates one matrix object.
Parameters:

Mat: | Matrix to initialize with.
--- | ---

Returned Value:

IPObjectStruct *: A newly created matrix object.

Keywords:
allocation

## GenMODELObject

(prsr_lib/allocate.c:1065)
Prototype:

      IPObjectStruct *GenMODELObject(MdlModelStruct *Model)

Description:
Creates one triangular surface object.
Parameters:

Model: | A model object.
--- | ---

Returned Value:

IPObjectStruct *: A newly created triangular surface object.

Keywords:
allocation

## GenMatObject

(prsr_lib/allocate.c:1461)
Prototype:

      IPObjectStruct *GenMatObject(char *Name, MatrixType Mat, IPObjectStruct *Pnext)

Description:
Creates one matrix object.
Parameters:

Name: | Name of polygonal object.
--- | ---
Mat: | Matrix to initialize with.
Pnext: | Entry into the object structure.

Returned Value:

IPObjectStruct *: A newly created matrix object.

Keywords:
allocation

## GenModelObject

(prsr_lib/allocate.c:1041)
Prototype:

      IPObjectStruct *GenModelObject(char *Name,
                                     MdlModelStruct *Model,
                                     IPObjectStruct *Pnext)

Description:
Creates one triangular surface object.
Parameters:

Name: | Name of polygonal object.
--- | ---
Model: | A model object.
Pnext: | Entry into the object structure.

Returned Value:

IPObjectStruct *: A newly created triangular surface object.

Keywords:
allocation

## GenNUMObject

(prsr_lib/allocate.c:1224)
Prototype:

      IPObjectStruct *GenNUMObject(RealType *R)

Description:
Creates one numeric object.
Parameters:

R: | Numeric value to place in object.
--- | ---

Returned Value:

IPObjectStruct *: A newly created numeric object.

Keywords:
allocation

## GenNUMValObject

(prsr_lib/allocate.c:1242)
Prototype:

      IPObjectStruct *GenNUMValObject(RealType R)

Description:
Creates one numeric object.
Parameters:

R: | Numeric value to place in object.
--- | ---

Returned Value:

IPObjectStruct *: A newly created numeric object.

Keywords:
allocation

## GenNumObject

(prsr_lib/allocate.c:1200)
Prototype:

      IPObjectStruct *GenNumObject(char *Name, RealType *R, IPObjectStruct *Pnext)

Description:
Creates one numeric object.
Parameters:

Name: | Name of polygonal object.
--- | ---
R: | Numeric value to place in object.
Pnext: | Entry into the object structure.

Returned Value:

IPObjectStruct *: A newly created numeric object.

Keywords:
allocation

## GenPLANEObject

(prsr_lib/allocate.c:1441)
Prototype:

      IPObjectStruct *GenPLANEObject(RealType *Plane0,
                                     RealType *Plane1,
                                     RealType *Plane2,
                                     RealType *Plane3)

Description:
Creates one plane object.
Parameters:

Plane0, Plane1, Plane2, Plane3: | Coefficients of point.
--- | ---

Returned Value:

IPObjectStruct *: A newly created plane object.

Keywords:
allocation

## GenPOLYObject

(prsr_lib/allocate.c:789)
Prototype:

      IPObjectStruct *GenPOLYObject(IPPolygonStruct *Pl)

Description:
Creates one polygonal object.
Parameters:

Pl: | Polygon(s) to place in object.
--- | ---

Returned Value:

IPObjectStruct *: A newly created polygonal object.

Keywords:
allocation

## GenPTObject

(prsr_lib/allocate.c:1292)
Prototype:

      IPObjectStruct *GenPTObject(RealType *Pt0, RealType *Pt1, RealType *Pt2)

Description:
Creates one point object.
Parameters:

Pt0, Pt1, Pt2: | Coefficients of point.
--- | ---

Returned Value:

IPObjectStruct *: A newly created point object.

Keywords:
allocation

## GenPlaneObject

(prsr_lib/allocate.c:1411)
Prototype:

      IPObjectStruct *GenPlaneObject(char *Name,
                                     RealType *Plane0,
                                     RealType *Plane1,
                                     RealType *Plane2,
                                     RealType *Plane3,
                                     IPObjectStruct *Pnext)

Description:
Creates one plane object.
Parameters:

Name: | Name of polygonal object.
--- | ---
Plane0, Plane1, Plane2, Plane3: | Coefficients of point.
Pnext: | Entry into the object structure.

Returned Value:

IPObjectStruct *: A newly created plane object.

Keywords:
allocation

## GenPolyObject

(prsr_lib/allocate.c:764)
Prototype:

      IPObjectStruct *GenPolyObject(char *Name,
                                    IPPolygonStruct *Pl,
                                    IPObjectStruct *Pnext)

Description:
Creates one polygonal object.
Parameters:

Name: | Name of polygonal object.
--- | ---
Pl: | Polygon(s) to place in object.
Pnext: | Entry into the object structure.

Returned Value:

IPObjectStruct *: A newly created polygonal object.

Keywords:
allocation

## GenPtObject

(prsr_lib/allocate.c:1266)
Prototype:

      IPObjectStruct *GenPtObject(char *Name,
                                  RealType *Pt0,
                                  RealType *Pt1,
                                  RealType *Pt2,
                                  IPObjectStruct *Pnext)

Description:
Creates one point object.
Parameters:

Name: | Name of polygonal object.
--- | ---
Pt0, Pt1, Pt2: | Coefficients of point.
Pnext: | Entry into the object structure.

Returned Value:

IPObjectStruct *: A newly created point object.

Keywords:
allocation

## GenSRFObject

(prsr_lib/allocate.c:881)
Prototype:

      IPObjectStruct *GenSRFObject(CagdSrfStruct *Srf)

Description:
Creates one surface object.
Parameters:

Srf: | Surfaces to place in object.
--- | ---

Returned Value:

IPObjectStruct *: A newly created surface object.

Keywords:
allocation

## GenSTRObject

(prsr_lib/allocate.c:1386)
Prototype:

      IPObjectStruct *GenSTRObject(char *Str)

Description:
Creates one string object.
Parameters:

Str: | The string.
--- | ---

Returned Value:

IPObjectStruct *: A newly created strtor object.

Keywords:
allocation

## GenSrfObject

(prsr_lib/allocate.c:857)
Prototype:

      IPObjectStruct *GenSrfObject(char *Name,
                                   CagdSrfStruct *Srf,
                                   IPObjectStruct *Pnext)

Description:
Creates one surface object.
Parameters:

Name: | Name of polygonal object.
--- | ---
Srf: | Surfaces to place in object.
Pnext: | Entry into the object structure.

Returned Value:

IPObjectStruct *: A newly created surface object.

Keywords:
allocation

## GenStrObject

(prsr_lib/allocate.c:1362)
Prototype:

      IPObjectStruct *GenStrObject(char *Name, char *Str, IPObjectStruct *Pnext)

Description:
Creates one string object.
Parameters:

Name: | Name of string object.
--- | ---
Str: | The string.
Pnext: | Entry into the object structure.

Returned Value:

IPObjectStruct *: A newly created strtor object.

Keywords:
allocation

## GenTRIMSRFObject

(prsr_lib/allocate.c:927)
Prototype:

      IPObjectStruct *GenTRIMSRFObject(TrimSrfStruct *TrimSrf)

Description:
Creates one surface object.
Parameters:

TrimSrf: | Trimmed surfaces to place in object.
--- | ---

Returned Value:

IPObjectStruct *: A newly created trimmed surface object.

Keywords:
allocation

## GenTRISRFObject

(prsr_lib/allocate.c:1019)
Prototype:

      IPObjectStruct *GenTRISRFObject(TrngTriangSrfStruct *TriSrf)

Description:
Creates one triangular surface object.
Parameters:

TriSrf: | Triangular Surfaces to place in object.
--- | ---

Returned Value:

IPObjectStruct *: A newly created triangular surface object.

Keywords:
allocation

## GenTRIVARObject

(prsr_lib/allocate.c:973)
Prototype:

      IPObjectStruct *GenTRIVARObject(TrivTVStruct *Triv)

Description:
Creates one trivariate object.
Parameters:

Triv: | Trivariates to place in object.
--- | ---

Returned Value:

IPObjectStruct *: A newly created trivariate object.

Keywords:
allocation

## GenTriSrfObject

(prsr_lib/allocate.c:995)
Prototype:

      IPObjectStruct *GenTriSrfObject(char *Name,
                                      TrngTriangSrfStruct *TriSrf,
                                      IPObjectStruct *Pnext)

Description:
Creates one triangular surface object.
Parameters:

Name: | Name of polygonal object.
--- | ---
TriSrf: | Triangular Surfaces to place in object.
Pnext: | Entry into the object structure.

Returned Value:

IPObjectStruct *: A newly created triangular surface object.

Keywords:
allocation

## GenTrimSrfObject

(prsr_lib/allocate.c:903)
Prototype:

      IPObjectStruct *GenTrimSrfObject(char *Name,
                                       TrimSrfStruct *TrimSrf,
                                       IPObjectStruct *Pnext)

Description:
Creates one surface object.
Parameters:

Name: | Name of polygonal object.
--- | ---
TrimSrf: | Trimmed surfaces to place in object.
Pnext: | Entry into the object structure.

Returned Value:

IPObjectStruct *: A newly created trimmed surface object.

Keywords:
allocation

## GenTrivarObject

(prsr_lib/allocate.c:949)
Prototype:

      IPObjectStruct *GenTrivarObject(char *Name,
                                      TrivTVStruct *Triv,
                                      IPObjectStruct *Pnext)

Description:
Creates one trivariate object.
Parameters:

Name: | Name of polygonal object.
--- | ---
Triv: | Trivariates to place in object.
Pnext: | Entry into the object structure.

Returned Value:

IPObjectStruct *: A newly created trivariate object.

Keywords:
allocation

## GenVECObject

(prsr_lib/allocate.c:1342)
Prototype:

      IPObjectStruct *GenVECObject(RealType *Vec0, RealType *Vec1, RealType *Vec2)

Description:
Creates one vector object.
Parameters:

Vec0, Vec1, Vec2: | Coefficients of vector.
--- | ---

Returned Value:

IPObjectStruct *: A newly created vector object.

Keywords:
allocation

## GenVecObject

(prsr_lib/allocate.c:1316)
Prototype:

      IPObjectStruct *GenVecObject(char *Name,
                                   RealType *Vec0,
                                   RealType *Vec1,
                                   RealType *Vec2,
                                   IPObjectStruct *Pnext)

Description:
Creates one vector object.
Parameters:

Name: | Name of polygonal object.
--- | ---
Vec0, Vec1, Vec2: | Coefficients of vector.
Pnext: | Entry into the object structure.

Returned Value:

IPObjectStruct *: A newly created vector object.

Keywords:
allocation

## IPAllacPolygon

(prsr_lib/allocate.c:195)
Prototype:

      IPPolygonStruct *IPAllocPolygon(ByteType Tags,
                                      IPVertexStruct *V,
                                      IPPolygonStruct *Pnext)

Description:
Allocates one Polygon Structure.
Parameters:

Tags: | Entry into new vertex structure.
--- | ---
V: | Entry into new vertex structure.
Pnext: | Entry into new vertex structure.

Returned Value:

IPPolygonStruct *: A new allocated polygon structure.

Keywords:
allocation

## IPAllocObject

(prsr_lib/allocate.c:314)
Prototype:

      IPObjectStruct *IPAllocObject(char *Name,
                                    IPObjStructType ObjType,
                                    IPObjectStruct *Pnext)

Description:
Allocates one Object Structure.
Parameters:

Name: | Name of newly allocated object.
--- | ---
ObjType: | Object type of newly allocated object.
Pnext: | Entry into new object structure.

Returned Value:

IPObjectStruct *: A new allocated object structure.

Keywords:
allocation

## IPAllocVertex

(prsr_lib/allocate.c:137)
Prototype:

      IPVertexStruct *IPAllocVertex(ByteType Tags,
                                    IPPolygonStruct *PAdj,
                                    IPVertexStruct *Pnext)

Description:
Allocates one Vertex Structure.
Parameters:

Tags: | Entry into new vertex structure.
--- | ---
PAdj: | Entry into new vertex structure.
Pnext: | Entry into new vertex structure.

Returned Value:

IPVertexStruct *: A new allocated vertex structure.

Keywords:
allocation

## IPFreeObject

(prsr_lib/allocate.c:413)
Prototype:

      void IPFreeObject(IPObjectStruct *O)

Description:
Frees one Object Structure.
Parameters:

O: | To free.
--- | ---

Returned Value:

void

Keywords:
allocation

## IPFreeObjectList

(prsr_lib/allocate.c:561)
Prototype:

      void IPFreeObjectList(IPObjectStruct *OFirst)

Description:
Free a list of Object structures.
Parameters:

OFirst: | To free.
--- | ---

Returned Value:

void

Keywords:
allocation

## IPFreePolygon

(prsr_lib/allocate.c:392)
Prototype:

      void IPFreePolygon(IPPolygonStruct *P)

Description:
Frees one Polygon Structure.
Parameters:

P: | To free.
--- | ---

Returned Value:

void

Keywords:
allocation

## IPFreePolygonList

(prsr_lib/allocate.c:504)
Prototype:

      void IPFreePolygonList(IPPolygonStruct *PFirst)

Description:
Free a list of Polygon structures.
Parameters:

PFirst: | To free.
--- | ---

Returned Value:

void

Keywords:
allocation

## IPFreeVertex

(prsr_lib/allocate.c:371)
Prototype:

      void IPFreeVertex(IPVertexStruct *V)

Description:
Frees one Vertex Structure.
Parameters:

V: | To free.
--- | ---

Returned Value:

void

Keywords:
allocation

## IPFreeVertexList

(prsr_lib/allocate.c:447)
Prototype:

      void IPFreeVertexList(IPVertexStruct *VFirst)

Description:
Free a, possibly circular, list of Vertex structures.
Parameters:

VFirst: | To free.
--- | ---

Returned Value:

void

Keywords:
allocation

## IPGetObjectByName

(prsr_lib/iritprs2.c:1609)
Prototype:

      IPObjectStruct *IPGetObjectByName(char *Name,
                                        IPObjectStruct *PObjList,
                                        int TopLevel)

Description:
Searchs for an onbject in given PObjList, named Name.
Parameters:

Name: | Of object to find and return a reference of.
--- | ---
PObjList: | List of objects to scan.
TopLevel: | if TRUE, scan only the top level list.

Returned Value:

IPObjectStruct *: A reference to found object, NULL otherwise.

Keywords:

## IPIsConsistentFreeObjList

(prsr_lib/allocate.c:274)
Prototype:

      int IPIsConsistentFreeObjList(void)

Description:
Verifies the consistency of the freed list itself. Debugging routine.
Parameters:

None

Returned Value:

int: TRUE if o.k., FALSE otherwise.

Keywords:
allocation

## IPIsFreeObject

(prsr_lib/allocate.c:249)
Prototype:

      int IPIsFreeObject(IPObjectStruct *PObj)

Description:
Verify if the given pobject is on the freed list.
Parameters:

PObj: | Is this object on the freed list!?
--- | ---

Returned Value:

int: TRUE if freed, FALSE otherwise.

Keywords:
allocation

## IPTraverseObjListHierarchy

(prsr_lib/iritprs2.c:1681)
Prototype:

      void IPTraverseObjListHierarchy(IPObjectStruct *PObjList,
                                      MatrixType CrntViewMat,
                                      IritPrsrApplyObjFuncType ApplyFunc)

Description:
Traverses a hierarchy of objects and invokes ApplyObject to each leaf (non list) object in the given object list with an associated matrix. Instances are converted into their real objects on the fly. Objects that have an "Invisible" attribute are ignored (they might be invoked indirectly as an instance).
Parameters:

PObjList: | To traverse and apply.
--- | ---
CrntViewMat: | Viewing matrix.
ApplyFunc: | To invoke on each and every non leaf object.

Returned Value:

void

Keywords:
instances

## IritClosedPolysToOpen

(prsr_lib/ip_cnvrt.c:1462)
Prototype:

      void IritClosedPolysToOpen(IPPolygonStruct *Pls)

Description:
Forces the given list of polygons to have open list of vertices
Parameters:

Pls: | Polygons to process, in place.
--- | ---

Returned Value:

void

See Also:
IritOpenPolysToClosed
Keywords:

## IritCurve2CtlPoly

(prsr_lib/ip_cnvrt.c:244)
Prototype:

      IPPolygonStruct *IritCurve2CtlPoly(CagdCrvStruct *Crv)

Description:
Routine to convert a single curve's control polygon into a polyline.
Parameters:

Crv: | To extract its control polygon as a polyline.
--- | ---

Returned Value:

IPPolygonStruct *: A polyline representing Crv's control polygon.

Keywords:
conversion

## IritCurve2Polylines

(prsr_lib/ip_cnvrt.c:177)
Prototype:

      IPPolygonStruct *IritCurve2Polylines(CagdCrvStruct *Crv,
                                           CagdRType TolSamples,
                                           SymbCrvApproxMethodType Method)

Description:
Routine to convert one curve into a polyline with TolSamples samples/tolerance.
Parameters:

Crv: | To approximate as a polyline .
--- | ---
TolSamples: | Tolerance of approximation error (Method = 2) or Number of samples to compute on polyline (Method = 0, 1).
Method: | 0 - TolSamples are set uniformly in parametric space, 1 - TolSamples are set optimally, considering the curve's curvature. 2 - TolSamples sets the maximum error allowed between the piecewise linear approximation and original curve.

Returned Value:

IPPolygonStruct *: A polyline approximating Crv.

See Also:
BspCrv2Polyline BzrCrv2Polyline SymbCrv2Polyline
Keywords:
conversion approximation

## IritCurvesToCubicBzrCrvs

(prsr_lib/ip_cnvrt.c:1020)
Prototype:

      CagdCrvStruct *IritCurvesToCubicBzrCrvs(CagdCrvStruct *Crvs,
                                              IPPolygonStruct **CtlPolys,
                                              CagdBType DrawCurve,
                                              CagdBType DrawCtlPoly,
                                              CagdRType MaxArcLen)

Description:
Approximates an arbitrary list of curves into cubic Beziers curves.
Parameters:

Crvs: | To approximate as cubic Bezier curves.
--- | ---
CtlPolys: | If we want control polygons as well (DrawCtlPoly == TRUE) they will be placed herein.
DrawCurve: | Do we want to draw the curves?
DrawCtlPoly: | Do we want to draw the control polygons?
MaxArcLen: | Tolerance for cubic Bezier approximation. See function BzrApproxBzrCrvAsCubics.

Returned Value:

CagdCrvStruct *: The cubic Bezier approximation, or NULL if DrawCurve is FALSE.

Keywords:
conversion approximation

## IritOpenPolysToClosed

(prsr_lib/ip_cnvrt.c:1493)
Prototype:

      void IritOpenPolysToClosed(IPPolygonStruct *Pls)

Description:
Forces the given list of polygons to have closed list of vertices
Parameters:

Pls: | Polygons to process, in place.
--- | ---

Returned Value:

void

See Also:
IritClosedPolysToOpen
Keywords:

## IritPrsrAppendLists

(prsr_lib/iritprs2.c:1349)
Prototype:

      IPObjectStruct *IritPrsrAppendLists(IPObjectStruct *ListObj1,
                                          IPObjectStruct *ListObj2)

Description:
Appends two lists.
Parameters:

ListObj1, ListObj2: | The two list objects to append.
--- | ---

Returned Value:

IPObjectStruct *: A combined list.

Keywords:

## IritPrsrAppendObjLists

(prsr_lib/iritprs2.c:1319)
Prototype:

      IPObjectStruct *IritPrsrAppendObjLists(IPObjectStruct *OList1,
                                             IPObjectStruct *OList2)

Description:
Appends two object lists together.
Parameters:

OList1, OList2: | Two lists to append.
--- | ---

Returned Value:

IPPolygonStruct *: Appended list.

Keywords:
linked lists

## IritPrsrAppendPolyLists

(prsr_lib/iritprs2.c:1244)
Prototype:

      IPPolygonStruct *IritPrsrAppendPolyLists(IPPolygonStruct *PList1,
                                               IPPolygonStruct *PList2)

Description:
Appends two poly lists together.
Parameters:

PList1, PList2: | Two lists to append.
--- | ---

Returned Value:

IPPolygonStruct *: Appended list.

Keywords:
linked lists

## IritPrsrAppendVrtxLists

(prsr_lib/iritprs2.c:1170)
Prototype:

      IPVertexStruct *IritPrsrAppendVrtxLists(IPVertexStruct *VList1,
                                              IPVertexStruct *VList2)

Description:
Appends two vertex lists together.
Parameters:

VList1, VList2: | Two lists to append.
--- | ---

Returned Value:

IPVertexStruct *: Appended list.

Keywords:
linked lists

## IritPrsrClntAcceptConnect

(prsr_lib/soc_clnt.c:605)
Prototype:

      int IritPrsrClntAcceptConnect(int *PrgmInput, int *PrgmOutput)

Description:
Accept a connection. Must be called by clients at the beginning.
Parameters:

PrgmInput: | A handler to the Program's input channel.
--- | ---
PrgmOutput: | handler to the Program's output channel.

Returned Value:

int: TRUE, if succesful, FALSE otherwise.

Keywords:

## IritPrsrClntCloseConnect

(prsr_lib/soc_clnt.c:658)
Prototype:

      int IritPrsrClntCloseConnect(int PrgmInput, int PrgmOutput)

Description:
Close a connection. Must be called by clients at the end.
Parameters:

PrgmInput: | A handler to the Program's input channel.
--- | ---
PrgmOutput: | handler to the Program's output channel.

Returned Value:

int: TRUE, if succesful, FALSE otherwise.

Keywords:

## IritPrsrCloseStream

(prsr_lib/iritprs1.c:182)
Prototype:

      void IritPrsrCloseStream(int Handler, int Free)

Description:
Close a data file for read/write.
Parameters:

Handler: | A handler to the open stream.
--- | ---
Free: | If TRUE, release content.

Returned Value:

void

Keywords:
files stream parser

## IritPrsrCoerceCommonSpace

(prsr_lib/coerce.c:30)
Prototype:

      CagdPointType IritPrsrCoerceCommonSpace(IPObjectStruct *PtObjList, int Type)

Description:
Given a set of points, returns the list's common denominator that spans the space of all the points, taking into account type Type.
Parameters:

PtObjList: | List of points.
--- | ---
Type: | Point type that we must span its space as well.

Returned Value:

CagdPointType: Point type that spans the space of point type Type as well as all points in PtObjList.

Keywords:
coercion

## IritPrsrCoerceObjectTo

(prsr_lib/coerce.c:119)
Prototype:

      IPObjectStruct *IritPrsrCoerceObjectTo(IPObjectStruct *PObj, int NewType)

Description:
Coerces an object to a new object. Points, vectors, control points and planes can always be coerced between themselves using this routine by specifying the new object type desired such as IP_OBJ_PLANE or control point type like CAGD_PT_E4_TYPE. Control points of curves and surfaces may be coerced to a new type by prescribing the needed point type as NewType, such as CAGD_PT_P2_TYPE.
Parameters:

PObj: | Object to coerce.
--- | ---
NewType: | New type which can be object type like IP_OBJ_VECTOR or point type like E2.

Returned Value:

IPObjectStruct *: Newly coerced object.

Keywords:
coercion

## IritPrsrCoercePtsListTo

(prsr_lib/coerce.c:73)
Prototype:

      CagdPointType IritPrsrCoercePtsListTo(IPObjectStruct *PtObjList, int Type)

Description:
Coerces a list of objects to Type.
Parameters:

PtObjList: | Coerce points/vectors/control points in this list to Type.
--- | ---
Type: | Minimum space type to coerce to in PtObjList.

Returned Value:

CagdPointType: The type coercion actualy took place with in PtObjList.

Keywords:
coercion

## IritPrsrConcatFreeForm

(prsr_lib/iritprs1.c:1989)
Prototype:

      IPObjectStruct *IritPrsrConcatFreeForm(IritPrsrFreeFormStruct *FreeForms)

Description:
Concatenate all freeform objects in FreeForms into a single list.
Parameters:

FreeForms: | Freeform geometry to process.
--- | ---

Returned Value:

IPObjectStruct *: concatenated linked list.

Keywords:
conversion

## IritPrsrEvalFreeForms

(prsr_lib/iritprs1.c:895)
Prototype:

      IPObjectStruct *IritPrsrEvalFreeForms(IPObjectStruct *PObj)

Description:
Evaluates the freeforms in the given hierarchy - usually to convert into a polygonal approximation. This function invokes IritPrsrProcessFreeForm for the evaluation of the individual freeform entities.
Parameters:

PObj: | Object(s) to freeform evaluate, in place.
--- | ---

Returned Value:

IPObjectStruct *: Evaluated hierarchy, in place.

See Also:
IritPrsrProcessFreeForm
Keywords:

## IritPrsrFatalError

(prsr_lib/ip_fatal.c:29)
Prototype:

      void IritPrsrFatalError(char *Msg)

Description:
Default trap for Irit parser errors. This function prints the provided error message anddies.
Parameters:

Msg: | Error message.
--- | ---

Returned Value:

void

Keywords:
error handling

## IritPrsrFlattenForrest

(prsr_lib/iritprs1.c:958)
Prototype:

      IPObjectStruct *IritPrsrFlattenForrest(IPObjectStruct *PObjList)

Description:
Flattens out a list of trees' hierarchy (a forrest) of objects into a linear list, in place.
Parameters:

PObj: | List of object(s) to flatten out.
--- | ---

Returned Value:

IPObjectStruct *: Flattened hierarchy.

Keywords:

## IritPrsrFlattenTree

(prsr_lib/iritprs1.c:803)
Prototype:

      IPObjectStruct *IritPrsrFlattenTree(IPObjectStruct *PObj)

Description:
Flattens out a tree hierarchy of objects into a linear list, in place. As a side effect freeform entities are processed by IritPrsrProcessFreeForm.
Parameters:

PObj: | Object(s) to flatten out, in place.
--- | ---

Returned Value:

IPObjectStruct *: Flattened hierarchy.

See Also:
IritPrsrProcessFreeForm IritPrsrEvalFreeForms
Keywords:

## IritPrsrForEachPoly

(prsr_lib/iritprs2.c:1500)
Prototype:

      void IritPrsrForEachPoly(IPObjectStruct *OList,
                               void (*CallBack) (IPPolygonStruct *))

Description:
Iterates on Irit object list and calls CallBack function on every polygon found, passing it a pointer to the polygon object.
Parameters:

OList: | Pointer to the Irit objects' linked list.
--- | ---
CallBack: | allback function.

Returned Value:

void

Keywords:

## IritPrsrForEachVertex

(prsr_lib/iritprs2.c:1526)
Prototype:

      void IritPrsrForEachVertex(IPObjectStruct *OList,
                                 void (*CallBack) (IPVertexStruct *))

Description:
Iterates on Irit object list and for each vertex in every polygon calls CallBack function passing it a pointer to the vertex object.
Parameters:

OList: | Pointer to Irit objects' linked list.
--- | ---
CallBack: | allback function.

Returned Value:

void

Keywords:

## IritPrsrGetBinObject

(prsr_lib/iritprsb.c:271)
Prototype:

      IPObjectStruct *IritPrsrGetBinObject(int Handler)

Description:
Routine to read one object from a given binary file, directly. Objects may be recursively defined (as lists), in which case all are read in this single call.
Parameters:

Handler: | A handler to the open stream.
--- | ---

Returned Value:

IPObjectStruct *: Read object.

Keywords:
files parser

## IritPrsrGetDataFiles

(prsr_lib/iritprs1.c:335)
Prototype:

      IPObjectStruct *IritPrsrGetDataFiles(char **DataFileNames,
                                           int NumOfDataFiles,
                                           int Messages,
                                           int MoreMessages)

Description:
Reads data from a set of files specified by file names. Messages and MoreMessages controls the level of printout to stderr. Freeform geometry read in is handed out to a call back function named IritPrsrProcessFreeForm before it is returned from this routine. This is done so applications that do not want to deal with freeform shapes will be able to provide a call back that processes the freeform shapes into other geometry such as polygons.
Parameters:

DataFileNames: | Array of strings (file names) to process.
--- | ---
NumOfDataFiles: | Number of elements in DataFileNames.
Messages: | Do we want error messages?
MoreMessages: | Do we want informative messages?

Returned Value:

IPObjectStruct *: Objects read from all files.

Keywords:
files parser

## IritPrsrGetLastObj

(prsr_lib/iritprs2.c:1273)
Prototype:

      IPObjectStruct *IritPrsrGetLastObj(IPObjectStruct *OList)

Description:
Returns a pointer to last object of a list.
Parameters:

OList: | A list of objects.
--- | ---

Returned Value:

IPPolygonStruct *: Last object in list OList.

Keywords:
linked lists last element

## IritPrsrGetLastPoly

(prsr_lib/iritprs2.c:1199)
Prototype:

      IPPolygonStruct *IritPrsrGetLastPoly(IPPolygonStruct *PList)

Description:
Returns a pointer to last polygon/line of a list.
Parameters:

PList: | A list of polygons.
--- | ---

Returned Value:

IPPolygonStruct *: Last polygon in list PList.

Keywords:
linked lists last element

## IritPrsrGetLastVrtx

(prsr_lib/iritprs2.c:1121)
Prototype:

      IPVertexStruct *IritPrsrGetLastVrtx(IPVertexStruct *VList)

Description:
Returns a pointer to last vertex of a list.
Parameters:

VList: | A list of vertices
--- | ---

Returned Value:

IPVertexStruct *: Last vertex in VList.

Keywords:
linked lists last element

## IritPrsrGetObjects

(prsr_lib/iritprs1.c:484)
Prototype:

      IPObjectStruct *IritPrsrGetObjects(int Handler)

Description:
Routine to read the data from a given file. Returns NULL if EOF was reached or error occured.
Parameters:

Handler: | A handler to the open stream.
--- | ---

Returned Value:

IPObjectStruct *: Read object, or NULl if failed.

See Also:
IritPrsrSetPolyListCirc IritPrsrSetFlattenObjects itPrsrSetReadOneObject IritPrsrTransformInstances.
Keywords:
files parser

## IritPrsrGetPrevObj

(prsr_lib/iritprs2.c:1293)
Prototype:

      IPObjectStruct *IritPrsrGetPrevObj(IPObjectStruct *OList, IPObjectStruct *O)

Description:
Returns a pointer to previous object in OList to O.
Parameters:

OList: | A list of objects.
--- | ---
O: | For which the previous object in OList is pursuit.

Returned Value:

IPVertexStruct *: Previous object to O in OList if found, NULL otherwise.

Keywords:
previous element linked lists

## IritPrsrGetPrevPoly

(prsr_lib/iritprs2.c:1220)
Prototype:

      IPPolygonStruct *IritPrsrGetPrevPoly(IPPolygonStruct *PList,
                                           IPPolygonStruct *P)

Description:
Returns a pointer to previous polygon in PList to P.
Parameters:

PList: | A list of polygons.
--- | ---
P: | For which the previous polygon in PList is pursuit.

Returned Value:

IPVertexStruct *: Previous polygon to P in PList if found, NULL otherwise.

Keywords:
previous element linked lists

## IritPrsrGetPrevVrtx

(prsr_lib/iritprs2.c:1141)
Prototype:

      IPVertexStruct *IritPrsrGetPrevVrtx(IPVertexStruct *VList, IPVertexStruct *V)

Description:
Returns a pointer to previous vertex in VList to V.
Parameters:

VList: | A list of vertices.
--- | ---
V: | For which the previous vertex in VList is pursuit.

Returned Value:

IPVertexStruct *: Previous vertex to V in VList if found, NULL otherwise.

Keywords:
previous element linked lists

## IritPrsrInputUnGetC

(prsr_lib/iritprs1.c:1441)
Prototype:

      void IritPrsrInputUnGetC(int Handler, char c)

Description:
Routine to unget a single character from input stream.
Parameters:

Handler: | A handler to the open stream.
--- | ---
c: | Character to unget.

Returned Value:

void

Keywords:
files parser

## IritPrsrIsConvexPolygon

(prsr_lib/iritprs2.c:605)
Prototype:

      int IritPrsrIsConvexPolygon(IPPolygonStruct *Pl)

Description:
Routine to test if the given polygon is convex (by IRIT definition) or not. Algorithm: The polygon is convex iff the normals generated from cross products of two consecutive edges points to the same direction. The same direction is tested by a positive dot product.
Parameters:

Pl: | To test for convexity.
--- | ---

Returned Value:

int: TRUE if PL convex, FALSE otherwise.

Keywords:
convexity files parser

## IritPrsrMergePolylines

(prsr_lib/iritprs2.c:385)
Prototype:

      IPPolygonStruct *IritPrsrMergePolylines(IPPolygonStruct *Polys)

Description:
Merges seperated polylines into longer ones, as possible. Given a list of polylines, matches end points and merged as possible polylines with common end points, in place.
Parameters:

Polys: | Polylines to merge.
--- | ---

Returned Value:

IPPolygonStruct *: Merged as possible polylines.

Keywords:
merge polyline

## IritPrsrObjListLen

(prsr_lib/iritprs2.c:1475)
Prototype:

      int IritPrsrObjListLen(IPObjectStruct *O)

Description:
Returns the length of a list of objects.
Parameters:

O: | Object list to compute its length.
--- | ---

Returned Value:

int: Number of elements in O list.

Keywords:
length linked lists

## IritPrsrOpenDataFile

(prsr_lib/iritprs1.c:93)
Prototype:

      int IritPrsrOpenDataFile(char *FileName, int Read, int Messages)

Description:
Open a data file for read/write. Data file can be either Ascii IRIT data file or binary IRIT data file. A binary data file must have a ".bdt" (for Binary DaTa) file type. Under unix, file names with the psotfix ".Z" are assumed compressed and treated accordingly.
Parameters:

FileName: | To try and open.
--- | ---
Read: | If TRUE assume a read operation, otheriwse write.
Messages: | Do we want error/warning messages to stderr?

Returned Value:

int: A handler to the open file, -1 if error.

See Also:
IritPrsrGetObjects IritPrsrSetPolyListCirc IritPrsrSetFlattenObjects itPrsrSetReadOneObject
Keywords:
files parser

## IritPrsrOpenStreamFromFile

(prsr_lib/iritprs1.c:225)
Prototype:

      int IritPrsrOpenStreamFromFile(FILE *f, int Read, int IsBinary, int IsPipe)

Description:
Converts an open file into a stream.
Parameters:

f: | A handle to the open file.
--- | ---
Read: | TRUE for reading from f, FALSE for writing to f.
IsBinary: | Is it a binary file?
IsPipe: | Is it a pipe?

Returned Value:

int: A handle on the constructed stream.

Keywords:

## IritPrsrOpenStreamFromSocket

(prsr_lib/iritprs1.c:263)
Prototype:

      int IritPrsrOpenStreamFromSocket(int Soc, int Read, int IsBinary)

Description:
Converts an open socket into a stream.
Parameters:

Soc: | A handle to the open socket.
--- | ---
Read: | TRUE for reading from f, FALSE for writing to f.
IsBinary: | Is it a binary file?

Returned Value:

int: A handle on the constructed stream.

Keywords:

## IritPrsrParseError

(prsr_lib/iritprs2.c:483)
Prototype:

      int IritPrsrParseError(int LineNum, char **ErrorMsg)

Description:
Returns TRUE if error has happend since last call to this function during data read or write, FALSE otherwise. If error, then ErrorMsg is updated to point on static str describing it.
Parameters:

LineNum: | Line number of error, in file/stream.
--- | ---
ErrorMsg: | To be updated with latest error to have happened in parser.

Returned Value:

int: TRUE if error occured since last call, FALSE otherwise.

Keywords:
error handling files parser

## IritPrsrPolyListLen

(prsr_lib/iritprs2.c:1453)
Prototype:

      int IritPrsrPolyListLen(IPPolygonStruct *P)

Description:
Returns the length of a list of polygons.
Parameters:

P: | Polygon list to compute its length.
--- | ---

Returned Value:

int: Number of elements in P list.

Keywords:
length linked lists

## IritPrsrProcessFreeForm

(prsr_lib/ip_procs.c:32)
Prototype:

      IPObjectStruct *IritPrsrProcessFreeForm(IritPrsrFreeFormStruct *FreeForms)

Description:
Default processor of read freeform geometry. This routine does not process the freeform geometry in any way. Other programs can, for example, convert the freeform shapes to polygons or polylines using the call back function or purge the freeform data if it is not supported.
Parameters:

FreeForms: | Freeform geometry to process.
--- | ---

Returned Value:

IPObjectStruct *: Processed freeform geometry. This function simply returns what it got.

Keywords:
conversion

## IritPrsrProcessReadObject

(prsr_lib/iritprs1.c:565)
Prototype:

      IPObjectStruct *IritPrsrProcessReadObject(IPObjectStruct *PObj)

Description:
Process a read object, in place, before returning it to the caller. List objects of zero or one elements are eliminated. Attributes are propagated throughout the hierarchy. If FlattenTree mode (see IritPrsrSetFlattenObjects) hierarchy is flattened out.
Parameters:

PObj: | Object to process.
--- | ---

Returned Value:

IPObjectStruct *: Processed object, in place.

Keywords:
files parser

## IritPrsrPropagateAttrs

(prsr_lib/iritprs1.c:691)
Prototype:

      void IritPrsrPropagateAttrs(IPObjectStruct *PObj)

Description:
Propagate attributes from list objects down into their elements. Animation Attributes are accumulated.
Parameters:

PObj: | To propagate down Attrs attributes.
--- | ---
Attrs: | Attributes to propagate.
AnimAttrs: | Animations Attributes to concatenate (object list).

Returned Value:

void

Keywords:
attributes files parser

## IritPrsrPutBinObject

(prsr_lib/iritprsb.c:1225)
Prototype:

      void IritPrsrPutBinObject(int Handler, IPObjectStruct *PObj)

Description:
Routine to write one object to a given binary file, directly. Objects may be recursively defined, as lists of objects.
Parameters:

Handler: | A handler to the open stream. *
--- | ---
PObj: | Object to write.

Returned Value:

void

Keywords:
files parser

## IritPrsrPutObjectToFile

(prsr_lib/iritprs2.c:698)
Prototype:

      void IritPrsrPutObjectToFile(FILE *f, IPObjectStruct *PObj)

Description:
Routine to print the data from given object into given file FileName. If FileName is NULL or empty, print using IritPrsrPrintFunc. See function IritPrsrSetPrintFunc, IritPrsrSetFloatFormat.
Parameters:

f: | Output stream.
--- | ---
PObj: | Object to put on output stream.

Returned Value:

void

Keywords:
files

## IritPrsrPutObjectToHandler

(prsr_lib/iritprs2.c:739)
Prototype:

      void IritPrsrPutObjectToHandler(int Handler, IPObjectStruct *PObj)

Description:
Routine to print the data from given object into given file designated via Handler.
Parameters:

Handler: | A handler to the open stream.
--- | ---
PObj: | Object to put on output stream.

Returned Value:

void

See Also:
IritPrsrSetPrintFunc IritPrsrSetFloatFormat IritPrsrPrintFunc
Keywords:
files

## IritPrsrResolveInstances

(prsr_lib/iritprs1.c:391)
Prototype:

      IPObjectStruct *IritPrsrResolveInstances(IPObjectStruct *PObjects)

Description:
Resolves, in place, all instances in the objects into their proper geometry. This functions hence eliminates all instances' objects while increasing the size of the data, and do so in place.
Parameters:

PObjects: | To eliminate instances from, in place.
--- | ---

Returned Value:

IPObjectStruct *: Same geometry as in PObjects but without instances.

Keywords:

## IritPrsrReverseListObj

(prsr_lib/iritprs2.c:1387)
Prototype:

      IPObjectStruct *IritPrsrReverseListObj(IPObjectStruct *ListObj)

Description:
Reverses a list.
Parameters:

ListObj: | List object to reverses its entries.
--- | ---

Returned Value:

IPObjectStruct *: Reversed list object.

Keywords:

## IritPrsrReverseObjList

(prsr_lib/iritprs2.c:230)
Prototype:

      *****************************************************************************/
      IPObjectStruct *IritPrsrReverseObjList(IPObjectStruct *PObj)

Description:
Reverses a list of objects, in place.
Parameters:

PObj: | A list of objects to reverse.
--- | ---

Returned Value:

IPObjectStruct *: Reverse list of objects, in place.

Keywords:
reverse files parser

## IritPrsrReversePlList

(prsr_lib/iritprs2.c:261)
Prototype:

      IPPolygonStruct *IritPrsrReversePlList(IPPolygonStruct *PPl)

Description:
Reverses a list of polygons, in place.
Parameters:

PPl: | A list of polygons to reverse.
--- | ---

Returned Value:

IPPolygonStruct *: Reversed list of polygons, in place.

Keywords:
reverse files parser

## IritPrsrReverseVrtxList

(prsr_lib/iritprs2.c:294)
Prototype:

      void IritPrsrReverseVrtxList(IPPolygonStruct *Pl)

Description:
Reverses the vertex list of a given polygon. This is used mainly to reverse polygons such that cross product of consecutive edges which form a convex corner will point in the polygon normal direction.
Parameters:

Pl: | A polygon to reverse its vertex list, in place.
--- | ---

Returned Value:

void

Keywords:
reverse files parser

## IritPrsrReverseVrtxList2

(prsr_lib/iritprs2.c:352)
Prototype:

      IPVertexStruct *IritPrsrReverseVrtxList2(IPVertexStruct *PVrtx)

Description:
Reverses a list of vertices of a polyline, in place. The list is assumed to be non circular and hence can be treated as a polyline.
Parameters:

PVertex: | A list of vertices to reverse.
--- | ---

Returned Value:

IPPolygonStruct *: Reversed list of vertices, in place.

Keywords:
reverse files parser

## IritPrsrSenseBinaryFile

(prsr_lib/iritprs1.c:163)
Prototype:

      int IritPrsrSenseBinaryFile(char *FileName)

Description:
Senses if a given file (name) is a binary or a text file.
Parameters:

FileName: | File to sense.
--- | ---

Returned Value:

int: TRUE if binary, FALSE if text.

Keywords:

## IritPrsrSetFlattenObjects

(prsr_lib/iritprs1.c:620)
Prototype:

      int IritPrsrSetFlattenObjects(int Flatten)

Description:
Controls the hierarchy flattening of a read object.
Parameters:

Flatten: | If TRUE, list objects will be flattened out to a long linear list. If FALSE, read object will be unchanged.
--- | ---

Returned Value:

int: Old value of flatten state.

Keywords:
files parser

## IritPrsrSetFlattenObjects

(prsr_lib/iritprs1.c:643)
Prototype:

      int IritPrsrFlattenInvisibleObjects(int FlattenInvisib)

Description:
Controls the hierarchy flattening of a read object.
Parameters:

Flatten: | If TRUE, list objects will be flattened out to a long linear list. If FALSE, read object will be unchanged.
--- | ---

Returned Value:

int: Old value of flatten state.

Keywords:
files parser

## IritPrsrSetFloatFormat

(prsr_lib/iritprs2.c:1571)
Prototype:

      void IritPrsrSetFloatFormat(char *FloatFormat)

Description:
Sets the floating point printing format.
Parameters:

FloatFormat: | A printf style floating point printing format string.
--- | ---

Returned Value:

void

Keywords:
files

## IritPrsrSetPolyListCirc

(prsr_lib/iritprs1.c:597)
Prototype:

      int IritPrsrSetPolyListCirc(int Circ)

Description:
Controls vertex list in polygons. Do we want it circular?
Parameters:

Circ: | If TRUE, vertex lists of polygons will be circular. If FALSE, the lists will be NULL terminated.
--- | ---

Returned Value:

int: old value of flag.

See Also:
IritPrsrGetObjects
Keywords:
files parser

## IritPrsrSetPrintFunc

(prsr_lib/iritprs2.c:1553)
Prototype:

      void IritPrsrSetPrintFunc(IritPrsrPrintFuncType PrintFunc)

Description:
Sets the printing function to call if needs to redirect printing.
Parameters:

PrintFunc: | A function that gets a single string it should print.
--- | ---

Returned Value:

void

Keywords:
files

## IritPrsrSetReadOneObject

(prsr_lib/iritprs1.c:670)
Prototype:

      void IritPrsrSetReadOneObject(int OneObject)

Description:
Controls the way the Ascii parser handle multiple objects in a file.
Parameters:

OneObject: | f TRUE, only next object will be read by IritPrsrGetObjectst. If FALSE, objects will be read until EOF is detected and placed in a linked list.
--- | ---

Returned Value:

void

See Also:
IritPrsrGetObjects
Keywords:
files parser

## IritPrsrSrvrExecAndConnect

(prsr_lib/soc_srvr.c:652)
Prototype:

      int IritPrsrSrvrExecAndConnect(char *Program,
                                     int *PrgmInput,
                                     int *PrgmOutput,
                                     int IsBinary)

Description:
Executes the given program and connect to it io ports.
Parameters:

Program: | Name of program to execute. Name can be NULL, in which the user is prompt to execute the program manually.
--- | ---
PrgmInput: | A handler to the Program's input channel.
PrgmOutput: | handler to the Program's output channel.
IsBinary: | If TRUE sets channels to binary, if FALSE channels are text. This is assuming no IRIT_BIN_IPC environment variable is set, when communication will always be binary.

Returned Value:

int: TRUE, if succesful, FALSE otherwise.

Keywords:

## IritPrsrSrvrKillAndDisConnect

(prsr_lib/soc_srvr.c:783)
Prototype:

      int IritPrsrSrvrKillAndDisConnect(int Kill, int PrgmInput, int PrgmOutput)

Description:
Optionally kill and close channels to another process.
Parameters:

Kill: | If TRUE, send a KILL message to the other process.
--- | ---
PrgmInput: | A handler to the Program's input channel.
PrgmOutput: | handler to the Program's output channel.

Returned Value:

int: TRUE, if succesful, FALSE otherwise.

Keywords:

## IritPrsrStderrObject

(prsr_lib/iritprs2.c:677)
Prototype:

      void IritPrsrStderrObject(IPObjectStruct *PObj)

Description:
Routine to print the data from given object into stderr.
Parameters:

PObj: | To be put out to stderr.
--- | ---

Returned Value:

void

Keywords:
files

## IritPrsrStdoutObject

(prsr_lib/iritprs2.c:659)
Prototype:

      void IritPrsrStdoutObject(IPObjectStruct *PObj)

Description:
Routine to print the data from given object into stdout.
Parameters:

PObj: | To be put out to stdout.
--- | ---

Returned Value:

void

Keywords:
files

## IritPrsrUpdatePolyPlane

(prsr_lib/iritprs2.c:91)
Prototype:

      int IritPrsrUpdatePolyPlane(IPPolygonStruct *PPoly)

Description:
Routine to update the Plane equation of the given polygon by the order of the most robust three vertices of that polygon to define the normal.
Parameters:

PPoly: | To update its normal/plane equation.
--- | ---

Returned Value:

int: TRUE if succesful, FALSE otherwise.

Keywords:
files parser

## IritPrsrUpdatePolyPlane2

(prsr_lib/iritprs2.c:169)
Prototype:

      int IritPrsrUpdatePolyPlane2(IPPolygonStruct *PPoly, VectorType Vin)

Description:
Routine to update the Plane equation of the given polygon such that the Vin vertex will be in the positive side of it.
Parameters:

PPoly: | To update its normal/plane equation.
--- | ---
Vin: | A vertex to be considered in the inside, respective to PPoly.

Returned Value:

int: TRUE if succesful, FALSE otherwise.

Keywords:
files parser

## IritPrsrUpdateVrtxNrml

(prsr_lib/iritprs2.c:201)
Prototype:

      void IritPrsrUpdateVrtxNrml(IPPolygonStruct *PPoly, VectorType DefNrml)

Description:
Routine to update all vertices in polygon to hold a default normal if have none already.
Parameters:

PPoly: | Polygon to update normal information.
--- | ---
DefNrml: | Normal tp use in update.

Returned Value:

void

Keywords:
files parser

## IritPrsrVrtxListLen

(prsr_lib/iritprs2.c:1422)
Prototype:

      int IritPrsrVrtxListLen(IPVertexStruct *V)

Description:
Returns the length of a list of vertices.
Parameters:

V: | Vertex list to compute its length.
--- | ---

Returned Value:

int: Number of elements in V list.

Keywords:
length linked lists

## IritSetCurvesToCubicBzrTol

(prsr_lib/ip_cnvrt.c:991)
Prototype:

      void IritSetCurvesToCubicBzrTol(RealType Tolerance)

Description:
Sets the tolerance that is used by the Bezier to Cubic Bezier conversion routines IritCurvesToCubicBzrCrvs and IritSurfacesToCubicBzrCrvs
Parameters:

Tolerance: | Of approximation to use.
--- | ---

Returned Value:

void

Keywords:
approximation

## IritSrf2OptPolysSetUserTolFunc

(prsr_lib/ip_cnvrt.c:375)
Prototype:

      SymbPlErrorFuncType IritSrf2OptPolysSetUserTolFunc(SymbPlErrorFuncType Func)

Description:
Sets the user tolerance function for surface optimal subdivision.
Parameters:

Func: | Function to invoke during recursive subdivision.
--- | ---

Returned Value:

SymbPlErrorFuncType: Old user tolerance function.

See Also:
SymbSrf2OptimalPolygons SymbSrf2OptPolysBilinPolyError SymbSrf2OptPolysCurvatureError IritSurface2Polygons
Keywords:

## IritSurface2CtlMesh

(prsr_lib/ip_cnvrt.c:350)
Prototype:

      IPPolygonStruct *IritSurface2CtlMesh(CagdSrfStruct *Srf)

Description:
Routine to convert a single surface's control mesh into a polylines object.
Parameters:

Srf: | To extract its control mesh as a polylines.
--- | ---

Returned Value:

IPPolygonStruct *: A polylines object representing Srf's control mesh.

Keywords:
conversion

## IritSurface2Polygons

(prsr_lib/ip_cnvrt.c:433)
Prototype:

      IPPolygonStruct *IritSurface2Polygons(CagdSrfStruct *Srf,
                                            int FourPerFlat,
                                            RealType FineNess,
                                            int ComputeUV,
                                            int ComputeNrml,
                                            int Optimal)

Description:
Routine to approximate a single surface by polygons. FourPerFlat cause four triangles from each flat patch, two otherwise. FineNess is an estimate on number of polygons for each side of mesh if Optimal = 0, otherwise a FineNess curvature control on the maximal distance between the surface and its polygonal approximation. Optimal is a two digits number where the units hold the subdivision strategy and the tens the termination criteria.
Parameters:

Srf: | To approximate using polygons.
--- | ---
FourPerFlat: | If TRUE, four triangle per flat surface patch are created, otherwise only two.
FineNess: | Fineness control on polygonal approximation. The larger this number is the finer the approximation becomes. 10 is a good compromise when Optimal is FALSE.
ComputeUV: | Do we want UV parameter values with the vertices of the triangles?
ComputeNrml: | Do we want normals to vertices!?
Optimal: | If FALSE (0) then parametric space of Srf is sampled
uniformely. Otherwise: | If the units digit of Optimal is equal to 1. Subdivide the surface alternatively in U and V. 2. Subdivide the surface in the direction that minimizes the error of the approximation If the tenths digit of Optimal is equal to 0. No real error analysis. The fastest way. 1. Use curvature surface analysis to decide where to subdivide. Much slower than 0. 2. Use a bilinear surface fit to estimate error. Somewhat slower than 0. 3. Combine 1 and 2 for a bilinar fit error measure with curvature analysis. Very slow. 4. User prescribed tolerance function via SymbSrf2OptPolysSetUserTolFunc.

Returned Value:

IPPolygonStruct *: Resulting polygons that approximates Srf.

Keywords:
approximation conversion

## IritSurface2Polylines

(prsr_lib/ip_cnvrt.c:282)
Prototype:

      IPPolygonStruct *IritSurface2Polylines(CagdSrfStruct *Srf,
                                             int NumOfIsolines[2],
                                             CagdRType TolSamples,
                                             SymbCrvApproxMethodType Method)

Description:
Routine to convert a single surface into polylines with TolSamples samples or tolerance per isoline curve as a polyline object. If NumOfIsolines has negative value, its absolute value is heuristically used to derive a new NumOfIsolines number for it.
Parameters:

Srf: | To approximate as a polyline .
--- | ---
NumOfIsolines: | umber of isocurves to extract, in each direction.
TolSamples: | Tolerance of approximation error (Method = 2) or Number of samples to compute on polyline (Method = 0, 1).
Method: | 0 - TolSamples are set uniformly in parametric space, 1 - TolSamples are set optimally, considering the isocurve's curvature. 2 - TolSamples sets the maximum error allowed between the piecewise linear approximation and original curve.

Returned Value:

IPPolygonStruct *: A polyline object approximating Srf.

See Also:
IritCurve2Polylines
Keywords:
conversion approximation

## IritSurfacesToCubicBzrCrvs

(prsr_lib/ip_cnvrt.c:1096)
Prototype:

      CagdCrvStruct *IritSurfacesToCubicBzrCrvs(CagdSrfStruct *Srfs,
                                                IPPolygonStruct **CtlMeshes,
                                                CagdBType DrawSurface,
                                                CagdBType DrawMesh,
                                                int NumOfIsolines[2],
                                                CagdRType MaxArcLen)

Description:
Approximates an arbitrary list of surfaces into cubic Beziers curves.
Parameters:

Srfs: | To approximate as cubic Bezier curves.
--- | ---
CtlMeshes: | If we want control meshes as well (DrawMesh == TRUE) they will be placed herein.
DrawSurface: | Do we want to draw the surfaces?
DrawMesh: | Do we want to draw the control meshes?
NumOfIsolines: | umber of isocurves to extract, in each direction.
MaxArcLen: | Tolerance for cubic Bezier approximation. See function BzrApproxBzrCrvAsCubics.

Returned Value:

CagdCrvStruct *: The cubic Bezier approximation, or NULL if DrawSurface is FALSE.

See Also:
IritSurfacesToCubicBzrSrfs
Keywords:
conversion approximation

## IritSurfacesToCubicBzrSrfs

(prsr_lib/ip_cnvrt.c:1397)
Prototype:

      CagdSrfStruct *IritSurfacesToCubicBzrSrfs(CagdSrfStruct *Srfs,
                                                CagdSrfStruct **NoConvertionSrfs)

Description:
Converts an arbitrary list of surfaces into cubic integral Bezier surfaces, if possible. Any rational or surface with degrees higher than cubic cannot be converted and is left as is in the NoConvertionSrfs list.
Parameters:

Srfs: | To approximate as cubic Bezier surfaces.
--- | ---

Returned Value:

CagdSrfStruct *: The cubic Bezier approximation, or NULL if nothing has been converted.

See Also:
IritSurfacesToCubicBzrCrvs
Keywords:
conversion approximation

## IritTriSrf2CtlMesh

(prsr_lib/ip_cnvrt.c:968)
Prototype:

      IPPolygonStruct *IritTriSrf2CtlMesh(TrngTriangSrfStruct *TriSrf)

Description:
Routine to convert a single triangular patch's control mesh into a polylines object.
Parameters:

TriSrf: | To extract its control mesh as a polylines.
--- | ---

Returned Value:

IPPolygonStruct *: A polylines object representing TriSrf's control mesh.

Keywords:
conversion

## IritTriSrf2Polygons

(prsr_lib/ip_cnvrt.c:882)
Prototype:

      IPPolygonStruct *IritTriSrf2Polygons(TrngTriangSrfStruct *TriSrf,
                                           RealType FineNess,
                                           int ComputeUV,
                                           int ComputeNrml,
                                           int Optimal)

Description:
Routine to approximate a single triangular patch by polygons.
Parameters:

TriSrf: | To approximate using polygons.
--- | ---
FineNess: | See IritSurface2Polygons.
ComputeUV: | See IritSurface2Polygons.
ComputeNrml: | See IritSurface2Polygons.
Optimal: | See IritSurface2Polygons.

Returned Value:

IPPolygonStruct *: Resulting polygons that approximates Srf.

Keywords:
approximation conversion

## IritTriSrf2Polylines

(prsr_lib/ip_cnvrt.c:928)
Prototype:

      IPPolygonStruct *IritTriSrf2Polylines(TrngTriangSrfStruct *TriSrf,
                                            int NumOfIsolines[3],
                                            int SamplesPerCurve,
                                            int Optimal)

Description:
Routine to convert a single triangular patch function into polylines with SamplesPerCurve samples, NumOfIsolines isolines into a polylines object. If NumOfIsolines has negative value, its absolute value is heuristically used to derive a new NumOfIsolines number for it.
Parameters:

TriSrf: | To approximate as a polyline .
--- | ---
NumOfIsolines: | Number of isocurves to extract, in each direction.
SamplesPerCurve: | Number of samples to compute on the polyline.
Optimal: | If FALSE samples are uniform in parametric space, otherwise attempt is made to sample optimally.

Returned Value:

IPPolygonStruct *: A polylines object approximating TriSrf.

Keywords:
conversion approximation

## IritTriSrfsToCubicBzrCrvs

(prsr_lib/ip_cnvrt.c:1338)
Prototype:

      CagdCrvStruct *IritTriSrfsToCubicBzrCrvs(TrngTriangSrfStruct *TriSrfs,
                                               IPPolygonStruct **CtlMeshes,
                                               CagdBType DrawSurface,
                                               CagdBType DrawMesh,
                                               int NumOfIsolines[3],
                                               CagdRType MaxArcLen)

Description:
Approximates an arbitrary list of triangular surfaces into cubic Beziers curves.
Parameters:

TriSrfs: | To approximate as cubic Bezier curves.
--- | ---
CtlMeshes: | If we want control meshes as well (DrawMesh == TRUE) they will be placed herein.
DrawSurface: | Do we want to draw the surfaces?
DrawMesh: | Do we want to draw the control meshes?
NumOfIsolines: | umber of isocurves to extract, in each direction.
MaxArcLen: | Tolerance for cubic Bezier approximation. See function BzrApproxBzrCrvAsCubics.

Returned Value:

CagdCrvStruct *: The cubic Bezier approximation, or NULL if DrawSurface is FALSE.

Keywords:
conversion approximation

## IritTrimSrf2CtlMesh

(prsr_lib/ip_cnvrt.c:679)
Prototype:

      IPPolygonStruct *IritTrimSrf2CtlMesh(TrimSrfStruct *TrimSrf)

Description:
Routine to convert a single trimmed surface's control mesh into a polylines object.
Parameters:

TrimSrf: | To extract its control mesh as a polylines.
--- | ---

Returned Value:

IPPolygonStruct *: A polylines object representing TrimSrf's control mesh.

Keywords:
conversion

## IritTrimSrf2Polygons

(prsr_lib/ip_cnvrt.c:558)
Prototype:

      IPPolygonStruct *IritTrimSrf2Polygons(TrimSrfStruct *TrimSrf,
                                            int FourPerFlat,
                                            RealType FineNess,
                                            int ComputeUV,
                                            int ComputeNrml,
                                            int Optimal)

Description:
Routine to approximate a single trimmed surface by polygons. FourPerFlat cause four triangles from each flat patch, two otherwise. FineNess is an estimate on number of polygons for each side of mesh if Optimal = 0, otherwise a FineNess curvature control on the maximal distance between the surface and its polygonal approximation. Optimal is a two digits number where the units hold the subdivision strategy and the tens the termination criteria.
Parameters:

TrimSrf: | To approximate using polygons.
--- | ---
FourPerFlat: | If TRUE, four triangle per flat surface patch are created, otherwise only two.
FineNess: | Fineness control on polygonal approximation. The larger this number is the finer the approximation becomes. 10 is a good compromise when Optimal is FALSE.
ComputeUV: | Do we want UV parameter values with the vertices of the triangles?
ComputeNrml: | Do we want normals to vertices!?
Optimal: | If FALSE (0) then parametric space of TrimSrf is sampled
uniformely. Otherwise: | If the tenths digit of Optimal is equal to 1. Subdivide the surface alternatively in U and V. 2. Subdivide the surface in the direction that minimizes the error of the approximation If the units digit of Optimal is equal to 0. No real error analysis. The fastest way. 1. Use curvature surface analysis to decide where to subdivide. Much slower than 0. 2. Use a bilinear surface fit to estimate error. Somewhat slower than 0. 3. Combine 1 and 2 for a bilinar fit error measure with curvature analysis. Very slow.

Returned Value:

IPPolygonStruct *: Resulting polygons that approximates TrimSrf.

Keywords:
approximation conversion

## IritTrimSrf2Polylines

(prsr_lib/ip_cnvrt.c:605)
Prototype:

      IPPolygonStruct *IritTrimSrf2Polylines(TrimSrfStruct *TrimSrf,
                                             int NumOfIsolines[2],
                                             CagdRType TolSamples,
                                             SymbCrvApproxMethodType Method,
                                             int TrimmingCurves,
                                             int IsoParamCurves)

Description:
Routine to convert a single trimmed surface into polylines with TolSamples samples/tolerance, NumOfIsolines isolines into a polylines object. If NumOfIsolines has negative value, its absolute value is heuristically used to derive a new NumOfIsolines number for it.
Parameters:

TrimSrf: | To approximate as a polyline .
--- | ---
NumOfIsolines: | umber of isocurves to extract, in each direction.
TolSamples: | Tolerance of approximation error (Method = 2) or Number of samples to compute on polyline (Method = 0, 1).
Method: | 0 - TolSamples are set uniformly in parametric space, 1 - TolSamples are set optimally, considering the curve's curvature. 2 - TolSamples sets the maximum error allowed between the piecewise linear approximation and original curve.
TrimmingCurves: | o we want the trimming curves as well.
IsoParamCurves: | o we want trimmed isoparametric curves.

Returned Value:

IPPolygonStruct *: A polylines object approximating TrimSrf.

Keywords:
conversion approximation

## IritTrimSrfsToCubicBzrCrvs

(prsr_lib/ip_cnvrt.c:1161)
Prototype:

      CagdCrvStruct *IritTrimSrfsToCubicBzrCrvs(TrimSrfStruct *TrimSrfs,
                                                IPPolygonStruct **CtlMeshes,
                                                CagdBType DrawTrimSrf,
                                                CagdBType DrawMesh,
                                                int NumOfIsolines[2],
                                                CagdRType MaxArcLen)

Description:
Approximates an arbitrary list of trimmed surfaces into cubic Beziers curves. Only isoparametric curves are extarcted (no trimming curves).
Parameters:

TrimSrfs: | To approximate as cubic Bezier curves.
--- | ---
CtlMeshes: | If we want control meshes as well (DrawMesh == TRUE) they will be placed herein.
DrawTrimSrf: | Do we want to draw the surfaces?
DrawMesh: | Do we want to draw the control meshes?
NumOfIsolines: | umber of isocurves to extract, in each direction.
MaxArcLen: | Tolerance for cubic Bezier approximation. See function BzrApproxBzrCrvAsCubics.

Returned Value:

CagdCrvStruct *: The cubic Bezier approximation, or NULL if DrawSurface is FALSE.

Keywords:
conversion approximation

## IritTrivar2CtlMesh

(prsr_lib/ip_cnvrt.c:853)
Prototype:

      IPPolygonStruct *IritTrivar2CtlMesh(TrivTVStruct *Trivar)

Description:
Routine to convert a single trivariate's control mesh into a polylines object.
Parameters:

Trivar: | To extract its control mesh as a polylines.
--- | ---

Returned Value:

IPPolygonStruct *: A polylines object representing Trivar's control mesh.

Keywords:
conversion

## IritTrivar2Polygons

(prsr_lib/ip_cnvrt.c:711)
Prototype:

      IPPolygonStruct *IritTrivar2Polygons(TrivTVStruct *Trivar,
                                           int FourPerFlat,
                                           RealType FineNess,
                                           int ComputeUV,
                                           int ComputeNrml,
                                           int Optimal)

Description:
Routine to approximate a single trivariate by polygons. Six faces of the trivariate are extracted as six surfaces that are displayed.
Parameters:

Trivar: | To approximate using polygons.
--- | ---
FourPerFlat: | See IritSurface2Polygons.
FineNess: | See IritSurface2Polygons.
ComputeUV: | See IritSurface2Polygons.
ComputeNrml: | See IritSurface2Polygons.
Optimal: | See IritSurface2Polygons.

Returned Value:

IPPolygonStruct *: Resulting polygons that approximates Srf.

Keywords:
approximation conversion

## IritTrivar2Polylines

(prsr_lib/ip_cnvrt.c:773)
Prototype:

      IPPolygonStruct *IritTrivar2Polylines(TrivTVStruct *Trivar,
                                            int NumOfIsolines[3],
                                            CagdRType TolSamples,
                                            SymbCrvApproxMethodType Method)

Description:
Routine to convert a single trivariate function into polylines with TolSamples/Tolerance per isocurve, NumOfIsolines isolines into a polylines object. If NumOfIsolines has negative value, its absolute value is heuristically used to derive a new NumOfIsolines number for it.
Parameters:

Trivar: | To approximate as a polyline .
--- | ---
NumOfIsolines: | umber of isocurves to extract, in each direction.
TolSamples: | Tolerance of approximation error (Method = 2) or Number of samples to compute on polyline (Method = 0, 1).
Method: | 0 - TolSamples are set uniformly in parametric space, 1 - TolSamples are set optimally, considering the curve's curvature. 2 - TolSamples sets the maximum error allowed between the piecewise linear approximation and original curve.

Returned Value:

IPPolygonStruct *: A polylines object approximating Trivar.

Keywords:
conversion approximation

## IritTrivarToCubicBzrCrvs

(prsr_lib/ip_cnvrt.c:1226)
Prototype:

      CagdCrvStruct *IritTrivarToCubicBzrCrvs(TrivTVStruct *Trivar,
                                              IPPolygonStruct **CtlMeshes,
                                              CagdBType DrawSurface,
                                              CagdBType DrawMesh,
                                              int NumOfIsolines[2],
                                              CagdRType MaxArcLen)

Description:
Routine to convert a single trivariate function into cubic Bezier curves.
Parameters:

Trivar: | To approximate as a set of cubic bezier curves.
--- | ---
CtlMeshes: | If we want control meshes as well (DrawMesh == TRUE) they will be placed herein.
DrawTrivar: | Do we want to draw the trivariate function?
DrawMesh: | Do we want to draw the control meshes?
NumOfIsolines: | umber of isocurves to extract, in each direction.
MaxArcLen: | Tolerance for cubic Bezier approximation. See function BzrApproxBzrCrvAsCubics.

Returned Value:

CagdCrvStruct *: A list of curves approximating Trivar.

Keywords:
conversion approximation

## ListObjectFind

(prsr_lib/allocate.c:615)
Prototype:

      int ListObjectFind(IPObjectStruct *PObjList, IPObjectStruct *PObj)

Description:
Returns TRUE if PObj is an object in list PObjList or in a sublist of PObjList, recursively.
Parameters:

PObjList: | To search for PObj in.
--- | ---
PObj: | The element to search in PObjList.

Returned Value:

int: TRUE if PObj was found in PObjList, FALSE otherwise.

Keywords:
linked lists find

## ListObjectGet

(prsr_lib/allocate.c:678)
Prototype:

      IPObjectStruct *ListObjectGet(IPObjectStruct *PObj, int Index)

Description:
Returns the object number Index in list of PObjList object.
Parameters:

PObj: | A list object to extract one object from.
--- | ---
Index: | Index of object to extractfrom PObj.

Returned Value:

IPObjectStruct *: Index object in list PObj, or NULL if no such thing.

Keywords:
lists find

## ListObjectInsert

(prsr_lib/allocate.c:651)
Prototype:

      void ListObjectInsert(IPObjectStruct *PObj,
                            int Index,
                            IPObjectStruct *PObjItem)

Description:
Insert an object PObjItem at index Index into a list of objects, PObj.
Parameters:

PObj: | A list of objects to insert PObjItem into.
--- | ---
Index: | Index where PObjItem should enter PObj.
PObjItem: | Eleent to insert into the list PObj.

Returned Value:

void

Keywords:
lists insert

## ListObjectLength

(prsr_lib/allocate.c:585)
Prototype:

      int ListObjectLength(IPObjectStruct *PObj)

Description:
Returns the length of a list, given a list of objects.
Parameters:

PObj: | A list of objects to find its length.
--- | ---

Returned Value:

int: Resulting length of list PObj.

Keywords:
linked lists length

## MdlReadModelSrfFromFile

(prsr_lib/mdl_read.c:43)
Prototype:

      MdlModelStruct *MdlReadModelFromFile(char *FileName,
                                           char **ErrStr,
                                           int *ErrLine)

Description:
Reads from a file a model. If error is detected in reading the file, ErrStr is set to a string describing the error and Line to the line it occured in file. If no error is detected *ErrStr = NULL.
Parameters:

FileName: | To read the model from.
--- | ---
ErrStr: | Will be initialized if an error has occured.
ErrLine: | Line number in file FileName of the error, if occured.

Returned Value:

MdlSrfStruct *: The read model surface, or NULL if an error occured.

See Also:
MdlReadModelSrfFromFile2
Keywords:
files read Mdlmed surfaces

## MdlWriteModelToFile

(prsr_lib/mdl_wrt.c:35)
Prototype:

      int MdlWriteModelToFile(MdlModelStruct *Models,
                              char *FileName,
                              int Indent,
                              char *Comment,
                              char **ErrStr)

Description:
Generic routine to write model(s) to the given file. If Comment is NULL, no comment is printed, if "" only internal comment.
Parameters:

Models: | To be saved in stream.
--- | ---
FileName: | File name where output should go to.
Indent: | Column in which all printing starts at.
Comment: | Optional comment to describe the geometry.
ErrStr: | If failed, ErrStr will be set to describe the problem.

Returned Value:

int: TRUE if succesful, FALSE otherwise.

Keywords:
files write

## MdlWriteModelToFile2

(prsr_lib/mdl_wrt.c:77)
Prototype:

      int MdlWriteModelToFile2(MdlModelStruct *Models,
                               int Handler,
                               int Indent,
                               char *Comment,
                               char **ErrStr)

Description:
Generic routine to write models(s) to the given stream. If Comment is NULL, no comment is printed, if "" only internal comment.
Parameters:

Models: | To be saved in stream.
--- | ---
Handler: | A handler to the open stream.
Indent: | Column in which all printing starts at.
Comment: | Optional comment to describe the geometry.
ErrStr: | If failed, ErrStr will be set to describe the problem.

Returned Value:

int: TRUE if succesful, FALSE otherwise.

Keywords:
files write stream

## MdlWriteModelToFile3

(prsr_lib/mdl_wrt.c:192)
Prototype:

      int MdlWriteModelToFile3(MdlModelStruct *Models,
                               FILE *f,
                               int Indent,
                               char *Comment,
                               char **ErrStr)

Description:
Generic routine to write model(s) to the given stream. If Comment is NULL, no comment is printed, if "" only internal comment.
Parameters:

Models: | To be saved in stream.
--- | ---
f: | File descriptor where output should go to.
Indent: | Column in which all printing starts at.
Comment: | Optional comment to describe the geometry.
ErrStr: | If failed, ErrStr will be set to describe the problem.

Returned Value:

int: TRUE if succesful, FALSE otherwise.

Keywords:
files write

## ReallocNewTypeObject

(prsr_lib/allocate.c:1507)
Prototype:

      void ReallocNewTypeObject(IPObjectStruct *PObj, IPObjStructType ObjType)

Description:
Routine to reallocate as necessary and object to a new object type.
Parameters:

PObj: | Object to reallocated as a new object of type ObjType.
--- | ---
ObjType: | New type for object PObj.

Returned Value:

void

Keywords:
allocation

## SocClientCloseSocket

(prsr_lib/soc_clnt.c:516)
Prototype:

      void SocClientCloseSocket(int Handler)

Description:
Close the client's socket.
Parameters:

Handler: | he socket info handler index. *
--- | ---

Returned Value:

void

Keywords:
ipc

## SocClientCreateSocket

(prsr_lib/soc_clnt.c:295)
Prototype:

      int SocClientCreateSocket(int BinaryIPC, int Read)

Description:
Opens the client's socket. Returns handler if succesful.
Parameters:

BinaryIPC: | Do we want to communicate text or binary?
--- | ---
Read: | Is this socket for read (TRUE) or write (FALSE).

Returned Value:

int: Non negative handler if successful, -1 otherwise.

Keywords:
ipc

## SocEchoInput

(prsr_lib/soc_clnt.c:91)
Prototype:

      void SocEchoInput(int Handler, int EchoInput)

Description:
Sets echo printing of read input.
Parameters:

Handler: | he socket info handler index.
--- | ---
EchoInput: | TRUE to echo every character read in.

Returned Value:

void

Keywords:
ipc

## SocReadCharNonBlock

(prsr_lib/soc_clnt.c:110)
Prototype:

      int SocReadCharNonBlock(int Handler)

Description:
Non blocking read of a single character. Returns EOF if no data is found.
Parameters:

Handler: | he socket info handler index.
--- | ---

Returned Value:

int: Read character or EOF if none found.

Keywords:
ipc

## SocReadLineNonBlock

(prsr_lib/soc_clnt.c:251)
Prototype:

      char *SocReadLineNonBlock(int Handler)

Description:
Non blocking read of a single line. Returns NULL if no line is available.
Parameters:

Handler: | he socket info handler index.
--- | ---

Returned Value:

char *: Read line, or NULL if unavailable.

Keywords:
ipc

## SocReadOneObject

(prsr_lib/soc_clnt.c:562)
Prototype:

      IPObjectStruct *SocReadOneObject(int Handler)

Description:
Attempts to read (non blocking) an object from socket. If read is successful the object is returned, otherwise NULL is returned.
Parameters:

Handler: | he socket info handler index. *
--- | ---

Returned Value:

IPObjectStruct *: An object if read one, NULL otherwise.

Keywords:
ipc

## SocServerAcceptConnection

(prsr_lib/soc_srvr.c:415)
Prototype:

      int SocServerAcceptConnection(int Handler)

Description:
Accepts a client socket connection. This function blocks until a connection with a client is established.
Parameters:

Handler: | he socket info handler index.
--- | ---

Returned Value:

int: TRUE if succesful, FALSE otherwise.

Keywords:
ipc

## SocServerActive

(prsr_lib/soc_srvr.c:555)
Prototype:

      int SocServerActive(int Handler)

Description:
Returns TRUE if connection is alive and active.
Parameters:

Handler: | he socket info handler index.
--- | ---

Returned Value:

int: TRUE if connection to client exists.

Keywords:
ipc

## SocServerCloseSocket

(prsr_lib/soc_srvr.c:500)
Prototype:

      void SocServerCloseSocket(int Handler)

Description:
Closes a server socket/connection.
Parameters:

Handler: | he socket info handler index.
--- | ---

Returned Value:

void

Keywords:
ipc

## SocServerCreateSocket

(prsr_lib/soc_srvr.c:228)
Prototype:

      int SocServerCreateSocket(int BinaryIPC, int Read)

Description:
Creates a server socket. Returns handler if successful. Also sets the IRIT_SERVER_PORT environment variable to the allocated socket.
Parameters:

BinaryIPC: | Do we want to communicate text or binary?
--- | ---
Read: | Is this socket for read (TRUE) or write (FALSE).

Returned Value:

int: Non negative handler if successful, -1 otherwise.

Keywords:
ipc

## SocWriteChar

(prsr_lib/soc_srvr.c:101)
Prototype:

      void SocWriteChar(int Handler, char c)

Description:
Writes a single char to client's socket.
Parameters:

Handler: | he socket info handler index.
--- | ---
c: | Character to write.

Returned Value:

void

Keywords:
ipc

## SocWriteLine

(prsr_lib/soc_srvr.c:162)
Prototype:

      void SocWriteLine(int Handler, char *Line, int LineLen)

Description:
Writes a single line of line length characters.
Parameters:

Handler: | he socket info handler index.
--- | ---
Line: | Line to write.
LineLen: | Length of line to write.

Returned Value:

void

Keywords:
ipc

## SocWriteOneObject

(prsr_lib/soc_srvr.c:610)
Prototype:

      void SocWriteOneObject(int Handler, IPObjectStruct *PObj)

Description:
Attempts to write an object to a socket.
Parameters:

Handler: | he socket info handler index.
--- | ---
PObj: | Object to write to the client's socket.

Returned Value:

void

Keywords:
ipc

## TrimReadTrimmedSrfFromFile

(prsr_lib/trimread.c:32)
Prototype:

      TrimSrfStruct *TrimReadTrimmedSrfFromFile(char *FileName,
                                                char **ErrStr,
                                                int *ErrLine)

Description:
Reads from a file trimmed surfaces. If error is detected in reading the file, ErrStr is set to a string describing the error and Line to the line it occured in file. If no error is detected *ErrStr = NULL.
Parameters:

FileName: | To read the trimmed surface from.
--- | ---
ErrStr: | Will be initialized if an error has occured.
ErrLine: | Line number in file FileName of the error, if occured.

Returned Value:

TrimSrfStruct *: The read trimmed surface, or NULL if an error occured.

Keywords:
files read trimmed surfaces

## TrimWriteTrimmedSrfToFile

(prsr_lib/trim_wrt.c:34)
Prototype:

      int TrimWriteTrimmedSrfToFile(TrimSrfStruct *TrimSrfs,
                                    char *FileName,
                                    int Indent,
                                    char *Comment,
                                    char **ErrStr)

Description:
Generic routine to write a trimmed surface to the given file. If Comment is NULL, no comment is printed, if "" only internal comment.
Parameters:

TrimSrfs: | To be saved in stream.
--- | ---
FileName: | File name where output should go to.
Indent: | Column in which all printing starts at.
Comment: | Optional comment to describe the geometry.
ErrStr: | If failed, ErrStr will be set to describe the problem.

Returned Value:

int: TRUE if succesful, FALSE otherwise.

Keywords:
files write

## TrimWriteTrimmedSrfToFile2

(prsr_lib/trim_wrt.c:76)
Prototype:

      int TrimWriteTrimmedSrfToFile2(TrimSrfStruct *TrimSrfs,
                                     int Handler,
                                     int Indent,
                                     char *Comment,
                                     char **ErrStr)

Description:
Generic routine to write trimmed surface(s) to the given stream. If Comment is NULL, no comment is printed, if "" only internal comment.
Parameters:

TrimSrfs: | To be saved in stream.
--- | ---
Handler: | A handler to the open stream.
Indent: | Column in which all printing starts at.
Comment: | Optional comment to describe the geometry.
ErrStr: | If failed, ErrStr will be set to describe the problem.

Returned Value:

int: TRUE if succesful, FALSE otherwise.

Keywords:
files write stream

## TrivBspTVReadFromFile

(prsr_lib/trivread.c:316)
Prototype:

      TrivTVStruct *TrivBspTVReadFromFile(char *FileName,
                                          char **ErrStr,
                                          int *ErrLine)

Description:
Reads from a file Bspline trivariates. If error is detected in reading the file, ErrStr is set to a string describing the error and Line to the line it occured in file. If no error is detected *ErrStr = NULL.
Parameters:

FileName: | To read the trivariate from.
--- | ---
ErrStr: | Will be initialized if an error has occured.
ErrLine: | Line number in file FileName of the error, if occured.

Returned Value:

TrivTVStruct *: The read trivariate, or NULL if an error occured.

Keywords:
files read trivariates

## TrivBspTVReadFromFile2

(prsr_lib/trivread.c:379)
Prototype:

      TrivTVStruct *TrivBspTVReadFromFile2(int Handler,
                                           CagdBType NameWasRead,
                                           char **ErrStr,
                                           int *ErrLine)

Description:
Reads from a file a Bspline trivariate. If NameWasRead is TRUE, it is assumed prefix "[TRIVAR BSPLINE" has already been read. This is useful for a global parser which invokes this routine to read from a file several times as a parent controller. For exactly this reason, the given file descriptor is NOT closed in the end. If error is found in reading the file, ErrStr is set to a string describing it and ErrLine to line it occured in file relative to begining of trivariate. If no error is detected *ErrStr is set to NULL.
Parameters:

Handler: | A handler to the open stream.
--- | ---
NameWasRead: | If FALSE, also reads the TRIVAR BEZIER prefix.
ErrStr: | Will be initialized if an error has occured.
ErrLine: | Line number in file FileName of the error, if occured.

Returned Value:

TrivTVStruct *: The read trivariate, or NULL if an error occured.

Keywords:
files read trivariates

## TrivBspTVWriteToFile2

(prsr_lib/triv_wrt.c:332)
Prototype:

      int TrivBspTVWriteToFile2(TrivTVStruct *TVs,
                                int Handler,
                                int Indent,
                                char *Comment,
                                char **ErrStr)

Description:
Generic routine to write Bspline trivariates to the given file. If Comment is NULL, no comment is printed, if "" only internal comment.
Parameters:

TVs: | To be saved in stream.
--- | ---
Handler: | A handler to the open stream.
Indent: | Column in which all printing starts at.
Comment: | Optional comment to describe the geometry.
ErrStr: | If failed, ErrStr will be set to describe the problem.

Returned Value:

int: TRUE if succesful, FALSE otherwise.

Keywords:
files write trivariates

## TrivBzrTVReadFromFile

(prsr_lib/trivread.c:126)
Prototype:

      TrivTVStruct *TrivBzrTVReadFromFile(char *FileName,
                                          char **ErrStr,
                                          int *ErrLine)

Description:
Reads from a file Bezier trivariates. If error is detected in reading the file, ErrStr is set to a string describing the error and Line to the line it occured in file. If no error is detected *ErrStr = NULL.
Parameters:

FileName: | To read the trivariate from.
--- | ---
ErrStr: | Will be initialized if an error has occured.
ErrLine: | Line number in file FileName of the error, if occured.

Returned Value:

TrivTVStruct *: The read trivariate, or NULL if an error occured.

Keywords:
files read trivariates

## TrivBzrTVReadFromFile2

(prsr_lib/trivread.c:189)
Prototype:

      TrivTVStruct *TrivBzrTVReadFromFile2(int Handler,
                                           CagdBType NameWasRead,
                                           char **ErrStr,
                                           int *ErrLine)

Description:
Reads from a file a Bezier trivariate. If NameWasRead is TRUE, it is assumed prefix "[TRIVAR BEZIER" has already been read. This is useful for a global parser which invokes this routine to read from a file several times as a parent controller. For exactly this reason, the given file descriptor is NOT closed in the end. If error is found in reading the file, ErrStr is set to a string describing it and ErrLine to line it occured in file relative to begining of trivariate. If no error is detected *ErrStr is set to NULL.
Parameters:

Handler: | A handler to the open stream.
--- | ---
NameWasRead: | If FALSE, also reads the TRIVAR BEZIER prefix.
ErrStr: | Will be initialized if an error has occured.
ErrLine: | Line number in file FileName of the error, if occured.

Returned Value:

TrivTVStruct *: The read trivariate, or NULL if an error occured.

Keywords:
files read trivariates

## TrivBzrTVWriteToFile

(prsr_lib/triv_wrt.c:290)
Prototype:

      int TrivBspTVWriteToFile(TrivTVStruct *TVs,
                               char *FileName,
                               int Indent,
                               char *Comment,
                               char **ErrStr)

Description:
Generic routine to write Bspline trivariates to the given file. If Comment is NULL, no comment is printed, if "" only internal comment.
Parameters:

TVs: | To be saved in file f.
--- | ---
FileName: | File name where output should go to.
Indent: | Column in which all printing starts at.
Comment: | Optional comment to describe the geometry.
ErrStr: | If failed, ErrStr will be set to describe the problem.

Returned Value:

int: TRUE if succesful, FALSE otherwise.

Keywords:
files write trivariates

## TrivBzrTVWriteToFile

(prsr_lib/triv_wrt.c:169)
Prototype:

      int TrivBzrTVWriteToFile(TrivTVStruct *TVs,
                               char *FileName,
                               int Indent,
                               char *Comment,
                               char **ErrStr)

Description:
Generic routine to write Bezier trivariates to the given file. If Comment is NULL, no comment is printed, if "" only internal comment.
Parameters:

TVs: | To be saved in file.
--- | ---
FileName: | File name where output should go to.
Indent: | Column in which all printing starts at.
Comment: | Optional comment to describe the geometry.
ErrStr: | If failed, ErrStr will be set to describe the problem.

Returned Value:

int: TRUE if succesful, FALSE otherwise.

Keywords:
files write trivariates

## TrivBzrTVWriteToFile2

(prsr_lib/triv_wrt.c:211)
Prototype:

      int TrivBzrTVWriteToFile2(TrivTVStruct *TVs,
                                int Handler,
                                int Indent,
                                char *Comment,
                                char **ErrStr)

Description:
Generic routine to write Bezier trivariates to the given file. If Comment is NULL, no comment is printed, if "" only internal comment.
Parameters:

TVs: | To be saved in stream.
--- | ---
Handler: | A handler to the open stream.
Indent: | Column in which all printing starts at.
Comment: | Optional comment to describe the geometry.
ErrStr: | If failed, ErrStr will be set to describe the problem.

Returned Value:

int: TRUE if succesful, FALSE otherwise.

Keywords:
files write trivariates

## TrivReadModelFromFile2

(prsr_lib/mdl_read.c:105)
Prototype:

      MdlModelStruct *MdlReadModelFromFile2(int Handler,
                                            CagdBType NameWasRead,
                                            char **ErrStr,
                                            int *ErrLine)

Description:
Reads from a file a model. If error is found in reading the file, ErrStr is set to a string describing it and ErrLine to line it occured in file relative to begining of model. Assumes the [MODEL prefix was read if NameWasRead. If no error is detected *ErrStr is set to NULL.
Parameters:

Handler: | A handler to the open stream.
--- | ---
NameWasRead: | If FALSE, also reads the MODEL prefix.
ErrStr: | Will be initialized if an error has occured.
ErrLine: | Line number in file FileName of the error, if occured.

Returned Value:

MdlModelStruct *: The read model, or NULL if an error occured.

See Also:
MdlReadModelSrfFromFile
Keywords:
files read model

## TrivReadTrimmedSrfFromFile2

(prsr_lib/trimread.c:91)
Prototype:

      TrimSrfStruct *TrimReadTrimmedSrfFromFile2(int Handler,
                                                 CagdBType NameWasRead,
                                                 char **ErrStr,
                                                 int *ErrLine)

Description:
Reads from a file a trimmed surface. If error is found in reading the file, ErrStr is set to a string describing it and ErrLine to line it occured in file relative to begining of trimmed surface. Assumes the [TRIMSRF prefix was read if NameWasRead. If no error is detected *ErrStr is set to NULL.
Parameters:

Handler: | A handler to the open stream.
--- | ---
NameWasRead: | If FALSE, also reads the TRIMSRF BEZIER prefix.
ErrStr: | Will be initialized if an error has occured.
ErrLine: | Line number in file FileName of the error, if occured.

Returned Value:

TrimSrfStruct *: The read trimmed surface, or NULL if an error occured.

Keywords:
files read trimmed surfaces

## TrivTVReadFromFile

(prsr_lib/trivread.c:30)
Prototype:

      TrivTVStruct *TrivTVReadFromFile(char *FileName, char **ErrStr, int *ErrLine)

Description:
Reads from a file trivariates. If error is detected in reading the file, ErrStr is set to a string describing the error and Line to the line it occured in file. If no error is detected *ErrStr = NULL.
Parameters:

FileName: | To read the trivariate from.
--- | ---
ErrStr: | Will be initialized if an error has occured.
ErrLine: | Line number in file FileName of the error, if occured.

Returned Value:

TrivTVStruct *: The read trivariate, or NULL if an error occured.

Keywords:
files read trivariates

## TrivTVReadFromFile2

(prsr_lib/trivread.c:90)
Prototype:

      TrivTVStruct *TrivTVReadFromFile2(int Handler, char **ErrStr, int *ErrLine)

Description:
Reads from a file a trivariate. If error is found in reading the file, ErrStr is set to a string describing it and ErrLine to line it occured in file relative to begining of trivariate. If no error is detected *ErrStr is set to NULL.
Parameters:

Handler: | A handler to the open stream.
--- | ---
ErrStr: | Will be initialized if an error has occured.
ErrLine: | Line number in file FileName of the error, if occured.

Returned Value:

TrivTVStruct *: The read trivariate, or NULL if an error occured.

Keywords:
files read trivariates

## TrivTVWriteToFile

(prsr_lib/triv_wrt.c:34)
Prototype:

      int TrivTVWriteToFile(TrivTVStruct *TVs,
                            char *FileName,
                            int Indent,
                            char *Comment,
                            char **ErrStr)

Description:
Generic routine to write trivariates to the given file. If Comment is NULL, no comment is printed, if "" only internal comment.
Parameters:

TVs: | To be saved in file f.
--- | ---
FileName: | File name where output should go to.
Indent: | Column in which all printing starts at.
Comment: | Optional comment to describe the geometry.
ErrStr: | If failed, ErrStr will be set to describe the problem.

Returned Value:

int: TRUE if succesful, FALSE otherwise.

Keywords:
files write trivariates

## TrivTVWriteToFile2

(prsr_lib/triv_wrt.c:85)
Prototype:

      int TrivTVWriteToFile2(TrivTVStruct *TVs,
                             int Handler,
                             int Indent,
                             char *Comment,
                             char **ErrStr)

Description:
Generic routine to write trivariates to the given file. If Comment is NULL, no comment is printed, if "" only internal comment.
Parameters:

TVs: | To be saved in stream.
--- | ---
Handler: | A handler to the open stream.
Indent: | Column in which all printing starts at.
Comment: | Optional comment to describe the geometry.
ErrStr: | If failed, ErrStr will be set to describe the problem.

Returned Value:

int: TRUE if succesful, FALSE otherwise.

Keywords:
files write trivariates

## TrivTVWriteToFile3

(prsr_lib/triv_wrt.c:136)
Prototype:

      int TrivTVWriteToFile3(TrivTVStruct *TVs,
                             FILE *f,
                             int Indent,
                             char *Comment,
                             char **ErrStr)

Description:
Generic routine to write trivariate(s) to the given file. If Comment is NULL, no comment is printed, if "" only internal comment.
Parameters:

TVs: | To be saved in file f.
--- | ---
f: | File descriptor where output should go to.
Indent: | Column in which all printing starts at.
Comment: | Optional comment to describe the geometry.
ErrStr: | If failed, ErrStr will be set to describe the problem.

Returned Value:

int: TRUE if succesful, FALSE otherwise.

Keywords:
files write

## TrngBspTriSrfReadFromFile

(prsr_lib/trngread.c:321)
Prototype:

      TrngTriangSrfStruct *TrngBspTriSrfReadFromFile(char *FileName,
                                                     char **ErrStr,
                                                     int *ErrLine)

Description:
Reads from a file Bspline triangular surfaces. If error is detected in reading the file, ErrStr is set to a string describing the error and Line to the line it occured in file. If no error is detected *ErrStr = NULL.
Parameters:

FileName: | To read the triangular surface from.
--- | ---
ErrStr: | Will be initialized if an error has occured.
ErrLine: | Line number in file FileName of the error, if occured.

Returned Value:

TrngTriangSrfStruct *: The read triangular surface, or NULL if an error occured.

Keywords:
files read triangular surfaces

## TrngBspTriSrfReadFromFile2

(prsr_lib/trngread.c:385)
Prototype:

      TrngTriangSrfStruct *TrngBspTriSrfReadFromFile2(int Handler,
                                                      CagdBType NameWasRead,
                                                      char **ErrStr,
                                                      int *ErrLine)

Description:
Reads from a file a Bspline triangular surface. If NameWasRead is TRUE, it is assumed prefix "[TRISRF BSPLINE" has already been read. This is useful for a global parser which invokes this routine to read from a file several times as a parent controller. For exactly this reason, the given file descriptor is NOT closed in the end. If error is found in reading the file, ErrStr is set to a string describing it and ErrLine to line it occured in file relative to begining of triangular surface. If no error is detected *ErrStr is set to NULL.
Parameters:

Handler: | A handler to the open stream.
--- | ---
NameWasRead: | If FALSE, also reads the TRISRF BEZIER prefix.
ErrStr: | Will be initialized if an error has occured.
ErrLine: | Line number in file FileName of the error, if occured.

Returned Value:

TrngTriangSrfStruct *: The read triangular surface, or NULL if an error occured.

Keywords:
files read triangular surfaces

## TrngBspTriSrfWriteToFile

(prsr_lib/trng_wrt.c:283)
Prototype:

      int TrngBspTriSrfWriteToFile(TrngTriangSrfStruct *TriSrfs,
                               char *FileName,
                               int Indent,
                               char *Comment,
                               char **ErrStr)

Description:
Generic routine to write Bspline triangular surfaces to the given file. If Comment is NULL, no comment is printed, if "" only internal comment.
Parameters:

TriSrfs: | To be saved in file f.
--- | ---
FileName: | File name where output should go to.
Indent: | Column in which all printing starts at.
Comment: | Optional comment to describe the geometry.
ErrStr: | If failed, ErrStr will be set to describe the problem.

Returned Value:

int: TRUE if succesful, FALSE otherwise.

Keywords:
files write triangular surfaces

## TrngBspTriSrfWriteToFile2

(prsr_lib/trng_wrt.c:325)
Prototype:

      int TrngBspTriSrfWriteToFile2(TrngTriangSrfStruct *TriSrfs,
                                int Handler,
                                int Indent,
                                char *Comment,
                                char **ErrStr)

Description:
Generic routine to write Bspline triangular surfaces to the given file. If Comment is NULL, no comment is printed, if "" only internal comment.
Parameters:

TriSrfs: | To be saved in stream.
--- | ---
Handler: | A handler to the open stream.
Indent: | Column in which all printing starts at.
Comment: | Optional comment to describe the geometry.
ErrStr: | If failed, ErrStr will be set to describe the problem.

Returned Value:

int: TRUE if succesful, FALSE otherwise.

Keywords:
files write triangular surfaces

## TrngBzrTriSrfReadFromFile

(prsr_lib/trngread.c:133)
Prototype:

      TrngTriangSrfStruct *TrngBzrTriSrfReadFromFile(char *FileName,
                                                     char **ErrStr,
                                                     int *ErrLine)

Description:
Reads from a file Bezier triangular surfaces. If error is detected in reading the file, ErrStr is set to a string describing the error and Line to the line it occured in file. If no error is detected *ErrStr = NULL.
Parameters:

FileName: | To read the triangular surface from.
--- | ---
ErrStr: | Will be initialized if an error has occured.
ErrLine: | Line number in file FileName of the error, if occured.

Returned Value:

TrngTriangSrfStruct *: The read triangular surface, or NULL if an error occured.

Keywords:
files read triangular surfaces

## TrngBzrTriSrfReadFromFile2

(prsr_lib/trngread.c:197)
Prototype:

      TrngTriangSrfStruct *TrngBzrTriSrfReadFromFile2(int Handler,
                                                      CagdBType NameWasRead,
                                                      char **ErrStr,
                                                      int *ErrLine)

Description:
Reads from a file a Bezier triangular surface. If NameWasRead is TRUE, it is assumed prefix "[TRISRF BEZIER" has already been read. This is useful for a global parser which invokes this routine to read from a file several times as a parent controller. For exactly this reason, the given file descriptor is NOT closed in the end. If error is found in reading the file, ErrStr is set to a string describing it and ErrLine to line it occured in file relative to begining of triangular surface. If no error is detected *ErrStr is set to NULL.
Parameters:

Handler: | A handler to the open stream.
--- | ---
NameWasRead: | If FALSE, also reads the TRISRF BEZIER prefix.
ErrStr: | Will be initialized if an error has occured.
ErrLine: | Line number in file FileName of the error, if occured.

Returned Value:

TrngTriangSrfStruct *: The read triangular surface, or NULL if an error occured.

Keywords:
files read triangular surfaces

## TrngBzrTriSrfWriteToFile

(prsr_lib/trng_wrt.c:169)
Prototype:

      int TrngBzrTriSrfWriteToFile(TrngTriangSrfStruct *TriSrfs,
                               char *FileName,
                               int Indent,
                               char *Comment,
                               char **ErrStr)

Description:
Generic routine to write Bezier triangular surfaces to the given file. If Comment is NULL, no comment is printed, if "" only internal comment.
Parameters:

TriSrfs: | To be saved in file.
--- | ---
FileName: | File name where output should go to.
Indent: | Column in which all printing starts at.
Comment: | Optional comment to describe the geometry.
ErrStr: | If failed, ErrStr will be set to describe the problem.

Returned Value:

int: TRUE if succesful, FALSE otherwise.

Keywords:
files write triangular surfaces

## TrngBzrTriSrfWriteToFile2

(prsr_lib/trng_wrt.c:211)
Prototype:

      int TrngBzrTriSrfWriteToFile2(TrngTriangSrfStruct *TriSrfs,
                                int Handler,
                                int Indent,
                                char *Comment,
                                char **ErrStr)

Description:
Generic routine to write Bezier triangular surfaces to the given file. If Comment is NULL, no comment is printed, if "" only internal comment.
Parameters:

TriSrfs: | To be saved in stream.
--- | ---
Handler: | A handler to the open stream.
Indent: | Column in which all printing starts at.
Comment: | Optional comment to describe the geometry.
ErrStr: | If failed, ErrStr will be set to describe the problem.

Returned Value:

int: TRUE if succesful, FALSE otherwise.

Keywords:
files write triangular surfaces

## TrngTriSrfReadFromFile

(prsr_lib/trngread.c:33)
Prototype:

      TrngTriangSrfStruct *TrngTriSrfReadFromFile(char *FileName,
                                                  char **ErrStr,
                                                  int *ErrLine)

Description:
Reads from a file triangular surfaces. If error is detected in reading the file, ErrStr is set to a string describing the error and Line to the line it occured in file. If no error is detected *ErrStr = NULL.
Parameters:

FileName: | To read the triangular surface from.
--- | ---
ErrStr: | Will be initialized if an error has occured.
ErrLine: | Line number in file FileName of the error, if occured.

Returned Value:

TrngTriangSrfStruct *: The read triangular surface, or NULL if an error occured.

Keywords:
files read triangular surfaces

## TrngTriSrfReadFromFile2

(prsr_lib/trngread.c:96)
Prototype:

      TrngTriangSrfStruct *TrngTriSrfReadFromFile2(int Handler,
                                                   char **ErrStr,
                                                   int *ErrLine)

Description:
Reads from a file a triangular surface. If error is found in reading the file, ErrStr is set to a string describing it and ErrLine to line it occured in file relative to begining of triangular surface. If no error is detected *ErrStr is set to NULL.
Parameters:

Handler: | A handler to the open stream.
--- | ---
ErrStr: | Will be initialized if an error has occured.
ErrLine: | Line number in file FileName of the error, if occured.

Returned Value:

TrngTriangSrfStruct *: The read triangular surface, or NULL if an error occured.

Keywords:
files read triangular surfaces

## TrngTriSrfWriteToFile

(prsr_lib/trng_wrt.c:34)
Prototype:

      int TrngTriSrfWriteToFile(TrngTriangSrfStruct *TriSrfs,
                                char *FileName,
                                int Indent,
                                char *Comment,
                                char **ErrStr)

Description:
Generic routine to write triangular surfaces to the given file. If Comment is NULL, no comment is printed, if "" only internal comment.
Parameters:

TriSrfs: | To be saved in file f.
--- | ---
FileName: | File name where output should go to.
Indent: | Column in which all printing starts at.
Comment: | Optional comment to describe the geometry.
ErrStr: | If failed, ErrStr will be set to describe the problem.

Returned Value:

int: TRUE if succesful, FALSE otherwise.

Keywords:
files write triangular surfaces

## TrngTriSrfWriteToFile2

(prsr_lib/trng_wrt.c:85)
Prototype:

      int TrngTriSrfWriteToFile2(TrngTriangSrfStruct *TriSrfs,
                                 int Handler,
                                 int Indent,
                                 char *Comment,
                                 char **ErrStr)

Description:
Generic routine to write triangular surfaces to the given file. If Comment is NULL, no comment is printed, if "" only internal comment.
Parameters:

TriSrfs: | To be saved in stream.
--- | ---
Handler: | A handler to the open stream.
Indent: | Column in which all printing starts at.
Comment: | Optional comment to describe the geometry.
ErrStr: | If failed, ErrStr will be set to describe the problem.

Returned Value:

int: TRUE if succesful, FALSE otherwise.

Keywords:
files write triangular surfaces

## TrngTriSrfWriteToFile3

(prsr_lib/trng_wrt.c:136)
Prototype:

      int TrngTriSrfWriteToFile3(TrngTriangSrfStruct *TriSrfs,
                             FILE *f,
                             int Indent,
                             char *Comment,
                             char **ErrStr)

Description:
Generic routine to write triangular surfaces(s) to the given file. If Comment is NULL, no comment is printed, if "" only internal comment.
Parameters:

TriSrfs: | To be saved in file f.
--- | ---
f: | File descriptor where output should go to.
Indent: | Column in which all printing starts at.
Comment: | Optional comment to describe the geometry.
ErrStr: | If failed, ErrStr will be set to describe the problem.

Returned Value:

int: TRUE if succesful, FALSE otherwise.

Keywords:
files write

## _IPGetCloseParenToken

(prsr_lib/iritprs1.c:1099)
Prototype:

      void _IPGetCloseParenToken(int Handler)

Description:
Routine to get close paren token from FILE f. This function invokes the parser's abort routine, if no close paren.
Parameters:

Handler: | A handler to the open stream.
--- | ---

Returned Value:

void

Keywords:

## _IPGetToken

(prsr_lib/iritprs1.c:1595)
Prototype:

      IPTokenType _IPGetToken(int Handler, char *StringToken)

Description:
Routine to get the next token out of the input file f as token number. StringToken must be allocated before calling this routine!
Parameters:

Handler: | A handler to the open stream.
--- | ---
StringToken: | String token will be placed herein.

Returned Value:

IPTokenType: Token as a numeral.

Keywords:

## _IPParserAbort

(prsr_lib/iritprs2.c:459)
Prototype:

      void _IPParserAbort(IritPrsrErrType ErrNum, char *Msg)

Description:
Routine to abort parsing operation and save error reported. See also function IritPrsrParseError.
Parameters:

ErrNum: | Type of error that had occured.
--- | ---
Msg: | A message to accompany the error number.

Returned Value:

void

Keywords:
error handling files parser

## _IPSkipToCloseParenToken

(prsr_lib/iritprs1.c:1120)
Prototype:

      int _IPSkipToCloseParenToken(int Handler)

Description:
Routine to skip to the next closed parenthesis.
Parameters:

Handler: | A handler to the open stream.
--- | ---

Returned Value:

int: TRUE, if found close paren.

Keywords:

## _IPUnGetToken

(prsr_lib/iritprs1.c:1418)
Prototype:

      void _IPUnGetToken(int Handler, char *StringToken)

Description:
Routine to unget one token (on stack of UNGET_STACK_SIZE levels!)
Parameters:

Handler: | A handler to the open stream.
--- | ---
StringToken: | Token to unget

Returned Value:

void

Keywords: