CAD-tekening op monitor naast CNC-machine die aluminium bewerkt, met metaalkrullen bij de snijkop in een industriële werkplaats.

How do I export my drawing to a format that my CNC machine can read?

To export a drawing to CNC output, save your design in a format that your CNC machine or CAM software can read, such as DXF, STEP, or G-code. The format you need depends on the type of machine and the CAM software you’re using as an intermediate step. In this article, we answer the most frequently asked questions about the process of converting a drawing into CNC output.

What file formats does a CNC machine support?

A CNC machine cannot interpret CAD files directly. The machine operates based on NC code or G-code, a series of instructions that describe the tool’s movements. CAD files such as DXF or STEP are first processed by CAM software, which converts the geometry into machine-readable code.

The most commonly used file formats in the process from design to machine are:

  • DXF: a 2D file format widely supported by CAM software and laser cutting machines
  • STEP: a 3D format that accurately transfers geometry between different software packages
  • G-code / NC-code: the final machine code that the CNC machine executes directly
  • DWG: Similar to DXF, but less widely supported outside the Autodesk ecosystem

G-code is the standard for milling machines, lathes, and machining centers. For sheet metal cutting machines and laser cutters, DXF is often used as an intermediate format before the CAM software generates the cutting paths.

How do you convert a CAD drawing to NC code?

You convert a CAD drawing into NC code using a CAM software package. The CAD drawing contains the part’s geometry; the CAM software adds the machining strategy, tool selection, and cutting parameters, and uses that information to generate the NC code for your specific machine.

The steps in this process are generally as follows:

  1. Export the CAD file in a format that your CAM software supports, such as STEP or DXF.
  2. Import the file into the CAM software and verify that the geometry has been transferred correctly.
  3. Define the machining operations: select tools, set cutting depths, and determine the sequence of operations.
  4. Generate the toolpaths: The CAM software calculates the tool’s paths.
  5. Post-processing to NC code: A post-processor converts the toolpath into the specific G-code that your machine understands.

Some integrated CAD/CAM solutions combine steps one and two, allowing you to skip the export step. This reduces the risk of errors when transferring geometry.

What is the difference between DXF, STEP, and G-code for CNC?

DXF and STEP are CAD exchange formats that describe geometry; G-code is the machine code that a CNC machine actually executes. The main difference is that DXF and STEP are intermediate steps on the way to the machine, while G-code is the final result that directly controls the machine.

DXF vs. STEP

DXF is a 2D format, originally developed by Autodesk, and is widely used for flat profiles, laser cutting, and sheet metal fabrication. STEP is a 3D format that captures volumes, surfaces, and precise dimensional information. For complex 3D parts, STEP is the better choice because it includes more geometric information.

G-code as the output format

G-code is not a universal format: every machine manufacturer has its own dialect. What works on a Fanuc controller doesn’t always work on a Heidenhain or Siemens. That’s why the postprocessor in your CAM software is so important. It translates the generic toolpath into the specific G-code variant that your machine expects.

Why doesn’t my CNC machine recognize the exported file?

Your CNC machine does not recognize an exported file because the machine likely expects a different file format, the postprocessor is not configured correctly, or the file contains errors that occurred during export. These are the most common causes of compatibility issues.

If you encounter any problems, check the following:

  • Incorrect format: Make sure you’re exporting to the format that your CAM software or machine expects. Not every machine accepts DXF files directly.
  • Missing or incorrect geometry: Open the exported file in a viewer to check whether all lines, curves, and surfaces have been transferred correctly.
  • Incorrect postprocessor: Once the NC code has been generated, check to make sure the postprocessor is set to the correct machine model and control system.
  • Units do not match: a file in millimeters that is imported as inches will produce unusable results. Check the unit settings on both sides.
  • Unsupported entities: Some CAD elements, such as splines or 3D solids, are not always correctly converted to 2D formats such as DXF.

If the machine reads the code but the part isn’t correct, the problem is often with the post-processor or a mismatch in the coordinate system.

Can CAD software automatically generate cutting paths and NC codes?

Yes, modern CAD software can automatically generate cutting lists, bill of materials, and NC codes based on the 3D model. This saves a significant amount of time compared to manually creating production lists and reduces the risk of errors that occur when manually transferring dimensions and quantities.

Automated output from CAD software typically includes:

  • Cutting lists with exact dimensions for each part
  • Purchasing lists based on the material specifications in the model
  • Sheet optimization to minimize material waste
  • NC codes that can be sent directly to the machine
  • Reports for Production and Quality Control

This capability is particularly valuable for companies in the furniture and interior design industries, where every project is custom-made and manual production planning is time-consuming. The more design and production planning are integrated into a single environment, the lower the risk of errors during the transfer of information.

How IronCAD Helps You Make the Transition from Drawing to CNC Output

IronCAD is Dynfos’ CAD solution, developed specifically for companies in the manufacturing industry, that significantly simplifies the transition from design to production. Instead of manually exporting and converting files, IronCAD automatically generates all necessary output from the 3D model.

Here’s what IronCAD actually does for you:

  • Automatically generate cutting lists based on your design, without having to manually enter measurements
  • Create NC codes directly from the model, ready for your CNC machine
  • Sheet optimization to minimize material waste and reduce purchasing costs
  • Automatically generate purchase lists and reports for production and administration
  • Seamless integration with the Dynfos ERP suite for a fully integrated production process

Would you like to see how IronCAD speeds up your production planning and eliminates errors in the transfer from drawings to CNC output? Contact us for a no-obligation demonstration.