Running the DXF2GBR Engine Directly

Created: March 9, 2004
Revised: June 23, 2016

Steve DiBartolomeo, Applications Manager


Artwork’s dxf2gbr engine can be called by an external application or script/batch and used to convert files from DXF to Gerber. We describes the resource files and command line syntax.

By calling the dxf2gbr engine one can convert the DXF into Gerber and import it but make the process seamless to the end user.

Easy and Hard Way

There are two approaches we will discuss here - the easy way and the hard way.

    Easy Way - we will convert everything to G36/G37 outline fill mode. This way we will always used "fixed" apertures. We'll also assume there is no text in the DXF file to convert.

    Hard Way - we want to create flashes for circles and draws for polylines with width. This means we have to scan the input file, figure out what sized apertures we need and create on-the-fly a custom aperture list. Sometimes the end user requires flashes (for example if they plan to use the data to drive a drilling machine.

Easy Way First

We'll do the easy way (i.e. G36 area fill) first.

What Do We Have to Know about the DXF?

    Units - we need to know the DXF file units as this information is not embedded in the DXF file itself.

    Layers - we need to know the DXF layer names as we will be specifying them. If you don't know the layer names you can run the scanning utility to find them. We'll show how to do that in the "Hard Way" section.

Creating an Aperture List

Preliminary Operations - Scanning the DXF File

Layers - AutoCAD’s DXF file format can contain data on multiple layers. Very often the user wants only to import some of the layers -- not all of them. The first thing a calling application should do is to have dxf2gbr engine scan the DXF file and return a list of layers. The list of layers can be presented to the user who will then “check” the layers to import.

    Circles - The scan routine can return a list of different circle diameters found in the DXF file as one option is to convert such circles into round flashes.

    Donuts - The scan routine can return as list of unique donut diameters (inner/outer) found in the DXF file as one option is to convert such donuts into flashes.

    Polyline Widths - the scan routine can return a list of unique widths found for polylines - one option is to map each such polyline to a draw using a round (or square) aperture of the width of the polyline.

    Blocks - the scan routine can return a list of blocks found in the AutoCAD DXF file as one conversion option is to map some or all of these block insertions into a flash in Gerber.

    Text Styles - the scan routine can return a list of text styles ( and the associated font file) for use in mapping text to Gerber draws.

Page    1   |   2   |   3   |   4   |   5   |   6   |   7   |   8   |   9   |   10