From 3e754e037801f156e870e47a4d36d684b5554ce8 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Tue, 18 Aug 2020 14:10:24 -0700 Subject: [PATCH] Teach PNS to respect PTH pads on single layers This is a valid configuration for some single layer boards (e.g. high-power LEDs) so we should ensure that PNS doesn't allow connections to those layers without pads. --- pcbnew/class_pad.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp index 2085eb9482..2e0c91fcae 100644 --- a/pcbnew/class_pad.cpp +++ b/pcbnew/class_pad.cpp @@ -209,11 +209,12 @@ bool D_PAD::IsPadOnLayer( int aLayer ) const return IsOnLayer( static_cast( aLayer ) ); if( !m_removeUnconnectedLayer ) - return true; + return IsOnLayer( static_cast( aLayer ) ); /// Plated through hole pads need copper on the top/bottom layers for proper soldering + /// Unless the user has removed them in the pad dialog if( aLayer == F_Cu || aLayer == B_Cu ) - return true; + return IsOnLayer( static_cast( aLayer ) ); return board->GetConnectivity()->IsConnectedOnLayer( this, static_cast( aLayer ), { PCB_TRACE_T, PCB_ARC_T, PCB_VIA_T, PCB_PAD_T } );