Synopsis
PDX_MSGT igeo_ConvertSurfaceTo128(long option, MDA_PTR db_ptr, EAM_STACK *stack, int model, double tolerance, int max_iters, int u_degree, int v_degree, MDA_PTR *db_ptr_128)
Purpose
Convert an IGES surface to an IGES NURBS surface(128)
Description
Converts an IGES surface to an IGES NURBS surface or converts an IGES NURBS surface from rational to non-rational and/or from one degree to an other degree. The IGES entities supported for conversion are: .nf .sp 108:1 - Bounded plane -> 144:0 that references 126 and 128 entities 114 - Parametric Spline surface 118 - Ruled surface 120 - Surface of revolution 122 - Tabulated Cylinder surface 128 - NURBS surface 140 - Offset surface .fi
By default, the entity attribute matrix is applied to the IGES NURBS surface and all the IGES non-pointer DE attributes as defined by the attributes on the first base surface are applied to the IGES NURBS surface. 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 surface.
The tolerance value applies to subordinate entites that are IGES 114 or IGES 140 entities and any subordinate curve entities that must be approximated as well as any test for closure. The max_iters values applies to subordinate entities that are IGES 140 entities and any IGES 130 subordinate curve entities. (See gdx_ConvertSurfaceToNurbSurface and gdx_ConvertCurveToNurbCurve 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 surface can be converted to another IGES NURBS surface with a different degree specified and/or conversion of a rational IGES NURBS surface to a non-rational IGES NURBS surface. For a conversion of an IGES NURBS surface that only requires an increase in the degree (degree elevation), the conversion is exact. All other conversions are appproximate to tolerance. The u_degree and v_degree values only applies when an IGES NURBS surface is converted to another IGES NURBS surface or an IGES Offset surface is converted to a NURBS surface. The value of u_degree and v_degree must be > 0.
If a conversion error occurs any data created during the conversion is deleted and no IGES NURBS surface is created.
The non-NURBS IGES surface entity must be a valid IGES surface definition.
Input
option
IGES_NOMATRIX
Do not apply entity matrix to data
IGEO_KEEPRAT
Keep a rational NURBS surface rational for degree elevation or no degree change
db_ptr
The valid IGES surface entity database pointer
stack
The entity attribute stack
model
The model to create the IGES NURBS surface in
tolerance
Conversion tolerance for 114 and 140 entities and subordinate curve entities that must be approximated
max_iters
The maximium iterations for the IGES 140 and subordinate IGES 130 entities convergence to tolerance
u_degree
The degree of a converted NURBS surface in U (should be >= 1)
v_degree
The degree of a converted NURBS surface in V (should be >= 1)
Output
db_ptr_128
The IGES NURBS surface or IGES 144 entity database pointer
Return
IGEO_NOERR
IGEO_ENTITYNOTSURFACE
IGEO_CNVNOTSUPPORTED
Low level error return
.fi