gbr_prep_web_page_header

GBRPREP - GUI for Split274x

While many users will want to use SPLIT274x in command line mode for batch or script based processing, some will prefer an interactive interface. GBRPREP64 provides that interface by collecting user input and then launching split274x.

GBRPREP Main Dialog

Input/Output/Log

Input - the RS274X file that you wish to condition. Use the Browse button to select the file. Use the View button to launch a Gerber viewer (typically Artwork's GBRVU) so you can display the file.

Output - the RS274X file you wish to produce. Use the Browse button to navigate to the desired directory and assign a file name. Do not use the same path/name as for the input file.

Log - the name and location for the log file. This file will provide a report on the changes made to the data based on the user selected conditioning operations.



Options

Thread Num - tells the program how many concurrent threads should be used. Since many of the optimization functions can run in parallel, more threads normally means faster results. Do not specify a thread count higher than the number of cores your computer has.

Standardize LPC/LPD - when checked, the program will detect and remove LPD/LPC commands that don't have any effect on the final output. It insures that the initial polarity is positive (LPD).



Arc Resolution - used when Arc segmentation is turned on. Determines the number of segments an arc is broken into based on the angle that the segment spans. Normally this is set to 45 degrees and the Chord Error parameter is used instead.

Arc segmentation - When checked this has the effect of breaking all arcs from the input data into segments using the Chord Error/Arcres parameters and enables the use of polygon edge compensation. (which applies only to G36/G37 polygons.) The DPI value associated with Arc segmentation is used to compute the amount of compensation (i.e. 1/2 of the pixel diameter.) If DPI = 0, then no compensation is done but the input arcs are still segmented.



Chord Error - used when Arc segmentation is turned on. Determines how many segments are used to approximate the arc. The value specified is the maximum error between the chord approximate and the arc. So for arcs with a large radius, more segments are used to maintain a constant error. Details.

Circularize - if checked, then the output data is scanned and any series of evenly spaced vertices are tested to see if they form an arc. The parameter supplied here is the chord error for the newly formed arc. The arc will only be formed using vertices when those vertices fall within the chord error tolerance.



Macro Tolerance - when searching for "duplicate" aperture macros, this value is used to determine whether two macros are effectively the same (if their differences are smaller than this value) If set to "0" then the function searching for duplicate macros is disabled.

Format - Gerber files rely on a format statement to define where the decimal point is inserted. The user has 3 options for the format of the output file:

Auto - let the program pick the output format;

Best - force output file format to be 3.5 or 2.6 for MM and INCH files respectively.

Specify - user specifies the desired output format using 2 digits - the first digit are the number of places to the left of the decimal, the second digit is the number of places to the right of the decimal. The sum of the two digits cannot exceed 8.



Max Points - used to determine if an area fill region (G36/G37) exceeds the maximum number of points specified. The max points value assumes that arcs have been broken into segments using the resolution/chord error parameters. If the value of a region exceeds the max points value, the region will be broken into two (or more) smaller regions that don't exceed the max.

Highest D-Code - Many plotters will only read D-code values up to a maximum - say 9999. If a 274X file defines a D-code higher than the max value, the program will re-assign the aperture to an unused D-code under the maximum value.



Remove Dup Pts - The program will examine traces and G36/G37 vertices to see if there are adjacent points spaced closer than this value. If such points are detected, they are deleted. If the value = 0, then this function is disabled.



Rotate (degrees) - Rotate the data by 90, 180, and 270 degrees.

Mirror X and Mirror Y - Mirror the data along X or Y axis. If rotate and mirror are used together, the program will first perform the rotatation and then mirror.



Synthesize Flash - Use this option to instruct the program to convert polygon data to a gerber flash.

Max Dimension (um) - Set the maximum flash size in microns. If the synthesize flash is larger than the value selected, the program will not create a flash and will leave the input polygon as is.

Not Rectangles - This option instructs the program to not synthesize rectangular flashes.

Not Rounds - This option instructs the program to not synthesize round flashes.

Optional Arguments - Additional command line arguments that are not part of the user interface.




Settings

Gerber Viewer - use the browse button to define the path and executable file name of your Gerber viewer. In most cases this will be a path to GBRVU that looks like:

path to Gerber viewer

Setting this will enable launching of a Gerber viewer when the View buttons are pressed for input or output files.




Command Line

The full gbrprep64.exe command line syntax is shown below:

gbrprep64.exe [input_file_name] -rewrite![output_file_name] [OPTARGS]

OPTARGS:

-h                 get the usage information
-log:filename      write log to filename
-rewrite:filename  rewrite input_file to filename remapping
                   decodes to a list of unique ones
-rewrite!filename  rewrite input_file to filename remapping
                   decodes to a list of unique ones, but always keep
-meta[:filename]   output meta data to filename (default derived from -rewrite)
-log:filename      write log to filename
-highest_dcode:N   set highest allowed Dcode value to be N (default 9999)
-macro_tol:X       set macro tolerance to X (defaults 0.001 mm, 0.00004 inch)
                   as per input file units
-macro_info        print macro details (informational)
-sr_span_tol:VU    use V (in units U) as the value for maximum allowed SR span error
                   allowed values for U are mm, um, inch and mils - U is required
                   default value is 1um
-enforce_sr_span_tol    violation of SR span tolerance will result in a fatal error
--enforce_sr_span_tol   violation of SR span tolerance will result in a warning (warning)
-opt_tool_cnt      keep outputs that manifest optimal tool counts (informational)
-comments          emit G04 comment records when optimizing dcode table
-bigrad:M          M is used as a divisor into MAX_INT to flag "large" radius data
                   and potential integer overflow conditions; smoothness is controlled
                   by the arguments to arcres and chord_error (default value is 10)
-arcres:A          use A degrees for segmenting circular data (default 1 degree)
                   used when -dpi:0 or "large" radius data is encountered
                   for the case of -dpi:DPI the default chord error is set to 1/DPI
-outline_arc_draws convert arc draws with width to polygons
-chord_error:VU    use V (in units U) as the value for chord error when segmenting circular
                   data; allowed values for U are mm, um, inch and mils - U is required
                   arcres set to 45 degrees; overrides all other smoothness controls
--chord_error      defeats last invocation of '-chord_error'
-circularize[:VU]  circularize data making use of arguments to -chord_error or optionally
                   use V (in units U) as the value for circularizing; use -dpi:0 so that
                   circular data will be "recircularized"; see notes to -dpi below
--circularize      defeats last invocation of '-circularize'
-qualify[:0|1|2]   check polygon data for validity (default -> 0 off)
--qualify          do not check polygon data for validity
-butting           when booleanizing output data as butting
--butting          negates -butting; implies cutlines
-cutlines          when booleanizing output data as cutlines (default)
--cutlines         negates -cutlines; implies butting
-booldll_logging   enable BoolDll logging (default off)
--booldll_logging  disable BoolDll logging
-fmt:NM            set format to be N.M
-fmt:auto          check input format N.M against rules:
                   (1) (N < 1) or (N > 6) implies (N = 6)
                   (2) ((M + N) > 8) implies M = (8 - N)
-fmt:best          coerce format to be 3.5 or 2.6 for MM and INCH files respectively
-mp_mia0b0         process as if %MIA0B0 appears in input file
-mp_mia1b0         process as if %MIA1B0 appears in input file
-mp_mia0b1         process as if %MIA0B1 appears in input file
-mp_mia1b1         process as if %MIA1B1 appears in input file
-mp_asaxby         process as if %ASAXBY appears in input file
-mp_asaybx         process as if %ASAYBX appears in input file
-rotate:A          rotate output by A degrees about 0,0 (must be a multiple of 90)
-mirror:M[,VU]     mirror in M direction (by default) about 0; M = x or y
                   optional comma separated parameter enables mirroring about the point
                   V (in units U) on the M axis
                   rotation is performed before mirroring
-scale:S[,Sy]      scale in x and y by S and Sy (defaults: S = 1.0, Sy = S)
-g2k_break_sr:2    pass and ignore AS, MI, IO, SF and IR mass parameters in input file
-pass_deprecated   pass and ignore AS and MI mass parameters in input file
-ignore_deprecated ignore AS and MI mass parameters in input file
-ignore_mp_as      ignore AS Axis Select mass parameter
-ignore_mp_mi      ignore MI Mirror Image mass parameter
-tform             by default macro definitions are transformed when MI or AS are active,
                   this option turns this behavior off
-rm_dup_pts:ARG    filter duplicate or nearly duplicate points. ARG can be either dpi
                   or a positive integer that determines "closeness". If ARG is the
                   string literal 'dpi' then points are the same if they are within 1/dpi;
                   if an integer "closeness" is measured in grid points corresponding to
                   the format statement
-maxsrxy:N         set max allowed value for SR counts for downstream usage (default 32768)
-thrnum:N          make use of N threads when sizing or window breaking
-maxblkvrtcnt:N    flush G36/G37 data when collected vertex count exceeds N (default 50M)
-stats             provide memory and cpu statistics
-tag_std_dcodes    do not provide type hint in dcode structure name (GDS output only)
-synflash          synthesize flashes
--synflash         reset for '-synflash' '-synflag' '-synrect' and '-synround'
-synflag           flag synthesized flashes with G04 in output
-synround          do not synthesize pads, i.e. synthesize round pads only
-synrect           do not synthesize non-manhattan rectangular pads
-syndim:DU         D is maximum extent considered to be converted to flash (U indicates units)
                   default is 0.25 inch or 6350 um
-dpi:DPI           normally used with -fmt:best; compensates polygon data,i.e. G36/G37
                   blocks by 1/2 pixel size indicated by DPI
                   DPI > 0 implies shrink
                   DPI < 0 implies grow (would normally not be used)
                   DPI == 0 results in no compensation but circular data is segmented
-zero_draws_ok     do not flag draws or flashes with zero width tool as an error
--zero_draws_ok    defeats last invocation of '-zero_draws_ok'
-macro_draws_ok    do not flag draws with macros as an error
--macro_draws_ok   defeats last invocation of '-macro_draws_ok'
-unref_draws_ng    flag draws or flashes with no tool assignment as an error
-sanity            skip sanity check to see if this is an RS274X file
-no_cache          do not cache sizing or window break results
-verbose[:N]       set verbosity level
-vertex_floor:N    cache sizing results for vertex counts > N
-debug             run in debug mode
-debug:poly        run in window break debug mode


Command Line Example

The following example will rotate the input file icsxseed.gbr by 90 degrees and mirror along the X axis. The output Gerber file name is out90.gbr and the log file is out90.log.

"C:\Wcad\GBRPREP64\gbrprep64.exe" "C:\Wcad\GBRPREP64\EXAMPLES\icsxseed.gbr" "-rewrite!C:\Wcad\GBRPREP64\EXAMPLES\out90.gbr" "-log:C:\Wcad\GBRPREP64\EXAMPLES\out90.log" "-thrnum:16" "-arcres:45.000000" "-chord_error:1.000000um" "-rotate:90" "-mirror:x"