Using stream gate

Hi all,
Still new to grasshopper & don’t quite have the language down. I will try my best to explain:

I am creating four possible options for the location of drawer pulls, depending on the width of the furniture. I’m locating the points for the center of the pulls based off of a line.
I would like to create something where if width<20, then the line geometry flows to the first option, if 20<width<40, then geometry flow to second option, if 40<width<60, third option, and width >60, forth option.

I think I can do a series of larger than/smaller than components that would work, but ss there an elegant way to use Stream Gate to do this? How do I configure a gate where the data on the width would then translate to 0, 1, 2, 3?

stream (16.3 KB)


From a list of numbers you can make “Consecutive Domains”, and with “Find Domain” you can get the index of the domain that contain a given value:

stream question (13.1 KB)

1 Like

You can use Python (10.4 KB)

1 Like

Thanks for responding to Helen. I routinely cruise the forum in an effort to learn from others. Your solution is nice and I learned 2 new components. Very cool.
Thanks again,

That is exactly what I was looking for. Thank you! I’m still wrapping my mind how domains can be used.

Thanks! I haven’t delved into Python at all, and will have to do more learning around it.