Simple way to find closest point for each point in a list?

There’s probably a simple way to do this, but I’m not seeing it.
I’m trying to use Closest Point to draw a line between the closest points in a list of points. I’ve used Closest Point before without trouble, but this time is slightly different: the Point to search from and the Cloud of points to search are all in a single list, and I want to repeat this operation for every point in the list.
Currently Closest Point returns the same point as the closest so all my lines are 0 width.

In abstract, I understand that I need to create a list that contains nested lists containing every point except the one I’m comparing. I could probably stumble my way through it, but it feels like there should be an easy way to do this.

I’ve attached a minimal example of what I’m talking about. Appreciate any help you can provide.

Side question: What does Closest Point do when two points are exactly the same distance (as in my example)?Closest point debug.gh (10.8 KB)

I’m not too sure about multiple same distance.
However for the closest point with the same list:


grabbing the two closest points including itself, I skip itself and take the second closest point.

1 Like