web_logo.gif

Running GBRUnion from a Command Line

This page describes how to run GBRUNion from a command line so that it can be launched by another application or from a script. In order to use GBRUnion in this fashion one actually calls a program called gbrunmgr.exe. This only works with RS274X files as input.

Command Line Syntax

(there are no returns in the command line - they are only shown for clarity ...)

  gbrunmgr.exe 
        input_gerber_file 
               -out:output_file 
                    -wdir:working_directory 
                           -outputtype:[rs274x | dxf | gds_stream | gds_cshape | egs] 
                                [options]


where


gbrunmgr.exe                name of the manager program executable

input_gerber_file           the input RS274X file to be processed

-out:output_file            the name of the output file to produce

-wdir:working_directory     the working directory where temporary files are written

-outputtype:string          the type of output to produce. Available outputs are:
                            rs274x, dxf, gds_stream, gds_cshape, egs




[options] are:


ARGUMENT                  DESCRIPTION


Conversion Settings and Parameters --------------------------------------------------


-arcres:value             Specifies arc resolution for arc data representation

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

-useotherunits:unit       Specify output unit where unit is: INCH | MIL CM | MM | UM

-outscale:value           Scales the output by value

-window:extents           Specify extents of window to which data is clipped by. Format of 
                          extents is: min_x,min,y,max_x,max_y

-offset:xvalue,yvalue     Specifies to offset data by (xvalue,yvalue).

-angle:value              Corners with angle greater than this value will be mitered.  
                          (For circular boolean)



Output Geometry Controls ----------------------------------------------------------


-emblevel                 Generates embedding level output instead of cutline output

-polyformat:butting       Generates butting polygon output instead of cutline output

-overlapvlaue:X           Generates an overlap of a user defined value in butting mode 
                          (use it with -polyformat:buttin)

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

-maxpoints:number         Specifies maximum number of vertices per polygon

-circularize:value        Specifies to detect line segments fitting in a chord error of 
                          value and converting them into circular data. 

-usecircbool              Output using circualar boolean. (only applies
                          to output formats such as DXF/Gerber where circular output
                          is supported.)



Gerber Output Settings -----------------------------------------------------------

-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 dia. of round dcode for trace output



Data Partitioning Options ------------------------------------------------------

-no_part                  Turns off data partitioning

-no_joinpart              Turns off 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)



Data Sizing and Smoothing Options -------------------------------------------------

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

-slivervalue:value        Specifies value for removing very thin data

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




Running Options ------------------------------------------------------------------

-silent                   Suppresses individual program displays.

-singledlg                Display Gbrunion's progress through a single dialog box. 
                          (default is off)

Example

Suppose you wish to convert the RS274X file, icsxseed.gbr, into an AutoCAD DXF file. You could use the following command line syntax to do so. Assume that the gbrunion exectuables are located in C:\wcad\gbrunion and that the test file is in a directory: c:\wcad\gbrunion\examples\rs274x

(note - there are no breaks or returns in the command line - it is shown that way for clarity)



"c:\wcad\gbrunion\gbrunmgr.exe"
   
    "c:\wcad\gbrunion\examples\274x\icsxseed.gbr"
   
          "-out:c:\wcad\gbrunion\examples\274x\out\icsxseed.dxf" 

                    "-wdir:c:\wcad\gbrvu.pro\EXAMPLES\274X\work" 

                           -outputtype:dxf 

                                -smoothingvalue:0.0001 

                                            -silent 

                                                 -singledlg