Synopsis
PDX_MSGT gdx_ConvertCBSToNurbCBS(long option, MDA_PTR gdx_db_ptr, int model, double tolerance, int u_degree, int v_degree, int max_iters, void *gdx_nurb_face, double *max_dev)
Purpose
Convert a GDX Curve Bounded Surface entity to a GDX NURB Curve bounded face entity
Description
Converts a GDX Curve Bounded Surface entity to a GDX Curve Bounded Surface that references all NURB curve and surface entities. If the GDX curve bounded face already references all NURB entities, then a duplicate of the GDX Curve Bounded Surface is created the model.
New parameter space curves are recomputed: .RS 4 o If the base surface was a non-NURBS surface that was converted to a NURBS surfaces, .RE .RS 4 o The option mask equals GDX_NEWPARMCRV, .RE .RS 4 o The Curve Bounded Surface type indicates references to model space curves only. .RE .RS 4 o The parameter space curve(s) is missing. .RE
and new model space curves are recomputed: .RS 4 o If the model space curves are not NURBS curves, .RE .RS 4 o If a new parameter space curve was computed and the preference flag is parameter space, .RE .RS 4 o The option GDX_NEWMODELCRV is set to recompute the model space curves and/or the base surface is NURBS and the model space curve is missing (MDA_NULL_PTR). .RE
The u_degree and v_degree are used to determine the degree of an offset surface or offset curve ( u_degree ) that needs to be converted to an approximate NURBS curve or surface. If the option mask GDX_USEUDEG is set then the u_degree is used to specify the degree of the parameter space curve created from projecting the NURBS model space curve to the NURBS surface (by default the degree of the existing parameter space curve or the maximium surface degree if the parameter space curve is missing is used for the degree of the parameter space curve). The tolerance and max_iters values apply to the NURBS curves or surface that are approximated. In addition, the tolerance applies to the test for curve and surface closure.
The GDX Curve Bounded Surface entity and all its subordinate entities must be valid definitions except as noted.
The conversion is exact where the curve and surface entities convert extactly to the NURBS definition, otherwise the conversion is an approximation to tolerance. The projection of new parameter space curves and/or creation of new model space curves from parameter space curves is an approximation to tolerance.
Input
option
GDX_COMMIT
Commit the GDX NURB surface to the database
GDX_KEEPRAT
Keep a rational NURBS surface rational for degree elevation or no degree change
GDX_USEBASEDEG
Use the base surface U and V degree for the degree of the offset surface
GDX_NEWPARMCRV
Recomputer the parameter space trimming curve by projecting the NURBS model space curve to the NURBS surface
GDX_NEWMODELCRV
Recompute the NURBS model space trimming curve from the computed NURBS parameter space trimming curve. The edge curve preference flag will be set to parameter space curve prefered.
GDX_USEUDEG
Use the U degree parameter ( u_degree ) for the degree of any new parameter space curves
GDX_OPENCLOSED
Open a closed surface if the projection of the model space curves generates multiple parameter space curves accross seam closure. This option only applies ot Curve Bounded Surfaces that are flagged as open but the base surface is closed.
gdx_db_ptr
The GDX Curve Bounded Surface entity database pointer
model
The model to create the GDX NURB surface or curve bounded face in
tolerance
The tolerance for approximating the GDX NURB surface in the case of converting an offset surface, a NURB surface to non-rational or lower degree, or for removing knots when a parametric spline is converted and for projecting the model space curve to the surface and/or extracting the model space curve from the surface
u_degree
The U degree to approximate the GDX NURB surface when a GDX NURB surface is converted to another GDX NURB surface and/or a GDX NURB curve is converted to another GDX NURB curve.
v_degree
The V degree to approximate the GDX NURB surface when a GDX NURB surface is converted to another GDX NURB surface.
max_iters
The maximum iteration count to test for convergence to the approximation tolerance
Output
gdx_nurb_face
The GDX NURB surface or Curve Bounded Surface entity structure or database pointer
max_dev
The maximium deviation of the model space curve to the surface
Tolerances
MODEL_SPACE_PNT_TOL
PARM_SPACE_PNT_TOL
ANGLE_TOL
ZERO_TOL
CONVERGE_TOL
KNOT_TOL
PNT_PROJ_TOL
PARALLEL_LINES_TOL
COLLINEAR_TOL
COPLANAR_TOL
.fi
Return
GDX_NOERR
GDX_ENTITYNOTCURVEFACE
Low level error return
.fi