How to open Gerber files in AutoCAD with free open source tools

2015-04-02

This guide provides a detailed procedure for importing Gerber RS-274X files into AutoCAD using open-source tools. This approach offers a cost-effective alternative to proprietary software solutions.

Before proceeding, ensure the following software is installed and configured:

  • gerbv: A tool for viewing Gerber files and exporting them to various formats (excluding DXF or DWG for AutoCAD).
  • pstoedit: A utility for converting Postscript files to a multitude of other formats.
  • ghostscript: A software package that pstoedit relies on for its functionality.

Begin by opening your Gerber files in gerbv. This procedure supports multiple layers. Carefully review your Gerber files for accuracy.

To export the Gerber set to PostScript, navigate to File -> Export -> Postscript…

Alternatively, if you prefer a command-line approach and visual confirmation in gerbv is not necessary, you can export using the command line:

gerbv -x ps MYGERBER.GTL

Following this, convert the Postscript (.ps) file to DXF using pstoedit. This can be efficiently done via the command line:

pstoedit -f dxf foobar.ps foobar.dxf

At this point, you should have a .dxf file that can be opened in AutoCAD.

Considerations

When exporting multiple Gerber files to a single .ps file, and subsequently converting them into a single .dxf, AutoCAD will interpret all the information as a single layer. However, the original layers can be differentiated by their respective colors.

If necessary, you can manually move different colors to new layers in AutoCAD using the QSELECT command. Automating this process is possible but may require advanced expertise.