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.
Segmenting the resulting mesh surface can be done by interpolating and cutting across float attributes using the implicitsurface VEX function:
implicitsurface(1, v@P, 'mask', f@mask);
Indexing each segment can be done by calling the ID of the closest implicit surface:
implicitsurface(1, v@P, i@index);
To obtain the name of each surface we call:
s@name = point(1, 'name', i@index);