# Synopsis

PDX_MSGT gdx_ConvertCBSToParmCBS(long option, MDA_PTR gdx_db_ptr, int model, double tolerance, int u_degree, int v_degree, int max_iters, void *gdx_new_parm_cbs, double *max_dev)

# Purpose

Convert a GDX Curve Bounded Surface entity to a GDX parametric spline curve bounded face entity

# Description

Converts a GDX Curve Bounded Surface entity to a GDX Curve Bounded Surface that references all GDX parametric spline curve and surface entities. If the GDX Curve Bounded Surface already references all parametric spline 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-parametric spline surface that was converted to a parametric spline surface, .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 parametric spline 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 parametric 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 parametric spline 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 parametric spline model space curve to the parametric spline 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 parametric spline 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 exactly to the parametric spline 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 parametric spline surface to the database

### 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.

### GDX_USEDEG1

Force the U or V degree of the converted surface to be degree 1 if the original surface is non-rational and degree 1 in U and/or V

## 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_new_parm_cbs

The GDX 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