20 March 2017 18:33
Getting the most out of your STL files
Since their introduction in 1987, STL (Stereolithography) files have remained the default format for printing in the field of additive manufacturing. In this tutorial, we’ll look closely at this file format and share a few ways to make more effective use of its capabilities as part of your own additive manufacturing projects.
How they work
STL files are available in both ASCII and binary formats, although in practice, binary representations are more commonly used in additive manufacturing to minimise file sizes. ASCII-formatted files are typically reserved for testing new CAD interfaces.
Models generated as STL files are made up of linked triangles that form an accurate representation of a solid object’s surface. Each triangle is represented on an X, Y and Z axis, representing its corners and perpendiculars, and a normal (i.e. a vector pointing outwards), which determines the inside of the mesh.
Why STL files?
Much of the STL format’s popularity can be attributed to its simplicity and ease of use. STL files are a simple and practical way of communicating design information to a 3D printing platform that most CAD programs are able to generate. Once a design has been finalised in the original CAD program, it is exported as an STL file, which can then be converted into printable information through the use of a slicer program. This makes the file a versatile tool that is compatible with all 3D printers currently in use.
However, the STL format has considerable limitations that must be considered. As additive manufacturing technology has evolved, printing platforms have been able to work with an increasingly wide range of materials, and also incorporate additional processes, such as colour injections. While modern CAD files can convey a wide range of information (including part properties, material types and required colours) STL files are still limited to representing the geometry of a printed object, and so any additional design elements like this will need to be factored in separately. Certain software packages (VisCAM and SolidView, for example) have attempted to remedy this solution by including tools for representing colour in binary STL files, although these will require an additional investment and are not compatible with all STL file readers.
Furthermore, STL files are quite difficult to edit compared to CAD files, which makes it essential that all data has been properly checked and optimised before it is prepared for printing, as we will see later in this tutorial.
Setting the right file resolution
The number of triangles used in the model (i.e. the resolution) determines the level of detail and — in turn — the size of the file. Too low a resolution and the triangles will still be visible after printing, too high and file will likely contain details that cannot actually be printed. The distance between the surface of the original design and the surface of the exported STL file is referred to as the ‘chord height’. The smaller the chord height, the smoother the result, so a chord height of 0.001mm is recommended as a good baseline.
If necessary, it is also possible to increase the file resolution by adjusting the angle tolerance — the limit on the size of angle between normals of adjacent files. This is typically set at 15°, but reducing it will increase the resolution of the outputted STL file.
Successful file conversions
If a model has been designed in a different format, it will need to be converted into STL format to be printable. Bear in mind that STL files are relatively simple compared to many CAD based designs, so more complex information (surface boundaries, for example) may not translate during the file conversion process. This can be overcome by increasing the number of triangles utilised, but doing so will increase the size of the file, so it will be necessary to strike a balance. Alternatively, certain CAM programmes can extrapolate the lost data as part of the printing process. At RP Platform, we have developed a file conversion process that supports varying tessellation levels and helps maintain the quality and consistency of data during the conversion process.
Checking your files before printing
The most important part of preparing any file for printing is checking the file for any data errors before they are output for printing, as the options for editing STL files following output is extremely limited. This should include:
- What level of detail is required for the finished part? The exact level of STL precision required to achieve the desired result will vary depending on the type of material used. A good rule of thumb is to aim for one order of magnitude smaller than the maximum possible precision.
- It is not possible to print surface model CAD files. Make sure your file is a solid model.
- What feature thickness will be required? In general, a minimum thickness of 0.020 will be required for clear results.
- Is the file a watertight solid, free of holes, gaps and overlaps?
- Is the file free of non-manifold or shared edges (i.e. edges in contact with more than one surface)?
- Are all surface normals pointing away from the model?
- Are there any moving parts? If so, the gap between them must be at least 0.5 mm to avoid sticking.
- Will the model actually fit on your 3D printing platform? Check the bounding box before sending a file to print. If it will be necessary to scale down the model, make sure the wall thickness still meets the minimum requirements and that any weight-bearing arms will still be able to support the required load.
It is advisable to utilise specialist software (such as RP Platform) to check and repair STL files as a ‘last line of defence’ before printing, as even the smallest flaws can lead to printing errors. While many platforms incorporate tools for manual checks and repairs, an automated file repair process can eliminate any remaining chances for human error and thus help you avoid costly mistakes. Provided the file has been properly checked beforehand, any necessary repairs can take place automatically, with no visible effect on the finished design.
Know your materials
Finally, although STL files do not contain any information regarding the material the model will be printed in, it pays to factor this in early on in your design and consider whether the material specs will affect the quality of your print. For example, will the level of detail achievable with the chosen material affect your choice of file resolution?
Know your software
The export process for STL files varies between different CAD platforms, so be aware of the differences between platforms if you will be utilising several different ones.