How to rebuild a bad mesh to mesh or polysurface?

Hi all,

Does anyone have a doable solution for rebuilding a mesh that has 7.2 million point?
I have try plugins like RhinoResrf and Mesh2Surface, and they either create a broken mesh, not responding, or shows nothing.

Does anyone has the experience dealing with topography like this size? Plus, the original bad mesh is created from RhinoTerrain with Lidar 1ft contour, and I did go back and check. It was a bad mesh came out from RhinoTerrain.

Can someone help? Thanks.


As i posting this topic, my rhino just crashed from trying to patch from points. (Even though I split 7 millions into portions to process, it still crash.)

I regularly work with meshes having 10M points which I clean up. If you can send me a link to your mesh (probably 1.2GB in size), I can try to clean it up for you and then, if successful, write a script that incorporates the fixes I applied so you can use it in the future. I would need the .obj file for the mesh not points.

My approach to creating surfaces for boat hulls based on meshes with millions of points is to sample the mesh.
Contour the mesh to create a set of polylines through the mesh.
Try Patch using the polylines. If they are too complex then Divide the polylines to obtain points, and use the points as input to Patch.

Hi Terry, thanks for offering the help.

Before I upload the file, do you know how can I save the file so that it does not broken(holes) in obj format?


Uncheck Ngo

Hi David, thanks for posting.

So I think I have try the similar methods to yours. I dont know what kind of size of points is feasible to patch. But when I try this method, my rhino crashed(multiple times).

Here are some supplemental info for my case:

1.The model is a 17569 ft long terrain(I need to fix it before i can scale and etc).
2.It is created from RhinoTerrain through Lidar 1ft contour line.
3.My PC has 32G of ram.
4.I’m running Rhino6

Thanks for the help!


Do you have the Lidar contour lines?

Hi Terry,
This is the link for the obj model. When you open the file, you might notice there iare two small broken gaps in the center of the model. I dont know why, but do let me know if you want the original file.

Thanks for the help.


Yes. do you want me to attach it?

Are you saying that the the mesh cannot be exported to .obj format?

No. that’s how it was look like…
But I just sent you a link of the new obj file.
Thank you for looking into it.

What are the units for the model? I am assuming feet for now. After I loaded it, I see that it has only 3.7M faces and 6.5M faces. Is this what you expect for this version? It has a lot of problems. I will start working on trying to improve it.


Its in Feet. Sorry I forgot to mention that!

I dont know if saving it to obj will change anything of that mesh, but your number matches mines in Rhino.(6475576 faces).


I could not cleanup your mesh. It has holes that I have not been able to fill using Rhino’s Mesh Tools -> Fill Hole function. I ran my cleanup script on it which found many self-intersecting faces which it tried to fix by removing one of the faces in the pairs but this leaves new holes in the mesh. It has 5394 faces with extremely short edges that I do not know how to fix. It has 24 manifold edges (edges where more than 2 faces meet). But when the script removes these it just causes other problems.

I would have to develop new methods to deal with cleaning up this mesh. Perhaps there is someone else that can do this by rebuilding the mesh for which I do not have experience.

My Rhino session did not crash when working on your mesh. I have 128 GB of memory in my computer but this is more than needed since when I looked at the resource monitor it showed the Rhino session never used more than 4 GB of memory. So I think your 32 GB should be enough unless you have many other processes using up most of the memory.

Sorry I could not help you.


That’s weird. I always keep Rhino on only when I working on this model…

Do you know how to adjust the ram or other hardware settings to maximize the performance for Rhino? Also, is there other ways that you would recommend to create the terrain(mesh or surface) with contour line in the most efficient and effective way? for the sake of time I really need this terrain for modeling and CNC milling…

Anyhow, I still want to thank you for trying, regardless the outcome.


I also tried the Delaunay in grasshopper with points. When I bake it it says this is not a valid mesh. And I use repair mesh it still shows as a bad mesh and can not be split or any editing.

Anyone else have ideas please?

Hi @peimingcc!

Do you think you could send me (here or in a PM) a copy of the file the gives you grief? This would help us fine-tuning our tools.



Giulio Piacentino
for Robert McNeel & Associates

Hi Giulio,
This is the link to the model. The topo layer is the mesh terrain generated from RhinoTerrain by using the 1ft contour line.

Do you think there is a way to recreate a mesh or surface from either this bad mesh or the 1ft contour line?

Thanks for the help!


@piac I mention you just in case you didn’t see the reply… Thanks.