For-each loop feedback problem

   2459   2   1
User Avatar
Member
12 posts
Joined: Oct. 2016
Offline
Hello!

I'm using a foreach loop over each connected piece(@class), to detect intersections between boxes (see attatched pictures).

It should work like this: The loop takes one box at a time and detects if it intersects with any of the other boxes. This works by always blasting the currently run over box and feeding this into the second boolean input, first input would always be the currently run over box. Then, if an intersection occured, prims get the group axbpolys = 1 and are deleted inside the loop.

BUT unfortunately in the end I just get the old setup back. I have no idea how to check for intersection and then delete one of the intersecting boxes.

Does anybody have an idea how to solve this? Scene file attatched.
Edited by choix - April 24, 2018 06:36:16

Attachments:
Favela_05.hiplc (477.5 KB)
01.PNG (469.6 KB)
04.PNG (476.5 KB)

User Avatar
Member
483 posts
Joined: Dec. 2006
Offline
Something like this :-?
Edited by matthias_k - April 24, 2018 14:40:40

Attachments:
Favela_05-3.hiplc (485.5 KB)

English is not my native language, sorry in advance for any misunderstanding :-)
User Avatar
Member
2036 posts
Joined: Sept. 2015
Offline
I'm just getting into For-Each loops.

I'm assuming you didn't want to include the large box which looks like you are referencing for the rotates and transforms. (alhtough it could be easily changed to include that as well)

In the green netbox is where I exclude any boxes that overlap each other.( not taking into account the large box ).

And I didn't do any rotates/transforms on the results.

I left the add node in, because I was testing to see if it works with more points(boxes copied too) added.
Edited by BabaJ - April 24, 2018 16:14:46

Attachments:
Remove Intersecting Boxes.hiplc (516.0 KB)

  • Quick Links