Grasshopper

generative modeling for Rhino

Stigvg

How to apply a data tree structure to a flat structure

Hi

I am struggling with the path/branches.

I have two sets of data with the same amount of points. First data structure is flat with only one path of 2244 points, second is structured by 204 path each containing 11 points. What I would like is to apply the data structure of the second list with the 204 path to the datas of the first list.
I guess it should be possible when the amount of items in the structures are the same.?

I hope you can help me out

Stig
Attachments:

Reply to This

Replies to This Discussion

Going one way is easy, just flatten the 204 lists. Either use a Flatten component or toggle the Flatten option on any parameter that receives the data. Going the other way (i.e. converting your list of 2244 items into 204 lists of 11 items each) is more complicated but also possible.

--
David Rutten
david@mcneel.com
Poprad, Slovakia

Reply to This

how about something like using a graft/weave combination on the 1D list. you shoul be able to extract a mask pattern from your multidimensional list... (list lenght as input into a list component)

Reply to This

Hi Jes and David, I need to go the troublesome road, but what your are suggesting Jes make sense, thanks for that, I will try that out.

I did hope that there was a more simple way to do it,,

Reply to This

Hi,
Normally it’s a problem.
But if you have the same amount of elements on each path,
what I normally do is a series of a series, like the example.

Regards,
Carlos
Attachments:

Reply to This

Hi Carlos,
I just went through your example, seams to work very well, I will try it out tonight.
Tanks a lot!

Reply to This

It works !! , very simple and nice,,, great

Reply to This

Hi all, before 06.0055 I used to apply Carlos' method, but I wanted to give a try to the path mapper component, which seems to be perfect for these issues. I eventually succeeded although I did not understand why I had to apply a strange "-5" to the destination formula (see attached image)... anybody has a clue?

Alessio
Attachments:

Reply to This

This must be a bug because its true for dividing by all odd numbers:
(i-1)/3
(i-2)/5
(i-3)/7
(i-4)/9
(i-5)/11
....
(i-n)/2n+1

And you can't make it work for even numbers

Reply to This

Hey, pretty cool Path Mapper!! I didn’t noticed.
Thanks!

Stigvg, you welcome.

Reply to This

RSS

© 2010   Created by Scott Davidson.   Powered by .

Badges  |  Report an Issue  |  Terms of Service