aesthete Posted March 2, 2016 Share Posted March 2, 2016 Hi all. I've wrapped up my head for the for loop in SOP network. I think i've tried to make quite a complicated setup, using the for loop in SOP. First of all, what i want to make is the looping with a bounding box which has a certain size enough to contain specific number of points. When it contains that specific number of points then the loop will stop, and will start again without the points which were contained previously. So for example, like attached hip file, given that the bounding box can contain "27" points, if it finds 27 points when it is located at the 91st point, the loop will stop because it found 27 points. And it will start again from the 92nd point, since the looping was executed from the 0th point to 91st point, searching whether it found the 27 points. To accomplish that, i used a bounding box with a specific size, which can contain 27 points to loop the group. Then i gave the metadata to the location of the bounding box so that the looping can be executed starting from the first point number to the last as iterations, of the source geometry (a cloud of points). But it seems like "Stop Condition" at the Block End node is evaluated before it performed the iteration. What i really wanted was "Stop Condition" to be evaluated afterwards. Sorry for long winded explanation. To summarize, - How can i stop the condition after it performed the iteration, not before? - When the loop stops, is there way that i can exclude the points which were contained before, and then start again? I don't want to use "Delete" because i want to keep the original point number. I heard that for this kind of setup, i need to set 2 for loops (a loop in a loop) but it is very complicated. How can i make this setup using 2 for loops? Any help and tips would help a lot. Thank you for your help. forloop.hipnc Quote Link to comment Share on other sites More sharing options...
lukeiamyourfather Posted March 2, 2016 Share Posted March 2, 2016 If the previous iterations of the loop affect each successive iteration then use the Solver SOP. Quote Link to comment Share on other sites More sharing options...
anim Posted March 3, 2016 Share Posted March 3, 2016 while it is not very clear to me what exactly you want to achieve here are answers to some of your questions - to execute stop condition after the iteration: 1. just store the condition result in a detail attribute at the end of iteration 2. make the Stop Condition parameter load the attribute as a first thing in the iteration and stop if it's true, that way while still evaluating the Stop Condition parm at the beginning of the iteration, it will get the condition value from previous iteration and therefore act as if it was stopped at the end of previous iteration - to exclude previously contained points (without deleting them) just make sure you are executing your loop only on certain group of points and then whenever you want just remove unwanted points from that group (or even add new ones) Quote Link to comment Share on other sites More sharing options...
aesthete Posted March 4, 2016 Author Share Posted March 4, 2016 Thanks a lot both of you! I'll give it a try. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.