Synopsis
PDX_MSGT gdx_CreateSurfCompEdgeCurve(long option, MDA_PTR db_ptr, MDA_PTR gdx_new_surf_db_ptr, int model, double tolerance, int degree, int max_iters, void *gdx_comp_edge_curve, double *max_dev)
Purpose
Create a GDX surface composite edge curve entity from an existing composite edge curve entity.
Description
Given a GDX composite edge curve entity, a NEW GDX composite edge curve entity is created with its definition based on the input parameters and the option options mask. By default, the input GDX composite edge curve 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, 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 composite edge curve type indicates references to model space curves only. .RE .RS 4 o The parameter space curve(s) is missing (MDA_NULL_PTR). .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 composite edge curve entity and all its subordinate entities must be valid GDX definitions except where stated for the cases of missing model OR parameter space curves.
The recomputed curves are an approximate conversion to tolerance.
The surface referenced by gdx_new_surf_db_ptr will be delete when an error occurs if the surface is not referenced by another entity.
Input
option
GDX_COMMIT
Commit the GDX composite edge curve to the database and return the MDA_PTR database pointer. Otherwise the memory structure pointer for the GDX composite edge curve 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
Recompute 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 curve.
GDX_NEWMODELCRV
Recompute the 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 curve
GDX_USESURF
Use the new GDX surface entity parameter gdx_new_surf_db_ptr as the surface entity for recomputation of the model and/or parameter space curves. Otherwise, the surface entity used to define the master GDX composite edge curve is used. For the case where multiple GDX composite edge curves are to be created from the same GDX surface, the input surface parameter should be set and this option mask used. The NEW GDX composite edge curve entity will reference the gdx_new_surf_db_ptr surface.
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.
db_ptr
The master GDX composite edge curve entity database pointer
gdx_new_surf_db_ptr
The database pointer of the GDX surface entity that should be used for the new composite edge curve surface if the GDX_USESURF option mask is set or MDA_NULL_PTR.
model
The model number for creation of the new GDX composite edge curve entity.
tolerance
The desired recomputation approximation tolerance.
degree
The computed NURBS curve degree
max_iters
The maximium iterations for convergence test. If a computed curve is not within tolerance tolerance after diverging this many iterations, then the recomputation terminates with an error.
Output
gdx_comp_edge_curve
The new GDX composite edge curve entity database pointer or structure pointer
max_dev
The maximium deviation of the original model space curve if it existed from the surface when a new parameter space curve is 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_NOMEMORY
Low level error return
.fi