Functions | |
void | Show_Trim_Count (int *count) |
void Show_Trim_Count | ( | int * | count | ) |
Returns the number of objects in the trim list of the currently open NURBS surface or trim collection.
count | - Returned to user. Passed by reference always. |
This call is not legal except when there is a valid NURBS surface that has been opened with a call to Open_Geometry() , or if the open item is a trim collection that has been opened with Open_Trim() .
Offsets of trimming objects are zero-based. Offset 0 corresponds to the head of the list. Trimming objects are prepended to the head of the list, meaning that offset 0 is the most recently created.
For example, the following snippett would calculate the number of trim curve objects that exist, either in the nurbs surface or in collections.
curve_count = 0; Open_Geometry( nurbs_surface_key ); count = Show_Trim_Count(); for( i = 0 ; i < count ; i++ ) { Show_Trim_Type( i, tempstr ); if( !strcmp( tempstr, "trim curve" ) { curve_count++; } else if( !strcmp( tempstr, "trim collection" ) { Open_Trim( i ); count2 = Show_Trim_Count(); for( j = 0 ; j < count2 ; j++ ) { Show_Trim_Type( j, tempstr ) if( !strcmp( tempstr, "trim curve" ) { curve_count++; } } Close_Trim(); } } Close_Geometry();