Pad with hole same size or larger than pad isn't flashed.
... even if it's marked as being on copper layers. Also changes the default hole clearance to 0.25mm. Fixes https://gitlab.com/kicad/code/kicad/issues/9901
This commit is contained in:
parent
df1e74d418
commit
1f9e75f676
|
@ -85,7 +85,7 @@
|
||||||
#define DEFAULT_MICROVIASMINSIZE 0.2 // micro vias (not vias) min diameter
|
#define DEFAULT_MICROVIASMINSIZE 0.2 // micro vias (not vias) min diameter
|
||||||
#define DEFAULT_MICROVIASMINDRILL 0.1 // micro vias (not vias) min drill diameter
|
#define DEFAULT_MICROVIASMINDRILL 0.1 // micro vias (not vias) min drill diameter
|
||||||
#define DEFAULT_HOLETOHOLEMIN 0.25 // minimum web thickness between two drilled holes
|
#define DEFAULT_HOLETOHOLEMIN 0.25 // minimum web thickness between two drilled holes
|
||||||
#define DEFAULT_HOLECLEARANCE 0.0 // copper-to-hole clearance
|
#define DEFAULT_HOLECLEARANCE 0.25 // copper-to-hole clearance (from IPC level A)
|
||||||
|
|
||||||
#define DEFAULT_COPPEREDGECLEARANCE 0.01 // clearance between copper items and edge cuts
|
#define DEFAULT_COPPEREDGECLEARANCE 0.01 // clearance between copper items and edge cuts
|
||||||
#define LEGACY_COPPEREDGECLEARANCE -0.01 // A flag to indicate the legacy method (based
|
#define LEGACY_COPPEREDGECLEARANCE -0.01 // A flag to indicate the legacy method (based
|
||||||
|
|
|
@ -50,6 +50,7 @@
|
||||||
#include <wx/log.h>
|
#include <wx/log.h>
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
#include <macros.h>
|
||||||
|
|
||||||
using KIGFX::PCB_PAINTER;
|
using KIGFX::PCB_PAINTER;
|
||||||
using KIGFX::PCB_RENDER_SETTINGS;
|
using KIGFX::PCB_RENDER_SETTINGS;
|
||||||
|
@ -214,18 +215,13 @@ bool PAD::FlashLayer( int aLayer ) const
|
||||||
std::vector<KICAD_T> types
|
std::vector<KICAD_T> types
|
||||||
{ PCB_TRACE_T, PCB_ARC_T, PCB_VIA_T, PCB_PAD_T, PCB_ZONE_T, PCB_FP_ZONE_T };
|
{ PCB_TRACE_T, PCB_ARC_T, PCB_VIA_T, PCB_PAD_T, PCB_ZONE_T, PCB_FP_ZONE_T };
|
||||||
|
|
||||||
// Return the "normal" shape if the caller doesn't specify a particular layer
|
|
||||||
if( aLayer == UNDEFINED_LAYER )
|
|
||||||
return true;
|
|
||||||
|
|
||||||
const BOARD* board = GetBoard();
|
const BOARD* board = GetBoard();
|
||||||
|
|
||||||
if( !board )
|
switch( GetAttribute() )
|
||||||
return false;
|
{
|
||||||
|
case PAD_ATTRIB::PTH:
|
||||||
/// We don't remove the copper from non-PTH pads
|
if( aLayer == UNDEFINED_LAYER )
|
||||||
if( GetAttribute() != PAD_ATTRIB::PTH )
|
return true;
|
||||||
return IsOnLayer( static_cast<PCB_LAYER_ID>( aLayer ) );
|
|
||||||
|
|
||||||
/// Heat sink pads always get copper
|
/// Heat sink pads always get copper
|
||||||
if( GetProperty() == PAD_PROP::HEATSINK )
|
if( GetProperty() == PAD_PROP::HEATSINK )
|
||||||
|
@ -239,7 +235,35 @@ bool PAD::FlashLayer( int aLayer ) const
|
||||||
if( m_keepTopBottomLayer && ( aLayer == F_Cu || aLayer == B_Cu ) )
|
if( m_keepTopBottomLayer && ( aLayer == F_Cu || aLayer == B_Cu ) )
|
||||||
return IsOnLayer( static_cast<PCB_LAYER_ID>( aLayer ) );
|
return IsOnLayer( static_cast<PCB_LAYER_ID>( aLayer ) );
|
||||||
|
|
||||||
return board->GetConnectivity()->IsConnectedOnLayer( this, static_cast<int>( aLayer ), types );
|
return board && board->GetConnectivity()->IsConnectedOnLayer( this,
|
||||||
|
static_cast<int>( aLayer ),
|
||||||
|
types );
|
||||||
|
|
||||||
|
case PAD_ATTRIB::NPTH:
|
||||||
|
if( GetShape() == PAD_SHAPE::CIRCLE && GetDrillShape() == PAD_DRILL_SHAPE_CIRCLE )
|
||||||
|
{
|
||||||
|
if( GetOffset() == wxPoint( 0, 0 ) && GetDrillSize().x >= GetSize().x )
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else if( GetShape() == PAD_SHAPE::OVAL && GetDrillShape() == PAD_DRILL_SHAPE_OBLONG )
|
||||||
|
{
|
||||||
|
if( GetOffset() == wxPoint( 0, 0 )
|
||||||
|
&& GetDrillSize().x >= GetSize().x && GetDrillSize().y >= GetSize().y )
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
KI_FALLTHROUGH;
|
||||||
|
|
||||||
|
case PAD_ATTRIB::SMD:
|
||||||
|
case PAD_ATTRIB::CONN:
|
||||||
|
default:
|
||||||
|
if( aLayer == UNDEFINED_LAYER )
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return IsOnLayer( static_cast<PCB_LAYER_ID>( aLayer ) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1150,6 +1174,12 @@ wxString PAD::GetSelectMenuText( EDA_UNITS aUnits ) const
|
||||||
GetParent()->GetReference(),
|
GetParent()->GetReference(),
|
||||||
layerMaskDescribe() );
|
layerMaskDescribe() );
|
||||||
}
|
}
|
||||||
|
else if( GetAttribute() == PAD_ATTRIB::NPTH && !FlashLayer( UNDEFINED_LAYER ) )
|
||||||
|
{
|
||||||
|
return wxString::Format( _( "Through hole pad %s of %s" ),
|
||||||
|
wxT( "(" ) + _( "NPTH, Mechanical" ) + wxT( ")" ),
|
||||||
|
GetParent()->GetReference() );
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return wxString::Format( _( "Through hole pad %s of %s" ),
|
return wxString::Format( _( "Through hole pad %s of %s" ),
|
||||||
|
@ -1167,6 +1197,12 @@ wxString PAD::GetSelectMenuText( EDA_UNITS aUnits ) const
|
||||||
GetParent()->GetReference(),
|
GetParent()->GetReference(),
|
||||||
layerMaskDescribe() );
|
layerMaskDescribe() );
|
||||||
}
|
}
|
||||||
|
else if( GetAttribute() == PAD_ATTRIB::NPTH && !FlashLayer( UNDEFINED_LAYER ) )
|
||||||
|
{
|
||||||
|
return wxString::Format( _( "Through hole pad %s of %s" ),
|
||||||
|
wxT( "(" ) + _( "NPTH, Mechanical" ) + wxT( ")" ),
|
||||||
|
GetParent()->GetReference() );
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return wxString::Format( _( "Through hole pad %s %s of %s" ),
|
return wxString::Format( _( "Through hole pad %s %s of %s" ),
|
||||||
|
|
Loading…
Reference in New Issue