For loop stop conditions

   1738   2   1
User Avatar
Member
40 posts
Joined: Sept. 2014
Offline
Hey

I'm not quite sure where I may be going wrong here. From what I thought I understood about the stop condition in for loops. If the stop condition is set to 1 on iteration 3, it will finish the process and output anything from the 3rd iteration and stop processing at the start of iteration 4.
Within the scene attached, if that was true I would expect to see a box in my scene as the condition was met in the 3rd iteration to set the stop condition to 1. The stop condition field has "detail(0,"stop",0)"

I've tried to defer the stop condition by an iteration with a wrangle setting a "i@stopping" attribute, and if this is 1, "i@stop" will equal 1 which is what the stop condition is using. Any help out be appreciated, I've looked at a a couple of examples posted on the forums and tried to copy their examples but doesn't seem to work in my instance.
Edited by jm - Feb. 25, 2023 20:35:45

Attachments:
forloopStopCondition.hiplc (126.9 KB)
Capture.PNG (47.1 KB)

User Avatar
Member
9384 posts
Joined: July 2007
Offline
jm
If the stop condition is set to 1 on iteration 3, it will finish the process and output anything from the 3rd iteration and stop processing at the start of iteration 4
that's not correct
the iteration when stop condition is 1 is not finished, stop condition is evaluated at the beginning of the iteration and if true the iteration is not processed

what exactly are you trying to do?
I can't tell from your file, since that's not a feedback loop and it's very unusual to use stop condition for potentially parallel processing of independent pieces
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
40 posts
Joined: Sept. 2014
Offline
Yes sorry, I must have not been clear on what I’m trying to achieve.
So the document said that the stop condition is evaluated at the start of the iteration. So if the condition is met at the end of the 3rd iteration it will stop the 4th from processing.

I think my frustration got the better of me with the file. I had tried using a feedback and a merge both giving the same result. I admit the merge was a Hail Mary thinking I was wrong with the feedback loop, but even when using a feedback node I wasn’t able to get this to function as anticipated.

I’m trying to place a box within an area without the box intersecting or hitting the walls. I have an intersection analysis node which checks if there is an intersection. If the box is placed and it doesn’t hit the wall, then the stop condition is set to 1 as it’s not clipping the walls and placed successfully.
  • Quick Links