How to Export for CNC Machine DXF
A DXF carries 2D geometry from your CAD file into the CAM software that drives the machine. Get the export right and the programmer reads exactly what you drew. Get it wrong and the first scrapped part tells you. This guide covers the settings that matter and the order to set them in.

In this article
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
Key takeaways
What a CNC machine DXF actually carries, and what it does not
DXF is a 2D vector exchange format. It stores lines, arcs, circles, polylines, splines, text and layer names. There is no solid model inside, no material, no toolpath and no machining strategy. The CAM programmer reads your curves, assigns tools and depths, and posts G-code from there.
That limits the format in a useful way. A DXF is the right carrier for a profile you would cut with a 2D path: a plate outline, a bracket face, a gasket, a laser or waterjet blank. It is the wrong carrier for an organic surface, an undercut or a five-axis blend.
A common mistake is sending a DXF of a top view and expecting it to define the whole part. It will not. Pockets with draft, counterbores with depth and any angled feature need a 3D model or a dimensioned drawing next to the DXF.
So decide early what the file is for. If it drives a 2.5D cut path, one clean DXF is enough. If it supports a setup sheet, it should show the stock outline, the datum edges and the clamp positions, not just the finished profile.
Units, scale and the mistakes that scrap parts
Set units before you draw anything. In AutoCAD and most DXF exporters you choose millimeters or inches in the drawing setup, not at export time. If the drawing is in inches and the machine expects millimeters, a 25.4 mm hole becomes 0.039 in and the part is gone.
Export at 1:1. Never scale geometry to fit a title block or a paper size. A plate that should be 300 mm long and comes in at 210 mm has been fitted to an A4 sheet somewhere in the chain. The CAM programmer usually catches it, but not always before the first setup.
Watch the decimal places in the file. Some exporters round coordinates to three decimals by default, which is 0.001 mm and fine. Others round to one decimal, which is 0.1 mm and not fine for a ±0.005 mm tolerance callout.
If you work in inches, say so in the file name, for example bracket-revB-in.dxf. It takes two seconds and removes the most common source of rework we see on incoming files.
How splines, ellipses and text behave after export
Splines and ellipses are the quiet failure mode. DXF can hold them as true curves, but many CAM packages convert them to polylines on import. The conversion uses a chord tolerance, and if that tolerance is loose the curve flattens.
For a 50 mm long spline, a 0.1 mm chord tolerance can move the mid-point by roughly 0.02 mm. That is enough to fail a ±0.005 mm profile. Tighten the tolerance to 0.01 mm or convert splines to arcs yourself before export, then check the deviation.
Text is the other trap. Single-line text (DTEXT) survives as editable entities. Multi-line text (MTEXT) sometimes arrives as a filled block or disappears. If the engraving matters, explode the text to outlines or switch to single-line text and set a minimum character height of 1.5 mm.
Ellipses, filled regions and hatches should be exploded or removed. A hatch that arrives as thousands of short segments will slow the CAM import and add nothing to the cut path.
Layer structure that saves programming time
Layers are free information. Put the outer profile on one layer, through-holes on another, tapped holes on a third, engraving on a fourth. The programmer then selects a layer and assigns a tool to the whole group in one pass instead of picking each contour.
Use names that mean something to the shop, not to your CAD template. OUTLINE, HOLES-M6-TAP, POCKET-3MM, ENGRAVE. Avoid layer 0 for anything that will be cut, and avoid dozens of empty layers carried over from a template.
Delete construction lines rather than hiding them. A hidden layer still travels in the DXF, and some importers show hidden layers by default. Reference geometry that was never meant to be cut becomes a toolpath and cuts air or, worse, cuts the part.
Keep one DXF per part per setup where you can. A single file holding twelve parts at odd angles is harder to verify than twelve files with clear names.
Tolerance, finish and what belongs on the model
A DXF carries nominal geometry, not tolerances. A 10 mm hole is drawn at 10 mm even if it must finish at 10.02 mm for a press fit. Put the tolerance in the drawing notes or the 3D model, or state it in the RFQ email.
Finish lives in the same place. Ra 0.8–1.6 μm and Ra 0.2–0.8 μm are different processes and different costs. A DXF cannot express either, so write the callout next to the feature.
Do not draw the tolerance band. Some designers inflate a hole by 0.02 mm on the drawing to hit the fit. The machinist then targets the inflated number and the part lands outside the band. Draw nominal and state the limit.
For anything held to ±0.005 mm, send the 3D model as the master and use the DXF for the setup sheet. The model carries the true surface, the drawing carries the intent, and the DXF carries the flat profile the operator can check against a print.
Step by step: how to export for CNC machine DXF
Run these in order. Each step takes a minute; skipping one costs a setup.
- 1Clean the drawingDelete construction lines, dimensions, notes and title blocks. Keep only geometry the tool will follow. Run OVERKILL or an equivalent to remove duplicate and zero-length entities.
- 2Set units and scaleConfirm millimeters or inches in drawing setup, then verify with a known dimension, for example a 100 mm line measures 100. Do not scale to a sheet.
- 3Flatten 3D to 2DProject the required edges onto the cutting plane. Use FLATTEN, a section plane or your CAD's 2D export. Remove any Z values other than 0.
- 4Convert curvesConvert splines and ellipses to arcs and lines with a chord tolerance of 0.01 mm, or keep true curves if the CAM package is known to read them. Check deviation after conversion.
- 5Set layersMove outline, holes, pockets, engraving and bend lines to separate named layers. Delete unused layers. Nothing cuttable stays on layer 0.
- 6Handle textFor engraving, use single-line text or explode to outlines. Minimum character height 1.5 mm. Remove MTEXT that may arrive as a filled block.
- 7Export and verifyExport as DXF R12 or 2000 ASCII unless the shop asks otherwise. Reopen the file, measure three known features, check units, then send it with the 3D model and the drawing.
Which DXF flavor to send
When in doubt, R12 ASCII opens everywhere.
| DXF version | Best for | Watch out for |
|---|---|---|
| R12 ASCII | Legacy CAM, laser, waterjet | No true splines, circles become polylines |
| 2000 ASCII | Most modern CAM packages | Larger files, more entity types to check |
| 2004 and later | Large assemblies, 3D data | Some older controllers reject the file |
| Binary DXF | Small transfer size | Poor support in older CAM software |
| DXF from 3D CAD | Flat patterns, sheet metal | Z values, hidden 3D edges, open contours |
Send the file once, cleanly
A clean DXF, a 3D model and stated tolerances remove almost every question a CAM programmer would otherwise email you about. We review incoming files and return a free DFM report with the quotation, usually within 12 hours.
Common questions
Can a CNC machine read a DXF directly?
No. The controller runs G-code. A DXF goes into CAM software, where the programmer assigns tools, depths, feeds and speeds, then posts G-code for that machine.
Some laser and plasma cutters accept DXF in their nesting software. Milling and turning almost never do.
Should I send DXF or STEP?
Send STEP or another 3D format when the part has pockets, undercuts, draft or any five-axis work. Send DXF when the feature is a flat profile.
The practical answer is both. The 3D model is the master for geometry; the DXF is the quick reference for the profile and the setup sheet.
Why did my arcs turn into straight segments?
The exporter or the CAM importer converted curves to polylines to keep the file simple. The chord tolerance controls how close the segments sit to the true curve.
Set it to 0.01 mm, or 0.001 mm for tight profiles, and re-export. If the CAM package reads true arcs, keep arcs instead and skip the conversion.
Do I need to close the profile?
Yes for anything that will be cut as a contour. A gap of even 0.01 mm stops the CAM software from generating a closed path and usually raises an open-contour warning.
Run a gap check before export. Many CAD packages have a boundary or region tool that flags open ends.
How do I stop units getting mixed up?
Put the unit in the file name and in the layer name of the outline, for example OUTLINE-MM. Then measure a known feature after reopening the file.
If the measurement is wrong, fix it at the source rather than scaling the DXF, because scaling introduces rounding across every coordinate.
Can I include bend lines and center marks?
Yes, on their own layers. Bend lines should be marked as centerline or phantom and named BEND. Center marks belong on a CENTER layer.
Never draw them on the cut layer. The toolpath will follow anything it can select, including a center mark.
Send your DXF and get a DFM review
Upload your CAD files and we will check geometry, units and layers before quoting, with no minimum order quantity.
12-hour quoteNo MOQUploads kept confidential