Special-case net-ties for solder mask bridging.
Fixes https://gitlab.com/kicad/code/kicad/issues/13646
This commit is contained in:
parent
b0ec006b81
commit
00e2bbac5a
|
@ -441,7 +441,8 @@ void DRC_TEST_PROVIDER_SOLDER_MASK::testItemAgainstItems( BOARD_ITEM* aItem, con
|
|||
return false;
|
||||
}
|
||||
|
||||
if( pad && otherPad && pad->SameLogicalPadAs( otherPad ) )
|
||||
if( pad && otherPad && ( pad->SameLogicalPadAs( otherPad )
|
||||
|| pad->SharesNetTieGroup( otherPad ) ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -162,6 +162,23 @@ bool PAD::IsLocked() const
|
|||
};
|
||||
|
||||
|
||||
bool PAD::SharesNetTieGroup( const PAD* aOther ) const
|
||||
{
|
||||
FOOTPRINT* parentFp = static_cast<FOOTPRINT*>( GetParentFootprint() );
|
||||
|
||||
if( parentFp && parentFp->IsNetTie() && aOther->GetParentFootprint() == parentFp )
|
||||
{
|
||||
std::map<wxString, int> padToNetTieGroupMap = parentFp->MapPadNumbersToNetTieGroups();
|
||||
int thisNetTieGroup = padToNetTieGroupMap[ GetNumber() ];
|
||||
int otherNetTieGroup = padToNetTieGroupMap[ aOther->GetNumber() ];
|
||||
|
||||
return thisNetTieGroup >= 0 && thisNetTieGroup == otherNetTieGroup;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool PAD::IsNoConnectPad() const
|
||||
{
|
||||
return GetShortNetname().StartsWith( wxT( "unconnected-(" ) )
|
||||
|
|
11
pcbnew/pad.h
11
pcbnew/pad.h
|
@ -155,13 +155,18 @@ public:
|
|||
* Before we had custom pad shapes it was common to have multiple overlapping pads to
|
||||
* represent a more complex shape.
|
||||
*/
|
||||
bool SameLogicalPadAs( const PAD* other ) const
|
||||
bool SameLogicalPadAs( const PAD* aOther ) const
|
||||
{
|
||||
// hide tricks behind sensible API
|
||||
return GetParentFootprint() == other->GetParentFootprint()
|
||||
&& !m_number.IsEmpty() && m_number == other->m_number;
|
||||
return GetParentFootprint() == aOther->GetParentFootprint()
|
||||
&& !m_number.IsEmpty() && m_number == aOther->m_number;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if this and \aOther represent a net-tie.
|
||||
*/
|
||||
bool SharesNetTieGroup( const PAD* aOther ) const;
|
||||
|
||||
/**
|
||||
* @return true if the pad is associated with an "unconnected" pin (or a no-connect symbol)
|
||||
* and has no net.
|
||||
|
|
Loading…
Reference in New Issue