In order to 3D print a digital model the model must be completely closed (watertight). This means that the object(s) cannot have any holes or gaps and that all the surfaces must close with others.
Note: The best way to ensure that you have a watertight object is to build your model in Rhino (or any 3D modeling software) with extreme care from the beginning.
Tips for Modeling with Care:
1. Use SNAPS and OBJECT SNAPS while modeling so that you can line up objects according to their endpoints or other geometrical identifiers.
2. Join curves and surfaces as you build them. If you make a mistake and accidentally join something that you don’t want joined, you can always explode it later. Keeping things joined as you work will help you know that your objects are truly coincident and closed. The Join command will not work if things are not lined up properly so this is a good check.
3. When extruding, always select the Cap option within the options for ExtrudeCrv or ExtrudeSrf. The Cap option will always produce a closed polysurface unless the input curve or input surface is not planar.
4. Be careful when trimming or splitting objects in Rhino. If you trim or split a previously closed polysurface you will effectively cut your closed polysurface input into two open polysurfaces. If you use the BooleanSplit instead of a regular split you will not have this problem. The Trim and Split commands should be exclusively used with curves, surfaces and open polysurfaces only. Note: the Boolean operations will only work on closed polysurfaces so if the BooleanSplit does not work this is a good check that your object is not closed.
5. Make sure the units in the Rhino file is set to INCHES.
A stereolithography file (.stl) requires the output to be a mesh. Since Rhino traditionally models in NURBS (Non-Uniform Rational B-Splines) your model is most likely a NURBS surface. SelMesh will select any meshes in your model. If nothing is selected, you have a NURBS surface.
SelClosedPolysrf will select only closed polysurfaces (solids). A classic example of a closed polysurface is a cube. A cube is made up of six surface sides whose edge curves are all coincident with one another and whose surfaces have been joined together. An exploded cube will yield six surfaces. If any of the surface sides of your object are not meeting coincidentally at their edges the surfaces will not be able to be joined together. SelClosedPolysrf will confirm whether or not your object(s) are closed polysurfaces. Only closed polysurfaces can be exported without error to 3D printing .stl files. You can test whether or not you have geometry which will export properly by using the Sel commands: SelSrf, SelOpenPolysrf, SelClosedPolysrf. If any objects are selected when you use the first two commands, those objects will export with errors.
In order to export properly to .stl you can either mesh your NURBS surface within the Rhino interface by using the Mesh command or you can export a NURBS object directly and mesh it within the STL Mesh Export Options dialog box. If there is a problem with your object(s) not being watertight, it is usually easier to identify and solve export problems in Rhino with the NURBS object.
A mesh that is created from a NURBS Rhino object by using the Mesh command is a mathematical approximation of the original NURBS object. The mesh representation of a NURBS object is a facetted approximation of the original. The more triangles that are used, the more accurately they will approximate the curvature of the input object.
The tolerance of the new mesh dictates how many triangles will be used and how close the approximation is to the original object. Curved surfaces require a smaller tolerance (so that the mesh triangulation is smaller and more closely approximates the input surface) than planar surfaces.
The key for meshing objects is to find a balance between the required tolerance to accurately represent a NURBS object and a file size that will not crash a 3D printer. It is not a sufficient strategy to just mesh all objects with the highest mesh tolerance because the file size will increase dramatically.
A mesh created from a NURBS object is editable and changeable just like a NURBS object. You can perform several checks on non-watertight meshed objects.
Exporting to .stl
To export your object(s) to a steroelithography (.stl) file format, select your object(s) and go to File, Export Selected. You can also use the Export command. In the Save as type option drop down menu, select .stl as the file type.
If your object(s) are NURBS polysurfaces the first dialog box that comes up will ask you for tolerance input regarding the meshing of your NURBS objects. The number you input for the meshing tolerance will determine the number of mesh triangles and how closely the mesh will approximate your surface.
To have more detailed control of your export meshing options, click the Detailed Controls button. A Polygon Mesh Detailed Options dialog box will appear. Here you can set the mesh density, maximum angle, maximum aspect ratio, minimum edge length, maximum edge length, maximum distance edge to surface and the minimum initial grid quads. A good rule of thumb for inputs here is to leave them all blank but the maximum distance edge to surface. The maximum distance edge to surface should be less than half of the 3D printer’s resolution. Click OK.
The STL Export Options dialog box will appear. Set the file type as Binary. If you leave the Export open objects box checked then the Export command will export all objects regardless of whether they have open edges, gaps or holes. This is not ideal. Uncheck this option so that you are unable to export objects that will not 3D print without error. Click OK.
If your object(s) are meshes (or if you have converted your original NURBS polysurfaces to meshes using the Mesh command) you will be immediately presented with the STL Export Options dialog box.
If there is a problem with your object(s), a window will pop up that indicates that your object(s) are not adequate for 3D printing. Take this warning seriously. If you decide to Export Anyway you risk 3D printing objects that will have printing errors and potentially waste a lot of 3D printing material and money.
Click Cancel and fix your modeling errors within Rhino.
Mitigating Export Errors
Common sources of error:
- Surfaces not being joined together
- Double or overlapped surfaces
- Holes in a polysurface
- Rebuilt edges of surfaces which look like they are coincident but are not identical
Fixing your NURBS objects:
The FlatShade command will create a consistent render view so that all the surfaces will appear with flat shading. If there are any problems with your objects, they will appear in the FlatShade view setting as anomalies. Anything that looks even remotely weird should be investigated as the perpetrator for errors in your .stl export.
This command will communicate how many edges an object has and whether any of those edges are unjoined or naked edges. Naked edges indicate holes or gaps in the model and that the model is not watertight. The command will display a dialog box for showing all edges of an input object or all the naked edges. If any of the edges are shown to be naked, you need to fix them so that this command reveals no naked edges.
The Join command will connect surfaces that with coincident (read: identical) edges. An exploded cube, or six separate surface sides is not a closed polysurface until the six sides are joined together. The command prompt line should read “6 surfaces or polysurfaces joined into one closed polysurface” and confirm that the newly joined object is a closed polysurface. You can also confirm this by using SelClosedPolysrf. If the object is not selected with you use SelClosedPolysrf, then it is going to have export errors.
The Cap command will create closed polysurfaces from the input of a surface without ends. The command will create planar surfaces at the ends of the input surface and simultaneously join all the surfaces together into a closed polysurface.
The ExtrudeCrv and ExtrudeSrf commands have a built in Cap option. Whenever you are extruding curves or surfaces, it is a good idea to have the Cap=yes option enabled so that the geometry created is closed. The Cap option will not be effective if the input curve or surface is not planar.
The Loft command can be utilized to connect holes between surfaces by creating a surface that lofts between the disconnected edges of two surfaces. When using Loft, you can select two edges as the input.
This command allows you to force a join between two edges that are not coincident. While this may seem like a good cure-all command, it should only be used when no other options will work. Forcing a join can often lead to modeling problems later.
If there is more than one object that you want to export, BooleanUnion your objects together so that they are joined as one closed polysurface. This is not required for export but it can be helpful.
Note: attempting a BooleanUnion with your objects will be a hint as to whether your objects are sufficiently modeled to export without 3D printer error. The Boolean commands only work with closed polysurfaces. If any or all of your objects are not closed polysurfaces, you will not be able to BooleanUnion them together and the result will be a failed BooleanUnion.
Fixing your meshed objects:
The CheckMesh command will tell you if you have a good or a bad mesh. This is essentially the same check as to whether or not you have a watertight object. A return of a bad mesh means something needs to be checked and repaired.
If you type 180 for the angle tolerance you will force a merging of coincident triangle points.
The Dir command will display the normals of an object. In order to export without error all the normals of a mesh need to be facing the same direction (out).
This command will unify the direction of all the normal vectors from each triangulated face.
ShowEdgesOff when you are finished.
Type this command to ensure that there are no naked or unjoined edges in your mesh. If no naked edges exist, then the model is ready to be exported to a .stl file format.