I'm trying to do multiple loops in hoopsnake to generate a pattern. The process has the following steps:
1. Define a boundary B_0 with a closed polyline.
2. Randomly put some rectangles R_1 into the boundary B_0.
3. Define a new boundary B_1 and compute the region C_1 = R_1 - B_1 (boolean operation); save C_1 for the next iteration.
4. Repeat Steps 2 and 3. In each iteration, C_i = C_(i-1) - B_i, in which B_i is a new boundary.
Now I managed to iterate step 2, and I have trouble putting step 3 into the iteration. Could anyone help me out?
I have two hoopsnake components. The one on the right does step 2. When it finishes, it triggers the one on the left, which generates a new boundary. At this moment, I feed the new boundary to another iteration (step 2), but I should add a boolean subtraction here and somehow pass the boolean result to the next iteration (please see diagram 3 and 4). I cannot figure where to do this boolean and how to pass it on.
I have my files here. Please take a look. Thank you for your time!
Hoopsnake
566 members
Description
Update:
Hoopsnake is now Open Source!
Check out the repo in Github!
Fork it and fix it :)
Hoopsnake is a component that allows feedback loops within Grasshopper.
Multiple loop problem dealing with boolean subtraction
by Peng Wang
Nov 7, 2012
Hi, all,
I'm trying to do multiple loops in hoopsnake to generate a pattern. The process has the following steps:
1. Define a boundary B_0 with a closed polyline.
2. Randomly put some rectangles R_1 into the boundary B_0.
3. Define a new boundary B_1 and compute the region C_1 = R_1 - B_1 (boolean operation); save C_1 for the next iteration.
4. Repeat Steps 2 and 3. In each iteration, C_i = C_(i-1) - B_i, in which B_i is a new boundary.
Now I managed to iterate step 2, and I have trouble putting step 3 into the iteration. Could anyone help me out?
I have two hoopsnake components. The one on the right does step 2. When it finishes, it triggers the one on the left, which generates a new boundary. At this moment, I feed the new boundary to another iteration (step 2), but I should add a boolean subtraction here and somehow pass the boolean result to the next iteration (please see diagram 3 and 4). I cannot figure where to do this boolean and how to pass it on.
I have my files here. Please take a look. Thank you for your time!