algorithmic modeling for Rhino
Hi! I have two different lists I would like to match. I got them using partition and split, so that the branches of the first list correspond to the branches of the second one {0,0} (1st list) to {0,0} (2nd list) and so. The branches of the 1st list contain sets of numbers from 0 to 6 elements (lets say, the first ten branches contain 0,1,2, the next twenty 0,1,2,3... the last set of branches contain 0,1,2,3,4,5 elements). Each branch of the second list contain a number within a range of 3 to 9 (say eight first branches 3 elements, next fourteen 4, and so, reaching a maximum number of 9 elements). I used sort list to order them from the lowest values to the highest ones in both cases to do the match.
I want to match the branches from the first list to the branches from the second one. That means matching packages of 0,1,2 (1st list) to 3 (2nd list) or 4 (2nd list), etc. How do I match them? Meaning {0,0} (1st list) to {0,0} (2nd list), {1,1} (1st list) to {1,1} (2nd list)...
What I want to do is "filling" the second list with the first one. Introducing packages of 3 numbers (0,1,2) from the 1st list into the second list in the branches that can "host them", values of 3 or 4 elements, for instance. I already have the lists ordered (using sort command) but I don´t know how to do this final step. Suggestions?
Thanks!!!
Tags:
do you mean merge? Merge component? or do you need domains? I am not getting it? sorry
Which version of Grasshopper are you using?
If you have it the [Cross Reference] component will "fill out" the other tree.
Otherwise you will need to [repeat] or [duplicate] the required number of times in the 2nd list
I'm having a hard time understanding what you're looking to do...is it just that you want to make a series of the sequential integers in discrete data structures, just of different lengths (and where these different lengths are themselves assigned by a pattern)? Like:
{0} 0,1,2
{1} 0,1,2
{2} 0,1,2
{3} 0,1,2,3
{4} 0,1,2,3
{5} 0,1,2,3
{6} 0,1,2,3,4
{7} 0,1,2,3,4
{8} 0,1,2,3,4
etc.
If this is the case, you can:
...but if not...maybe you could post the GH file you have. It would probably be easier for us to help that way...
I'm glad i'm not the only one not getting this :)
Sorry that still doesn't help.
If you have 3 centroids and you need 4 i.e. 3 boxes and 1 void where are you getting the 4th point from?
:-))))) I am still not getting it :-)
do you mean like this?
Hi David I´m attaching a JPG of what I´ve got. I guess the code is incomplete for some reason... It might be because my Grasshopper version is 0.9.0014
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
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by