3D printing and export

STL files explained

Short answer

An STL file is a list of triangles describing a surface. It carries no units, no curves, no colour and no editable dimensions, which is why an STL opened at the wrong scale is such a common problem. STEP stores real solid geometry with faces, edges and units. Export STL to print, keep STEP to edit.

STL is the format everything supports and almost nobody understands. Knowing what is actually inside the file explains most of the odd behaviour people run into: parts that import at the wrong size, curves that look faceted, files that will not slice, and why converting one back into a CAD model is so much harder than it sounds.

What is actually in an STL file

Triangles. That is the whole format. For each triangle the file stores three corner points and a normal vector saying which side faces outward. Repeat a few thousand times and you have described the surface of a shape.

Note what is not in there:

  • No units. The numbers are bare. Nothing in the file says whether 25.4 means millimetres or inches.
  • No curves. A cylinder is a ring of flat facets. There is no circle anywhere in the file, only an approximation of one.
  • No dimensions. There is no hole with a diameter, only triangles arranged in a hole shape. Nothing to edit.
  • No structure. No features, no history, no named faces. It is a bag of triangles with no stated relationship between them.
  • No colour or materials in the standard format. Some tools bolt colour onto the binary variant through a non-standard extension, which is why it often survives one program and not the next.

The name is a fossil, incidentally. STL comes from stereolithography, the 1980s process it was invented for. It has outlasted its origin by several decades on compatibility alone.

Why your STL imports at the wrong size

Because of the missing unit field. The exporter knew it meant millimetres; the file cannot record that; the importer has to assume something. When the assumptions disagree you get a part 25.4 times too big or too small, which is unmistakable, or occasionally a factor of 10, which is not.

There is no fix inside the format. The habit that works is to check one known dimension immediately after importing, before doing anything else. If the part should be 60 mm across, measure it and confirm that it is.

STL against STEP

STEP is the other format worth knowing, and the difference is not one of quality but of kind.

STEP stores boundary representation geometry. A cylinder is stored as a cylinder: an axis, a radius, a height, mathematically exact at any zoom level. Faces, edges and vertices are real named entities with real relationships. Units are part of the file. It is an ISO standard, ISO 10303, and the parts you will see referenced are AP203, AP214 and AP242.

Practically:

  • A hole in STEP is a cylindrical face with a diameter you can select and change.
  • A hole in STL is thirty-two flat facets that together look round from a distance.

For printing this rarely matters, because the slicer is going to convert everything to a toolpath anyway. It matters enormously the moment you want to edit the part, send it to a machine shop, or open it in different CAD software in two years.

Why STL to CAD is so hard

Going from STEP to STL is exact and instant. You are discarding information: take the true surfaces, approximate them with triangles, write them out. Nothing is guessed.

Going the other way means putting back information that was thrown away. The software has to look at a band of facets and decide whether they were meant to be a cylinder, a cone, or a genuinely faceted surface that should stay faceted. It has to find edges that no longer exist as edges. It has to guess intent.

Reverse-engineering tools do attempt this and can produce something usable from a clean scan, but the result is rarely a tidy parametric model with sensible dimensions. If you have any choice at all, keep the STEP file. This is the single most common regret in a printing workflow: the part you need to change in a year exists only as an STL.

Resolution, and why more is not better

When CAD exports an STL it decides how finely to approximate each curve. The control is usually chord deviation or chord tolerance: the largest permitted gap between the flat facet and the true curve it stands in for. A smaller deviation means more triangles and a closer approximation.

The temptation is to set it as fine as possible. Resist it. Below your printer's actual precision you are generating enormous files describing detail the nozzle physically cannot reproduce, and slicing gets slower for nothing. For FDM, a chord deviation somewhere around 0.01 to 0.05 mm is sensible. Resin justifies the finer end of that range. Almost nothing justifies going below it.

The symptom of the opposite mistake is visible faceting: a cylinder that looks like a polygon. That means deviation was set too coarse, and it is worth fixing.

Watertight, manifold, and why slicers complain

A slicer has to work out what is inside the part and what is outside. For that the surface must be closed, with every triangle edge shared by exactly one neighbour. That property has several names in circulation: watertight, manifold, or simply a valid solid.

Meshes break it in a few recognisable ways:

  • Holes: triangles missing, leaving a gap in the surface.
  • Flipped normals: a triangle facing inward, so the slicer disagrees with itself about which side is solid.
  • Self-intersection: parts of the surface passing through each other.
  • Duplicate or degenerate faces: triangles stacked on each other, or with zero area.

Where these come from matters. An STL exported from a solid modeller is watertight by construction, because the thing it was exported from was already a closed solid, so there was nothing to leave open. Errors turn up overwhelmingly in meshes built as meshes: sculpting, scanning, surface-based modelling. That is why repair tools exist and why a solid-modelling workflow rarely needs them.

3MF, which is simply better

3MF is the modern replacement and it fixes essentially every complaint above. It is a compressed container holding XML, and it carries units, colour, materials, multiple objects, and print settings. The specification defines valid geometry strictly, so the non-manifold mess that STL merely tolerates is invalid rather than commonplace.

Every current slicer reads it, and most now prefer it. Use 3MF where the chain supports it end to end. STL persists because everything on earth accepts it, not because it is good.

Which to use, in practice

  • Printing something now: STL or 3MF. Prefer 3MF.
  • Keeping the design: STEP, always, alongside the mesh.
  • Sending to a machine shop: STEP. An STL will get you a polite email asking for the real geometry.
  • Sharing on a model site: STL for reach, 3MF for quality, STEP as a courtesy so people can modify it.

The rule underneath all of this: export the mesh, keep the solid. The mesh is a printable snapshot. The solid is the design.

Where to go next

For the workflow from a description through to a sliced file, see text to CAD for 3D printing and the text to STL page. The difference between tools that produce meshes and tools that produce solids is covered in AI CAD generators compared. Models in the gallery export as both STEP and STL, which is the arrangement this page argues for.

Frequently asked questions

What is an STL file?

A list of triangles. Each one is stored as three corner points and a direction telling you which side is outside. That is the entire format. It describes the surface of a shape and nothing about how the shape was designed.

Why does my STL import at the wrong size?

Because STL has no unit field. The numbers in the file are bare, so the program reading it has to assume a unit. If the exporter meant millimetres and the importer assumes inches, the part arrives 25.4 times too large. Always confirm the dimensions after importing.

What is the difference between STL and STEP?

STL is a mesh approximating a surface with flat triangles. STEP stores boundary representation geometry: real faces, real edges, actual mathematical curves and cylinders, plus units. A hole in a STEP file is a cylinder. In an STL it is a ring of flat facets pretending to be one.

Can I convert an STL back to a CAD model?

Not properly. Going from STEP to STL is exact and one-click, because you are throwing information away. Going back means guessing which triangles were meant to be a cylinder and which were meant to be flat. Reverse-engineering tools attempt it, and the result is rarely a clean parametric model.

Should I export STL at the highest possible resolution?

No. Resolution is controlled by chord deviation, the maximum gap between the flat facet and the true curve. Setting it well below your printer's precision produces an enormous file describing detail the nozzle cannot reproduce. Around 0.01 to 0.05 mm deviation is sensible for FDM.

Is 3MF better than STL?

Technically, yes. 3MF stores units, colour, materials and print settings in one compressed container, and it is defined so that non-manifold geometry is invalid rather than merely common. STL persists because everything supports it, not because it is good.

Export both and keep the STEP

Generate a part, send the STL to your slicer, and keep the STEP so you can change a dimension later without starting again.