Grasshopper

algorithmic modeling for Rhino

Hi everyone,

I have a tree with 25 branches with groups of 4 items (total 100 items). After a conditional, I have 17 true values and 83 false values. But now I want to select the previous branches that contain at least a true value, in other words, after conditional, how can I selected the groups? Tks.  

Views: 8049

Attachments:

Replies to This Discussion

Attachments:

I have another approach. 

The logic is thus:

  1. You have some tree with true and false values.
  2. You compute the Mass Addition for each branch. Since False=0 and True=1, so the integer that is the result of the Mass Addition is basically the number of True values in each branch.
  3. Convert the integer back into booleans. 0=false, anythingelse=true. Also flatten this list of booleans.
  4. Use the Param Viewer to get a list of all the paths in the tree.
  5. You can now use CullPattern to remove all branches which did not have any True values in them.
  6. The output of Cull Pattern is a list of all the paths which have at least one True value.
  7. Use Tree Branch to extract these branches.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

me, too. :-)

Attachments:

Hi Guys,

Tku for your answers. In my case, the definition by Rutten works better. Best regards from Brazil!  

RSS

About

Translate

Search

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service