HC_Trim_NURBS_Surface_By_Poly

void HC_Trim_NURBS_Surface_By_Poly(int cpcount, float const points[])
void HC_Trim_NURBS_Surface_By_Poly(int cpcount, float const points)

Inserts a polyline into the trim list and applies the trim to a surface.

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.

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()
HC_Open_Geometry, HC_Open_Trim, HC_Close_Trim, HC_Delete_Trim, HC_Set_Trim_Operation, HC_Create_Trim_Collection, HC_Trim_NURBS_Surface_By_Curve, HC_Trim_NURBS_Surface_By_Poly, HC_Show_Trim_Count, HC_Show_Trim_Curve, HC_Show_Trim_Curve_Count, HC_Show_Trim_Operation, HC_Show_Trim_Type, HC_Show_Trim_Poly, HC_Show_Trim_Poly_Count

Parameters

cpcount: Number of valid points in points.

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