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 ?

StreamFilter.gh (9.2 KB)

7 Likes

Wow

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