Gerber Union Command Line Syntax

For a calling application to run Gerber Union it must generate the correct command line and launch the gbrunmgr.exe (GerberUnion Manager) program. Syntax is shown below:

gbrunmgr 
         input_gbr 
                   -out:output_file 
                                      -wdir:dir 
                                                 -outputtype:type 
                                                                    [options]

where

gbrumgr              path/name of the Gerber Union Manager executable

input_gbr            path/name of the input Gerber (RS274X) file

-out:output_file     path and name of the output file.

-wdir:wdir           the directory where working and temporary files are written.
 
-outputtype:type     The type of output. Possible outputs: (may require license)
                     [rs274x | dxf | gds_stream | gds_cshape | egs]



[options]

Data Polarity Controls
=======================

-emblevel                 Generates embedding level output.  This
                          format represents holes by assigning a
                          layer to a level of embedding.


-polyformat:pftype        Indicates method for representing holes in
                          polygons other than embedding level.
                          pftype is [leonov | cutlines | butting]
                          Default is cutlines.


-reversal:x,y             Generate a reverse image of unionized output.
                          x is for left and right margins extending
                          from data extents or output window.
                          y is same as x but is for top and bottom
                          margins.


Gerber Output Controls
========================

-no_g36                   Outputs Gerber trace output instead of
                          polygons  w/ G36/G36 codes.

-dcode:number             Specifies number for dcode to be used for
                          trace output.

-diameter:value           Specifies diameter of round dcode for trace
                          output. See unit control notes.


Data Partitioning
=================

-single_part              Enforce single threaded operation while not invoking 
                          manual or auto partitioning.

-joinpart                 Turns on data partition joining.

-manpart                  Specifies that data partitioning is user specified.

-partition_nx:number      Specifies the number of vertical stripes
                          for data partitioning. (used with -manpart).

-partition_ny:number      Specifies the number of horizontal stripes
                          for data partitioning. (used with -manpart).

-autopartrcarray          partitions input into boxed areas instead of stripes.


Geometry Sizing Controls
========================

-manh                     Use Manhattan sizing. Default: 3 points.

-fivept                   Use Five point sizing. 

-sizingvalue:value        Positive value grows data and negative value shrinks it.


Polygon Clean Up Controls
=========================

-slivervalue:value        Specifies value for removing very thin data.

-smoothingvalue:value     Specifies value for removing consecutive
                          points closer than the value specified.

-usecircbool              Output using circular Boolean.


Output File Units and Scaling
=============================

-useotherunits:unit       Specifies output unit as unit.
                          For Gerber output unit can be [inch | mm].
                          Otherwise, unit can be [inch | mil | mm | cm | um].

-outscale:value           Scales the output by value.

-offset:x,y               Offset output by (x, y).

-outputgrid:value         Specifies value of what output grid the data snaps to.

-maxpoints:number         Specifies maximum number of vertices per polygon.


Arc Controls
============

-arcres:value             Specifies arc resolution for arc data representation.

-arcsag:value             Specifies arc chord error for arc data representation.

-circularize:value        detect line segments describing an arc and convert them
                          back to arcs. The value indicates a chord error 
                          tolerance. (Applies to RS274X and DXF output formats)


DXF Output Controls
====================

-basename:layer_substr    Sets   DXF layer names to be of the form: layer_substr_#
                          where # is a number from [1-N]. Default form is L_#


Defining Region to Process
==========================

-window:extents           Clip to window defined by extents which are
                          in the form LLx,LLy,URx,URy.

-polywin:plyfile          Clip to region(s) defined in plyfile.
                          See "Polygon File Format" below.


Messaging Controls
==================

-no_warnings              Prevents warning messages from appearing
                          anywhere except in log file.

-silent                   Silences individual program's progress dialog.

-singledlg                Directs progress information of each
                          executable into a single progress dialog.

Processing and Threads
======================

-passthru                 Will flatten data without unionizing.

-thrnum:thnum             thnum indicates how many threads to use when unionizing.
                          Default is to detect number of CPUs and set the concurrent
                          threads = number of CPUs.

Units on the Command Line
=========================

                         If not specified, dimensional arguments on the command line
                         are in the same units as the input file i.e. either inch
                         or mm.

                         To override the default unit users can follow a dimension
                         value by a unit: um | mm | inch | mil.

                         Example: -sizingvalue:10um



========= end of options ======================================================

Polygon File Format for Complex Cutouts

Let's say you want to clip one ore more irregular regions to "clip" out of your Gerber input file. One can specify one or more regions using the -polywin:file argument (instead of -window) and creating a file with the correct syntax describing the polygon.

In order to prepare the text file you must know in advance:

    a) the number of polygons in your file.

    b) the number of vertices in each polygon. The first and last vertex must be on the same coordinate so a square has 5 vertices.

    c) the X Y coordinates.

For a single cross shaped cutout our "cross.txt" file looks like >

 
1
13
4.66 8
5.33 8
5.33 8.66
6 8.66
6 9.33
5.33 9.33
5.33 10
4.66 10
4.66 9.33
4 9.33
4 8.66
4.66 8.66
4.66 8

If we had two regions to cut out -- a cross and a square -- then our polywin file "cross_square.txt" file would look like this: >

 
2
13
4.66 8
5.33 8
5.33 8.66
6 8.66
6 9.33
5.33 9.33
5.33 10
4.66 10
4.66 9.33
4 9.33
4 8.66
4.66 8.66
4.66 8
5
4.66 6.66
5.33 6.66
5.33 7.33
4.66 7.33
4.66 6.66

Command Line Examples

We've posted a large number of gbrunmgr command line examples on this page





Download Using GBRUnion   Price   Rev History   FAQ  


ARTWORK CONVERSION SOFTWARE, INC.       Company Profile
417 Ingalls St., Santa Cruz, CA 95060    Tel (831) 426-6163     Fax 426-2824    email: info@artwork.com