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 terminology of “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 have been worried 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. Remember also, 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 having 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.
The use of 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. The quickest way I find to check an object for whether it is a solid (closed polysurface) or not, is to click on the details button in Properties, which I leave 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 very basic stuff. Just keep modeling with an eye to producing solids from the beginning, and not as an after thought.
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 buton 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. See also 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 my self (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. On the other hand, 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, one or more of the surfaces to be joined might need to be adjusted slightly.
This command allows you to “force” edges together that are too far apart to be joined normally. A command to be used sparingly and with discretion. It does not make your model more accurate, 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 will 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 the 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.