Basic stream filter advise

Hello I have a basic question about how to use the stream filter. I am sure it is very easy but I am new to grasshopper.

I need to control which of 4 inputs is used on the stream filter. I think that I may need to use the expression component to supply the right number gate to the stream filter.

If the input number that i have is smaller than 300 - gate 0
if the number is between 300 - 600 - gate 1
if the number is between 600 -900 - gate 2
if then number is larger than 900 - gate 3

Can anyone help me with how to achieve this? Or direct me to any good tutorials to learn?

One of many solutions:

stream_filter.gh (24.7 KB)

3 Likes

Check this as well.


FindDom._re.gh (6.7 KB)

3 Likes

Thanks for this much appreciated.

wow that’s a very elegant solution, thanks a lot for your help, much appreciated

In case of uneven divisions, polyline parametrization is handy.
(parameter is a linear interpolation between points, integer part is index of segment, decimal part is the interpolation in that segment…)


stream gate.gh (9.8 KB)
(Extreme number can just be a little less than min and a little more than max, -10000 and 10000 were just an exaggeration…)
Edit, max extreme extra number can be avoided, since extreme point will be an integer number, correct for the purpose.


Martin’s is the “low level”(low abstraction), always correct, error proof solution.
Kim’s and mine are sort of hacks…

1 Like

Two components solution ? :thinking:

StreamFilter.gh (9.2 KB)

7 Likes

Wow :no_mouth:

Shame on me…

genius, thanks

1 Like

It should be noted here that sometimes Pick’n’Choose works where Stream Filter will not.

thanks mate, ill look at this

this really is a beautiful solution, so simple if you know how