Grasshopper

algorithmic modeling for Rhino

  Hi there!

 I am working now on an algorythm, which as a result gives me a list of 'true/false' data. I'd like to use this alg 2 or 3 times at the same time and compare those lists in a way in which :

- if, at same location in those lists shows at least one 'true' then it counts it as a true or as 1.

and if, there are all 'false' then it comes up as a false or 0.

for expample:

false, false, true     = true

false, false, false    = false

true, true, false      = true

etc.

And i have no bloody idea how to do that(fighting for 5 hours already...). Is it possible to make it using 'standard' grasshopper components or it requires some custom scripting?

Views: 553

Replies to This Discussion

Do you just mean "Gate Or"?  That allows you to add/subtract inputs with the ZUI.  Any single "True" among your list of inputs will return "True".

oh ! :) Thank You so much David! It seems to work perfectly! 

Hi!

try mass addition and test  if result >= 1.

Sylvain

mass addition doesn't respect 'true/false' input list at mine computer... :/  but thank You!

This doesn't work? (or doesn't give you the wanted result?)

edit: Damn, didn't see the "or" stuff... sometimes things or so simple...

Attachments:

Mh..i have no idea about how i would do that with the 'standard' components. But indeed you can do that with a scripting component. The input accepts datatrees with either strings or booleans on its branches.

Attachments:

Thank you Thomas,  I tried to link your script to my lists but those are 3 different lists, and I have no clue how to convert those into this format :  true, false, true with ',' in between...  But thir "OR' component seems to wok just as  I wanted. Thank you for help! :)

Attachments:

You would have to graft the input in order to convert your true..false..true-sequence to a (comma separated) 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