Introduction

Getting Started

Programming Guides

API Reference

Additional Resources

Insert_NURBS_Surface

Functions

HC_KEY DInsert_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 Insert_NURBS_Surface(), but accepts parameters of type double for increased precision. Unlike Insert_NURBS_Surface, the parameters are not truncated. More...
 
HC_KEY 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. More...
 

Detailed Description

Function Documentation

HC_KEY DInsert_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 Insert_NURBS_Surface(), but accepts parameters of type double for increased precision. Unlike Insert_NURBS_Surface, the parameters are not truncated.

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
The key to the inserted geometry.

DETAILS

No additional details. See Insert_NURBS_Surface().

HC_KEY 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
Returns
The key to the inserted geometry, or -1 if an error occurred.

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).

This function's double parameters are internally truncated to float. If you require extra precision, use this function's double-precision variant, DInsert_NURBS_Surface.

NOTES

If there is an error the Insert 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