This came up in another thread when a user was confused about why the plotted output didn't match the previews https://forum.kicad.info/t/soldermask-missing-between-pads/13792 This bugged me a bit so I did a little digging. Probably not a complete picture but gives some scope to what is involved. The challenge is that pullback/margin preview that one sees in pcbnew is applied by the pad geometrically, specifically in PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) defined in pcb_painter.cpp which gets the margin setting from D_PAD::GetSolderMaskMargin defined in class_pad.cpp , for custom pads a geometric inflate is applied. There is also a related drawing function D_PAD::Draw defined in pad_draw_functions.cpp with largely the same logic, but it is not clear to me when that drawing code is used. This is straight forward as this applies the margin to the mask feature defined by the pad itself, note that a side effect of this is the clearance option will not automatically pull back solid mask regions (such as when one wants to leave a region of board unmasked) outside of a pad. Although, perhaps I missed that code somewhere else. On the other side of this: the minimum mask width (minimum sliver) setting is computed purely graphically during the plotting step. PlotSolderMaskLayers in plot_board_layers.cpp There a code comment reads /* Plot a solder mask layer. * Solder mask layers have a minimum thickness value and cannot be drawn like standard layers, * unless the minimum thickness is 0. * Currently the algo is: * 1 - build all pad shapes as polygons with a size inflated by * mask clearance + (min width solder mask /2) * 2 - Merge shapes * 3 - deflate result by (min width solder mask /2) * 4 - ORing result by all pad shapes as polygons with a size inflated by * mask clearance only (because deflate sometimes creates shape artifacts) * 5 - draw result as polygons ...*/ Indeed, the minimum sliver and clearance is done across the board in an aperture style plot. This could