Terrain Modeling

by Tuğrul Yazar | July 19, 2023 18:00

Here is a short tutorial on getting help from Grasshopper[1] in physical terrain modeling. It is a classical architectural terrain modeling process. Let’s see how Grasshopper can help us with this.

Part 1: Terrain modeling for Laser cutter

The terrain model entered in the Brep data store in this application is a closed/solid model. For now, you can also use ready-made components such as Cone or Sphere (Sph) to quickly produce a solid model. In this application, after we obtained the section curves with Contour, we created the projections of these sections on the ground plane with the help of the Project component. We recommend that you examine the data tree in the output of the Project component. Because with this data tree, we can group curves in each section plane easily. After the projections are grouped with the help of the Group component, the dimensions of each group are determined by the Bounding Box (BBox) component.

terrain modeling

We converted frames limiting the sections into rectangles with the help of a Rectangle (Rec). Then, we obtained the dimensions of the rectangles numerically with the help of Deconstruct Rectangle (DRec). The size of the rectangles in the X direction gives information about how far each of our cut sheets is to be brought side by side. The Deconstruct Rectangle (DRec) component has generated data of the data range (domain) type. To quickly find out what width this range corresponds to in terms of distance, we connect the range data with the Number (Num) parameter and convert the range to a number. This is again GH’s pleasant surprise.

Preparing the Laser cut Sheets

To figure out how far to offset each sheet, we finally resort to the Mass Addition (MA) component, which adds up these widths. We’re in luck because this component not only gives the sum of a large number of numbers but also the subtotals we want. Thanks to this output, we can obtain all intermediate results in a list structure. Such as the addition of one and two index numbers, one, two, and three index numbers. We shift our sections with the help of this list obtained from the Pr output. As a fine adjustment, a little Offset has been added so that rectangular shapes can be cut easily. In addition, an addition (Addition (A+B)) has been made to the dimensions of the rectangle in order to keep the sheets slightly apart from each other.

Part 2: More Advanced Version

In this second application, we complete the model that we tried before. We can examine this application in three parts. In the first part, we transform the points whose coordinates come from the separate lists to the surface with Patch and complete the missing surfaces in order to turn this surface into a solid object. There are two ways to do this. First, after extruding our land surface downwards, it can be to delete the parts below from the Z=0 plane. We can use boolean operations for this. Another method is in the form of completing and combining the missing surfaces, the projection of our land surface to the ground plane. We used a Ruled Surface (RuleSrf) to make the four surfaces on the edges. Instead of the A and B curves, we entered the lower and upper edges of the surfaces.

terrain modeling

Although we connected our surfaces to an input that requested curves, the edges of the surfaces had no error. Finally, we joined all our surfaces with the Brep Join (Join) component. You can examine the output of Brep Join (Join) B to see if the result is really a solid object. The closed brep statement will show that everything is fine.

Final Touches for the Terrain Modeling

[2]

In the next part of the application, we took the contour curves and grouped them. In the third part, we made these curves ready for cutting using the components we learned earlier. Again, we created vectors using the Move component. In addition, we numbered the sections. Trying to keep these numbers always on the plates will require a separate effort. We recommend that you try it.

You can rebuild the definitions by looking at the diagrams and explanations above. However, if you want to support this website by downloading my Grasshopper files; would you consider being my Patreon? Here is the link to my Patreon page[3] including the working Grasshopper files for the Terrain Modeling and more. 

Endnotes:
  1. Grasshopper: https://www.designcoding.net/category/tools-and-languages/grasshopper/
  2. [Image]: https://www.designcoding.net/decoder/wp-content/uploads/2023/07/2023_07-19-terrain-2-def.jpg
  3. Here is the link to my Patreon page: https://www.patreon.com/posts/terrain-modeling-86339094?utm_medium=clipboard_copy&utm_source=copyLink&utm_campaign=postshare_creator&utm_content=join_link

Source URL: https://www.designcoding.net/terrain-modeling/