Gerber Based Translators and Postprocessors

Split274x

In modern versions of Artwork's software products that import Gerber (274x) files, the file is submitted to a module called split274x which is used to condition the Gerber data. (You will not see split274x in the program directory because it is linked as a static library ... )

Its purpose is to protect against (among other things)

  1. 32 bit integer overflow related to format specification (e.g. a format statement of 5.6) as most Artwork software is limited to 32 signed integer operations.

  2. 32 bit integer overflow related to circular commands with shallow (large radius) arcs.

  3. Conflicting D-code Definitions .e.g D10 is first defined as a 10 mil Round and later on in the file D10 is defined to be a 50 mil square.

  4. Reduction of identical and nearly identical Dcode definitions and macros (default tolerance is 1 um for equivalency - in some products this tolerance can be controlled by the end user)

  5. Breaking large vertex count polygons (including circular data that will be segmented) into many smaller pieces. We have seen G36 area fill polygons with more than 200K vertices.

  6. Correct for poorly constructed circular data (G02 and G03) and circular data that is inconsistent with G74 and G75 codes corresponding to 90° and 360° circular interpolation.

  7. Change Dcode definitions greater than 40000, e.g. ADD500000,C... will be redefined to use the first available Dcode number below 40000; Note that the latest RS274X specification allows Dcode enumeration up 32 bit values but many tools may not yet support that.

  8. When split274x is used with Artwork's Gerber rasterizers - Gerber data is made to conform to either format 3.5 (mm) or format 2.6 to maximize the precision of the rasterizer.

This code was introduced in 2002 and has been regularly updated over the years when we encounter new issues.


Output File

Split27x does not modify the original file - it creates a new file. The new file name is based on the source file with the _fmtbest appended to the file name.


layer5.gbr -> layer5_gbr_fmtbest.gbr


You many encounter these files in the working directory of many of Artwork's converters.

Additional Functions

Split274x has additional internal functions that are independent of input file conditioning. These functions can be exposed by running:

c:\> split274x (or split274x64) -h

This will return the command line arguments

split274x: a 274X conversion utility, vx.p (rcs 1.397)
(C) 2002-2017 Artwork Conversion Software, Inc. (831) 426-6163

usage is

split274x64.exe input_file [options]

options

-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 

-split:basename      split input_file into several files using basename as the root file name

-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)

-macro_info          print macro details (informational)

-opt_tool_cnt        keep outputs that manifest optimal tool counts (informational)

-comments            emit G04 comment records when optimizing dcode table

-arcres:R            use R degrees for segmenting large radius circular data (default 1)

-maxpts:N            limit polygon vertex count to N (default 4096)

-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

-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

-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.

-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

-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







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