Functions | |
void | Trim_NURBS_Surface_By_Poly (int cpcount, const float *points) |
void Trim_NURBS_Surface_By_Poly | ( | int | cpcount, | |
const float * | points | |||
) |
Inserts a polyline into the trim list and applies the trim to a surface.
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). |
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.
Here's some pseudocode:
key = HC_Insert_NURBS_Surface(...) HC_Open_Gometry( key ) HC_Trim_Surface_By_Poly(...) HC_Close_Geometry()