Revise restriction on No Copper setting
This allows the user to specify a NPTH with "No Copper", allowing a pad to retain the mask layer without a copper landing. Fixes https://gitlab.com/kicad/code/kicad/issues/3407 Fixes https://gitlab.com/kicad/code/kicad/issues/5237
This commit is contained in:
parent
1082402b33
commit
f4e8c194be
|
@ -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( "<br><br><i>" );
|
||||
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 );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -581,8 +581,9 @@ std::unique_ptr<PNS::SOLID> 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::SOLID> 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::SOLID> 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;
|
||||
|
|
Loading…
Reference in New Issue