006 – How To Add A Stream Filter In Grasshopper In 7 Steps
Updated: May 16
Why use a stream filter?
A stream filter helps you to split your data and perform different operations depending on your pattern. You can easily toggle between two different options by inserting a Boolean toggle into the gate of the Stream Filter, e.g. Stream 0 corresponds to “False” and Stream 1 corresponds to “True”. Stream filters are useful for when you have different choices.
How to add a stream filter in Grasshopper
In this case, we will filter by the type of geometry, which allows us to use components which will work specifically for the selected geometry type: you can assign a specific colour to just the spheres, perform some analysis, or continue modelling with just the sphere geometry.
Steps:
Step 1: Double click on your Grasshopper workspace and type ‘box’ and below it also type ‘sphere’. Once you have these two components in place, you should be able to see the 3D geometry in your Rhino workspace

Step 2: Then search for a ‘stream filter’ and add that right in between your box & sphere. Next you need to connect the box to the Stream 0 node and the sphere to the Stream 1 node.

Step 3: Now add a ‘boolean toggle’ to the gate node of the stream filter.

Step 4: Here Stream 0 (box) corresponds to “False” and Stream 1 (sphere) corresponds to “True”. This helps you to split your data and perform different operations on it depending on your pattern.

Step 5: Add a ‘panel’ to the right of the ‘area’ and connect the area node to the panel.

Step 6: You can now switch between true & false on the boolean toggle and the area will appear on the panel.

Step 7: Now we can calculate the surface area of the geometry, this depends on which geometry is used. Go to surface and drag ‘area’ to the right of the stream filter and connect the S(0) node to the geometry node.

Learn more
Read our previous blog post "Useful Grasshopper Resources" or sign up to our platform here to put your Grasshopper models online and share them.