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:

http://www.grasshopper3d.com/group/milkbox/forum/topics/tree-sloth

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 data...one 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.

best,


Dave

UPDATED FILE:

tree_sloth_0.1.gha

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

tree_sloth_initiation.gh

Load Previous Comments
  • Claudio Campanile

    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

    Claudio

  • David Stasiuk

    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...

  • Peter Taylor

    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!