Making a Loop for comparing Solid intersections

I have made a script that detects all elements inside of generated scope boxes. And i want to compare all the scope boxes by looking and sorting them by all elements inside and if the amount is the same or not (it is for detecting connections) The problem now is i made it so it take’s the first item in the list and compare’s it to all the other instances and get a true/falls value out of it. now i want to loop it to take the rest of the scope boxes and run the same script again and again until the list is empty but i don’t know how to do that, is it possible to loop it efficient by just looping the first code over and over?. this is what i have now:


working script on its own for detecting same elements inside scope box.

spaghetti code (it loops now 10 time’s but i want it to loop until it can’t)

Didn’t look too good at the big image, but my first thought is you might need to look into
Lacing > Cross Product.

1 Like

I got it to work finaly:


i wrote a pth script that remove’s the xyz text from the dynamo line’s so now it only writes Line instead of Line(XYZ txt,txt.txt,) and put that in the key string so it wont make like 50 different keys.

2 Likes