How to Make an STL File for CNC Machine Work
An STL is a mesh, not a CAD model, so the export settings decide how much cleanup happens before the first cut. This guide covers triangulation, mesh repair, unit and scale checks, and when to hand your machinist a STEP file instead. Written for design engineers and buyers who need a quote-ready model, not a pretty screenshot.

In this article
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
Key takeaways
What an STL File Really Contains
An STL file stores a surface as a cloud of triangles. Each triangle is three points plus a normal vector, and that is the entire format. There is no cylinder, no hole, no fillet in the file. A Ø10 mm bore becomes a ring of flat facets that only approximates a circle. When you ask how to make an STL file for CNC machine work, the real question is how fine that approximation should be and whether the mesh is closed.
CNC CAM software wants surfaces it can offset by a tool radius. With a mesh, the CAM kernel first has to rebuild surfaces, then it can plan passes. That rebuild is where most problems appear: tiny facets create thousands of micro-surfaces, and a single open edge breaks the solid body. Dense meshes also slow everything down. A 200 MB STL can take longer to process than a 4 MB STEP of the same part.
This does not mean STL is useless for machining. For 3D-printed fixtures, scan data, or organic shapes from topology optimization, STL is often the only format available. It also works fine for simple prismatic parts when the mesh is clean and the tolerances are loose enough that facet error sits far below the cut tolerance.
The practical rule: use STL when that is what you have, but keep the mesh tight, closed, and correctly scaled. If your CAD tool can export a solid, a STEP file will save your machinist an hour of repair and remove an entire class of quoting errors.
- 1Binary vs ASCIIBinary is roughly 5 times smaller. Both carry identical geometry.
- 2Facet countA 100 mm part at 0.02 mm chord height often lands between 200,000 and 800,000 triangles.
- 3NormalsAll facets must point outward or CAM sees an inside-out solid.
- 4No color, no unitsThe file itself is unitless. Scale is decided by the reader.
Export Settings That Keep Facet Error Small
Every CAD package offers the same two dials under different names: chord height (also called deviation, sag, or surface tolerance) and angle tolerance. Chord height controls how far a facet can sit from the true curved surface. Angle tolerance controls how much the surface normal may turn between adjacent facets. Reduce either one and the file grows.
For machined parts, chord height between 0.01 mm and 0.02 mm is a good starting range. That keeps facet error roughly ten times below a ±0.005 mm machining tolerance on small features. On a 300 mm housing, 0.02 mm is still fine, but the triangle count climbs fast, so check the file size before exporting. Anything above roughly 300 MB becomes painful to open in CAM.
Angle tolerance of 10° to 15° is typical. Drop it to 5° only when the part has small radii that read as polygonal in a section view. A common mistake is setting chord height to 0.001 mm because it feels safer. The result is a 1 GB file, a stalled CAM session, and no better part. Facet error below the machine's repeatability buys nothing.
Export the whole solid, not the visible bodies. Hidden construction surfaces and interior shells are the usual source of open edges. If your CAD lets you export selected bodies only, select the finished solid and nothing else.
- 1Chord height 0.01–0.02 mmFor parts up to roughly 300 mm.
- 2Angle tolerance 10–15°Use 5° only for small cosmetic radii.
- 3Export one closed solidHide sketches, planes and construction surfaces first.
- 4Watch file sizeAbove 300 MB, CAM handling slows noticeably.
Units and Scale: Why Parts Arrive 25.4 Times Too Big
STL carries no unit tag. The numbers are just numbers. If you model in inches and the CAM operator imports with millimeters selected, a 100 mm part becomes 2,540 mm. On a machine with 4,000 mm travel it will still fit on the table, which is exactly why this error sometimes survives all the way to the first cut.
Set your CAD document units before modeling, not before export. Mixed-unit assemblies are the worst case: one component in millimeters and one in inches, exported as a single mesh. The mesh is internally consistent and completely wrong. Check the bounding box dimensions after export and compare them against the drawing by hand.
A fast sanity check: open the STL in a viewer, measure the longest edge, and compare it to the drawing. If the ratio is close to 25.4, you have a unit mismatch. If it is off by 10 or 1,000, someone applied a scale factor. Both are fixable in seconds at the CAM stage, but only if the operator spots it before setup.
Also confirm the origin. If the model origin sits 800 mm from the part, every CAM setup starts with a coordinate shift, and the risk of a wrong work offset goes up. Move the part to a useful origin near a datum corner or a centerline before export.
- 1Set units firstDocument units are set at model creation, not at export.
- 2Check the bounding boxCompare the longest dimension against the drawing.
- 3Ratio near 25.4Inch to millimeter confusion, not a modeling error.
- 4Put the origin on a datumA corner or centerline makes setup faster and safer.
Repairing Open Edges, Holes and Flipped Normals
A printable mesh and a machinable mesh are not the same thing. Slicers tolerate small gaps because they work in layers. CAM offset algorithms do not. An open edge means the software cannot tell inside from outside, so it refuses to build a toolpath across that region.
Most CAD and mesh tools include a diagnostic that counts open edges, non-manifold edges, self-intersections and duplicate facets. Run it before sending anything. For a machined part, the target is zero open edges and zero non-manifold edges. Self-intersections are tolerable in a few places but should be fixed where a tool will actually pass.
Automatic repair tools handle small gaps well and large gaps badly. If the diagnostic reports dozens of open edges clustered in one area, the underlying solid is probably missing a face. Go back to CAD, patch the surface, and re-export. Patching meshes by hand is slow and rarely survives a design revision.
Flipped normals are the other common failure. The mesh looks closed in a viewer, but CAM sees an inverted solid and offsets toolpaths outward instead of inward. If a toolpath appears to machine the air around the part, check normal direction first.
- 1Zero open edgesThe hard requirement for CAM surface rebuilding.
- 2Zero non-manifold edgesEdges shared by more than two facets break solid detection.
- 3Fix in CAD, not in meshHand patching does not survive the next revision.
- 4Check normalsToolpaths that cut air usually mean inverted facets.
What to Send With the STL File for CNC Machine Quotes
Geometry alone does not get you an accurate quote. Send the STL plus a 2D drawing that carries the tolerances, datums and surface finish callouts. STL cannot express a ±0.005 mm bore or an Ra 0.8–1.6 μm face, so those requirements have to travel in a document next to the mesh.
State the material and the quantity. A 6061-T6 bracket and a 17-4PH stainless bracket look identical as meshes and quote very differently. Quantity matters too, because setup cost dominates a single prototype and spreads across a production run. We quote from one piece to 10,000+ parts with no minimum order quantity.
Flag the critical features. If three holes carry the assembly, say so. That tells the machinist where to hold the tight tolerance and where a looser Ra 3.2 μm finish is acceptable. Without that signal, everything gets machined to the tightest requirement and the price climbs.
If the part is confidential, request an NDA before sending files. Uploads are treated as secure and confidential either way, but a signed agreement removes the question. Quotation and free DFM analysis come back within 12 hours, and production can start within 24 hours of approval.
- 1STL plus 2D drawingTolerances and finish callouts cannot live in a mesh.
- 2Material and quantityBoth change the process plan and the price.
- 3Mark critical featuresSay which dimensions carry the function.
- 4Ask for an NDAAvailable on request before file transfer.
7 Steps to Make an STL File for CNC Machine Use
Each step lists the setting or check that matters most.
- 11. Set document units before modelingChoose millimeters or inches in the CAD document settings. Changing units after modeling can silently scale dimensions. Compare the overall bounding box against the drawing before you go further.
- 22. Finish the solid, then hide everything elseSketches, planes, construction surfaces and interior shells should not be exported. Confirm the body is a single closed solid. If the model has multiple bodies that must stay separate, export them as separate files.
- 33. Move the origin to a useful datumPlace the origin on a corner or a centerline the machinist can touch off. A model origin 800 mm from the part adds a coordinate shift to every setup and raises the chance of a wrong work offset.
- 44. Set chord height to 0.01–0.02 mmKeep facet error roughly ten times below the machining tolerance on small features. Do not chase 0.001 mm; it inflates the file to hundreds of megabytes without improving the cut.
- 55. Set angle tolerance to 10–15°Drop to 5° only when small radii read as polygonal in a section view. This mainly affects cosmetic surfaces, not functional fits.
- 66. Export binary STL and run a mesh diagnosticBinary is about five times smaller than ASCII with identical geometry. Check for open edges, non-manifold edges, self-intersections and duplicate facets. Target zero open edges.
- 77. Verify scale and normals, then send with a drawingMeasure the longest dimension in a viewer and compare to the drawing. A ratio near 25.4 means a unit mismatch. Confirm normals point outward, then send the STL with a 2D drawing, material and quantity.
STL vs STEP vs IGES for CNC Machining
Same part, three formats, three different amounts of work at the CAM stage.
| Format | What it carries | CAM effort | Best used when |
|---|---|---|---|
| STL | Triangle mesh, no units, no features | High: surfaces must be rebuilt | Scan data, topology-optimized shapes, 3D print handoff |
| STEP | Exact surfaces and feature geometry | Low: import and program | Any part you can export from CAD |
| IGES | Surface geometry, older standard | Medium: occasional surface gaps | Legacy CAD that cannot write STEP |
| STL at 0.02 mm chord | Tighter mesh, larger file | Medium: cleaner rebuild | Simple prismatic parts with loose tolerances |
| STL at 0.001 mm chord | Very dense mesh, huge file | High: slow CAM processing | Rarely justified for machining |
Send STEP if you can, STL if you must
An STL works for machining when the mesh is closed, correctly scaled and tight enough that facet error sits below the cut tolerance. If your CAD can write a STEP file, send that instead and keep the STL for printing.
Frequently Asked Questions
Can a CNC machine cut directly from an STL file?
Not directly. The machine runs G-code, and CAM software generates that G-code from surfaces. With an STL, the CAM kernel first rebuilds surfaces from the triangle mesh, then offsets them by the tool radius to plan passes.
That rebuild works well on a clean, closed mesh and fails on an open one. If your CAD can export a STEP file, that skips the rebuild entirely.
What chord height should I use for a machined part?
Between 0.01 mm and 0.02 mm covers most parts up to roughly 300 mm. This keeps facet error about ten times below a ±0.005 mm machining tolerance on small features.
Going tighter than 0.005 mm usually just inflates the file. Facet error below the machine's own repeatability does not show up in the finished part.
How do I check whether my STL is watertight?
Run the mesh diagnostic built into your CAD or mesh tool. It reports open edges, non-manifold edges, self-intersections and duplicate facets. The target for machining is zero open edges and zero non-manifold edges.
If the diagnostic shows a cluster of open edges, the solid is probably missing a face. Fix it in CAD rather than stitching triangles by hand, because hand repairs rarely survive the next design revision.
Why did my part come back 25.4 times too large?
The model was created in inches and imported as millimeters, or the reverse. STL files carry no unit tag, so the reader decides the scale. A 100 mm part becomes 2,540 mm.
Measure the longest dimension in a viewer and compare it to the drawing. A ratio near 25.4 confirms the mismatch, and it takes seconds to correct at the CAM stage.
Can you work from an STL if I have no STEP file?
Yes. We machine from STL regularly, including scan data and topology-optimized geometry that has no parametric equivalent.
Send a 2D drawing with tolerances, datums and finish callouts alongside the mesh, plus material and quantity. Quotation and free DFM analysis come back within 12 hours.
Does the STL need to include threads and knurling?
No. Threads, knurling and most surface texture are better called out on the drawing than modeled as mesh geometry. Modeling a thread produces thousands of tiny facets that slow CAM without improving the result.
Model the pilot hole or the nominal diameter and specify the thread on the drawing. The machinist will pick the tool and the cutting parameters.
Send your model and get a DFM review in 12 hours
Upload the STL or STEP with a 2D drawing. We check mesh health, scale and tolerances, then quote from one prototype to 10,000+ parts with no minimum order quantity.
12-hour quoteFree DFM analysis100% inspectionNDA on request