Show hole clearance lines around NPTH pads.
Also make the clearance line NONPLATED_HOLES colour, not the PADS_TH colour.
This commit is contained in:
parent
f22316b868
commit
90af5a36d2
|
@ -755,6 +755,32 @@ int PAD::GetLocalClearance( wxString* aSource ) const
|
|||
}
|
||||
|
||||
|
||||
int PAD::GetOwnClearance( PCB_LAYER_ID aLayer, wxString* aSource ) const
|
||||
{
|
||||
DRC_CONSTRAINT c;
|
||||
|
||||
if( GetBoard() && GetBoard()->GetDesignSettings().m_DRCEngine )
|
||||
{
|
||||
BOARD_DESIGN_SETTINGS& bds = GetBoard()->GetDesignSettings();
|
||||
|
||||
if( GetAttribute() == PAD_ATTRIB::NPTH )
|
||||
c = bds.m_DRCEngine->EvalRules( HOLE_CLEARANCE_CONSTRAINT, this, nullptr, aLayer );
|
||||
else
|
||||
c = bds.m_DRCEngine->EvalRules( CLEARANCE_CONSTRAINT, this, nullptr, aLayer );
|
||||
}
|
||||
|
||||
if( c.Value().HasMin() )
|
||||
{
|
||||
if( aSource )
|
||||
*aSource = c.GetName();
|
||||
|
||||
return c.Value().Min();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int PAD::GetSolderMaskExpansion() const
|
||||
{
|
||||
// The pad inherits the margin only to calculate a default shape,
|
||||
|
|
|
@ -397,6 +397,8 @@ public:
|
|||
double GetLocalSolderPasteMarginRatio() const { return m_localSolderPasteMarginRatio; }
|
||||
void SetLocalSolderPasteMarginRatio( double aRatio ) { m_localSolderPasteMarginRatio = aRatio; }
|
||||
|
||||
int GetOwnClearance( PCB_LAYER_ID aLayer, wxString* aSource = nullptr ) const override;
|
||||
|
||||
/**
|
||||
* Convert the pad shape to a closed polygon. Circles and arcs are approximated by segments.
|
||||
*
|
||||
|
|
|
@ -1327,6 +1327,9 @@ void PCB_PAINTER::draw( const PAD* aPad, int aLayer )
|
|||
|
||||
if( flashActiveLayer || aPad->GetDrillSize().x )
|
||||
{
|
||||
if( aPad->GetAttribute() == PAD_ATTRIB::NPTH )
|
||||
color = m_pcbSettings.GetLayerColor( LAYER_NON_PLATEDHOLES );
|
||||
|
||||
m_gal->SetLineWidth( m_pcbSettings.m_outlineWidth );
|
||||
m_gal->SetIsStroke( true );
|
||||
m_gal->SetIsFill( false );
|
||||
|
|
Loading…
Reference in New Issue