for each loop: repeat the process until... ?

   1622   2   0
User Avatar
Member
1007 posts
Joined: April 2017
Offline
Hi!

I'm making a wood floor pattern by starting with a bunch of super long lines (20 meters). My goal is to select and cut each lines that are too long (above 6 meters) and repeat the process until all lines are below 6 meters.

At the moment, I'm using a for-each-loop to cut at a middle point of each primitive that is measured above 6 meters. Since all lines are 20 meters, they all get cut once but it stops there. I still have a lot of lines that are too long.

How can I have it loop over and over until there's no more cuts possible or with a slider to select how many times to go over?

Thanks!

-Olivier

Attachments:
wood_floor_from_lines_how_to_repeat_forEach.jpg (203.5 KB)

User Avatar
Member
8539 posts
Joined: July 2007
Offline
just enclose it in another For Loop (feedback) for exact number of iterations

or set the number of iteration too high and use Stop condition to leave early
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
1007 posts
Joined: April 2017
Offline
Ah!

It works but I expected this to run faster. Oh well!

Thanks.

-Olivier
  • Quick Links