Grasshopper

algorithmic modeling for Rhino

Tree: To highlight a single branch and its subbranch from a "Param Viewer"

Hi,

when having an amount of points organized in a tree hierarchy (branches and sub-branches and so on),

how could one draw a polyline joining the points on the branches, from the path {0} to, lets say, {0;0;0} where the last item (of this branch) is.

 

Imagining this last item as an apple, this polyline would be like the single way that have to follow the water or minerals to feed the apple climbing from the roots (the ground) of the tree.

 

 

When clicking on a "Param Viewer", we all can see the graphic state of our tree in use, with all the branches organized in the composed hierarchy.

But, how to select from there the {0}, {0;0} and {0;0;0} ?

 

 

I'm attaching a screenshot of how i'm solving it at the moment. By this way, i have to step back and merge apart the branches i want.. which i realized it is not elegant or smart at all.

 

highlight_pathway.jpg

 

Does someone know how to do it?

 

 

(As I figure it not a matter of how the points are actually being joined on the Rhino, i did not attached the *.ghx. (if someone need it, I add it as soon as possible). It is more about highlighting a concatenation of branches).

 

Thanks,

Daniel D.

Views: 468

Replies to This Discussion

Tree data structure is more easily understood as a hierarchy. GH components operate on each unique branch. GH recognizes {0}, {0;0} and {0;0;0} as 3 different branches and thus wouldn't combine data "across" those branches.

To create polylines from specific groups of points you would try to arrange your tree such that your point groups exist in individual unique branches, typically with the same index levels.

i.e.
{0} -> polyline1
{1} -> polyline2
{2} -> polyline3
Thanks Taz for your answer.

Actually, it is a pitty. I was imagining myself playing with a slider connected to that data structure which, in every integer, highlighted a different route across the following branches.

i.e

one for {0} + {0;0} + {0;0;0}
two for the route {0} + {0;0} + {0;0;1}
three for {0} + {0;0} + {0;0;2}

and so on.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service