Synopsis
PDX_MSGT gdx_ConvertCBSToNoSeamNurbCBS(long option, MDA_PTR db_ptr, int model, double tolerance, int u_degree, int v_degree, int max_iters, int *num_no_seam_faces, MDA_PTR **db_ptr_no_seam_faces, double *max_dev)
Purpose
Convert a GDX Curve Bounded Surface entity to one or more all GDX NURB Curve Bounded Surface entities with no seams
Description
Given a GDX Curve Bounded Surface entity that references non-NURBS entities, converts the non-NURBS entities to NURBS and converts all the composite edge curve entities that reference non-NURBS GDX entities to reference GDX NURBS entities. If the GDX Curve Bounded Surface and/or GDX composite edge curve entities reference GDX NURBS entities, the GDX NURBS entities are duplicated in the new model and referenced by the new Curve Bounded Surface and composite edge curve entities.
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 bounded surface type indicates references to model space curves only. .RE
Model space curves are recomputed: .RS 4 o If the model space curves are not GDX NURB 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, .RE .RS 4 o The option GDX_OPENCLOSED was specified and the surface was closed and the outer boundary in parameter space traverses the complete parameter domain in U and/or V. .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 GDX definitions accept 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. The resulting GDX Curve Bounded Surface entity is check to see if it can directly map to a GDX Curve Bounded Surface entity with no seams(the base surface is not closed and/or no seams are crossed) in which case one GDX Curve Bounded Surface entity will be created. If the GDX curve bounded face entity contains seams and can not map directly to a single non-seamed GDX Curve Bounded Surface entity, the GDX curve bounded face is split into 2 or more GDX non-seamed Curve Bounded Surface entities. After conversion to the GDX NURBS non-seamed Curve Bounded Surface entities, the converted GDX NURB Curve Bounded Surface entity is deleted.
If the option GDX_OPENCLOSED is specified and the base surface is closed in the U and/or V parametric direction, the base GDX NURB Surface is opened. If the extents of the outer trimming boundary do not span the parametric domain of the base surface, the GDX NURB Surface is relimited to include the parametric extents of the outer trimming boundary of the GDX NURB Curve Bounded Surface. Otherwise, the surface is split in half in each parametric direction that is closed and new GDX NURBS non-seamed Curve Bounded Surface entities are created.
The array of GDX NURBS non-seamed Curve Bounded Surface database pointers must be freed by the application. If the calling application is not part of libgdx, a call to gdx_Free() must be made to free the list.
Input
option
GDX_KEEPRAT
Keep NURBS curves/surface rational when elevating the degree during conversion
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 in the case where the base surface is already a NURBS surface
GDX_NEWMODELCRV
Recompute the NURBS model space trimming curve from the computed NURBS parameter space curve. The preference flag will be set to parameter space curve prefered.
GDX_OPENCLOSED
Open a closed base surface by relimiting of subdividing.
GDX_USEUDEG
Use the U degree parameter ( u_degree) for the degree of any new parameter space curves
db_ptr
The GDX Curve Bounded Surface entity database pointer
model
The model to create the new GDX non-seamed curve bounded face entities entity in
tolerance
The conversion approximation tolerance.
u_degree
The converted NURBS curve degree and/or the converted NURBS surface U degree of approximation is required
v_degree
The converted NURBS surface V degree if approximation is required
max_iters
The maximium iterations for convergence test
Output
num_no_seam_faces
The number of NURBS GDX non-seamed curve bounded face entities created
db_ptr_no_seam_faces
The new NURBS GDX non-seamed Curve Bounded Surface entity database pointers (must be freed by the application, using gdx_Free if the application is not part of libgdx)
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_NOMEMORY
Low level error return
.fi