generative modeling for Rhino
Hi all!
What would be the simplest form to merge several lists (of different lengths) into one tree where each input list has its own branch?
Thanks a lot!
Tags:
Permalink Reply by Danny Boyes on December 10, 2011 at 5:00pm If you can always guarantee the order of the lists (longest first) it's very easy. You can achieve it with two components Merge (Inputs Grafted) and Flip Matrix. But if the Inputs will always vary in length with no control over the order then you need to have a system that pads out the shorter lists to the same length as the longest and then after the graft/merge/flip you shift them back to the original length.
here's one way:
EDIT:
BTW you can also use a flatten component to set the Path of each list. eg. P = {1}
Permalink Reply by Andrei Raducanu on December 10, 2011 at 5:19pm interesting way of forcing it to use flip matrix (which would work easily if the liste lenghts were equal)
to chris:
although i hope not, this probably is the easiest way around
here is one way i thought of in the meantime:
maybe David would make a component that would do this (or maybe it could be an option on the merge component). seems like something you run across fairly often
thanks for your inputs!
(if anyone has a better idea, please do share!)
Permalink Reply by Andrei Raducanu on December 10, 2011 at 5:45pm
Permalink Reply by Danny Boyes on December 10, 2011 at 5:56pm
Permalink Reply by Andrei Raducanu on December 10, 2011 at 6:00pm very interesting workaround!
Permalink Reply by Andrei Raducanu on January 20, 2012 at 6:35pm AND NOW WE HAVE ENTWINE... :)
© 2012 Created by Scott Davidson.
Powered by