Grasshopper

algorithmic modeling for Rhino

Dear all,

How can make an if statement in grasshopper, for example.

 

If input values is x then,

    x = 1  then y = 332

    x = 2  then y = 32 

    x = 3  then y = 4423

 

where input x and output y has no mathematical relations.

 

Thanks in advance.

 

R.

 

Views: 34254

Replies to This Discussion

Hi David! 

Thanks! 

If I wanna use "or" with "IF"

is it possible to write in a line of expression? 

I tried to use If(mm<=0 || mm>10) , but got a error message.

Attachments:

Hi again, 

Sorry I found the answer right after posting...sorry...

Just separate it with ( )

If((mm<=0)or(mm>10),true,false) works just fine.

Thanks!!

Hello,

I have a question, can this work also for the ranges of numbers ? For example

If x c {0,5; 1} then y = 1 ?

Kind regards.

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