Synopsis
PDX_MSGT gcr_NurbCurve2(long option, MDA_PTR orig_db_ptr, char type, MDA_COUNT degree, MDA_COUNT num_of_ctrl_pts, double *knots, MTH_3DPNT *ctrl_pts, double *weights, double bounds[2], int gdx_model, MDA_PTR *gdx_NC_ptr)
Purpose
Create a GDX NURB Curve.
Description
This function creates a GDX NURB Curve entity for the given input data. The data provided must result in a valid definition.
The GDX NURB Curve's planar, xy_planar, and plane_normal fields are set by calling gdx_SetNurbCurvePlanarFlag with the zero tolerance for point in plane check set to GDX COPLANAR_TOL.
The GDX NURB Curve's closed field is set using tolerance of GDX PARM_SPACE_PNT_TOL if GCR_PARM_DATA is specified. By default the GDX MODEL_SPACE_PNT_TOL will be used to determine closure.
The GDX NURB Curve's periodic field is set by examining the values specified in the knot array.
The orig_db_ptr argument should contain the database pointer of the entity that the new entity was created from (usually this should be obtained by the calling routine via mda_GetOrigDbptr) or MDA_NULL_PTR. See the mda_intro man page for more information about predecessor entities.
\fBRules\fR .IP • 3 degree > 0 .IP • 3 num_of_ctrl_pts > 1. .LP
Input
option
GCR_NOVALIDATE
No validation will occur on the input data.
GCR_PARM_DATA
Signifies parametric data (by default, model space data is assumed)
orig_db_ptr
The original entities orig_db_ptr as obtained from the mda_GetOrigDbptr call, or MDA_NULL_PTR
type
GDX_NURB_GENERAL
The general form of the GDX NURB
GDX_NURB_LINE
line
GDX_NURB_ARC
Arc
GDX_NURB_ELLIPSE
Ellipse
GDX_NURB_PARABOLS
Parabola
GDX_NURB_HYPERBOLA
hyperbola
GDX_NURB_COMPOSITE
Composited
GDX_NURB_OFFSET_CURVE
Offset curve
GDX_NURB_POINT_CURV
Point curve
degree
The algebraic degree of the basis functions
num_of_ctrl_pts
The number of control points for the curve
knots
The curve knot sequence (non-decreasing)
ctrl_pts
The set of 3D coordinates (X, Y, Z) that define the control points for the curve
bounds
The active parametric domain of the curve, or NULL. If value is NULL, gdx bounds[0] = gdx knot[degree] and gdx bounds[1] = gdx knot[number of knots - order]
weights
The weights for the GDX NURB Curve
gdx_model
The GDX model for entity creation
Output
gdx_NC_ptr
Entity database pointer of the GDX NURB Curve
Tolerances
GDX COPLANAR_TOL
GDX PARM_SPACE_PNT_TOL or
GDX MODEL_SPACE_PNT_TOL
.fi
Return
GCR_NOERR
GCR_INVALID_MODEL
Low level error return
.fi