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.
This commit is contained in:
Seth Hillbrand 2020-08-18 14:10:24 -07:00
parent f4e8c194be
commit 3e754e0378
1 changed files with 3 additions and 2 deletions

View File

@ -209,11 +209,12 @@ bool D_PAD::IsPadOnLayer( int aLayer ) const
return IsOnLayer( static_cast<PCB_LAYER_ID>( aLayer ) );
if( !m_removeUnconnectedLayer )
return true;
return IsOnLayer( static_cast<PCB_LAYER_ID>( 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<PCB_LAYER_ID>( aLayer ) );
return board->GetConnectivity()->IsConnectedOnLayer( this, static_cast<int>( aLayer ),
{ PCB_TRACE_T, PCB_ARC_T, PCB_VIA_T, PCB_PAD_T } );