What's the difference?
-
iamVFX
- Posts: 697
- Joined: 24 Sep 2010, 16:28
What's the difference?
Between "While with Counter" and "Repeat with Counter"?
-
Hirazi Blue
- Administrator
- Posts: 5113
- Joined: 04 Jun 2009, 10:15
Re: What's the difference?
The way I understand it, the "While with Counter" gives you the opportunity to set any kind of condition resulting in a boolean True or False to terminate the loop, while the Repeat sets a fixed amount of times the loop goes through. So the "While with Counter" only terminates after the certain condition turns False (or the Max repeat is reached), while a "Repeat with Counter" loops through its loop an exactly predefined number of times...
;)
;)
Stay safe, sane & healthy!
-
iamVFX
- Posts: 697
- Joined: 24 Sep 2010, 16:28
Re: What's the difference?
So if I work with a topology and use "While with Loop" with Max Repeat value that determined by number of polys - it's will be the same as if I used "Repeat with Counter"? 
-
Hirazi Blue
- Administrator
- Posts: 5113
- Joined: 04 Jun 2009, 10:15
Re: What's the difference?
But you'd still have to set a condition...
In that case "Repeat with Counter",
where you "pipe" the number of polygons
into the number of repeats (+1? I forget...) seems "easier".
In that case "Repeat with Counter",
where you "pipe" the number of polygons
into the number of repeats (+1? I forget...) seems "easier".
Stay safe, sane & healthy!
-
iamVFX
- Posts: 697
- Joined: 24 Sep 2010, 16:28
Re: What's the difference?
+1, exactly.Hirazi Blue wrote:But you'd still have to set a condition...
In that case "Repeat with Counter",
where you "pipe" the number of polygons
into the number of repeats (+1? I forget...) seems "easier".
Ok, so difference only in the possibility of using the condition. Thanks, Hirazi!
-
xsisupport
- Posts: 713
- Joined: 09 Jun 2009, 09:02
- Location: Montreal Canada
Re: What's the difference?
The counter in While with Counter is a convenience. It's there so you can use it in the body of the loop, but as mentioned already, it doesn't control the number of loop iterations (unless you use it in the condition).
-
iamVFX
- Posts: 697
- Joined: 24 Sep 2010, 16:28
Re: What's the difference?
Thanks, Stephen! It's clear now 
-
dwigfor
- Posts: 395
- Joined: 17 Nov 2009, 16:46
Re: What's the difference?
If you haven't seen this Modulo tutorial, you should look it over. https://www.si-community.com/forum/viewtopic.php?f=41&t=1842
I think it might help you eliminate the need for repeat with counter.
I think it might help you eliminate the need for repeat with counter.
-
iamVFX
- Posts: 697
- Joined: 24 Sep 2010, 16:28
Re: What's the difference?
No, because for some reason merge vertices and cap hole compounds accepts only per object arraysdwigfor wrote:I think it might help you eliminate the need for repeat with counter.