So I have a clustered component I have developed to create a unique shaped dependant on an individual voronoi cell. The component works as intended for an individual voronoi cell, but when I attempt to input multiple voronoi cells the process breakdowns.
To briefly describe what is happening, I am taking a voronoi cell, contouring it, and then creating points on each of the contour lines. It then measures the distance of each of those points to the centroid of that voronoi cell, moving the point in the z-axis proportional to that distance.
This works just fine; however, when I apply the whole voronoi field the distance is calculated for each point to all of the centroids which is not what is intended. Each voronoi cell should only calculate the distance of the points of its own contours to its own centroid.
What is the best way to achieve this?
Edit: I solved this with the closet point component, but if there are suggestions to make improvements they will be greatly appreciated as I am still learning grashopper.
voronoi_contours.gh (16.8 KB)