From 7bb81f75739912dfd6da3e7fba5dcc2db622d6d4 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sat, 6 May 2023 21:28:49 +0100 Subject: [PATCH] Expand solder mask for pads *defined* to be on copper layers. Fixes https://gitlab.com/kicad/code/kicad/issues/14693 --- pcbnew/pad.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pcbnew/pad.cpp b/pcbnew/pad.cpp index 147a4b5724..89679543bf 100644 --- a/pcbnew/pad.cpp +++ b/pcbnew/pad.cpp @@ -850,8 +850,9 @@ int PAD::GetOwnClearance( PCB_LAYER_ID aLayer, wxString* aSource ) const int PAD::GetSolderMaskExpansion() const { // Pads defined only on mask layers (and perhaps on other tech layers) use the shape - // defined by the pad settings only - if( !IsOnCopperLayer() ) + // defined by the pad settings only. ALL other pads, even those that don't actually have + // any copper (such as NPTH pads with holes the same size as the pad) get mask expansion. + if( ( m_layerMask & LSET::AllCuMask() ).none() ) return 0; int margin = m_localSolderMaskMargin; @@ -891,8 +892,9 @@ int PAD::GetSolderMaskExpansion() const VECTOR2I PAD::GetSolderPasteMargin() const { // Pads defined only on mask layers (and perhaps on other tech layers) use the shape - // defined by the pad settings only - if( !IsOnCopperLayer() ) + // defined by the pad settings only. ALL other pads, even those that don't actually have + // any copper (such as NPTH pads with holes the same size as the pad) get paste expansion. + if( ( m_layerMask & LSET::AllCuMask() ).none() ) return VECTOR2I( 0, 0 ); int margin = m_localSolderPasteMargin;