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: 5372


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

Join Grasshopper

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.

Comment by David Stasiuk on March 5, 2013 at 7:27am's built for rhino 5.0 64 bit.  Is it giving you any particular error message?

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

David, my gh wont register any tree sloth, is there any special installation other than just putting in components folder/unblocking?

Comment by David Stasiuk on March 5, 2013 at 6:00am

Ha...just how long it took me to get started on them.


Search Grasshopper


  • Add Photos
  • View All

© 2017   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service