Synopsis
PDX_MSGT gdx_ConvertCompToNurbCurve(long option, MDA_PTR gdx_comp_db_ptr, int model, double tolerance, int max_iters, void *gdx_nurb_curve)
Purpose
Convert a GDX composite curve to a GDX NURB Curve
Description
Converts a GDX composite curve entity to a GDX NURB Curve entity.
The base GDX curve definitions for the composite curve are each converted to the cooresponding GDX NURB Curve definition and the resultant GDX NURB Curves are composited together to form a single GDX NURB Curve definition.
The tolerance applies to subordinate entites that are GDX parametric spline curves or GDX offset curve entities as well as any test for closure. The max_iters applies to subordinate entities that are GDX offset curve entities. See gdx_ConvertParmSplToNurbCurve and gdx_ConvertOffsetToNurbCurve for more details on these parameters.
If a conversion error occurs any data created during the conversion is deleted and no GDX NURB Curve is created. The GDX curve entities used to create the GDX curve are deleted.
The GDX composite curve and all the subordinate composite curve entities must be valid GDX entities.
For the base entities that have an exact conversion, the conversion of the composite curve is geometrically exact to the precision of the input data and to machine precision. If the base curve does not have an exact conversion, then the conversion of the composite curve is an approximate conversion to tolerance.
If the GDX composite curve entity is no end to end continuous, then the resultant GDX NURB Curve will be made continuous by using the average point location of the ending curve point and the next starting curve point as the new continuous point for the start and end of the curves
Input
option
GDX_COMMIT
Commit the definition to the database
gdx_comp_db_ptr
The valid GDX composite entity database pointer
model
The model to create the GDX NURB Curve in
tolerance
GDX offset curve approxmation tolerance
max_iters
The maximium iterations for offset convegence to tolerance
Output
gdx_nurb_curve
The GDX NURB Curve entity database pointer or structure pointer
Tolerances
MODEL_SPACE_PNT_TOL
PNT_PROJ_TOL
ANGLE_TOL
ZERO_TOL
.fi
Return
GDX_NOERR
GDX_INVALIDENTITYTYPE
GDX_INVALIDMODEL
GDX_NOMEMORY
Low level error return
.fi