Creating a Surface from Contour Lines using Patch Surface – Example 4.2
Often you will start a project with existing topographical information in the form of contour lines in a CAD program. This will allow you to quickly and easily develop a 3D model in Rhino.
Step One – Prepare your Contour Lines. You can import most CAD drawing formats directly into Rhino although some information will be lost. Don’t worry too much as long as you can find and isolate the contour lines.
The contour lines do not need to be joined as a single line. But they do need to be at the correct vertical elevation or “Z” coordinate. Many CAD files already have this done, in which case you are in luck! otherwise be prepared to spend some time moving all your lines to the appropriate height. Once this is done you can move on to the next step.
Step Two – Extract Points. Your contour lines should look something like the images at the left hand side. The first thing to do is select all of the contour lines at once, being careful to select no geometry that is not elevation information. You might want to turn other layers off for this. Then you use the command in Rhino “Extract Points” Which will give you (depending on your contour line accuracy) thousands of points. Your model will look like the one on the right.
Step Three – Create a Patch Surface. Now select all of these points and use the command “Patch” (you can type this in or use the icon). For patch you will be given some options. The first is U and V. Higher numbers will give you more accuracy but if these numbers are too high (on my computer over 80) your computer will crash. The other think to adjust is stiffness. A higher number here will make the surface less bendable and in our case here less accurate. you can experiment with this but a number around 100 should do the trick. Now Rhino will generate the patch. In my case, I wanted a surface that would fill a square boundary, but the patch bases the surface extent on your points and adds some for good measure. To get a Patch surface that fills the square, I needed to add two points (at the appropriate spot elevation) to the locations indicated. Now my surface is big enough to fill the square.
Step Four – Trim. Your patch surface will be larger than it needs to be, and surface information outside of your points will be inaccurate as it just extrapolates the general direction of the surface at the edges. You will need to trim the edges of your surface down. In this case I am using a square, but the trim line could be a property line for a project site, or it could be the city limits of a town for an urban model, or anything you choose. Note the trim line doesn’t need to be at the same “Z” coordinate of the surface. Once you are ready, type “Trim” or hit the trim button, you will be asked to select first the cutting curve (select it, and then press Enter) and then to select the surface to trim. Click the surface outside the trim boundary and it is trimmed.
Now you have a surface to work with but it doesn’t look very inspiring. The first thing you might want to do is draw new contour lines (back to the start!) as described in Example 4.1. Why go through the trouble? Well this is one way to quickly readjust the contour interval of a drawing, if you want to laser cut a site model, for example. You can also create “contours” in the X or Y direction (or any direction for that matter) which are effectively “site sections”
Another potential use would be to construct a model like this one. This is a photo I took of a model the studio urbam had built for the Metrocable project in Medellin, Colombia. Although It would take tons of work to set up, the advantage of this approach to model making is you could integrate the building masses into the terrain. To get building volumes combined with terrain in grasshopper would take a bit of more advanced know how, slicing through building masses as well as contours and combining these together but its something worth exploring! And the model looks pretty cool as well.