Grasshopper

algorithmic modeling for Rhino

I have a data tree, with every branch consisting  of 50 boolean items (true/false). I would like to retrieve all indices of true values, from every branch. I am sure, that it is very simple, but I still can't figure it out. 

Thanks

Cheers 

Views: 9232

Replies to This Discussion

post the file

cześć :D

najprostsze rozwiazanie to:

komponent list length (podłaczamy do tego drzewa)-> nastepnie komponent series (długości z drzewa jako wejście C)-> equality (gdzie jako A dajemy drzewo a jako B pojedyncza wartosc true lub false) -> ostatni komponent to cull pattern (lista L to bedzie drzewo z wyjścia series, P to jest pattern z wyjścia equality).

napisze jeszcze po angielsku, bo to dość przydatne rozwiazanie :

solution in english :

workflow which will generate such a parallel data tree of indices consists of 4 components. first of all, take a "list length" component and connect it to your datatree. then use series (connect list length to C input) to generate all indices. next step is to cull indices which are not true (or false). you should use "equality" component and provide as A your primary datatree, as B one value (true or false). last step is to cull indices with pattern obtained with equality, use "cull pattern" to achieve that (data tree from series as list, pattern taken from equality).

Dzieki wielkie:)

This actually works very nice! Thanks Mateusz!

Hey Maeusz!
I cant get this method to work for trees with subbranches :/ know of a work around?

-jens

thank you! it helps with my problem.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service