Grasshopper

algorithmic modeling for Rhino

hello

after reading extensively in the forum about data tree I am still helpless with my question.

1)  I have a data tree with multiple branches, each branch containing different number of points.

2) I want to rebuild this tree so that every first element of each branch are grouped together, every second with every second, and so on.

3) in the end i would have a tree with the same elements but rearranged according to their previous index number inside of their previous branches.

Path mapper does no seem to be a solution, and neither can I use the values of each point as a comparison factor to reorder the elements... it has to be done according to index number!

Any ideas?

Thanks!
Daniel

Views: 4246

Replies to This Discussion

Hey Daniel,

how are you? are you sure path mapper doesn't work? sounds like the perfect example to use the path mapper. check out the following:


The path mapper reads {0;0;a}(i) -> {0;0;i}(a)

Best,
T
Hey Tobias! Nice to get a reply from you :)

Yes it does work perfectly. I guess I simply did not grasp the whole path mapper concept... have to put my mind to it and learn it properly!

So simple...

Thanks a lot!
Daniel
Great!
In version 0.7.0030 there is a component that does this for you. I forgotten what its called but its something lick matrix flip. Look in the tool bar with all the other tree components.
I don't think it will work. That component requires that each path has the exact same number of elements.

You cannot just 'flip' a matrix where each row has a different number of items. You need to be specific about how those discrepancies are supposed to be handled. Perhaps filling out the shorter branches with null elements prior to flipping might help?

--
David Rutten
david@mcneel.com
Turku, Finland
might be a solution.
but the solution described by Tobias worked great in my case, no matter how many elements I had in each branch...

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service