7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-21 17:53:45 +00:00

Support via stacks in plotter

This commit is contained in:
Jon Evans 2024-11-04 22:27:50 -05:00
parent d0b2334ceb
commit 7e1638ed11

View File

@ -627,19 +627,24 @@ void PlotStandardLayer( BOARD* aBoard, PLOTTER* aPlotter, LSET aLayerMask,
int via_margin = 0;
double width_adj = 0;
// TODO(JE) padstacks - separate top/bottom margin
if( onSolderMaskLayer )
via_margin = via->GetSolderMaskExpansion();
if( ( aLayerMask & LSET::AllCuMask() ).any() )
width_adj = itemplotter.getFineWidthAdj();
// TODO(JE) padstacks
int diameter = via->GetWidth( PADSTACK::ALL_LAYERS ) + 2 * via_margin + width_adj;
/// Vias not connected to copper are optionally not drawn
if( onCopperLayer && !via->FlashLayer( aLayerMask ) )
continue;
int diameter = 0;
for( PCB_LAYER_ID layer : LSET( aLayerMask & LSET::AllCuMask() ).Seq() )
diameter = std::max( diameter, via->GetWidth( layer ) );
diameter += 2 * via_margin + width_adj;
// Don't draw a null size item :
if( diameter <= 0 )
continue;