Grasshopper

algorithmic modeling for Rhino

How do I obtain the path count of a tree?

Seems like a simple question, but I can't figure it out.

I was hoping for a component like "Tree Length", similar to "List Length", but it doesn't exist.

I found path mapper's "you can use path_count" line so I suppose it can output it, but there is no indication how to correctly input data into the lexer combo editor.

Thanks for help.

EDIT: I used "Tree Statistics" and then "List Length" on my tree, which works. Happy to hear other suggestions though.

EDIT2: Right, my method doesn't work in that I cannot use it to retrieve the last path in a tree on which I want to perform a certain operation. I wanted to feed the value of the tree statistics path list length into the "Branch" component, but it needs the value in { } apparently ...

EDIT3: Okay, I feel like an idiot now :) Just had to add an L-1 expression to the List Length component and "Tree Branch" will happily accept it.

Views: 1720

Replies to This Discussion

Use param viewer to get the a list of the tree paths....

[Param Viewer] is very slow for big data trees you would still be better off getting the same list from [Tree Stats]

true

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service