Brief Index      Full Index      I.M. Reference

Insert_NURBS_Surface


Functions

void Insert_NURBS_Surface (int u_degree, int v_degree, int u_count, int v_count, const HC_POINT *points, const float *weights, const float *u_knots, const float *v_knots)
HC_KEY KInsert_NURBS_Surface (int u_degree, int v_degree, int u_count, int v_count, const HC_POINT *points, const float *weights, const float *u_knots, const float *v_knots)
void QInsert_NURBS_Surface (const char *segment, int u_degree, int v_degree, int u_count, int v_count, const HC_POINT *points, const float *weights, const float *u_knots, const float *v_knots)
HC_KEY QKInsert_NURBS_Surface (const char *segment, int u_degree, int v_degree, int u_count, int v_count, const HC_POINT *points, const float *weights, const float *u_knots, const float *v_knots)
void DInsert_NURBS_Surface (int u_degree, int v_degree, int u_count, int v_count, const HC_POINT *points, const double *weights, const double *u_knots, const double *v_knots)
HC_KEY DKInsert_NURBS_Surface (int u_degree, int v_degree, int u_count, int v_count, const HCD_POINT *points, const double *weights, const double *u_knots, const double *v_knots)
void DQInsert_NURBS_Surface (const char *segment, int u_degree, int v_degree, int u_count, int v_count, const HCD_POINT *points, const double *weights, const double *u_knots, const double *v_knots)
HC_KEY DQKInsert_NURBS_Surface (const char *segment, int u_degree, int v_degree, int u_count, int v_count, const HCD_POINT *points, const double *weights, const double *u_knots, const double *v_knots)

Function Documentation

void Insert_NURBS_Surface ( int  u_degree,
int  v_degree,
int  u_count,
int  v_count,
const HC_POINT *  points,
const float *  weights,
const float *  u_knots,
const float *  v_knots 
)

Generates a Non-Uniform Rational B-Spline (NURBS) surface.

Parameters:
u_degree - Degree of the surface in the u direction.
v_degree - Degree of the surface in the v direction
u_count - Number of valid control points in the u direction
v_count - Number of valid control points in the v direction
points - Vector of x-y-z triplets for the coordinates of the control points.
(A simple N x 3 array may also be used.) Passed by reference always.
weights - Control point weights.
u_knots - Knot sequence in the u direction
v_knots - Knot sequence in the v direction

DETAILS

A NURBS surface is a parametric HOOPS primitive, i.e., it's goemetric properties are determined by a set of mathematical functions.

For drawing purposes, a NURBS surface is like a shell or mesh. Visibility and other drawing attributes can be set as usual on the segment.

The order of the surface determines the form of the parametric equations which define the surface, as well as how smooth the surface can be.  The order is equal to 1 plus the maximum exponent (degree) of the variables in the parametric equations.  The control points are points in object space that affect the shape of the surface, while the knot sequence defines how the control points afffect the surface. The weights control the influence of the control points.

The relationships among the NURBS surface parameters are as follows:

  • u_order = u_degree + 1, where u_degree is the maximum exponent in the parametric equations.  For example, use 2 for a quadratic equation.

  • u_order = v_degree + 1, where v_degree is the maximum exponent in the parametric equation in the v-direction.
    - to define a surface, you need at least order control points
    - maximum continuity = order - 2
    - number of knots = order + cpcount
    - maximum knot multiplicity = order
    - continuity = order - (multiplicity + 1)

Knot values must be nondecreasing, and all weights should be nonnegative.

If NULL is passed in for weights, weights will be given a default value of 1.0 (the surface is nonrational).  If NULL is passed in for knots, than and knots will have default values of "0,1,2,...,knot count" (the surface is uniform).

NOTES

If there is an error the KInsert routine returns "-1".

Tolerance settings to control the way that NURBS surfaces are tessellated are available in Set_Rendering_Options() . To get the tessellated represesentation in the form of a shell, open the surface with Open_Geometry() and use Show_Shell() (Show_Shell's "key" is ignored when the currently open item is a NURBS surface). If Show_Shell is called in this manner before the surface is ever shown as part of an update, however, it will use default tolerances to tessellate the surface rather than what would normally be inherited along the path from the driver at draw time.

RESTRICTIONS

See also:
Edit_NURBS_Surface, Set_Rendering_Options, Show_NURBS_Surface, Show_Shell, Trim_NURBS_Surface_By_Curve, Trim_NURBS_Surface_By_Poly

HC_KEY KInsert_NURBS_Surface ( int  u_degree,
int  v_degree,
int  u_count,
int  v_count,
const HC_POINT *  points,
const float *  weights,
const float *  u_knots,
const float *  v_knots 
)

Similar to Insert_NURBS_Surface(), but returns an HC_KEY to the object.

Parameters:
u_degree - Degree of the surface in the u direction.
v_degree - Degree of the surface in the v direction
u_count - Number of valid control points in the u direction
v_count - Number of valid control points in the v direction
points - Vector of x-y-z triplets for the coordinates of the control points.
(A simple N x 3 array may also be used.) Passed by reference always.
weights - Control point weights.
u_knots - Knot sequence in the u direction
v_knots - Knot sequence in the v direction
Returns:
key

DETAILS

No additional details. See Insert_NURBS_Surface()

void QInsert_NURBS_Surface ( const char *  segment,
int  u_degree,
int  v_degree,
int  u_count,
int  v_count,
const HC_POINT *  points,
const float *  weights,
const float *  u_knots,
const float *  v_knots 
)

Similar to Insert_NURBS_Surface(), but operates on a given segment rather than the currently open one.

Parameters:
segment -
u_degree - Degree of the surface in the u direction.
v_degree - Degree of the surface in the v direction
u_count - Number of valid control points in the u direction
v_count - Number of valid control points in the v direction
points - Vector of x-y-z triplets for the coordinates of the control points.
(A simple N x 3 array may also be used.) Passed by reference always.
weights - Control point weights.
u_knots - Knot sequence in the u direction
v_knots - Knot sequence in the v direction

DETAILS

No additional details. See Insert_NURBS_Surface()

HC_KEY QKInsert_NURBS_Surface ( const char *  segment,
int  u_degree,
int  v_degree,
int  u_count,
int  v_count,
const HC_POINT *  points,
const float *  weights,
const float *  u_knots,
const float *  v_knots 
)

Similar to Insert_NURBS_Surface(), but operates on a given segment and returns an HC_KEY to the object.

Parameters:
segment -
u_degree - Degree of the surface in the u direction.
v_degree - Degree of the surface in the v direction
u_count - Number of valid control points in the u direction
v_count - Number of valid control points in the v direction
points - Vector of x-y-z triplets for the coordinates of the control points.
(A simple N x 3 array may also be used.) Passed by reference always.
weights - Control point weights.
u_knots - Knot sequence in the u direction
v_knots - Knot sequence in the v direction
Returns:
key

DETAILS

No additional details. See Insert_NURBS_Surface()

void DInsert_NURBS_Surface ( int  u_degree,
int  v_degree,
int  u_count,
int  v_count,
const HC_POINT *  points,
const double *  weights,
const double *  u_knots,
const double *  v_knots 
)

HC_KEY DKInsert_NURBS_Surface ( int  u_degree,
int  v_degree,
int  u_count,
int  v_count,
const HCD_POINT *  points,
const double *  weights,
const double *  u_knots,
const double *  v_knots 
)

Similar to KInsert_NURBS_Surface() but accepts double-precision values. This command can only be used when the application source includes the HOOPS double-precision header, hcd.h.

Parameters:
u_degree - Degree of the surface in the u direction.
v_degree - Degree of the surface in the v direction
u_count - Number of valid control points in the u direction
v_count - Number of valid control points in the v direction
points - Vector of x-y-z triplets for the coordinates of the control points.
(A simple N x 3 array may also be used.) Passed by reference always.
weights - Control point weights.
u_knots - Knot sequence in the u direction
v_knots - Knot sequence in the v direction
Returns:
key

DETAILS

No additional details. See Insert_NURBS_Surface().

void DQInsert_NURBS_Surface ( const char *  segment,
int  u_degree,
int  v_degree,
int  u_count,
int  v_count,
const HCD_POINT *  points,
const double *  weights,
const double *  u_knots,
const double *  v_knots 
)

Similar to QInsert_NURBS_Surface() but accepts double-precision values. This command can only be used when the application source includes the HOOPS double-precision header, hcd.h.

Parameters:
segment -
u_degree - Degree of the surface in the u direction.
v_degree - Degree of the surface in the v direction
u_count - Number of valid control points in the u direction
v_count - Number of valid control points in the v direction
points - Vector of x-y-z triplets for the coordinates of the control points.
(A simple N x 3 array may also be used.) Passed by reference always.
weights - Control point weights.
u_knots - Knot sequence in the u direction
v_knots - Knot sequence in the v direction

DETAILS

No additional details. See Insert_NURBS_Surface().

HC_KEY DQKInsert_NURBS_Surface ( const char *  segment,
int  u_degree,
int  v_degree,
int  u_count,
int  v_count,
const HCD_POINT *  points,
const double *  weights,
const double *  u_knots,
const double *  v_knots 
)

Similar to QKInsert_NURBS_Surface() but accepts double-precision values. This command can only be used when the application source includes the HOOPS double-precision header, hcd.h.

Parameters:
segment -
u_degree - Degree of the surface in the u direction.
v_degree - Degree of the surface in the v direction
u_count - Number of valid control points in the u direction
v_count - Number of valid control points in the v direction
points - Vector of x-y-z triplets for the coordinates of the control points.
(A simple N x 3 array may also be used.) Passed by reference always.
weights - Control point weights.
u_knots - Knot sequence in the u direction
v_knots - Knot sequence in the v direction
Returns:
key

DETAILS

No additional details. See Insert_NURBS_Surface().

Main Index
Brief Index      Full Index      I.M. Functions