Synopsis
PDX_MSGT gdx_ConvertNurbToNurbSurf(long option, MDA_PTR gdx_ns_ptr, int model, double tolerance, int u_degree, int v_degree, int max_iters, MDA_PTR *gdx_new_ns_ptr)
Purpose
Convert a GDX NURB Surface to another GDX NURB Surface
Description
Converts a GDX NURB Surface entity to another GDX NURB Surface entity. The conversion converts the NURBS surface to a lower or higher degree.
By default, when the surface is converted, the new surface is non-rational and all surfaces are converted. The GDX_KEEP_RAT option can be specified to keep surfaces rational when the degree is increased. The GDX_RATIONAL_ONLY option can be specified, so that only rational NURBS are converted. Finally, the GDX_DEGREE_1 option can be specified to keep surfaces that are degree 1 in both u and v, or just convert the degree that is not equal to 1.
The tolerance and max_iters values apply to the NURBS surface that is approximated as the new GDX NURB Surface. The tolerance is the measure of how far the lower degree and/or non-rational surface can vary from the original surface. The max_iters is the maximium number of iterations that a span in the original NURBS surface is subdivided for approximating the new NURBS surface. Typically only several iterations are required for convergence to the tolerance, but a discontinuous original NURBS surface may never converge to the required tolerance. The tolerance also applies for closure test.
If a conversion error occurs any data created during the conversion is deleted and no GDX NURB Surface is created.
The GDX NURB Surface entity must be valid GDX definitions.
The conversion is an approximate conversion to tolerance.
Input
option
GDX_COMMIT
Commit the GDX NURB Curve to the database
GDX_KEEPRAT
Keep rational when elevating the degree
GDX_RATIONAL_ONLY
Convert only rational NURBS
GDX_KEEP_DEGREE_1
Keep degree 1 curves degree 1
gdx_ns_ptr
The valid GDX NURB Surface entity database pointer
model
The model to create the GDX NURB Surface in
tolerance
The conversion approximation tolerance.
u_degree
The converted NURBS surface U degree
v_degree
The converted NURBS surface V degree
max_iters
The maximium iterations for convergence test
Output
gdx_new_ns_ptr
The GDX NURB Surface entity database pointer or structure pointer
Tolerances
MODEL_SPACE_PNT_TOL
PNT_PROJ_TOL
ANGLE_TOL
ZERO_TOL
CONVERGE_TOL
KNOT_TOL
PNT_PROJ_TOL
PARALLEL_LINES_TOL
COLLINEAR_TOL
COPLANAR_TOL
.fi
Return
GDX_NOERR
GDX_INVALIDMODEL
GDX_ENTITY_NOT_NURBS
Low level error return
.fi