So perhaps you've recently completed your engineering masterpiece, slaved over its elegant design for weeks or months, transformed an idea into a robust 3D model using the best of what your CAD software has to offer. You've massaged every surface, blended every corner, tweaked every draft to perfection. You've got the touch, you've got the power. And now, at the end of all things, you're ready to 3D print the crap out of it. In your moment of triumph, as the rock anthem crescendos, you search in futility for that shiny print button. But instead, you find out you have to cram your masterpiece through a one-way pipe into a predominantly binary file format that's been awesomely radical since 1987.
Feeling betrayed, you angrily shake your fist at the screen with the same level of disgust as the day you found out Stan Bush tried to channel Linkin Park resulting in something most heinous. But you've stumbled on a fundamental challenge, one that's as old as 3D printing itself. Since most 3D printing techniques involve building a part through successive stacked layers of material, your finely crafted 3D model has to be appropriately sectioned. That's where the trouble starts. The Non-Uniform Rational B-Splines (NURBS), Bezier curves, and analytical geometry that makes continuous and controllable CAD geometry possible is impractically complex for defining print sections. The solution requires simplifying the necessary geometry for printing, and that's where tessellation comes into the fray.
More than meets the eye
Tessellation decimates your surfaces into simpler shapes that are easier to process, taking what otherwise would be smooth curves and approximating them with a finite number of planar triangles. Your graphics card uses tessellation in a similar fashion on the fly to maintain graphical display performance of your modeling surfaces. Depending on your CAD system, if you adjust zoom or resolution settings you can sometimes catch variable tessellation in action.
But why triangles? While the technique is technically valid with any type of polyhedron, triangles are more computationally practical than say, a mesh of tetrakaidecagons. Or evil Decepitcons even. If you look at similar techniques in FEA for example, quad elements are common, holding an advantage in representing stress/strain over triangular elements but at computational cost (that's an article for another time if you get excited by that kind of thing). The 3D printing world, however, definitely runs on triangles. So a simple annulus (two concentric circles) once tessellated looks something like the picture below:
My old friend, STL
So back in the 80s, way before Michael Bay started ruining transforming robots for children everywhere, someone had to come up with a file format to store a collection of planar triangles. Hence, STL was born. Incidentally, that's why STL's nickname is often referred to as the Standard Tessellation Language (not to be confused with its proper name derived from the original STereo Lithography process). And we've been stuck with it ever since. While new more forward-looking formats are in the process of adoption, STL still seems to be everywhere.
Dare to keep all your dreams alive
Unfortunately, due to the age of the STL format, moving your geometry to STL is essentially a one-way trip, and an often problematic one at that. Some things to keep in mind to ease the pain:
- Choose the right mesh tolerances: Your tessellation mesh needs to be fine enough to print your part within desired tolerance but coarse enough that it will process and print reasonably well. You might imagine you should just go big or go home, but you also don't want your printer to suffer a coronary while crunching on 7 billion facets. It's an engineering tradeoff between speed and accuracy. Keep in mind the size of your smallest feature.
- Check for enclosed shells: If your model is not fully enclosed, the tessellation process could end up with a build-ruining hole, and even Optimus Prime may not be able to save you. While this seems a rather obvious thing, sometimes a modeling error in your CAD package may be fine on the CAD end, but ends up manifesting as degenerate triangles, gaps, or other such nonsense in the tessellated mesh.
- Consider some validation tools: If you don't already have some tools on the CAD end or the printer end, consider investing in software tools to help root out the above problems. Because sometimes staring at the file a really long time is just not enough.
So until that easy print button shows up one day, you know the streets. You got the heart, you got the motion.