Grasshopper

algorithmic modeling for Rhino

Is there a way to remove(not retrieve) a branch from a tree?

Suppose you have the following branches {0;0;0},{0;0;1},{0,0,2},{0,0,3}. How do you go about removing a particular branch from the tree, say {0;0;1}, so that the output is {0;0;0},{0,0,2},{0,0,3} ?

Views: 959

Replies to This Discussion

Here's a possible approach:

Get a list of all the branches using the ParamViewer object (it outputs a list of branch paths). Remove the offending path using a [Cull Index] or [Cull Pattern] component, then use [Tree Branch] to extract all the other branches from the original tree:


--
David Rutten
david@mcneel.com
Poprad, Slovakia
David,
thanks for the quick reply. I knew there must be a way to do this without flattening the tree and taking out a subset of the new list.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service