algorithmic modeling for Rhino

Simple Tree Structuring Question - Partition List for Branches

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.  

Views: 200

Reply to This

Replies to This Discussion

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.

Took me a while to figure this out since I had no idea which component to use and because I had no idea how path mapper works (that seems to be the component for the job!). Attached divides branches into groups of 2 (as per the notes above).


I should have used "floor" to make it more like David's example above. 






  • Add Photos
  • View All

© 2018   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service