Grasshopper

algorithmic modeling for Rhino

Cull Item in Data Tree (or Cull / Insert Data Tree Branch)

I am pretty familiar with how to work with data trees and have run through all my favorite resources (esp Grasshopper Data Tree Editing Wiki Page) to try and figure this problem I recently ran across while working in a graph, but was stumped so I'm curious if any of you out there can figure this one out:

Here is the scenario: I have several curves (branches) which are divided into panels (sub branches) which are made up of two sides and a top (3 items in branches).

I am trying to figure out how to cull (drop) several of the items in certain branches. I could settle for culling the branches with these items and then reinserting them (but I would need to figure out how to cull specific branches and reinsert the same, but I am open to this option). Essentially, what I am after is the opposite of the tree branch node as depicted in this screen shot: I want everything else but these branches.

Essentially, I can't remember how to operate on the branch of a tree the way I would operate on a sub-lists in an array (yes I've been spending too much time in Dynamo lately).

Download Link for GH file

In the file I've included a few of my attempts. I've considered exploding the tree and then recreating the tree, but this would be painful due to the number of sub-branches in most of the trees. It also seems poor practice to do this.

Views: 2861

Replies to This Discussion

Ok I was just inspired by this post to figure out how to cull the branches instead of selecting them:

Now to figure out how to put them back (once the have been operated on)...

(Don't you love how you can't figure something out and then an hour after you post it to the forum a light bulb just goes on...?)

Hi Jeremy, try the SplitTree component, it gives you both sets of branches:

Perfect! I'd just come to the same conclusion after reading this post.

I love/hate how I'm so much more productive / think clearly Saturday mornings after posting on the gh forum :) thanks for all the help.

It's called "rubber-ducking", and it really works:) Well - most of the times it does ~:)

And here is the cleaner / simpler version... now that it is on the forum I shouldn't forget this one... :)

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service