Delete Geometry when Intersect

   5279   4   2
User Avatar
Member
6 posts
Joined: Feb. 2018
Offline
I'm a bit new to for-each loops and am having some trouble at the moment and didn't know if they are a causing a problem or can give me a solution.

I'm spawning various geometry into a scene using scatter and copy to point. However, if they intersect with other geometry, they need to be deleted.
I saw a post on here about deleting geo if it intersect with itself when spawning, but it didn't provide a way to delete if it passed through geometries outside of that for-loop. I can currently get it to delete PARTS of the pieces spawned, but not the entire thing (it'll just create holes).

Any help or guidance is appreciated.
Edited by Dylagent - April 30, 2018 00:54:40

Attachments:
deleteOrFixIntersect.hipnc (160.8 KB)

User Avatar
Member
897 posts
Joined: July 2018
Offline
You can use a intersect node and then a switch node with the expression 0==npoints (“../intersectionNodeName”). Then have your switch node switch to a null node when this expression is true.
B.Henriksson, DICE
User Avatar
Member
6 posts
Joined: Feb. 2018
Offline
Should I be putting this into my for-each loop?
At the moment when I do this, it fails to let me compile in the last node of the loop.

Attachments:
deleteOrFixIntersect_02.hipnc (188.5 KB)
failedCompile.PNG (3.7 MB)

User Avatar
Member
897 posts
Joined: July 2018
Offline
Changed it to a feedback loop and the loop now switches between merging the new iteration or not depending if it interesects with exising. The intersection nodes output doesn't have to be plugged in to be of use in this case.

I removed the compiling as there's not much use when in feedback mode and there's a connection needed somewhere in my setup to make it compileable.

Attachments:
deleteOrFixIntersect_02edit.hipnc (189.3 KB)

B.Henriksson, DICE
User Avatar
Member
6 posts
Joined: Feb. 2018
Offline
Ah I see, so I didn't need to enable the compiling. I was a little worried if this shouldn't be done or not, but it works just fine without it.
Thanks!
  • Quick Links