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)
-dcode_adjust:-0.05um -dcode_adjust:-0.00005mm -dcode_adjust:-0.000002inch -dcode_adjust:-10%,50800It 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
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.05umThis method gives the end user the control to achieve the desired rounding rule for path data.
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.
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