Segmenting, indexing, and naming pieces of a kettlebell model created from implicit surfaces.
Implicit surfaces are mathematically defined, computationally lightweight geometrical shapes. They can be combined using boolean operations such as union, intersect, subtract, and difference, and they even support smooth, round, or chamfered transitions.
The resulting mesh surface can be segmented by interpolating and cutting across float attributes using the implicitsurface VEX function:
implicitsurface(1, v@P, 'mask', f@mask);
Each segment can be indexed by calling the ID of the closest implicit surface:
implicitsurface(1, v@P, i@index);
Next, we obtain the name of each surface which is represented by a point:
s@name = point(1, 'name', i@index);