Clone this wiki locally
Making better .stl models
Better .stl by design
Make sure you remove duplicate edges and vertices (select all, hit 'w', select Remove doubles) before exporting the STL.
Recalculate normals with ctrl-n after editing your part.
Check if anything else is wrong by hitting shift-ctrl-alt-m to check if your part is non-manifold.
Fixing broken .stl models
(Note: after making changes to an STL in blender, make sure you exit edit mode and select your part before exporting as STL again. Otherwise you may be re-exporting the original part, even after you've made some changes.)
To edit an STL in blender, you will normally start blender, delete the default cube (hit 'x' and select Delete), import your STL, select it (right-click), and then enter Edit mode by hitting TAB. The following instructions assume you're in edit mode. When you're done, hit TAB again to exit edit mode, and then you can export your new clean STL.
Sometimes a part is upside down, or standing up instead of lying down. Without fixing this, prints come out all wrong. This can be fixed by importing the STL, selecting it (right-click), and hitting 'r' for rotate, then 'x' or 'y' for axis to rotate around, and finally the angle ('90' to lay down a standing part, '180' to flip a part that's upside down), followed by Enter to finish the task. If you screw anything up and haven't hit Enter yet, hit Escape to cancel what you've done so far. Otherwise you can use Undo. (You can of course rotate around the Z axis too, if you want to print a part at a different angle.)
Blender has functionality to detect if a part is non-manifold. In edit mode, hit 'z' to view wireframe mode, to see everything (hit 'z' again to exit wireframe mode). Hit 'a' until nothing is selected, and then hit shift-ctrl-alt-m. This will select any non-manifold edges and vertices. If you are in face select mode, you will get a warning - change to edge or vertex select mode and retry. Read on for some ways to fix some problems if your parts are non-manifold.
Sometimes a face is missing from your part, so there's a hole in your mesh. Select all the edges around the hole (unless they are selected already after hitting shift-ctrl-alt-m), and hit alt-f to fill in the space. This isn't the most common case.
Duplicate vertices and edges can be fixed in blender. In edit mode, hit 'a' until everything is selected, and then hit 'w' and select Remove doubles.
It is good to also do Normals->Recalculate Outside in the mesh menu after removing doubles, because sometimes triangles get flipped to become holes in that operation. To see how things look, hit 'n' to show the context menu, and enable vertex and face normals. Adjust the length for clarity. The hotkey to fix normals: In edit mode, hit 'a' to select all, and hit ctrl-n to recalculate normals.
3D scanned organic parts are often really unclean around the stitched edges, and can have lots of faces crossing each other at the intersections. One possible way to fix this is to delete all the unclean faces, and fill in the holes with alt-f. Then you can enter sculpt mode to clean up the shape, if necessary. This can take some time, depending on the object.