Grasshopper

algorithmic modeling for Rhino

I end up with this situation:

 

Have the Value A

 

A has some data or

 

A is null, it does no have data.. no values, like if you did not select any thing with the curve parameter etc...

 

I want to be able to say: IF A has data, then = to 1, and if A does not have data, then, set it to 0.

 

How would I go to do that? Is there a NULL eval parameter or component?

 

Thanks

 

Andres

Views: 213

Replies to This Discussion

There is such a component. Sets>List>Null Item

 

This is what I have now, but I do not know if this is ok

What you're really after is a simple way to convert True/False to numbers. Any time you put a Boolean into something that requires a number then GH converts True to 1 and False to 0

 

The Not component will reverse that result so 1s become 0s etc

Danny

 

But, if the input to the BOOLEAN is empty too. The component would not work... so, I may not get the TRUE/FALSE.... 

 

Danny, can you check the photo I just uploaded? Tell me if I am 100% right or LOST! :-)

 

Thanks..

Yes I think your right, notice I had to put the Referenced Point through another component to get the nulls also. From there you can use the Null Item to get your Booleans

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service