algorithmic modeling for Rhino
Tags:
Hi,
I've been dealing with a similar problem, but haven't found a solution from the forums. Sorry for no images, the definition is currently at a different location.
How about if the lists aren't the same length, but the total length of items is the same. Consider the following flat lists (short for convinience):
L1: A B C D E F G H and L2: 0 0 0 1 2 2 2 3. L1 could be a list of strings or numbers, L2 defines a category. The end result should be {0;0} A {0;1} B {0;2} C {1;0} D {2;0} E {2;1} F {2;2} G {3;0} H
Using L2 getting the target paths, or even the index where the first list should be splitted, is fairly simple.
However, I just can't find a component that can divide L1 accordingly. In order it to be useful for longer lists and larger set of categories, the solution should not rely on an array of components for each branch.
Thank you!
That's exactly what I was looking for. Though, I had to update GH from an ancient version. Seems like the Replace component worked differently before.
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