Is your 3D model a mess? Make it printable!

Is your 3D model a mess? Make it printable!

Is your 3D model a mess? Make it printable! 840 517 mathgrrl

Also published at Shapeways Magazine
—–

What do you do when your 3D model is broken? I mean really broken, like “can’t even upload it” broken, or “half of my triangles are disappearing” broken? In this post we’ll talk about what to do when your usual mesh-repairing strategies fail and you need to bring out the big guns.

Let’s do this by example. So that we can follow exactly what’s going wrong, we’ll create a bad mesh by modifying an existing 3D model, my Deltoidal Hexecontahedron Catalan Bracelet:

We’re going to turn this into a tealight ring and add some solid faces to the wireframe to create a partially-enclosed look. The screenshot below shows what it looked like when I did this in TopMod; I added the closed triangle faces, and everything seems fine:

Nice! But when we try to upload to Shapeways, we get this error message:

First line of defense: Meshmixer

Meshmixer is a great first tool for modifying 3D meshes; for an in-depth example see our previous article Tutorial Tuesday 50: Using Meshmixer to Make 3D Models Thick Enough to 3D Print. But, in this case, when we open our broken file in Meshmixer to see what’s going wrong, the faces don’t load in. Although Meshmixer knows something is wrong here, its Inspector cannot repair it:

Second line of defense: MeshLab

Another great mesh-manipulation tool is MeshLab; for a primer on making simple mesh fixes with MeshLab, check out our previous article Tutorial Tuesday 5: Quick Fixes With MeshLab. It’s more complicated than Meshmixer, but can often take care of bad geometry like reversed normals and non-manifold faces. However, when we try to open our broken file in MeshLab we get this error:

After opening the file and looking through some of the Cleaning & Repairing filters, we see that there are some non-manifold faces:

The problem lies with where the new faces intersect. When we added those new triangles, we created some bad geometry where the pairs of coincident faces meet.  Alas, although MeshLab can identify these problems, it’s not able to actually fix them; usual MeshLab repair menu options such as “Remove Faces from Nonmanifold Edges” and “Remove T-Vertices by Edge Flip” are unsuccessful here.

The big guns: MakePrintable

If you have a Windows machine, you can try using the professional software Netfabb to repair this model. Netfabb is free for students, but for the rest of us it costs $30, per month. For professionals in industry this is probably reasonable, but for smaller businesses and hobbyists it’s pretty steep.

Luckily, with any platform and for no money at all you can have access to the extremely powerful mesh-repair services at MakePrintable. MakePrintable’s free cloud-based repair service lets you upload models to repair on their servers, and then download up to three repaired models per month. If you need more repairs than that, then for just $10 per month you can upgrade to their Pro service to get access to more features and unlimited downloads. Since Meshmixer and MeshLab can handle lots of simple mesh problems, the three-a-month restriction is not so bad. But does it work? The answer is YES, and in fact in my experience I have NEVER had a model that MakePrintable couldn’t repair. That includes successfully repairing my Tentacle Bowl, which was made from thousands of recursively-generated overlapping spheres that resulted in very broken internal geometry.

Let’s see what MakePrintable can do with our model. MakePrintable is a cloud-based service that works entirely in your browser, so to get started you just go to makeprintable.com:

Opening and repairing models is free in MakePrintable; it’s only the final download that counts against your monthly total. This means that we can upload our file and see if MakePrintable will fix our file without risking anything. When we upload our model, MakePrintable immediately recognizes its 20 non-manifold edges. Along the right sidebar are a number of fancy options for the Pro/Paid version, but for our purposes we can just use the default free settings.

So, can MakePrintable fix this bad geometry? Yes! Note in the image below that the right-hand model has no non-manifold edges anymore, so we should be in the clear. To download the repaired mesh, choose Save/Export, then 3D Model, then your filetype, then save the file to your computer. This action will reduce your three-a-month download count, so be sure you are happy with the repair before downloading.

In this case our initial broken mesh was very simple, and MakePrintable’s repaired mesh was much finer, with many more triangles. We could have controlled that if we were using the Pro/Paid version, but in this case we can reduce the mesh in Meshmixer and then run through mesh styling TopMod to get exactly the blocky-smooth style we want, which looks like this:

Fixed and ready for Shapeways

Our repaired and remeshed model now uploads to Shapeways, and we can order 3D prints of fancy Deltoidal Hexecontahedron Tealight Rings. Here’s what they look like after printing and photographing for our geekhaus store:

This was just a simple example with a handful of faces and edges causing bad geometry; it can of course get much, much worse. Do you have a broken model? Give these tools a try then upload your model again. Let us know how it goes!

 

——————

As an Amazon Associate we earn from qualifying purchases, so if you’ve got something you need to pick up anyway, going to Amazon through this link will help us keep Hacktastic running. Thanks! :)


Leave a Reply

Back to top