algorithmic modeling for Rhino
I have a data tree with thousands of branches. First n branches have x items each. Following n branches have y items each. Following n branches have z items each. How do I turn these branches into sub-branches, with n sub-branches in one main branch. I am looking to do the same as what Partition List does for a list, but instead of individual items, I need branches partitioned.
Tags:
So you have:
{0} N = 3
{1} N = 3
{2} N = 5
{3} N = 5
...
Where n=2, x=3 and y=5? And you want:
{0;0} N = 3
{0;1} N = 3
{1;0} N = 5
{1;1} N = 5
...
Or did I misunderstand?
Also, do you know n, x and y, or do you need GH to figure out these values at runtime?
That is exactly what I am looking for. n is known. x and y are not known but are unimportant. The number of base level branches (or the total number of initial branches) after transformation is not known, but there will be an even number of sub-branches in each branch.
Thank you.
I should have used "floor" to make it more like David's example above.
That is interesting. Now I have this question. How can you partition your lists in this way:
{0;0} N = 3
{0;1} N = 3
{1;0} N = 5
{1;1} N = 5
{2;0} N = 30
{2;1} N = 30
partition these six branches into three parts:
branch 1:
{0;0} N = 3
{0;1} N = 3
branch 2:
{1;0} N = 5
{1;1} N = 5
branch 3:
{2;0} N = 30
{2;1} N = 30
parthmapper won't change the length of branch, explode tree won't give me two branches in one output
Welcome to
Grasshopper
Added by kgm 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2023 Created by Scott Davidson. Powered by