gbr rip web page logo

-dcode_adjust Option

Artwork added a new API to GBRPLT.DLL to affect the rasterization of round ended trace draws. This new command line option -dcode_adjust is passed to the Gerber preprocessor which in turn modifies entries in the embedded Dcode table of the input Gerber file. Usage of this new API is as follows (taken from GBR2TIFF64.EXE help):

-dcode_adjust:VU[,D]     compensate standard non-zero round apertures as per Value and Unit
                         Unit must be one of "um", "mm", "inch" or "%"
                         if Unit is "%" then it must be followed by ",Dpi" (suggested value for V is -10)

The following usages are all equivalent and will result in the same rasterized output:
-dcode_adjust:-0.05um
-dcode_adjust:-0.00005mm
-dcode_adjust:-0.000002inch
-dcode_adjust:-10%,50800
It is important to note that when the adjustment is given as a percentage, then DPI must be part of the argument list. The value of V is signed, so a negative value will result in rounding rules such that path draws in pixels will be narrower than the nominal (i.e. no dcode adjustment). If V is positive then the rounding rules will be such that path draws in pixels will be wider than the nominal.


Command Line Usage

When using the command line Gbr2TIFF64.exe, this option is passed after -engargs so that it will be passed to GBRPLT.DLL setupFunc as in this example:

c:\wcad\gbrip64.v803\gbr2tiff64.exe test_mod.gbr -274x -mm -pack:50800_adj.tif -dpi:50800 -scale:1.0,1.0 -wplot -1,-1 1,1 -ram:2000 -logcalls -engargs -thrnum:2 -dcode_adjust:-10%,50800

In this example the DPI is provided twice, once is the usual way and then again as a parameter to -dcode_adjust. The follow command line is fully equivalent to the one above:
c:\wcad\gbrip64.v803\gbr2tiff64.exe test_mod.gbr -274x -mm -pack:50800_adj.tif -dpi:50800 -scale:1.0,1.0 -wplot -1,-1 1,1 -ram:2000 -logcalls -engargs -thrnum:2 -dcode_adjust:-0.05um
This method gives the end user the control to achieve the desired rounding rule for path data.
In the examples provided below all yellow cells in the table below moved to the customer's expected value with -dcode_adjust:-10%,DPI. Even though the DPI may change from row to row in the table below, -10% results in correct amount of adjustment regardless of the DPI.


Examples

The table below summarizes the results of the various command line examples and they demonstrate the usage and the affect of the -dcode_adjust feature.
dcode_adjust table

gbr2tiff64.exe test_mod.gbr -274x -mm -pack:50800_std.tif -dpi:50800 -scale:1.0,1.0 -wplot -1,-1 1,1 -ram:2000 -engargs -thrnum:2
gbr2tiff64.exe test_mod.gbr -274x -mm -pack:50800_adj.tif -dpi:50800 -scale:1.0,1.0 -wplot -1,-1 1,1 -ram:2000 -logcalls -engargs -thrnum:2 -dcode_adjust:-10%,50800
gbr2tiff64.exe test_mod.gbr -274x -mm -pack:25400_std.tif -dpi:25400 -scale:1.0,1.0 -wplot -1,-1 1,1 -ram:2000 -engargs -thrnum:2
gbr2tiff64.exe test_mod.gbr -274x -mm -pack:25400_adj.tif -dpi:25400 -scale:1.0,1.0 -wplot -1,-1 1,1 -ram:2000 -logcalls -engargs -thrnum:2 -dcode_adjust:-10%,25400
gbr2tiff64.exe test_mod.gbr -274x -mm -pack:20320_std.tif -dpi:20320 -scale:1.0,1.0 -wplot -1,-1 1,1 -ram:2000 -engargs -thrnum:2
gbr2tiff64.exe test_mod.gbr -274x -mm -pack:20320_adj.tif -dpi:20320 -scale:1.0,1.0 -wplot -1,-1 1,1 -ram:2000 -logcalls -engargs -thrnum:2 -dcode_adjust:-10%,20320
gbr2tiff64.exe test_mod.gbr -274x -mm -pack:12700_std.tif -dpi:12700 -scale:1.0,1.0 -wplot -1,-1 1,1 -ram:2000 -engargs -thrnum:2
gbr2tiff64.exe test_mod.gbr -274x -mm -pack:12700_adj.tif -dpi:12700 -scale:1.0,1.0 -wplot -1,-1 1,1 -ram:2000 -logcalls -engargs -thrnum:2 -dcode_adjust:-10%,12700
gbr2tiff64.exe test_mod.gbr -274x -mm -pack:10160_std.tif -dpi:10160 -scale:1.0,1.0 -wplot -1,-1 1,1 -ram:2000 -engargs -thrnum:2
gbr2tiff64.exe test_mod.gbr -274x -mm -pack:10160_adj.tif -dpi:10160 -scale:1.0,1.0 -wplot -1,-1 1,1 -ram:2000 -logcalls -engargs -thrnum:2 -dcode_adjust:-10%,10160

gbr2tiff64.exe test_mod.gbr -274x -mm -pack:50800_adj.tif -dpi:50800 -scale:1.0,1.0 -wplot -1,-1 1,1 -ram:2000 -engargs -thrnum:2 -dcode_adjust:-0.05um
gbr2tiff64.exe test_mod.gbr -274x -mm -pack:25400_adj.tif -dpi:25400 -scale:1.0,1.0 -wplot -1,-1 1,1 -ram:2000 -engargs -thrnum:2 -dcode_adjust:-0.10um
gbr2tiff64.exe test_mod.gbr -274x -mm -pack:20320_adj.tif -dpi:20320 -scale:1.0,1.0 -wplot -1,-1 1,1 -ram:2000 -engargs -thrnum:2 -dcode_adjust:-0.125um
gbr2tiff64.exe test_mod.gbr -274x -mm -pack:12700_adj.tif -dpi:12700 -scale:1.0,1.0 -wplot -1,-1 1,1 -ram:2000 -engargs -thrnum:2 -dcode_adjust:-0.20um
gbr2tiff64.exe test_mod.gbr -274x -mm -pack:10160_adj.tif -dpi:10160 -scale:1.0,1.0 -wplot -1,-1 1,1 -ram:2000 -engargs -thrnum:2 -dcode_adjust:-0.25um

gbr2tiff64.exe test_mod.gbr -274x -mm -pack:50800_adj.tif -dpi:50800 -scale:1.0,1.0 -wplot -1,-1 1,1 -ram:2000 -engargs -thrnum:2 -dcode_adjust:-0.00005mm
gbr2tiff64.exe test_mod.gbr -274x -mm -pack:25400_adj.tif -dpi:25400 -scale:1.0,1.0 -wplot -1,-1 1,1 -ram:2000 -engargs -thrnum:2 -dcode_adjust:-0.00010mm
gbr2tiff64.exe test_mod.gbr -274x -mm -pack:20320_adj.tif -dpi:20320 -scale:1.0,1.0 -wplot -1,-1 1,1 -ram:2000 -engargs -thrnum:2 -dcode_adjust:-0.000125mm
gbr2tiff64.exe test_mod.gbr -274x -mm -pack:12700_adj.tif -dpi:12700 -scale:1.0,1.0 -wplot -1,-1 1,1 -ram:2000 -engargs -thrnum:2 -dcode_adjust:-0.00020mm
gbr2tiff64.exe test_mod.gbr -274x -mm -pack:10160_adj.tif -dpi:10160 -scale:1.0,1.0 -wplot -1,-1 1,1 -ram:2000 -engargs -thrnum:2 -dcode_adjust:-0.00025mm

gbr2tiff64.exe test_mod.gbr -274x -mm -pack:50800_adj.tif -dpi:50800 -scale:1.0,1.0 -wplot -1,-1 1,1 -ram:2000 -engargs -thrnum:2 -dcode_adjust:-0.000002inch
gbr2tiff64.exe test_mod.gbr -274x -mm -pack:25400_adj.tif -dpi:25400 -scale:1.0,1.0 -wplot -1,-1 1,1 -ram:2000 -engargs -thrnum:2 -dcode_adjust:-0.000004inch
gbr2tiff64.exe test_mod.gbr -274x -mm -pack:20320_adj.tif -dpi:20320 -scale:1.0,1.0 -wplot -1,-1 1,1 -ram:2000 -engargs -thrnum:2 -dcode_adjust:-0.000005inch
gbr2tiff64.exe test_mod.gbr -274x -mm -pack:12700_adj.tif -dpi:12700 -scale:1.0,1.0 -wplot -1,-1 1,1 -ram:2000 -engargs -thrnum:2 -dcode_adjust:-0.000008inch
gbr2tiff64.exe test_mod.gbr -274x -mm -pack:10160_adj.tif -dpi:10160 -scale:1.0,1.0 -wplot -1,-1 1,1 -ram:2000 -engargs -thrnum:2 -dcode_adjust:-0.000010inch