Pro Cabinet Shop

DXF vs G-code for CNC cabinet parts

A DXF is a drawing: the outlines of the parts and the positions of the holes, with no instructions for a machine. G-code is the list of moves one particular machine follows to cut them. CAM software and a post-processor turn the drawing into G-code for a specific controller, tool and material.

Last updated · By the Pro Cabinet Shop team · How we check our pages

What is in a DXF file?

Geometry: lines, arcs and circles, usually sorted onto named layers. For cabinet parts that means each part's outline, the circles where holes go, and lines for grooves, with the layer name saying what each is and often how deep. A DXF does not say which tool to use, how fast to feed, or in what order to cut. Nearly every CAD and CAM program can read one.

What is in G-code?

Moves. Each line tells the machine to go to a position at a speed, with codes for the spindle, tool changes and vacuum. It is written for one controller: the same part needs different files for different machines, and codes do not always mean the same thing from one maker to the next. G-code already contains every decision: the tool, the depth of each pass, the direction of cut, the order.

How does a part get from one to the other?

  1. Design: the cabinet is drawn and its parts are listed.
  2. Layout: the parts are nested onto sheets.
  3. Export: the sheets go out as DXF, or straight to machine code if the software knows the machine.
  4. CAM: toolpaths are assigned to each layer: which bit, how deep, inside or outside the line.
  5. Post-processing: the toolpaths are written in the dialect of the machine's controller.
  6. At the machine: the file is checked, the sheet is loaded, and the program is run.

Which file do you need?

  • A machine that came with its own nesting or CAM software: DXF, read by that software.
  • A machine whose controller you know exactly: G-code written for that controller.
  • A handheld CNC router: an SVG or DXF outline it follows on the sheet.
  • A panel saw: neither. A printed cut list and layout.

What does Pro Cabinet Shop export?

Sheet layouts as DXF files in the AutoCAD R12 format, in inches, with outlines and drilling on separate layers; an SVG outline for Shaper Origin; and machine code written for ShopSabre routers that run WinCNC. Other machines take the DXF into their own software. The DXF is a drawing and is kept separate from machine code: a file written for one controller is never offered as suitable for another.

Run any new program above the sheet first and check the tool numbers, depths and origin against your machine. A CNC router will do exactly what the file says.

Questions people ask

Can I send a DXF straight to my CNC?

Usually not. Most controllers run G-code. The DXF goes into the CAM or nesting software that came with the machine, which writes the G-code.

What is a post-processor?

The part of CAM software that writes toolpaths in the exact form one machine controller expects. The same toolpaths need a different post-processor for each make of controller.

Changes to this page

  • : First published.