Synopsis
PDX_MSGT igeo_ConvertCurveTo126(long option, MDA_PTR db_ptr, EAM_STACK *stack, int model, double tolerance, int max_iters, int degree, MDA_PTR *db_ptr_126)
Purpose
Convert an IGES curve to an IGES NURBS curve(126)
Description
Converts an IGES curve to an IGES NURBS curve or convert an IGES NURBS curve from rational to non-rational and/or from one degree to another degree. The IGES entities supported for conversion are: .nf .sp 100 - Circular Arc 102 - Composite Curve 104 - Conic Arc 106 - Copious Data 110 - Line 112 - Parametric Spline 116 - Point 126 - NURBS Curve 130 - Offset Curve .fi
By default, the entity attribute matrix is applied to the IGES NURBS curve and all the IGES non-pointer DE attributes as defined by the attributes on the first base curve are applied to the IGES NURBS curve. If the model is the same as the db_ptr model than all the IGES pointer DE attributes, property pointers and associativity pointers are applied to the IGES NURBS curve.
The tolerance value applies to subordinate entites that are IGES 112 or IGES 130 entities as well as any test for closure. The max_iters values applies to subordinate entities that are IGES 130 entities. See igeo_Convert112To126, igeo_Convert130To126, igeo_Convert126To126 for more details on these parameters.
For all entities that have an exact conversion, the conversion is exact to the precision of the input data and to machine precision. Otherwise the conversion is an approximate conversion to a tolerance.
An IGES NURBS curve can be converted to another IGES NURBS curve with a different degree specified and/or conversion of a rational IGES NURBS curve to a non-rational IGES NURBS curve. For a conversion of an IGES NURBS curve that only requires an increase in the degree (degree elevation), the conversion is exact. All other conversions are appproximate to tolerance. The degree value only applies when an IGES NURBS curve is converted to another IGES NURBS curve or an IGES Offset curve is converted to a NURBS curve. The value of degree must be > 0.
If a conversion error occurs any data created during the conversion is deleted and no IGES NURBS curve is created.
The non-NURBS IGES curve entity must be a valid IGES curve definition.
Input
option
IGES_NOMATRIX
Do not apply entity matrix to data
IGEO_KEEPRAT
Keep a rational NURBS curve rational for degree elevation or no degree change
IGEO_NOKNOTREM
Do not remove knots when the parametric spline is converted to NURBS
db_ptr
The valid IGES curve entity database pointer
stack
The entity attribute stack
model
The model to create the IGES NURBS curve in
tolerance
Conversion tolerance for 112 and 130 entities
max_iters
The maximium iterations for 130 convergence to tolerance
degree
The degree of a converted NURBS curve.
Output
db_ptr_126
The IGES NURBS curve entity database pointer
Return
IGEO_NOERR
IGEO_ENTITYNOTCURVE
IGEO_CNVNOTSUPPORTED
Low level error return
.fi