Grasshopper

algorithmic modeling for Rhino

Hi ,

I want to achieve this : once a item is larger than zero then return "东" ,if not ,return "西" . I intend to use the if() but without any luck .Who can help ?

Views: 433

Replies to This Discussion

one way is use larger than component. this will result in true false output. plug that to a num param. this will turn true fasle into 0 1. Use stream filter with num plugged into g. set 0 of stream as one of your characters and 1 as the other.

1. Eval expression doesn't convert the input to integer, you have to do that explicitly.

2. The Dong and the Xi needs quotes to be treated as strings.

 

It's the quotes that were the problem. He was plugging floating point numbers which would have worked with > 0

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Hi thank you !!

It's always the quotes !!

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service