diff --git a/pcbnew/dialogs/dialog_pad_properties.cpp b/pcbnew/dialogs/dialog_pad_properties.cpp
index 15389909bb..8e248438e7 100644
--- a/pcbnew/dialogs/dialog_pad_properties.cpp
+++ b/pcbnew/dialogs/dialog_pad_properties.cpp
@@ -1197,18 +1197,11 @@ bool DIALOG_PAD_PROPERTIES::padValuesOK()
if( !padlayers_mask[F_Cu] && !padlayers_mask[B_Cu] )
{
- if( m_dummyPad->GetDrillSize().x || m_dummyPad->GetDrillSize().y )
+ if( ( m_dummyPad->GetDrillSize().x || m_dummyPad->GetDrillSize().y )
+ && m_dummyPad->GetAttribute() != PAD_ATTRIB_HOLE_NOT_PLATED )
{
// Note: he message is shown in an HTML window
- msg = _( "Error: the pad is not on a copper layer and has a hole" );
-
- if( m_dummyPad->GetAttribute() == PAD_ATTRIB_HOLE_NOT_PLATED )
- {
- msg += wxT( "
" );
- msg += _( "For NPTH pad, set pad size value to pad drill value,"
- " if you do not want this pad plotted in gerber files" );
- }
-
+ msg = _( "Error: plated through holes must have a copper pad on at least one layer" );
error_msgs.Add( msg );
}
}
diff --git a/pcbnew/router/pns_kicad_iface.cpp b/pcbnew/router/pns_kicad_iface.cpp
index 85ba1eedd5..1ef98c18bc 100644
--- a/pcbnew/router/pns_kicad_iface.cpp
+++ b/pcbnew/router/pns_kicad_iface.cpp
@@ -581,8 +581,9 @@ std::unique_ptr PNS_KICAD_IFACE_BASE::syncPad( D_PAD* aPad )
{
LAYER_RANGE layers( 0, MAX_CU_LAYERS - 1 );
- // ignore non-copper pads
- if( ( aPad->GetLayerSet() & LSET::AllCuMask()).none() )
+ // ignore non-copper pads except for those with holes
+ if( ( aPad->GetLayerSet() & LSET::AllCuMask()).none() &&
+ aPad->GetAttribute() != PAD_ATTRIB_HOLE_NOT_PLATED )
return NULL;
switch( aPad->GetAttribute() )
@@ -590,9 +591,9 @@ std::unique_ptr PNS_KICAD_IFACE_BASE::syncPad( D_PAD* aPad )
case PAD_ATTRIB_STANDARD:
break;
- case PAD_ATTRIB_SMD:
case PAD_ATTRIB_HOLE_NOT_PLATED:
case PAD_ATTRIB_CONN:
+ case PAD_ATTRIB_SMD:
{
LSET lmsk = aPad->GetLayerSet();
bool is_copper = false;
@@ -610,7 +611,8 @@ std::unique_ptr PNS_KICAD_IFACE_BASE::syncPad( D_PAD* aPad )
}
}
- if( !is_copper )
+ /// Keep the NPTH pads because we will use the drill as alternate shape
+ if( !is_copper && aPad->GetAttribute() != PAD_ATTRIB_HOLE_NOT_PLATED )
return NULL;
}
break;