Grasshopper

algorithmic modeling for Rhino

Hello, I currently trying to use the boolean GATE OR funtion but it is failing for what I need it to do.
I have a list
{0;0}
0 - True
1 - True
2 - False
3 - False

{0;1}
0 - True
1 - True
2 - False
3 - False

{0;2}
0 - False
1 - False
2 - True
3 - False

{0;3}
0 - False
1 - False
2 - False
3 - False

Is there anyway I can get a GATE OR result from this list, where the GATE OR is applied between all the corresponding list items. So the end result will be;

{0;0;0} ??
0 - True
1 - True
2 - True
3 - False

Views: 897

Replies to This Discussion

If you have 4 lists, you'll need to use OR on the first two and the last two, then use OR again on the partial results:


If you have a flexible number of lists, you'll need to convert your booleans to integers (False = 0, True = 1), perform mass addition on your numbers, then convert back into booleans:


--
David Rutten
david@mcneel.com
Seattle, WA
ps. There's also a Ternary OR gate, which allows you to do the first solution with only two components:


--
David Rutten
david@mcneel.com
Seattle, WA
Thankyou for that, that has helped immensly, not only by fixing my problem, but as well reminding me that boolean can be numerical. Thankyou again.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service