Sunday, October 02, 2005

Machining From STL Files-Part 2

Limitations
There is a downside to working with STL files. Perhaps the most obvious is that a faceted model is an approximation of the original surface geometry, which calls its accuracy into question. Practically speaking, however, this issue is relatively minor from the machinist's standpoint. Why? Sooner or later the model will become faceted anyway because all contouring moves in a 3D part program will be composed of linear movements in all but a very few exceptions.
One could argue that there is a doubling effect of laying tool path on an approximated model -- an approximation of an approximation so to speak. But one should also take into account that the facets of a tessellated model can be quite small. It's common practice to set faceting tolerances in the range of 0.001 mm (about 0.00004 inch) for machining purposes, says Mr. Howes. Moreover, the tool path processor can apply some relatively simple logic to more closely adhere to the base geometry. For example, on a convex form, the center of a linear path across a facet will obviously come closer to the base geometry, where on a concave form the edges of the facet will come closer, and the tool path processor can take these factors into account.
A larger issue for most shops will be the size of an STL file. For one thing, it takes a lot of triangles to accurately approximate a 3D form of any complexity. The file also contains a great deal of redundant information because the vertex coordinates of every triangle are stated individually. Since any given vertex will be shared with two or more adjacent triangles, each point will be stated two, three or more times. Also, the surface normal of each triangle is explicitly defined as a vector, which helps improve processing speed for rapid prototyping but mostly just adds unnecessary data for three-axis machining applications.
This large volume of data creates the temptation to attempt to reduce file size by loosening the faceting tolerance; but that's a bad idea if the facets become large enough to be seen in the actual machined surface. The faceting tolerance must be chosen in anticipation of the tightest machining tolerance to be used, says Mr. Howes, even though this means that the initial roughing calculations will be slower than is strictly necessary.
So, STL users will have to get used to large files. There are ways to compress the data to make files somewhat more manageable, and the faster computational speeds do a lot to mitigate the downside aspects of their size. In fact, Delcam contends that tool path calculation performance is still faster overall. But anyone wanting to machine from STL files will need to commit more than a little extra memory to the task.
Another significant issue, particularly if you live on the CAM side of the fence, is that there is little opportunity to edit an STL file once it has been output. The CAM system therefor must rely on the originating CAD system to have produced a good STL representation and to a suitable tolerance. That all depends on the CAD system's ability to consistently output good, closed models and on the CAD operator's knowledge of what tolerances manufacturing will require as well as an inclination to make sure all the necessary geometry is created in the first placenone of which is a given.
There are ways to correct moderately defective STL files. Delcam, for instance, has a feature called TriFIX that can sort out the connectivity of the facets and fill in small gaps, remove duplicate nodes, correct overlapping triangles and so on. Moreover, intelligence can be built into the CAM processor that makes it more forgiving of imperfect models. For example, when Delcam's PowerMILL CAM system is creating tool path from an STL model, it will automatically pass over a hole in the geometry smaller than the diameter of the selected tool.
But no patch kit can compensate for a faceting tolerance too loosely set or for a badly flawed file that's missing fillets, radii, or other important geometry. Those cases will demand a return to the original surface or solid model.
And finally, there is some useful information that will be lost when surfaces are converted to a faceted model. Surface boundaries, for example, will be gone. In many cases, these boundaries can be recreated with CAM functionality, but not always. Some flow cuts that follow individual surfaces may be sacrificed as well. Functions such pencil milling (where a tool is automatically driven along sharp surface intersections) are still possible, however, by using algorithms that analyze the faceted model, looking for abrupt changes in the "surface" normals.
More Applications
These limitations are going to relegate the STL file to a niche role well into the foreseeable future. But that role is likely to grow larger with time. Besides Stereo-lithography, the STL format has already become the de facto standard for other rapid prototyping processes such as selective laser sintering, laminated object manufacturing, and fused deposition modeling. Simple, faceted solid models also have other obvious applications in casting and molding process simulation, stress and thermal analysis, and other engineering functions.
Machining applications are likely to become more prevalent as well. But whether shops choose to machine directly from faceted solid models or not, they had best be aware of the STL format, since they'll likely be seeing more of those files in the future.

No comments: