generative 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
Tags:
Permalink Reply by Michael Pryor on August 10, 2012 at 9:46pm post the file
Permalink Reply by Mateusz Zwierzycki on August 10, 2012 at 10:41pm 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).
Permalink Reply by Boleslaw Musierowicz on August 11, 2012 at 4:11am Dzieki wielkie:)
This actually works very nice! Thanks Mateusz!
Added by Mgeorgio 0 Comments 0 Likes
Added by Mgeorgio 0 Comments 0 Likes
© 2013 Created by Scott Davidson.
Powered by