algorithmic modeling for Rhino
So I have two trees which look as so:
#1 #2
{0} {0:0}
{1} {0:1}
{2} {0:2}
{0:3}
{1:0}
{1:1}
{1:2}
{1:3}
{2:0}
{2:1}
{2:2}
{2:3}
Each branch has 10 points. I'd like all the points in {0} to draw lines to each sub-branch {0,#}, {1} to {1:#}, etc. I am simply confounded, how would this be accomplished?
Thanks!
Tags:
Great!
i deleted the screenshot file and i was wondering if this solution would work with the following
#1
{0}
{1}
{2}
to be matched with
#2
{0;0}
{0;1}
{0;2}
{1;0}
{1;1}
{1;2}
{1;3}
have you tried it with uneven subbranches?
cheers
alex
Hi i saw this thread by looking for something else...
But anyway,i guess here's another simple solution. Actually you can just path map all the branches {n;m} to {n}, then link your mapped branches and your simple branches {0},{1}..{n} to longest list component, set it to wrap. It will duplicate the whole list of your every simple branches depending on the number of items in mapped branch {n} to match with.
For exemple, for simple{0} you have [0,1,2,3,4], and for mapped {0} you have 15 items, the function will make your simple{0} to [0,1,2,3,4,0,1,2,3,4,0,1,2,3,4]
so len(simple{0}) =15 equals your len(mapped{0})
This means you dont have to count how many subbranches it has to duplicate your list.
Hope i made it clear. Best
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by