Thanks to anyone willing to help!
This is a portion of a script I’ve written but for some reason some of the connections are not connecting to the right corners. See pics. I marked what they should all look like in a blue checkmark and the incorrect ones in a red X.
Things like that happen a lot. Not all operations are always performed in the same order, so the order of points might be okay sometimes and sometimes not.
What you have to do is add a step before the lines are drawn and take all 4 points, measure the distance to the other end point of the line to be drawn, sort by distance and take the nearest one.
It’s a very common pattern in parametric design, where you have to make sure certain conditions are met, by coding in those conditions. If you don’t have those conditions then it might work in some cases, but only by coincidence.
Hope that helps.
ps: you should also post your file, then its easier for us to see what’s going on. From just a screenshot it can be hard.
Thanks Armin. I’m pretty new to grasshopper. So what you mentioned makes sense, I just have to figure out how to put it into practice.
I uploaded my files as well.
As Quan Li says you didn’t internalize your objects.
And as Armin says you’ll have to rely on ‘luck’ for point order to match if previous steps have lost consistency - either ensure that’s the case or use your four points ‘inside’ to look for their closest neighbors ‘outside’: