Jump to content

For-Loop within For-Loop


FruehBird

Recommended Posts

I am working on a way to place packed primitives (sphere) onto a point cloud one at a time, detect if there is a collision and shrink the object until there is no collision. I have attached a file I am working on. Currently the scale is set to the iteration of the loop but does not seem to work correctly.

For collision I am using the intersection node on feedback of the first for-loop and setting a detail attribute Collision to the just added sphere and from there setting a stopping value for the for-loop is attribute exists. The internal for-loop is then merged into the first and the cycle continues until all the points are filled.

Am I going about the right way of setting this up? 

 

For-Loop_Intersection.hip

Link to comment
Share on other sites

Thanks for the link Atom. This is just a simple part of a much larger operation. Eventually I will be placing a prototype on to each point, one at a time and checking for intersections, if one exists I will be rotating/scaling the prototype until no intersections occur and then move on to the next point and do the same. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...