Skip to navigation

How to Create High Quality STL Files for 3D Prints

Have you ever 3D printed a part that had flat spots or faceted surfaces where smooth curves were supposed to be? Or maybe you’ve just seen a picture of a 3D print that looked like it belonged in some low-resolution CGI from the 90’s? You are not alone, and it’s not your 3D printer’s fault — the culprit is likely a lack of resolution in the STL file that was used to create the part!


We’ve been getting a lot of questions from new users about these types of faceted surface characteristics on their printed parts, so in the interest of helping everyone get the best possible prints from their 3D printer, we’ve put together this guide to creating high quality STLs that will make for great 3D printed parts.


In the guide we will cover the following aspects of STL files and 3D Printing:


  1. 1. What is an STL File?
  2. 2. Why STL Files Matter
  3. 3. Identifying a Suboptimal STL
  4. 4. Defining STL Parameters
  5. 5. Chordal Tolerance/Chordal Deviation
  6. 6. Angular Tolerance/Angular Deviation/Normal Deviation
  7. 7. Mesh Quality vs File Size: Our Recommendations
  8. 8. STL Export Settings by Major CAD Software

The TL;DR: Exporting CAD geometry with the right STL resolution will result in 3D printed parts with the highest dimensional accuracy and surface finish, without slowing down the slicing process.


Our recommendation is to start by exporting STLs with the following parameters:


  • - In binary STL format (smaller file size than ASCII)
  • - Chordal tolerance/deviation of 0.1 mm [0.004 in]
  • - Angular tolerance/deviation of 1 deg
  • - [Optional] Minimum triangle side length set to 0.1 mm [0.004 in]

If the resulting file size is greater than 20 MB, we strongly recommend reducing the file size by increasing the values of the chordal and angular tolerance until the STL file size has been reduced to less than 20 MB, as the large file size can significantly slow down the computations involved in preparing the STL for 3D printing. If your model still contains excessive flat spots at these settings, you can try decreasing the values of the chordal and angular tolerance, with the strong recommendation of continuing to keep the file size below 20 MB.

This author is also guilty of producing STL files with overly-coarse resolution — during the run-up to our launch of H13 tool steel on the Metal X system in late 2018, I exported an STL of this nozzle in a rush and only realized (much too late) after sintering that I’d produced a low-resolution file with the flat, faceted surfaces you can see on the lower two-thirds of the part. This lower region was modeled as completely smooth curved surface, and the printer was well-maintained — the deviations from the as-designed model are solely due to non-ideal STL export settings.

What is a STL File?


As the original file type created for stereolithography 3D printing in the late 1980’s (STL comes from STereoLithography), the STL file format is effectively the 3D printing industry standard for importing 3D model files into a slicing program like Markforged’s Eiger software, in preparation for actually 3D printing the model. If you’ve ever used a 3D printer, or designed something to be 3D printed, there’s an almost certainty that you’ve encountered an STL file before — but did you know that not all STLs are equal? In fact, it’s entirely possible to design a 3D model that meets your functional requirements and then generate an STL file from that model that will produce out-of-spec parts.


STL files simply describe a set of triangles that (usually) make up a mesh which approximates the continuous surfaces of a 3D model. To be more precise, an STL file contains a list of three dimensional coordinates, grouped into sets of three along with a normal vector — each of these sets of three coordinates makes up the vertices (corner points) of a triangle and the vector is normal, or perpendicular, to the plane which is described by the three points of the triangle.

Each triangle in an STL file is represented by a set of three vertex points and a normal vector, as seen in this image. An STL file can contain hundreds of thousands to millions of triangles or more, and will grow in file size proportional to the triangle count.

In an ASCII (text-based) STL file, each triangle is represented in the following format, where the normal vector n is represented by (ni
nj nk
) and each vertex v has three dimensional coordinates (vx vy vz):


facet normal ni nj nk

 outer loop

 vertex v1x v1y v1z

 vertex v2x v2y v2z

 vertex v3x v3y v3z

 endloop

endfacet


Together, all of the triangles (it’s common to have millions of them) form a mesh that can describe three-dimensional geometry, and can then be imported into slicing software, like Markforged’s Eiger software platform, in preparation to be 3D printed.

An STL file loaded into Markforged’s Eiger software, displayed as a three-dimensional solid. Note that this STL was intentionally generated with low triangle resolution, which is why large facets are clearly visible on the model.

It’s important to note that STLs intended for 3D printing should contain a well-formed mesh or meshes that fully enclose the geometry that you wish to create, with each triangle edge connected to exactly two faces (this is sometimes known as a manifold STL, or one with no gaps).


However, an STL file is simply a list of coordinates and vectors and there is no requirement in the STL file specification for such a manifold condition. STL files, especially ones created directly from 3D scanners, can often contain non-manifold geometry or incomplete surfaces that may be difficult or impossible to 3D print correctly, and may cause errors during slicing.


In general, it’s best to export your STLs from mainstream CAD software with known-good STL export capabilities — pretty much all modern commercial engineering CAD software and the more well-known open source or hobbyist packages fall into this category. A quick online search for your CAD software and “STL export options” will usually point you in the right direction.


STL 3D Printing: Why It Matters


That last section was a bit more geometry than you probably care about — what’s important to this discussion however, is the mesh created by all these triangles. Since a triangle is a flat, 2D shape, the collection of triangles in an STL file can only perfectly replicate a 3D model which is only composed of flat surfaces, such as a cube, a polygon, or really any geometry without curved surfaces, assuming that the triangles in the mesh can be smaller than the smallest feature in the model. We’ll discuss that assumption later on when we talk about STL export settings in CAD.


Many engineering parts have at least some curved surfaces however, whether those are holes, fillets, radiuses, revolves or more complex curves and organic geometries. These curved (non-planar) features and surfaces will be replicated by a mesh of triangles and so they can only be approximated by an STL file with varying levels of precision, based on the STL export settings.

A line drawing of two halves of a sphere saved at different STL resolutions. The left side of the sphere is saved at a lower resolution, while the right side is saved at a higher resolution. Look closely and notice how the outline of the sphere on the right side much more closely approximates a smooth curve than on the left side — this is key to producing 3D prints with smooth, non-faceted surfaces.

Do I Need to Update my STL Files?


If you are satisfied with the quality of your 3D prints, and the speed at which their respective STL files are processed in Eiger, then congratulations — there’s no need to change something that’s working well! However, if you’re having issues, there are two main challenges that this article can help with, and they result from STL files that have been generated with export resolution settings that are either too low or too high. The defining characteristics of low resolution STLs are 3D prints with flat spots in regions that should have smoothly curved faces. With excessively-high resolution STL files you’ll produce great looking 3D printed parts, but the large file sizes will lead to long slice times in Markforged’s Eiger software, and may cause the user interface to lag when adjusting the part view in the most extreme cases.


One of the underlying reasons that the STL format is so widespread is its simplicity, which in turn has made it easy for a broad array of engineering and design software to support, edit, and generate STL files from other 3D model formats, which can then be printed on nearly every 3D printer out there. Unfortunately, one of the main downsides of STLs is also their simplicity — they don’t contain any information about the unit system (millimeters, inches, feet, etc.) they were designed in and it’s not really possible to determine the resolution of an STL file by itself and how accurately it represents the original model it was created from.


The most common issue our users run into are STL files that are too coarse, and were generated without sufficient resolution. The most prominent indicator of this is flat spots and faceted regions of parts that were designed with smooth curves, like in the following image of a nozzle.

CAD geometry for the nozzle (left) showing a smoothly curved nozzle surface and the resulting 3D printed part (right) from an STL file generated from the CAD with very low-resolution. Note the flat, segmented facets on the printed nozzle surface that are artifacts of the low STL resolution.

You can also easily identify this low-resolution condition using built-in tools in Markforged’s Eiger software platform. When you move your mouse over the part model in the software, Eiger highlights the face underneath your cursor in blue, as well as all faces parallel to it (and within a small angular tolerance of parallel). If you can see clear facets and flat spots in your model when highlighting faces with your mouse, you probably need to increase the resolution of your STL file. If the highlighted faces look ‘fuzzy’, with a relatively smooth color gradient, the STL resolution is likely sufficient for 3D printing purposes.

Low-resolution STL files (left) will highlight distinct flat faces on curved part regions when the mouse moves over them, whereas with higher-resolution STL files the highlighted faces will display a more fuzzy color gradient.

On the other end of things, STL files with overly-high resolution can be too large for Eiger to efficiently handle, and can slow down slicing operations. There’s no real limit (other than maybe available storage space on your computer) on how fine an STL can be, and it’s completely possible to create a triangular mesh that has triangle side lengths on the order of nanometers or smaller (for reference an average human hair is about 75,000 nanometers). This is far too more resolution than can be used by your 3D printer or is necessary and so an overly-high resolution STL simply slows down your workflow and wastes your time.


Despite these limitations, it’s easy to make great 3D printed parts if you follow a few best practices when creating an STL file. The export settings you choose in your CAD software when generating and exporting an STL can dramatically impact the quality, dimensional accuracy, and surface finish of your 3D printed part, so it’s important to understand these parameters.

Defining STL Parameters


When you export an STL from your CAD software, there are a few parameters that control the density of the triangular mesh, which in turn defines a part’s geometry. One way to think about the interaction between the export process and these parameters is that your CAD software tries to optimize for a small STL file size, and so will try to create the roughest, lowest resolution mesh possible, but one or more of the export parameters you specify may require the software to use a higher resolution mesh over different features and geometry. So a useful mental model is to consider these export parameters as ‘forcing’ the export process to generate a finer, higher-resolution mesh.

Two completely different parts were created from the exact same 3D model file in CAD, simply by exporting two STLs with very different export settings. On the left you have a 3D print of an STL file that was created with much higher resolution, while on the right is a 3D print of a version exported with very low resolution STL parameters.

In general most modern CAD software offers users the ability to control at least two export parameters: one with linear dimensions called the chordal tolerance (or chordal deviation), and one with angular dimensions called the angular tolerance (or angular deviation). The resulting STL must meet all the conditions specified by your chosen export settings. Depending on the geometry of a specific feature of your 3D model, one of these settings will typically be more restrictive (aka requiring a higher-resolution mesh) than the other and can be considered the dominant or limiting parameter over that feature. The limiting parameter will typically vary across the geometry of a part in response to different features. We will explore these parameters and how they impact STL generation first, then breakdown how to configure these settings in a variety of major CAD software packages.


Chordal Tolerance/Chordal Deviation


The chordal tolerance (or chordal deviation) is a setting that controls the global dimensional accuracy of the STL when compared with the as-designed 3D model. Chordal tolerance is usually specified as the maximum normal (perpendicular) linear deviation allowed from the surface of the as-designed 3D model and the nearest triangular face of the resulting STL, as seen in the following image.

You can think of the chordal tolerance as controlling the maximum error allowed between the generated STL and the as-designed model, across the entire geometry of the part. So as the STL export function in your CAD software is building a triangular mesh around your 3D model geometry, it cannot create triangles whose maximum distance from the 3D model would exceed the chordal tolerance you specify. Assuming that the chordal tolerance is the limiting factor in STL resolution, a smaller chordal tolerance value will result in a higher resolution STL, with more triangles and a larger file size.


Angular Tolerance/Angular Deviation/Normal Deviation


The angular tolerance setting (sometimes referred to as angular deviation or normal deviation) controls the maximum angle allowed between the normal vectors of any two neighboring triangles in the mesh, and you can think of it as a parameter that ‘refines’ the mesh with higher resolution beyond what the chordal tolerance would otherwise allow. A good example of when the angular tolerance comes into play is typically with small curved surfaces, like fillets whose radii are similar in size to the chordal tolerance. Without the angular tolerance setting, these small fillets might have very visible flat spots, or be turned into a chamfer in the extreme case where the fillet radius is equal to the chordal tolerance as shown in the following diagram.

If the chosen angular tolerance parameter was too large or did not exist at all, small curved features of a 3D model that are similar in size to the chordal tolerance could be completely destroyed. In an extreme example (left diagram), you can see that the fillet radius is equal to the chordal tolerance, which is the dominant parameter (assume angular deviation was set to be >45˚ and thus not limiting), and the resulting STL mesh simply turns the fillet into a flat surface. A more accurate STL can be created if the maximum angular deviation is instead set to a smaller value (right diagram), which causes it to be the dominant parameter controlling the mesh generation around the fillet. Here, the STL generation process must use a smaller mesh with more triangles in the fillet region in order to satisfy the angular deviation limit, which in turn creates a smoother STL surface.

If the angular deviation value (measured in degrees) is set small enough to be the dominant parameter, it will force the STL generation process to add more triangles in regions of a part with sharper curvatures, which are often features with small radiuses. This in turn will ‘improve’ the smoothness of these features in the resultant 3D printed part beyond what the chordal tolerance alone would provide.


Note that while angular deviation is usually measured in degrees (with a lower value resulting in a higher resolution model), some CAD software specifies the angular deviation as a dimensionless ‘angle control’ parameter that varies in value from 0 to 1, with larger values specifying a higher STL resolution around curved surfaces. See the below section on STL settings by major CAD software package, or visit your specific CAD software publisher’s technical support or knowledge base site for more details.


Additional Export Settings: Some CAD programs may offer you extra settings beyond the two main controls of chordal and angular tolerance, which can include options like minimum or maximum triangle facet length. In general these are usually used to address STL export issues in edge cases, and we recommend leaving these at default values unless you have a specific reason to want to adjust them.


‍Mesh Quality vs. File Size: Our Recommendations


Since a higher resolution STL mesh produces a smoother, more accurate model, you might be tempted to simply crank up the resolution settings in your CAD program to the maximum possible resolution and call it a day. However, increasing the resolution of the STL export also leads to an increase in STL file size, which generally results in longer software processing times, both in generating the STL file, uploading it to Eiger, and then actually slicing the STL and preparing it for 3D printing. Past a certain point, the resolution of the STL file can far exceed the machine precision of your 3D printer, which means that you can end up paying a time cost for STL resolution that isn’t actually reflected in your printed parts.


Our recommended best practice then is to choose your STL export settings to be a balance between a high quality resolution that meets your functional requirements and a file size that can be quickly processed in Eiger. Experience has shown that the following settings are a useful starting point:


  • - Binary STL format (smaller file size than ASCII)
  • - Chordal tolerance/deviation of 0.1 mm [0.004 in]
  • - Angular tolerance/deviation of 1 deg
  • - Minimum side length of 0.1 mm [0.004 in]

If the resulting file size is significantly larger than 20 MB, we strongly recommend reducing the file size by increasing the values of the chordal and/or angular tolerance until the STL file size has been reduced to less than 20 MB, as the large file size can slow down the processing operations involved in preparing the STL for 3D printing. You should feel free to experiment with different file sizes however, as your tolerance for different levels of STL resolution and software processing times is a personal preference.


STL Export Settings by Various CAD Software


We tried to grab a representative sample of major CAD software packages, but it wasn’t always easy to find screenshots online — if you’re a representative for a CAD vendor that we missed and you’d like to get on this list, or you feel we incorrectly represented how these parameters should be configured, shoot us a note via our contact page and we’ll make it right!


Creo (PTC)


With Creo it’s important to note that the ‘Angle control' parameter seen below doesn’t adjust the maximum angular deviation in degrees, but is instead a unitless measure of angular deviation refinement beyond the radius that would be created by the ‘Chord height' (chordal tolerance) parameter. The 'Angle control' parameter value can range from 0.0 to 1.0. You can read more about the 'Angle control’ parameter here. We recommend the following settings as a starting point:


  • - STL Format: Binary
  • - Chord height: 0.1 mm [0.004 in] (Note: this is the chordal tolerance)
  • - Angle control: 0.25
  • - Leave ‘Maximum Edge Length’ and ‘Aspect Ratio’ at their default values

Fusion 360 (Autodesk)


Fusion 360. We recommend the following settings as a starting point:

  • - STL Format: Binary
  • - Surface Deviation: 0.1 mm [0.004 in] (Note: this is the chordal tolerance)
  • - Normal Deviation: 1 degree (Note: this is the angular deviation)
  • - Leave ‘Maximum Edge Length’ and ‘Aspect Ratio’ at their default values

NX (Siemens)


We recommend the following settings as a starting point:

  • - Output File Type: Binary
  • - Chordal Tolerance: 0.1 mm [0.004 in] (Note: units here are set by your document units)
  • - Angular Tolerance: 1 degree

Onshape (PTC)


We recommend the following settings as a starting point:

  • - STL Format: Binary
  • - Angular deviation: 1 degree
  • - Chordal tolerance: 0.1 mm [0.004 in]
  • - Minimum facet width: 0.1 mm [0.004 in]

SOLIDWORKS (Dassault Systèmes)


We recommend the following settings as a starting point:

  • - STL Format: Binary
  • - Resolution: Custom
  • - Deviation: 0.1 mm [0.004 in] (Note: this parameter is chordal tolerance/chordal deviation)
  • - Angle: 1 degree
  • - Leave ‘Define Maximum Facet Size’ unchecked

All of the blogs and the information contained within those blogs are copyright by Markforged, Inc. and may not be copied, modified, or adopted in any way without our written permission. Our blogs may contain our service marks or trademarks, as well as of those our affiliates. Your use of our blogs does not constitute any right or license for you to use our service marks or trademarks without our prior permission. Markforged Information provided in our blogs should not be considered professional advice. We are under no obligation to update or revise blogs based on new information, subsequent events, or otherwise.

Never miss an article

Subscribe to get new Markforged content in your inbox