Problem with level curves patch and topography


I’ve used ArcMap with a DEM (Digital Elevation Model) to produce contour lines from a region of 10km x 10km approx. I have performed a smooth line to have nice smooth contour lines that I’ve imported into Rhino for further modeling. The model is scaled down in Rhino at 1:25 000 to have a model of less than 18 inches square. The goal is to use this model to make a CNC milled topography.

I used the Patch tool with points extracted from curves to build the surface but I can’t get it to work. I’ve tested many parameters in patch command but I get random results every time.

It looks like the image below. Can someone point me in the right direction to solve this ?
I can upload the file if someone want to look at it.

Thanks !


Hi Pier-Alex- try MeshPatch - see if that gets you something useful - it will be a mesh of course.



I appreciate that you want to learn do this from contour lines in Rhino.

However, its possible to go right from a DEM to a triangulated model without this step. If the CNC cut part is the end product (ie not using a mold to produce many of these) there are machine and software combinations that will do this without a nurbs model.


Thanks for you response. The DEM used was quit pixelated at this resolution. That’s why I used a smooth curve tool to generate the topo. Also, the technician at the lab is more confortable with a rhino surface than a DEM file or triangulated model.


Is it possible the Mesh Patch tool cannot work with open curves ?


It should work - are you seeing it fail? Can you post your file, or send to


I suspect a problem with normals, the hierarchy of the curves or the curves themselves. Also, When I select all the curve and turn Edit point ON, only a small amount of them show their points.

That is an odd result from MeshPatch… @tim, does that look right to you, MeshPatch from the dense polylines in Pier’s file above?


Create curves along on the four edges using CurveThroughPt though the ends of the contours. Smooth and simplify the edge curves as desired for the edges of the final surface. Use EdgeSrf to create a surface using the four edge curves. Then use Patch with the surface previously created as the starting surface for patch with Preserve Edges selected, and the points from the contours as input to Patch.

I’d use the command Heightfield on the DEM bitmap and then Scale1D to the proper elevations. You might need to use levels on the bitmap first to get a good grayscale range, and experiment with the sample points option values. You’ll get a better result as heightfield can use a much higher sample than patch.

Thanks everyone !

It’s now working. First, @gregb, I tried your method and it worked like a charm, but… I don’t like the imprecision of me scaling the entire site to have the right height. And also, when you insert the DEM as a tiff, I didn’t find a way to have it at the right scale. You have to insert it as an image and it’s not so precise. But it is a very fast method.

Then I found the exact problem… When I insert my layers from GIS, they are placed at the right coordinate in Rhino so it was very far from Origin point 0,0,0. I was trying to change the cplane without results. Then, I moved the entire drawing at 0,0,0.

@davidcockey, I used a part of your method to create an edge around the end points of level curves and I used patch on this curve to generate the starting surface. I don’t know if it was necessary but I’ve been able to generate my terrain from points extracted from level curves and it took less than 30seconds to generate, on a not so fast laptop! For this I wrote a small Gasshopper script (see image below).

Lesson learnt, don’t try to patch to far from origin !



Right- good catch, I did not notice that. MeshPatch also works a lot better at the origin.


You’re welcome.

You could just scale the surface to the size of your DEM tile.

You could also buy a license of Rhino…