algorithmic modeling for Rhino

Returning to GH after a long time... I seem to be getting rusty!

I have a data tree which looks something like this:

{0;0} (2)
{0;1} (2)
{0;2} (2)
{0;3} (6)
{0;4} (6)
{0;5} (5)
{0;6} (5)
{0;7} (8)

I would like to group the paths based on their item count (n) values resulting in a tree which should look something like this:

{0;0} (3)
{0;1} (2)
{0;2} (2)
{0;3} (1)

in other words, all paths with 2 items are under one path, all with 6 items in another, and so on. 

I feel that the pathmapper should be able to do this very easily but cannot figure out what the expression should be... I have tried searching the forum but have not had much luck! 

Any ideas? Thanks a ton!

Views: 375

Replies to This Discussion

I don't think you can use a Path Mapper for this directly. You want to structure one tree based on information in another. If you want to use PathMapper then you'll somehow have to merge these two trees, operate on the combined set and then peel them apart again...

This is tricky. I'd even go as far as tricky.

See attached.

David Rutten
Poprad, Slovakia
Whoa... Trees sublisted within trees... My brain just shut down as a survival mechanism.

Speaking of non-standard practices, can you comment on "the mix" originating from within the below discussion?

Much obliged, sir.
What part of it needs comment?

David Rutten
Poprad, Slovakia
I had a funny feeling that maybe what I was trying was too complicated... thank you for confirming it. This surely is not a path I want to follow. I will look for alternatives.
That is tricky. It'll take me a while to wrap my head around this one.

I have never seen "item_count"'s excellent. Is there any place that has all of the syntax of path mapper all together?
Path Mapper help topic (double click the PathMapper icon in the toolbar but also accessible from any PathMapper menu).

David Rutten
Poprad, Slovakia
I stumbled onto this discussion and thought I'd take a crack at it. heres an alternative solution that culls the set of paths according to each path's respective length.






  • Add Photos
  • View All


  • Add Videos
  • View All

© 2023   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service