Synopsis
PDX_MSGT gdx_CreateCBS(long option, MDA_PTR gdx_db_ptr, int model, double tolerance, int degree, int max_iters, void *gdx_curve_bounded_surf, double *max_dev)
Purpose
Create a GDX Curve Bounded Surface entity from an existing Curve Bounded Surface entity
Description
Given a GDX Curve Bounded Surface entity, a NEW GDX Curve Bounded Surface entity is created with its definition based on the input parameter and the option mask, By default, the input GDX Curve Bounded Surface entity is duplicated in the model model. Based on the input options, new parameter space and/or model space curve(s) can be computed, using the base surface parameterization. By default, any implied but not defined composite edge curve boundary is created (the outer bounds of the curve bound face), ALL the parameter space and model space curves that are missing are computed and the recomputed curve(s) are defined as NURBS curve(s). Optionally the curve(s) can be converted to the analytical form if the form can be determined.
New parameter space curves are recomputed if: .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
New model space curves are recomputed if: .RS 4 o A new parameter space curve was computed and the preference flag is not for model space prefered, .RE .RS 4 o The option GDX_NEWMODELCRV is set to recompute the model space curve(s). .RE .RS 4 o The model space curve(s) is missing (MDA_NULL_PTR). .RE
The tolerance and max_iters values apply to the computed NURBS curve(s) approximation. In addition, the tolerance applies to the test for closure.
The GDX Curve Bounded Surface entity and all its subordinate entities must be valid definitions except where stated for the cases of missing model OR parameter space curves.
The recomputed curves are an approximate conversion to tolerance.
Input
option
GDX_COMMIT
Commit the GDX Curve Bounded Surface to the database and return the MDA_PTR database pointer. Otherwise the memory structure point for the new GDX Curve Bounded Surface entity is returned.
GDX_USEBASEDEG
Use the base degree of the original curve for the degree of the computed curve. Otherwise the degree parameter is used for the degree of the computed curves. If the original curve is missing the degree of the curve that the new curve is being computed from is used.
GDX_NEWPARMCRV
Recomputer the parameter space bounding curve(s) by projecting the model space curve to the surface. Otherwise the parameter space curves are duplicated if present. If the parameter space curves are not present, the parameter space curves are recomputed for the NEW GDX composite edge curves.
GDX_NEWMODELCRV
Recompute the NURBS model space bounding curve(s) from the surface parameter space bounding curve(s). The preference flag will be set to model space curve NOT prefered. Otherwise, the model space curves are duplicated if present. If the model space curves are not present the model space curves are recomputed for the NEW GDX composite edge curves.
GDX_OPENCLOSED
Open a closed surface if the projection of the model space curves generates multiple parameter space curves across surface closure seams. The surface closure flags are ignored and the closed surface is treated as a non-seamed open surface for projection and the model space curves are reprojected. Since the parameter space curves can no longer cross the seams, the model space curves that projected to the opposite parametric domain are projected to the parametric boundary. This option should only be used to cleanup curves that cross the seams by a small amount and the intent was not to cross the seams.
GDX_MAPCURVE
Map the computed GDX NURB Curve(s) to the analytical form of the curve. The GDX NURB Curve(s) can map to GDX polylines, conics, arcs, parametric splines, and composite curve entities.
GDX_NONRATTOPARMSPL
Forces non-rational NURBS curve(s) that do not map to any other curve form to map to parametric spline curves. By default, these curves will remain NURBS curves. The degree of the parametric spline curve will be the same as the degree of the NURBS curve.
gdx_db_ptr
The master GDX Curve Bounded Surface entity database pointer
model
The model number for creation of the new GDX curve bounded face entity.
tolerance
The desired recomputation approximation tolerance.
degree
The computed NURBS curve degree
max_iters
The maximum iteration count for convergence test. If a computed curve is not within tolerance tolerance after diverging this many iterations, then the recomputation terminates with an error. the approximation tolerance
Output
gdx_curve_bounded_surf
The new GDX Curve Bounded Surface entity structure or database pointer
max_dev
The maximium deviation of all the original model space curves if they existed from the surface when new parameter space curves are projected. Otherwise 0.0.
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