Merge multiple expressions

Hi,
I’m trying to merge multiple expressions in the same box. I would like to avoid making a box for each “if function”.
It’s possible?

if(,,if(,,if(,,"Huh?")))

// Rolf

1 Like

they must be 4 independent functions. There are 4 variables (a, b, c, d) as input and 4 different results at the output. With your formula I have only one result.

If the requirement is independent functions, why then try to make them dependent by one function?

// Rolf

you could combine them with python but yeah, i wonder what the point is

1 Like

The script is the right way, I was looking for a way to avoid it. I was hoping to use only one “box expression” in which to insert a list of equations because it is easier to set up than a script (which I can not do). The goal would be to compress the operations without using a script :slight_smile:

Thanks

If you want to compress use the equation component where the equation is string input. You can use a panel with multiple lines

However, the component can not contain more than one expression. so I need more expression components anyway.

Thanks

It is not possible to add more outputs to the expression component. It’s something I would like to have but never ended up writing.

You can output 3 values using {xxx,xxx,xxx} then deconstruct point

Or



Is it not what you want ?

1 Like

Instead of Expression, Is it not an option to use Evaluate?

3 Likes

Cool, we are synchronysed. It was I wanted to explain on my first answer, but I was just with my phone and I forgot the good name of this component. For me Evaluate or Expression are the same.

1 Like

I do not understand why people use Evaluate or Expression when there’s ghpython :face_with_raised_eyebrow:

Because it exists, because it is simple …
Because when you begin to use Grasshopper it is because you don’t know coding …
You also can say. I don’t understand why people use Grasshopper and not rhinoceros or rhinocommon

Endless debate :sleeping:

3 Likes

Also until recently python was not included in the standard component set. That’s Rhino6 only.

@laurent_delrieu, @DavidRutten,

I’m gonna paraphrase. I meant: Why are people STILL using them?

Their syntax is pretty much like python’s, you have limited possibilities, and only one output.

Not to mention higher processing demands than ghpython. (which will be fixed later on but now it exists)

You’re right, but as Laurent says, I simply can not use python. Since there are those components, I was trying to avoid scripting.
That’s all

avoid scripting but using IF statements in expression components, that for me is scripting my friend :slight_smile:. Anyways, everyone is free to use whatever they wanna use, I was just curious.

For me, the only reason I use one of these is so I can see the equation without having to open the python editor (not that it can’t be done using panel as input, but it’s different, not as pretty :wink: )