GreatLight CNC Machining Factory logo
CNC Machining
Rapid Prototyping
Materials
Industries
News
About GL

Get Instant Quote

CNC file formats

What File Format Does CNC Machines Use?

Every CNC part starts as a file and ends as a toolpath. This page explains which formats a machine can actually read, which ones a CAM programmer needs, and how to judge whether your model will survive the trip from CAD to spindle.

STEP AP214IGESSTLG-code
what file format does cnc machines use
The short answer

What File Format Does a CNC Machine Read?

A CNC machine does not read a CAD model. It reads a toolpath written in G-code, a plain text file of coordinates, feed rates, spindle speeds and tool changes. When someone asks what file format does CNC machines use, the precise answer is G-code or a machine-specific variant of it.

Your STEP or IGES file never touches the machine control. It goes to a CAM programmer, who sets stock, workholding, tool selection and cutting strategy, then posts the toolpath out as G-code. The CAD file and the machine file are two different stages, and mixing them up causes most of the confusion on this topic.

So there are two answers, and both are correct. If you are sending work to a machine shop, send a solid model in STEP or IGES. If you are asking what actually runs the spindle, it is G-code. The rest of this page covers the handoff between those two worlds and where geometry gets lost.

The format matters because errors compound. A tolerance callout that reads ±0.005 mm on your drawing is meaningless if the surface that carries it arrives at the CAM station as a set of disconnected patches. Fix the format first, then talk about tolerance.

CAD interchange

STEP and IGES: Sending Geometry to the Shop

STEP (ISO 10303) is the default exchange format for machined parts. A STEP file stores the model as boundary representation: exact analytic surfaces and NURBS patches, not a mesh. That means a Ø12 H7 bore stays a true cylinder with a defined diameter, which is what a CAM system needs to offset a tool against it.

Send STEP AP214 or AP242 when you can. AP214 carries assembly structure, colors and layers; AP242 adds tolerance and PMI data that some shops can read directly. Older AP203 files still import fine, but they drop a lot of annotation, so your GD&T usually has to travel separately as a PDF drawing.

IGES arrived earlier and handles wireframe and trimmed surfaces. It still works for simple prismatic parts, but it has known weaknesses with trimmed surface seams and closed solids. Complex organic shapes often arrive as gaps between patches. If a shop has to stitch surfaces before programming, you pay for that time.

Practical rule: STEP in, IGES only as a fallback. If a customer sends IGES for a part with blended fillets or thin walls, we usually ask for a STEP version too. It takes them two minutes and saves a rebuild in CAM.

  • 1
    STEP AP242Best for parts with GD&T that a shop may read directly
  • 2
    STEP AP214Safe default for assemblies and single parts
  • 3
    IGESAcceptable for simple prismatic geometry, risky for blends
  • 4
    Native CADOnly useful if the shop runs the same software version
Meshes and 2D

STL and DXF: Where They Fit and Where They Break

STL describes a surface as triangles. There is no notion of a cylinder, only a cloud of flat facets approximating one. For 3D printing that is fine. For CNC machining it becomes a problem the moment you need a true diameter, a sharp corner, or a flat face that must seal against another part.

STL does have a role in machining. It is useful for rough stock models, for verifying that a part will fit inside a work envelope, and for reverse-engineered shapes that were scanned and then rebuilt. It is not the file you send when the drawing calls out a reamed hole or a ground surface.

Resolution is the trap. A coarse STL with a 0.2 mm chord tolerance produces visible facets on a curved surface. Tighten it to 0.01 mm and the file balloons. Even then, the geometry is only as good as the tessellation, and CAM software has to guess at the underlying surface.

DXF is different again. It is a 2D format and it is the right choice for flat parts: sheet metal blanks, gaskets, plates cut on a router or a laser. Give us a DXF with clean closed polylines and a layer showing bend lines, and programming is fast. Give us a DXF exported from a 3D view with overlapping entities, and someone has to redraw it.

So the question of what file format does CNC machines use for flat work has a different answer than for turned work. A laser cutter wants DXF. A lathe wants STEP. Same shop, different front door.

Machine side

G-Code and the Post-Processor

G-code is not universal. Two machines can run the same part from different code because each control has its own dialect. Fanuc, Siemens, Heidenhain and Haas all share the core G01, G02, G03 moves, but differ on canned cycles, tool compensation calls and high-speed look-ahead options.

The translation happens in a post-processor, a script inside the CAM software tuned to one machine and one control. A post for a 3-axis Haas mill is not the post for a 5-axis Hermle. If the post is wrong, the code may run without alarm and still cut in the wrong place, which is worse than a crash.

For 5-axis work the post matters even more. Simultaneous 5-axis toolpaths need correct rotary axis limits, singularity handling and feed-rate re-calculation for the rotary motion. A generic post will produce code that either alarms out or leaves witness marks where the rotary axes hesitate.

We keep separate posts for each machine family in the shop. When a new control arrives, the first job on it is a test part with known dimensions, not a customer order. That test takes an hour and prevents a scrapped batch later.

Failure modes

What Goes Wrong When the Wrong Format Arrives

The most common failure is a mesh sent for a dimensional part. The CAM programmer can program it, but every curved surface becomes a series of facets, and the finishing pass shows it. On a part with a sealing face or a bearing bore, that is a reject.

The second is IGES with trimmed surface gaps. The model looks correct on screen because the viewer tolerates small gaps, but CAM cannot offset a tool across a gap without stitching. Sometimes the fix takes ten minutes. Sometimes the surface has to be rebuilt from scratch.

Unit and origin errors come third. A part modeled far from the origin, or with a rotated coordinate system, imports fine but places the stock in an odd position. It is easy to fix and easy to miss, which is exactly why it wastes time.

Then there is the drawing that disagrees with the model. The step file shows a 6 mm fillet, the PDF says R3. Someone has to decide which is current. We flag it and wait for confirmation rather than guess, because guessing here means cutting metal twice.

None of these are exotic. They are ordinary handoff mistakes, and they are why we run a DFM review on every upload before quoting.

Handoff

How to Prepare a File That Machines Cleanly

Five checks before you upload.

  • 1
    Export a solid, not a surface setUse STEP AP214 or AP242 from your CAD system and confirm the export log shows no missing faces. A solid model lets CAM offset tools reliably.
  • 2
    Keep one part per file unless it is an assemblyMultiple parts in one file force the programmer to separate bodies manually. Name the file with the part number and revision.
  • 3
    Put GD&T on a drawing, not only in the modelSend a PDF drawing alongside the STEP file. Datums, surface finish notes like Ra 0.8–1.6 μm and thread callouts are easier to read there than in PMI.
  • 4
    Check units before exportA model built in inches and imported as millimeters comes out 25.4 times too large. Confirm the unit setting in the export dialog, not just in the CAD session.
  • 5
    Include material and finish in the notesThe geometry does not say whether the part is 6061-T6 or 316L, or whether it gets hardcoat anodizing. Those choices change tooling and stock allowance.
Format selection

Which File Format to Send for Which Job

Pick the row that matches your part type and process.

Part or processSend thisWhyWatch out for
Prismatic milled partSTEP AP214/AP242Exact B-rep surfaces, clean tool offsettingMissing separate GD&T drawing
Turned shaft or bushingSTEPTrue diameters and chamfers surviveSTL gives faceted diameters
Flat sheet or plateDXF2D profiles, bend lines on their own layerOpen polylines, duplicate entities
Organic or scanned shapeSTEP from rebuilt modelCAM needs real surfaces, not trianglesSending raw scan mesh instead
Fit-check or stock modelSTLFast, small, good enough for clearanceNever use it for final dimensions
Direct to machineG-codeThis is what the control readsControl-specific, not portable
Legacy or mixed CADSTEP plus PDF drawingGeometry and intent travel togetherRelying on IGES alone for blends

The Practical Answer

Send STEP for anything with a tolerance, DXF for flat profiles, and STL only for fit checks. G-code is what the machine reads, but that step belongs to the shop, not to you.

FAQs

File Format Questions Engineers Ask

Can I send a native SolidWorks or Fusion file instead of STEP?

You can, and it usually opens if the shop runs the same software and a compatible version. The risk is version mismatch and missing references.

STEP removes that risk entirely. If you want both, send the native file plus a STEP export, and note which one is authoritative. We will program from the STEP.

Does a higher STL resolution make it suitable for machining?

No. A finer mesh means smaller triangles, not real surfaces. You still cannot extract a true diameter or a tangent continuous blend from it.

Mesh resolution helps for visual checks and clearance studies. For anything with a tolerance callout, rebuild the model as a solid and export STEP.

What tolerance can you hold once the file is correct?

We work to ±0.005 mm on critical features and inspect 100% before shipment, with reports on request. Achievable tolerance depends on feature geometry, material and setup count, not only on the file.

A clean STEP file with a clear drawing is the starting point. Five-axis work on a part that needs four setups will always be a different conversation than a single-setup part.

Do you need the CAM file or the G-code from me?

No. Send the model and the drawing. Our programmers generate the toolpaths and post G-code for the specific machine that will run the job.

Customer-supplied G-code is rarely portable. It is written for one control, one workholding setup and one tool list, and it usually has to be rewritten anyway.

How fast can you review a file and quote?

Quotation and a free DFM analysis come back within 12 hours. Production can start within 24 hours of approval, and parts typically ship in 3–5 days.

No minimum order quantity applies. One prototype and a 10,000-part run go through the same file review, though the review is longer on the larger job.

Are uploaded files kept confidential?

Yes. Uploads are secure and confidential, and we can sign an NDA on request before you send anything sensitive.

If your program requires it, tell us at the quoting stage and we will route the file review through the NDA before any programming begins.

Send Your File, Get a DFM Review

Upload your STEP, DXF or STL and get a quotation plus free DFM analysis within 12 hours.

12-hour quote100% inspectionNo minimum order

Follow

More From the Shop Floor

We publish setup notes, tooling trials and inspection data from the factory floor.

FacebookTikTokYouTubeLinkedInInstagramThreadsPinterest

Trusted by engineers and manufacturers worldwide

Tesla Ford Motor Company BYD Auto Denso Magna International Boeing Airbus Medtronic KUKA FANUC