Find closest point

Hi, guys, my task is to find pairs of the closest points among 2 group of points.

But in my current workaround its not always so easy, due to sometimes some point left w/o pair and other get more than one point, see screenshot.

So i need somehow skip already used point to allow 2nd point attach to remaining closest one

You’ll probably have to use Python. How do you determine which points get paired up when there’s overlap?

There’s an algorithm for that:

You first have to build a desirability matrix. In your case, the “desirability” is the distance between all the points from the opposite set.