Updated: May 16
What is a dispatch pattern and why is it useful?
The Dispatch Pattern component in Grasshopper is used to dispatch a list of data in two directions using a True/ False pattern. In this example, we'll split a set of geometries into two parts: Boxes and Not Boxes.
Prerequisite: Make a list of 8 to 10 geometries in a row.
Step 1: Add a 'match text' component to check if the items are type "box" or not. You can do this by double clicking on your Grasshopper workspace and searching for 'match text' and connecting the wire to the text node.
Step 2: Using the pattern from the 'match text' component, we can determine how our geometry should be split up. Now add a 'box panel' and connect it to the 'match text' pattern node.
Step 3: Add a 'dispatch pattern' component and add 'items' to the list node with a wire. Then connect the match node with the dispatch pattern node.
Step 4: Now add 'geometry' to the right of the 'dispatch pattern' and rename it boxes; connect to List A. Repeat but rename the next 'geometry' not boxes and connect to List B.
Note: The output list A of the 'dispatch pattern' component contains all the data that matches the pattern (True). The output list B contains all the data that does not match the pattern (False).
Now you can select boxes or not boxes and see the results displayed in your row of geometries.