CNC milling: from DXF files to G-Code using free software

Step 1:  Generate the G-Code from your DXF files

  1. Download and extract DXF2GCODE. Within this app, open your DXF file
  2. Select/deselect all layers in the left layer window (Layer)
  3. Alternatively, in the shown image, click on the shapes (outlines, holes etc.) you want to include in your G-Code
  4. Choose milling depth, milling speed etc. and optionally, move origin-point (0,0)
  5. Export pathes to G-Code


Step 2: Load the generated G-Code into a simulator

Before running the G-Code on your CNC milling machine, let’s try it out in a simulator.

  1. You can open the generated G-Code in a plain text editor (Notepad etc.)
  2. Copy & paste the generated G-Code into a G-Code simulator. The red lines show the CNC machine tool movements within the air


Step 3: Load the generated G-Code into your CNC milling software

Open the G-code with your CNC milling machine software (e.g. Mach3)


A blog on projects with robotics, computer vision, 3D printing, microcontrollers, car diagnostics, localization & mapping, digital filters, LiDAR and more