Shortest distance point cure

I need to connect the closest points to each other and remove the rest. Then choose the midpoint of that curve. But how do I only select the 2 points whom distance is very short and remove the rest?points.gh (7.7 KB)

You need to use Closest Points and not Closest Point. For closest point to work you would have to flatten the P input, but closest points can kind of does that automatically.

Then its about sorting, tree management and getting the right indexes.

points_as.gh (18.9 KB)

1 Like