Synopsis

PDX_MSGT igeo_Convert126To112(long option, MDA_PTR db_ptr_126, EAM_STACK *stack, int model, double tolerance, MDA_PTR *db_ptr)

Purpose

Convert an IGES NURBS curve (126) to an IGES Spline curve (112)

Description

Converts an IGES NURBS curve (126:0) which is non-rational and order < 3 to an IGES Parametric Spline curve entity (112).

By default, the IGES NURBS curve matrix is concatenated with the matrix on the attribute stack and the new IGES matrix created in the model and applied to the converted data. All the other IGES NURBS curve non-pointer DE attributes are applied to the IGES parametric spline curve.

If a conversion error occurs any data created during the conversion is deleted and no IGES Spline entity (112) is created.

The IGES NURBS curve entity must be a valid IGES non-rational order < 3 IGES NURBS curve definition. If the NURBS curve is rational and/or degree > 3 igeo_Convert126To126 can be used to generate an approximate non-rational order < 3 IGES NURBS curve.

The conversion is exact to the precsion of the input data and to machine precision.

Input

option

IGES_NOMATRIX

Do not apply entity matrix to data (Note: the matrix currently on the stack will be applied to the data)

db_ptr_126

The valid IGES NURBS curve entity database pointer

stack

The entity attribute stack

model

The model to create the IGES curve in

tolerance

The closure tolerance

Output

db_ptr

The IGES 112 curve entity database pointer

Return

      IGEO_NOERR
      IGEO_CURVENOTNURBS
      IGEO_BADDEGREE
      IGEO_RATIONAL
      IGEO_NOMEMORY
      Low level error return
      .fi