algorithmic modeling for Rhino

Tree Sloth Data Structure Components, early testing

Hi everyone-

UPDATE: There is a new Tree Sloth out there as well, with quite a bit more functionality.  I've relocated it to the Milk Box, because it all layers in with the "Sets" tab:

As much for my own use and GHA development learning process as to give back to the community I've started work on a series of data management components that I'm calling Tree Sloth, and I'd love to get your feedback.  So please by all means make use of the ones I've put together here...but more importantly, if there are any list, data or tree components that you wish for, let me know and I'll see if I can integrate them into this package.  This is waaaaay in the early phases (I started it up yesterday) but hopefully some of these components can provide some utility for you now.

So far I have included the following.

Dispatch Multiple: Like a dispatch, except that you feed in an index pattern. Think of it like an "unweave", or a sift without any nulls to clean up if you just want a raw list. And and subtract output lists with the ZUI.

Dispatch Branches: Like a split tree, except that you feed in an index pattern that applies to the list of data paths. You also can add and subtract output lists with the ZUI for multiple dispatches, and you have option of either keeping the original path structure or having each output renumbered.

Flip Last Matrix: Just like the flip matrix, except this can take in a tree with a deeper path structure. It identifies the last path index with unique values in it and flips that index number with the object count.

Filter Unmatched Paths: Compares any number of data trees and filters out for each any paths that aren't shared by all. Manage inputs with the ZUI.

For now the components appear on the "Sets" category, either under the "List" or "Tree" subcategories.

Some of what I plan to do in the future:

1) Filter Matched Paths: Like filter unmatched, this one will output for each input data tree all data paths that are unique to each.

2) Propagate Ancestor: Sometimes I find that I have an object with "ancestral" data structure that I'd like to perform an operation with its children, and I find I have to execute a series of shift path, get list length, duplicate and graft for proper matching.  So this component will allow for you to set the path index you'd like to progagate from and the downstream data structure you'd like it to multiply for.

3) Clone: takes a flat data structure and matches its structure to that of another tree that has the same number of elements

4) Peel: a simple renumbering of paths (thanks to Michael Pryor for the name!)

5) In-list cross reference: Sometimes I find that I have several objects in a data structure that I want to have compared against every other element in their own path, but not against themselves.  So this will output two lists of of each element from the original structure, grafted, and another of matching data structure that has every other object from the same data path, matching the grafted structure of the starting element.

So this is really just the beginning, although I can't guarantee any kind of schedule as there's loads of other stuff going on for me now.  But more than anything, feedback, ideas, wishes, and your efforts to break what I've put together would be very much appreciated.  Thanks to Daniel Piker for getting me started on the GHA path and for general inspiration, Michael Pryor for conversations, ideas and feedback, and David Rutten and Thibault Schwarz for advice about getting more deeply into Visual Studio.





I originally had the icon files referenced locally.  Hopefully this will fix it!

Views: 6805


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

Join Grasshopper

Comment by Peter Taylor on March 6, 2017 at 5:41pm

Dude! I was banging my head against a wall trying to figure out a way to do the unique list compare before i knew about this plugin. Thanks for the work! I'm sure the rest of the tools will become as useful as that one once i have reasons to use them!

Comment by David Stasiuk on February 28, 2017 at 9:52am

Hi Claudio-

Glad the tools are helpful for you! So you mean for assigning the directory on the Unpack component? That's a good idea. I doubt I'll implement it right away, but for the next release I can make it possible. In the meantime, Metahopper has a useful relative path tool. Hope this helps for now...

Comment by Claudio Campanile on February 28, 2017 at 9:36am

Hi David

Thank you for sharing and updating this amazing tool - I have been using it for a long time!

Just come up with a question - is there any way to feed the unpack data with a relative path? I often use that for collaborating with other people, and it would be amazing to not have to update the path all the times! I would like to avoid to internalise any data for speed purposes.

Thank you


Comment by Duncan W on June 29, 2013 at 10:29am

Wow, I think I could very well start depending on these completely.

Comment by David Stasiuk on April 15, 2013 at 5:28pm

Hi Jesus-

I think it's because the dispatch multiple is index-based and the standard dispatch uses True/False...when the integer input parses the true/false, a false is captured as a zero and a true as it would invert it.  I'm planning on doing a new release of Tree Sloth in the next few weeks with some additional components, and I think I'm going to rename the dispatch multiple "unweave"...hopefully that will help eliminate confusion of this sort.  Thanks for pointing it out!

Comment by Jesus Galvez on April 15, 2013 at 5:01am

Hi David,

It looks like the dispatch multiple component, when set up with only two outputs, gives results the opposite way as grasshoppers dispatch component. 

Comment by David Stasiuk on March 5, 2013 at 8:54am

okay.  I'll try to recompile it and see what's up.  sorry guys!

Comment by Marios Tsiliakos on March 5, 2013 at 8:03am

Oops, same thing for me,

RH5.0 32bit GH 9.0.014. 

Comment by David Stasiuk on March 5, 2013 at 7:39am

Wow.  I don't know why it wouldn't work.  Let me try to install it on another machine.  I haven't had any problems on my own, but I haven't really tried it out anyplace else.  I'll try it on my old one when I get home...sorry about that!

Comment by Nick Tyrer on March 5, 2013 at 7:35am

I am currently using rhino5.0 64bit, with gh 9.0014.

Ive put it into components folder, made sure its unblocked, restart rhino. And no components turn up in sets. Then i get this message if i try to open your example file.





  • Add Photos
  • View All

© 2021   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service