3D printing stl binary or ascii


5 vital things to know about STL file format in 3D printing

When designing any 3D model, one will likely encounter a variety of file extension types to save drawings. There are many file formats that are used for 3D printing such as OBJ, VRML, PLY, etc. The most common file format for 3D printers is STL (.stl).

STL was first developed for stereolithography in the late 1980s. It was created to prepare CAD data for 3D printers. Since then, it was considered as the “standard” file format for 3D printing.

In order to understand this file type better, below are 5 vital things you need to know about STL file format.

1. What is STL file?

STL format is the most commonly used format file for 3D printing. An STL (Standard Tessellation Language or STereoLithography) file is a format that describes surface geometry of a 3D object without any colour, texture or other attributes.

This format uses a series of linked triangles to recreate or reproduce surface geometry of the 3D model. The more triangles used, the higher resolution the 3D model will have.

STL file is widely used because it is simple, light and easy to be handled by 3D machines and software.

2. Limitations of STL files

Although STL is the most widely used file format for 3D printing, it also has its own limitations. STL only understands the external surface and shape of the 3D model.

The second biggest problem regarding STL files is the gaps and overlaps of joining surfaces in model that are not drawn correctly. These are known as non-manifold edges e.g. a door in a building has a air gap all around the door and is not connected solidly so cannot be 3D printed in the model.

Furthermore, information such as colour, internal structure, texture or attributes that a CAD file holds may not be included in an STL file.

3. Exporting STL files using different CAD software

Exporting an STL file is one of the steps in creating 3D printed models. Exporting STL files may differ in each CAD software. As a quick reference, here are some of the steps for exporting STL files.

  • Tinkercad

Design > Download for 3D printing > .stl

  • Autodesk Inventor

1. Select IPro > Print > 3D Print Preview

2. Select Options then choose desired resolution > Click Ok

3. In the preview window, Select Save Copy As or Send to 3D Print Service

4. Save As to STL file (*.stl)

  • SketchUp

In SketchUp, creating STL files directly within the program may not be possible. An extension for .stl must be downloaded first in order to export STL files.

1. Download and install DXF or STL plugin

2. Select Tools > Export to DXF or STL > select the units (in millimetres) for the model

  • Solidworks

1. File > Save As

2. Set Save As file type to STL

3. Options > Resolution > Fine or Custom > Ok

  • Fusion 360

1. File > 3D Print

2. Under Refinement / Refinement options, select export settings.

3. Output > untick “Send to 3D Print Utility” > OK > Save

4. Important settings when exporting STL files

Below are some of the most important settings when exporting STL files. These settings will result in good quality prints and file size.

  • Angle control

To improve the print resolution, it is recommended to have gaps between triangles and change its angle deviation between adjacent triangles. In this way, it will be easier to adjust how close objects are layered or tiled together.

  • Chordal deviation

Chord height is the maximum distance between the surface of the original design and STL mesh. Choosing the right tolerance will give you smoother and not pixelated 3D part.

The chord tolerance should be set between 0.01 to 0.001 millimetres. This setting usually results in good 3D prints.

  • Binary or ASCII

STL files can store information in two different ways. These are Binary encoding and ASCII encoding. Binary files are smaller and easier to share while ASCII files are visually easy to read and check.

Binary format is recommended to use for 3D printing. However, ASCII format is suggested for those who want to manually inspect STL file for debugging.

5. Special rules for STL files

There are special rules for tessellation and storing information for STL files. Below are some of them.

  • Vertex to vertex rule

In STL formatting, this rule states that each triangle must share 2 vertices with its neighbouring triangles. This means that a vertex of one triangle must not lie on the side of another triangle.

  • Orientation rule

This rule states that the orientation of the facet must be defined clearly. This orientation is specified in two ways. First, the direction of normal vector should point outwards. Moreover, the vertices should be listed in counter-clockwise order when looking at the object from the outside (or right-hand rule).

  • All-positive Octant rule

This rule states that all the coordinates of the triangle vertices must be positive (nonnegative and nonzero).

If the 3D part is allowed to lie anywhere in the coordinate space, then negative coordinates may occur. The problem is, when storing negative coordinates, one must use “signed floating pointing numbers”. These numbers may require an additional bit to store a sign (+/-).

Hence, it is important to ensure that all coordinates are positive. When all the coordinates are positive, it also means that more space will be saved.

STL file is an important aspect in 3D printing since it serves as an interface between 3D model and 3D printer. Moreover, it is important to know about STL files especially if you are planning to DIY 3D printing. With this guide, you now have an in-depth understanding of how STL file format works.

If you are starting with 3D printing, you can ask a professional to design the 3D models for you. A reliable 3D printing service company can provide services such as 3D design and printing, custom 3D printing, industrial 3D printing, etc.

3d models - Export STL as ASCII or binary?

Asked

Modified 1 year, 10 months ago

Viewed 19k times

$\begingroup$

When go to export a model using Fusion 360 or Meshmixer, I see that there are two options. Could the final model be affected by the format chosen at the time of saving?

  • 3d-models
  • stl

$\endgroup$

$\begingroup$

The two formats contain the same information about the model, but the binary format is much more compact, so it will produce smaller files from the same part but they should work the same. That's to say, if you take the exact same model, save it as a binary STL and as an ASCII STL, the binary STL file will take up fewer bytes on disk. The number of triangles and the dimensions of the printed model will stay the same.

There are a couple of important exceptions here:

  1. I don't know about Meshmixer specifically, but some tools will have completely different code paths for exporting the two formats. One exporter may have a bug that the other exporter doesn't. The same is true of the slicer, which may have a bug reading one of the two kinds of STL but not the other. In this case, it'll make a huge difference which one you use, but you'll only find out when one goes wrong. This is what fred_dot_u experienced in his answer.

  2. Some tools have a way of putting colour information into the binary STL format, which isn't possible with the ASCII format. If your model has coloured triangles, you might find that the binary STL preserves the colours, while the ASCII STL loses the colours. Whether this matters to you depends on what printing technology you'll be using. Most slicers can't use these colours anyway - and subsequently, ignore color information on import.

The ASCII STL format is older than the binary format, so you may find some very old software can only understand the ASCII STL files, but unless you're working with such old software, it's usually better to use the binary format. Smaller files don't just save disk space: they're also faster to process and transfer via e-mail or on servers.

$\endgroup$

3

$\begingroup$

You should always pick the binary option. ASCII files are larger and slower to save and load. There's no reason to ever use ASCII unless you are using software that is incompatible with binary files.

Could the final model be affected by the format chosen at the time of saving?

In practice, the model will not be affected by either choice. There are some subtle differences between the two formats, such as binary being able to store an attribute per triangle (which is sometimes used to represent colour), ASCII being able to store a "name" for the solid in a file while binary can store an 80-byte header containing metadata, binary being limited to 32 bits of precision while ASCII theoretically has the option to use arbitrary precision. However, for 99.9% of all use cases there is no difference, so it is preferable to use binary for its smaller file size.

$\endgroup$

1

$\begingroup$

I have experienced problems on occasion when using a binary exported Meshmixer model. The slicers used have been Simplify3D and Prusa Slicer 2.0 and possibly an earlier version. I've not attempted to resolve the problem other than to change that specific model to export to ASCII which then solves the problem. ASCII files will be larger but that's not a significant factor, in my opinion.

If you are using a program which fails to properly process a binary export, it's simple enough to overwrite the model in ASCII form.

$\endgroup$

3

$\begingroup$

The other answers on this thread seem kind of hand-wavy, so I'll give my input.

At its simplest, all we're dealing with here is two different formats of encoding the same data. The 3D file is identical, just described by the file data in different terms.

That being said, there is a multitude of different reasons that 3D prints can fail. Fusion 360 is notorious for having issues with slicers because of fillets, lofts, smooth-curvy type patterns, or intersecting planes.

Binary is a smaller encoding. It almost always works for me. ASCII has never failed me as a backup when binary did.

$\endgroup$

1

(Solution available) Export STL as ASCII or binary?

3d models stl

When I go to export the model with Fusion 360 or Meshmixer I see that there are two options. Can the final model be affected by the format chosen at save time?

@Pedro Miguel Pimienta Morales, 👍8