Brief Index      Full Index      Events Index      I.M. Reference

Trim_NURBS_Surface_By_Curve

Functions

void Trim_NURBS_Surface_By_Curve (int degree, int cpcount, const float *control_points, const float *weights, const float *knots, double start_u, double end_u)

Function Documentation

void Trim_NURBS_Surface_By_Curve ( int  degree,
int  cpcount,
const float *  control_points,
const float *  weights,
const float *  knots,
double  start_u,
double  end_u 
)

Inserts a NURBS curve into the trim list and applies the trim to a surface.

Parameters:
degree- Degree of the curve.
cpcount- Number of valid points in control_points.
control_points- Vector of u-v tuples for the coordinates of the control . (A simple N x 2 array may also be used.) Passed by reference always. length should be 2 x cpcount x sizeof(float).
weights- Control point weights.
knots- Knot sequence.
start_u- Start parameter.
end_u- End parameter.

DETAILS

These functions are not legal except when there is a valid NURBS Surface that has been opened with a call to Open_Geometry() . Trim_NURBS_Surface_By_Curve() and Trim_NURBS_Surface_By_Poly() cut away a region from a NURBS Surface. The trim region can be defined either by a polygon or NURBS curve. Such 2d trim regions are defined in u,v parametric space.

NURBS Surfaces in HOOPS effectively have a parameterization from [0..1, 0..1], for he purposes of specifying trim regions. The uvpoints (for polys) and uvcontrol_points (for curves) are in the order [u1,v1,u2,v2, ... , u(N-1),v(N-1),uN,vN].

The last point of the trim will be implicitly connected to the first to form a closed region. Trim objects are normally each interpreted as independent closed regions, but can be combined using trim collections (see Create_Trim_Collection() ). Portions of the NURBS surface that fall within that closed region are cut away or saved, depending on the operation type set in Set_Trim_Operation() . The process of trimming a NURBS surface is thus a boolean subtract.

NOTES

Trim_NURBS_Surface_By_Curve() behaves exactly as Insert_NURBS_Curve(), with the following exceptions:

  1. control points are in parametric space
  2. each control point has only 2 floats, not 3

Trim objects are prepended to the front of the trim list, meaning that trim list offset 0 is the most recently inserted.

Here's some pseudocode:


    key = HC_Insert_NURBS_Surface(...)
    HC_Open_Gometry( key )
        HC_Trim_Surface_By_Poly(...)
    HC_Close_Geometry()

RESTRICTIONS

See also:
Open_Geometry, Open_Trim, Close_Trim, Delete_Trim, Set_Trim_Operation, Create_Trim_Collection, Trim_NURBS_Surface_By_Curve, Trim_NURBS_Surface_By_Poly, Show_Trim_Count, Show_Trim_Curve, Show_Trim_Curve_Count, Show_Trim_Operation, Show_Trim_Type, Show_Trim_Poly, Show_Trim_Poly_Count

Brief Index      Full Index      Events Index      I.M. Reference