Link points but not closest point?

Hello,
Quite new to grashopper so please bear with me my lack of vocabulary.
I have a array of big rectangles and smaller rectangles inside some of the big ones. I wish to link the centers of the smaller ones with their parent’s. If I use closest point , I don’t always get the desired result. In the image below, on the left is what I would like and on the right is what I would like to avoid.
Do you have an idea to make this work?
Thank you in advance,

You can use point in curves. Please share the file

2 Likes

closest point.gh (7.3 KB)
I’ll check point in curves even though I don’t see how it’s going to work..
Thank you

closest point.gh (7.9 KB)

3 Likes

Thank you!

1 Like