Laserlab, Inc.

Understanding Gerber data precision

Listed below are the steps to follow to prepare one or more .dxf files for conversion to Gerber format from a single AutoCAD .dwg  file.

  1. Make a working copy of your .dwg  file.
  2. Remove all spurious entities from your drawing.
  3. Make sure the drawing is at 1:1 scale.
  4. Explode blocks, dimensions, hatching, and mtext.
  5. Purge drawing.
  6. Use AutoCAD "dxfout" command to produce .dxf file(s).

Make a working copy of your .dwg file.

Make a copy of your original .dwg  file, and give the copy a different name. This is done so as to avoid modifying the original .dwg  file. The copy will be modified in a way that might make it difficult to perform edits in the future, so the original .dwg  file is retained. You can skip this step if you are certain your drawing contains no unexploded entities.

We recommend appending the letter x to the original file name when creating the new one to signify eXploded since the main difference between the original and the working copy is that any complex entities present in the original file will be exploded in the copy. If for example, your original file is named abc.dwg , name the working copy abcx.dwg  or abc_x.dwg .

Method A:

  1. Open the original .dwg  file. If you are currently editing the original .dwg  file, save it by typing qsave on the command line or clicking the 'floppy disk' icon.
  2. Pick File -> Save As from the main menu bar.
  3. Give the new drawing a unique name. The original file will be left intact.

Method B:

  1. Using Microsoft Windows Explorer, copy the .dwg  file to a new name.

Remove all spurious entities from your drawing.

Erase anything that will not appear on the artwork/photomask. This includes title blocks, notes, layers containing unneeded information, etc. The final drawing should contain only those entities that will appear on the photoplot or photomask.

Make sure the drawing is at 1:1 scale.

Make sure the drawing is at 1:1 scale. Unless you tell us otherwise, we assume your drawing units are inches. If you use other units, you must specify them in your readme.txt file or scale your drawing to inches before using the dxfout command. Examples are: cm (10 mm), inches, mm, microns (1/1000 mm), and mils (1/1000 inch).

Units are totally arbitrary in AutoCAD. The numbers used in a drawing can mean anything you wish. We cannot guess what you intend. We don't look at the dimension callouts (if supplied) in the drawing.

Explode blocks, dimensions, hatching, and mtext.

The Laserlab dxf2gbr translator does not recognize compound objects such as blocks. Blocks and other compound objects must be exploded to decompose them into simpler entities like lines, arcs, and polylines.

Do not explode hatching intended to guide our CAD operators. If your drawing contains hatching intended to show which areas of your drawing are to be filled, do not explode it. This will make it easier for us to delete. Explode any hatching which is to form part of the artwork. This should be offset, user-defined hatching.

Dimensions must be exploded twice. First the dimension itself is exploded into lines and mtext, then the mtext (multi-line text) must be exploded into dtext (single line text).

Method A: (best if you have only a few items to explode and know their locations)

  1. Type explode at the command prompt.
  2. Click on the compound entities one-by-one.

Method B: (preferred method, but more complex)

  1. Type explode at the command prompt.
  2. Type 'filter (note the tick (apostrophe)).
  3. Add one or more of "block", "dimension" "hatch", and "text" to the object selection filters dialog box using the scroll box. Click "add to list". Click "apply" when done.
  4. Type "all" when asked to select objects.
  5. Press return as many times as required to complete.

Purge drawing.

Remove all unused compound entities, line styles, text styles, layers, etc. from the drawing. These items are not visible but are stored in the .dwg  file. Purging the drawing can dramatically reduce the .dwg  file size.


  1. Type "purge" at the command prompt and press enter.
  2. Type "all" and press enter.
  3. Press enter when prompted "Enter name(s) to purge <*>:"
  4. Press enter when prompted "Verify each name to be purged? [Yes/No] :"
  5. Repeat steps 1-4 until the following is displayed:
    No unreferenced blocks found.
    No unreferenced layers found.
    No unreferenced linetypes found.
    No unreferenced text styles found.
    No unreferenced shape files found.
    No unreferenced dimension styles found.
    No unreferenced mlinestyles found.
    No unreferenced plotstyles found.

Use AutoCAD "dxfout" command to produce .dxf file(s).

There is a one-to-one correspondence between .dxf and .gbr files. Each .dxf file must contain exactly those items you wish to have appear on your photoplot or photomask. In the following procedure, you generate one or more .dxf files by turning on and off layers in the drawing, then outputting a .dxf file with only the visible entities. These steps are repeated until you create all the desired .dxf files.


  1. Zoom out so that everything you want to output is visible. Leave a border by zooming ".9x". This leaves room to easily select the objects to output using a selection window.
  2. Open the layer properties manager by clicking the "layers" icon (looks like a stack of three white sheets of paper).
  3. Turn off all layers not pertinent to the artwork you wish to produce.
  4. Turn on all layers you wish to have appear on the artwork. Close the layers dialog box.
  5. Type "dxfout" at the command prompt and press enter. The "Save As" dialog box will appear.
  6. Click the "Options" button at the lower righthand side of the dialog box. The "Saveas Options" dialog box appears.
  7. Click the "DXF Options" tab.
  8. Check mark the "Select objects" checkbox. Click "OK" to close the dialog box.
  9. Type a file name in the "file name" field. Click "Save" to close the dialog box.
  10. Select all the items on the screen using a selection window. Press enter. This should save only the visible entities to a .dxf file.
  11. Repeat steps 2-10 to create other .dxf files as required.

top of page

Laserlab Home Page

Copyright© 1998-2019 Laserlab, Inc.
Last modified on Wednesday, July 13, 2005 at 4:44 PM

Check this page for XHTML 1.0 strict compliance.

Check this page for CSS compliance.