web page logo for GBR2DXF

Translating Gerber RS274D Files to DXF

Steve DiBartolomeo
Applications Manager

This page shows how to translate a Gerber RS274D File to DXF. Gerber files using the older 274D syntax need to have the parameters and aperture definitions entered manually.

Say you've received a file and you're not sure if it's 274D or 274X. Let's examine the difference between these two files first. Take the file you're unsure about -- for this example we'll use 272p-l1 -- and drag it into WordPad or other text editor (I recommend Notepad++) to open it.

Here is our example file. Notice the D-Codes (D56) are referenced followed by draw or flash commands (D01,D02,D03) followed by X,Y coordinates. However no where in the file do we see the D-codes defined. Nor do we see any parameters such as UNITS, DATA FORMAT, LEADING or TRAILING ZERO SUPPRESSION, ABSOLUTE or INCREMENTAL coordinates. Therefore, we can deduce that this is a RS274D file.

snapshot of text editor showing our sample RS274D file.


Here is an example of a RS274X file, also opened in a text editor. Notice that this file has D-Codes definitions at the beginning of the file. We can't see the parameter settings but there is also a line for those. Now, when a D-code is used in the data section, our program will know the size and shape.

example of a RS274X file


Now we'll start GBR2DXF and open our sample file 272p-l1. But, notice how the Select Gerber File menu does not show our file available in the directory where it's located.

The reason is because our sample file has no Gerber extension (.gbr, .art, .mda, etc...). So, in the section Files of Type: we must change the settings to All Files - Auto Detect (*.*).

Now the file is visible in the Menu. But, before opening it, Click on the Working Dir... button to make sure the working directory is the same as the one where the Gerber file is located.

This will open the Directory Menu. Click OK to reset the working directory. Now, select the file and press Open.

selecting the file to load into GBR2DXF. Now we can see the file we want to select.


From the GBR2DXF Main Menu, Click on the Settings button to open the Settings Menu. Now we need to enter parameters for our RS274D file. Most importantly, the Gerber UNITS and FORMAT. this information is not found in our sample file. Instead we were provided with the parameters and the an aperture file (listing of D-codes) separately.

settings1.gif


Let's open the sample aperture file 272p-l1.rep. This file was in the same folder as the Gerber file

This is our sample aperture file in NotePad. Notice the Mm / inch = mm. So, in the settings menu we have selected mm. The Coordinate format is given as 4.3 by the string: X0000V000. Change the 4.4 setting that the dialog opens with to 4.3.

From the Settings Menu, click OK to continue.

snapshot of the parameters and aperture information for our RS274D file
updated GBR2DXF Settings Window to refleect format = 4.3


Scroll down a bit further until the aperture table is visible. We will be filling these values into GBR2DXF's Aperture dialog.

Aperture table from the .rep file


As you can see, we've manually added all the aperture definitions to the Menu in GBR2DXF.

For clarity, we've shown all the D-codes in one menu. The user would actually have to scroll down the menu to enter each D-codes aperture separately.

Click OK to save the changes. Now, the Gerber file has an aperture file saved in Artwork's .APT format and we can proceed.

GBR2DXF's Aperture dialog window filled in from  the table.


Before proceeding with the conversion, let's view the data using GBRVU and our newly created aperture list.

The layout looks correct so the GBR2DXF conversion will also be correct.

view of the RS274D file once the correct aperture file was created by entering parameters and D-code values.


From the GBR2DXF Main Menu, Click on the Start Translation button. The translated DXF file will be placed in the same directory as the original Gerber and Aperture files, (i.e. The Working Directory).

You can now open the translated DXF file in AutoCAD for viewing and modifications.