What is a solid in Rhino? How do I get a good watertight .stl file from my Rhino objects?
There has been quite a lot of good help offered in the production of STL files. The most important is simply this:
The Rhino object must be a closed solid before a valid STL file can be generated.
Mitch says: The official terminology for a closed solid in Rhino is a closed polysurface.
A solid has no naked edges. That's a concise definition. Another way to understand a solid is to see it as a balloon. If there is even a pin prick size hole, it will deflate. Thus it is not air/watertight, not volumetric. A solid is a volume. A solid is its outer surfaces, once they are completely joined.
JB says: Use the ShowEdges command with the display set to “naked edges” to find the unjoined edges.
The term “solids” seems to confuse a lot of people and there are often discussions about it, in particular with relation to getting watertight solids for rapid prototyping. Some people worry that if you slice a solid in Rhino, you do not get surface planes or salami slices, but just an outer boundary curve at each slice. This is normal. The rapid prototyping software/machine fills these slices in for you. Also remember, that it is not the Rhino NURBS object that is being sliced by the rapid prototyping process, but a mesh in the form of your object, via an STL file. And guess what? Meshes are no more solid than Rhino NURBS objects… When you slice them, you still get just boundary curves.
An understanding of absolute tolerance is required so that valid solids are generated. A good rule to follow is change the absolute tolerance from the default value of .01 to .0001 or .001. I start out all my jewelry size projects at .0001, then I have room to loosen the tolerance if necessary.
JB says: Another rule is have your tolerance one order of magnitude tighter than the accuracy you can hold through your manufacturing process, or one order of magnitude smaller than your smallest modeled detail. For jewelers like Jeffrey that work with very fine detail on relatively small parts, 0.001 millimeters or 0.0001 inches should work well.
Mitch says: If you start with a tighter tolerance than necessary, you may loosen it a bit at the end to facilitate joining difficult spots. Be sure to read the Wiki page on tolerances.
Using snaps and object snaps is extremely helpful, possibly essential to get edges to join up.
Analyzing a Rhino object is an important part of the process. I find that the quickest way to check whether an object is a solid (closed polysurface) is to click on the details button in Properties. I leave this open and docked on the right side of the screen, with the Layers panel docked right beneath it.
JB says: Or you can use the What command if you don't usually have the Properties window open.
Post the objects you have trouble joining to the Rhino Newsgroup. You will get it if you keep trying. Just look for the naked edges and zoom way in on them. You will see what is not joined. Experience and practice bring understanding. It's basic stuff. Just keep modeling with an eye to producing solids from the beginning, and not as an afterthought.
Once you have a valid solid, export it as an STL file. If you use the default 0.01 for the Maximum Distance, Edge to Surface, the stl file will be just fine for any machine currently out there. You can test your STL by reading it back into Rhino and doing ShowEdges with the Naked Edges option. Creating a valid solid to export from is the tricky part. That's what you need to be working on. There's no mystery here for producing stl files. They are nothing more than a mesh made up of triangles.
Mitch says: While in principle STL Export works, in practice sometimes Rhino has trouble meshing objects. One good way to check the results of your .stl export is to open the STL file you just created in a new instance of Rhino and look at it with the Perspective viewport set to FlatShade. (There is a toolbar button for this, or you can type the command, or you can select it from the viewport title right click menu.) If the model looks OK with FlatShade on - no obvious holes or anomalies - you're probably good to go. Also, see the Wiki page on meshing.
Keep posting and asking questions, and work through the answers given! Understanding how to model with Rhino is the key, and also a thorough understanding of NURBS in general. I'm sorry, but it takes a bit of work, maybe more than a little bit to become a fluent CAD modeler. No condescension is intended. I went through these steps myself (study, practice, study, practice, etc.), and it finally came together for me.
If anything here doesn't make sense, post to the newsgroup about it!
(Adapted some by John Brock and Mitch Heynick and Gordon Adams – Hope you don't mind, Jeffrey!)
Join parts and check your work as you model. Use the ShowEdges>Naked Edges command. If you catch some you need to go back and figure out why they happened and correct the problem. It's a lot easier to correct as you go rather than try to fix things after you're all done modeling. Some late corrections may cost you hours of work at the end when they would have only been a few minutes to fix earlier on.
Watch out for the way you trim surfaces. Rhino will trim surfaces with curves according to the active CPlane, and those curves don’t necessarily have to lie on the surface. The trim edge may then not be exactly where you think it is and this may not show up in an orthographic view. It’s best to trim surfaces with the other surfaces you're joining them to if it’s possible. Sometimes this may not work, and if you are forced to trim with curves, make sure the surfaces do join up afterward.
Rebuilding surfaces. This may cause the edges to change enough to be too far away to join, so be very careful here.
The act of joining itself may cause naked edges. Paradoxical but true. At certain areas where there are complex multisurface joins (usually done by window selecting many surfaces and running Join), Rhino may occasionally produce naked edges where none should be. In this case, you need to undo your join and go in and see what happens if you try to join one by one instead of all at once. In stubborn cases, you may need to slightly adjust one or more of the surfaces to be joined.
This command allows you to force edges together that are too far apart to join normally. Use this command sparingly and with discretion. It does not make your model more accurate and it does not correct your geometry. It simply allows Rhino to override the absolute tolerances at that point and create an average edge somewhere between the two real edges. In doing so, the meshing commands can bridge the gap to create a watertight mesh object, and your .stl service bureau might be happier. If it is being exported as a surface or solid format for downstream engineering, however, it may all come apart later, so JoinEdge is best avoided in these cases.
This command will reset the edges of surfaces to (more or less) the way they were originally before joining. This may be important, as when edges are forced out of alignment by JoinEdge or something similar, they can be restored.
If you get this, you have a problem. Usually naked edges are in pairs. You can often join the pairs with JoinEdge (even though the joins are thus out of tolerance, the seam will be closed). But if you have only one naked edge, there is nothing to join to. In this case, there's a bit of work ahead of you. You will often need to unjoin all the edges around the problem area, RebuildEdges on all, and see what's misaligned and correct it. Often you need to zoom way in to see what's going on.
Make sure you've got a valid object. When you go in and start editing edges, you can often cause the object to go invalid (even though it’s closed.) This may cause problems with meshing as well as more modeling down the line. My suggestion is to turn on CheckNewObjects in Rhino and leave it on. That way, if you do create an invalid object by editing, you'll know it immediately.
It is often possible and much quicker, to close up a mesh object using the mesh repair tools in the Mesh menu(V4) or Bonus menu(V3) than it is to get rid of pesky nakeds in a surface object. If your goal is rapid prototyping output via an STL or SLC file, try making a mesh object (Mesh command see also MeshFAQ) in Rhino and using MatchMeshEdge, FillMeshHoles and some of the other mesh repair tools to seal up the mesh before exporting it to STL. See Help on these commands for more about what they do and how to use the options. ShowEdges will tell you if the mesh is closed just as with surfaces.