Grasshopper

algorithmic modeling for Rhino

Data Tree Utilities: Match Path and Partial Flatten

In the coming weeks, I am planning to release some clusters I've put together for use, and I thought I'd start with two that correspond to common operations I perform on data trees.

The first, Match Path, takes a flat list of data with N items, and another list of data with N items with some kind of arbitrary tree structure. The output is the first flat list, reconfigured to match the path structure of the input list. I was inspired to create this one by a post on the Grasshopper board by Arie-Willem de Jongh (here).

The second, Partial Flatten, takes a set of data with a tree structure and flattens the N lowermost levels of hierarchy. This has been requested a number of times as a built-in feature on the GH board - (see this thread for one example) but until it's implemented this cluster will have to do.

Both tasks can be accomplished on an individual basis with the path mapper, but the problem with the path mapper in general is that changes to the data structure upstream require editing all downstream path mappers to get everything to work. The two clusters I am posting here avoid the use of path mappers entirely, so they will perform the same functions even if the structure upstream changes.

download both clusters here:

Views: 3390

Comment

You need to be a member of Grasshopper to add comments!

Comment by castroecosta on June 5, 2013 at 3:58pm

lol!

indeed...

well thanks anyway :)

Comment by Andrew Heumann on June 5, 2013 at 9:03am
Hi Castro - just FYI, this is now a built-in feature of grasshopper with the "shift paths" component.
Comment by castroecosta on June 5, 2013 at 8:50am

Thank you thank you THANK YOU!

I've been trying to do partial flatten for quite some time!

Comment by Jonatan Schumacher on July 27, 2011 at 5:27pm
Thanks a lot Andrew, that is great to hear. Yes, Grasshopper is a very powerful tool for engineers! Not only does it make our job more fun, but it also helps rationalize geometry for all sorts of analysis. That in conjunction with the many translators and addons (ssiTools, Firefly, Geco, Slingshot, Karamba, Kangaroo,...) that are being developed really changes the way that we interact with architects and fabricators.
Comment by Andrew Heumann on July 27, 2011 at 4:39pm
Hey Jonatan, glad you find them useful! Funny that you should comment, I just watched your presentation with Robert Otani to the NYC Revit User Group two days ago -- really great stuff! I am very impressed, it is this kind of work that really exemplifies the power of Grasshopper!
Comment by Jonatan Schumacher on July 27, 2011 at 4:28am
Thank you Andrew. These components are extremely useful!
Comment by Peter Vikar on January 6, 2011 at 1:37pm
thanks A, this node kind of saved my life:)
Comment by Andrew Heumann on December 9, 2010 at 6:43pm

I'm glad to hear it!

Comment by Tristan Morgan on December 9, 2010 at 6:22pm
Andrew, thanks for this!
The match path component has solved a number of headaches.

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service