Synopsis
PDX_MSGT igeo_Create143From143(long option, MDA_PTR db_ptr, EAM_STACK *stack, int model, double tolerance, int max_iters, int degree, MDA_PTR *db_ptr_143, double *max_dev)
Purpose
Convert an IGES 143 entity from an existing IGES 143 entity
Description
Given an IGES 143 entity create a NEW IGES 143 entity. By default, the input IGES 143 entity is duplicated with any missing model space or parameter space curves generated. Based on the input options, new parameter space and/or model space curve(s) can be computed, using the base surface parameterization.
Parameter space curves are recomputed if: .RS 4 o The option mask equals IGEO_NEWPARMCRV, .RE .RS 4 o The bounded surface type indicates references to model space curves only. .RE
Model space curves are recomputed if: .RS 4 o A new parameter space curve was computed and the preference flag is parameter space, .RE .RS 4 o The option IGEO_NEWMODELCRV is set to recompute the model space curves. .RE .RS 4 o The model space curve for a given boundary curve is missing (MDA_NULL_PTR) and the preference is not for the model space curve definition and the parameter space curve is not missing. .RE
If the option mask IGEO_BASEDEG is set then the degree of the base curve is used for the degree of the recomputed curve otherwise the degree parameter is used to specify the degree of the parameter space curve created from projecting the NURBS model space curve to the 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.
By default the IGES entity matrix is applied to the IGES NURBS curve and all the IGES 143 non-pointer DE attributes are applied to the new NURBS base IGES 143 entity. If the model is the same as the db_ptr model than all the IGES pointer DE attributes, property pointers and associativity pointers are applied to the new IGES NURBS base 143 entity.
The IGES 143 entity and all its subordinate entities must be valid IGES definitions.
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
IGES_NOMATRIX
Do not apply entity matrix to data
IGEO_BASEDEG
Use the base degree for the curve for the degree of the recomputed curve
IGEO_NEWPARMCRV
Recomputer the parameter space trimming curve by projecting the model space curve to the surface
IGEO_NEWMODELCRV
Recompute the model space trimming curve from the computed parameter space trimming curve. The curve preference flag will be set to parameter space curve prefered.
IGEO_MAPCURVE
Map any GDX NURB curves create from projection to the base GDX curve form
db_ptr
The IGES 143 entity database pointer
stack
The entity attribute stack handle
model
The model to crete the new IGES 143 entity in
tolerance
The conversion approximation tolerance. Note: The MODEL_SPACE_PNT_TOL should be at least 2 orders of magnitude less than this tolerance for correct results.
max_iters
The maximium iterations for convergence test
degree
The degree of the computed curve
Output
db_ptr_143
The new IGES 143 entity 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
IGEO_NOERR
IGEO_NOMEMORY
Low level error return
.fi