"Send me a DXF and I'll have the program in no time." Anyone who uses CAM says some version of this. So what is a DXF, and what actually happens between the file and the G-code?

This article walks the route from DXF to toolpath to G-code, one step at a time, for anyone trying CAM for the first time.

What a DXF is: the common language between CAD programs

DXF (Drawing Exchange Format) is a file format for moving drawings between CAD programs. Autodesk created it for AutoCAD, but it became the de facto standard and almost every CAD and CAM package can read and write it.

Inside, a DXF is a collection of geometry: lines, arcs, circles. A lathe CAM picks the part profile out of that collection and uses it to calculate the cutting path.

KEY POINT

For turning, all you need is one side of the profile, the section cut lengthwise through the axis. Rather than handing over a full three-view drawing, prepare a DXF with just the profile on it.

Step 1: draw the profile, or get one

First you need the drawing data. There are three usual routes.

Things to watch when you draw the profile

Step 2: load the DXF, then choose operations and tools

Load the DXF and the profile appears on screen. From here it is down to the machinist, and there are three things to decide.

  1. Operations — OD first or ID, and where the grooving goes
  2. Tools — which insert, which nose radius, which included angle
  3. Cutting conditions — depth of cut, feed, surface speed

From that, CAM works out the roughing passes, the finish pass, and coordinates with nose radius compensation already built in. Nobody has to calculate the taper and arc corrections by hand. (How that correction works is covered in the nose radius article.)

Step 3: check the simulation

Before you post the G-code, always watch the tool move in simulation. What to look for:

This is the biggest single difference from hand programming. Where you used to load it on the machine and creep through a dry run, CAM lets you check it as many times as you like on screen, without stopping the machine. For bringing on a younger machinist, being able to see how the part is cut is worth a lot.

Step 4: post the G-code and take it to the machine

Once the simulation looks right, output the G-code. Transfer it to the machine on a USB stick or over the network and it runs as it is.

On the first part, CAM output or not, the rule still stands: run it in single block with the feed override turned down. CAM cannot check that the tool offsets in the control match the tools actually in the turret. That part is still yours.

How simple does it get? The LATHE-NC route

If you are worried about how much CAM operation there is to learn, here is the flow in LATHE-NC, the browser lathe CAM I build. There are three steps.

  1. Load a DXF (or type the profile in)
  2. Check the simulation (you see the stock come away in 3D)
  3. Output the G-code (nose radius compensation already calculated)

It runs in a browser, so there is nothing to install, and it works on an iPhone. Writing tomorrow's program on your phone during a break is a genuinely practical way to use it.

Summary

DXF to G-code in three steps, even on a phone.

LATHE-NC, lathe CAM in your browser. Nothing to install, works on iPhone.
The beta is free for the first 100 users.