A popular design for walls and ceilings these days is to create a random assortment of blocks or other shapes that create depth to a previously flat surface. We will learn how to create a system like this in grasshopper.
Create and divide the boundary surface into panels
First, we need to define the extents of the wall or ceiling element by creating a surface. From here we will divide the surface into panels.
To do this with native grasshopper components we use the isotrim (SubSrf) component to create a grid of panels from our surface. Isotrim takes a base surface and a domain to calculate the new surface. Rather than constructing a new domain, which will just build another surface at the u and v dimensions within our existing surface, we want to use the divide domain^2 so that we divide the two-dimensional existing surface into equal components. After plugging in the domain to the isotrim component we can see the grid but do not have access to the individual cells so we cannot manipulate them yet. For this, we need to use the Deconstruct Brep (DeBrep) component which will output the faces, edges, and vertices of our new divided surface parts. Before moving on to the extrusion of these faces, we want to make sure we flatten the faces output so we can manipulate the faces individually. Right click on the F output variable and select Flatten. We will dive deeper into this in the extrusion section.
Using the Lunchbox components for easy paneling different panel shapes
Another and much simpler way to create panels from a surface is to use the lunchbox component which can be downloaded from the links below. Not only is it much simpler, but you can also create many different panel shapes such as diamonds, hexagons, and variable rectangles.
Randomly extrude the blocks from a list of specific depths
To create our blocks we will simply extrude the faces by a certain dimension in the direction perpendicular to the plane we are working in. The XZ plane was defined earlier when we created our initial surface so we will want to extrude in the Y direction with a Unit Y vector.
For the factor (value) input into the vector, Grasshopper has a random component which will give us a list of unique random numbers within a domain but this list will include a lot of different decimal numbers which are not easy to build. For example, if we set a domain between 1 to 6 we will get a list of numbers including 2.006, 4.739, 5.713, etc… These numbers are not easy to build to so we will want to round the output in order to get clean integer numbers.
Create a labeled diagram to show which blocks are at what depth
Now that we have our finished block wall we want to provide information to the builder on which blocks are at which depths so it can be constructed. To do this we use the Text Tag component which takes a location and text to display. For the text, we will plug in our list of depths created at the end of the last section. We will place the text at the center of each box so we will use a Polygon Center component to gather the center points of each box. Once we have a pattern that we are satisfied with we can bake the text tag component to see our numbers populate over the geometry and now we have a diagram that can aid in the construction process.
Pieces of this script can be applied to many different projects so I’d recommend saving this in a folder to access later. Also, if you’d like to try to take this project one step further and use a curve attractor to manipulate the depths of the boxes in a more strategic way, check out my tutorial on curve attractors and see if you can apply that information here!
Thanks for reading.