Use only a physical connection to determine flashing of pads.

Checking for proper nets just confuses things when the nets are set
wrongly for some reason.  This way we generate clearer DRC errors.

Fixes https://gitlab.com/kicad/code/kicad/issues/10645
This commit is contained in:
Jeff Young 2022-02-20 20:44:32 +00:00
parent d56e488f2d
commit f8d15a641a
3 changed files with 5 additions and 4 deletions

View File

@ -378,7 +378,7 @@ void CONNECTIVITY_DATA::PropagateNets( BOARD_COMMIT* aCommit, PROPAGATE_MODE aMo
bool CONNECTIVITY_DATA::IsConnectedOnLayer( const BOARD_CONNECTED_ITEM *aItem, int aLayer,
std::vector<KICAD_T> aTypes ) const
std::vector<KICAD_T> aTypes, bool aIgnoreNets ) const
{
CN_CONNECTIVITY_ALGO::ITEM_MAP_ENTRY &entry = m_connAlgo->ItemEntry( aItem );
@ -397,7 +397,7 @@ bool CONNECTIVITY_DATA::IsConnectedOnLayer( const BOARD_CONNECTED_ITEM *aItem, i
{
if( connected->Valid()
&& connected->Layers().Overlaps( aLayer )
&& connected->Net() == aItem->GetNetCode()
&& ( connected->Net() == aItem->GetNetCode() || aIgnoreNets )
&& matchType( connected->Parent()->Type() ) )
{
return true;

View File

@ -201,7 +201,8 @@ public:
unsigned int GetUnconnectedCount() const;
bool IsConnectedOnLayer( const BOARD_CONNECTED_ITEM* aItem,
int aLayer, std::vector<KICAD_T> aTypes = {} ) const;
int aLayer, std::vector<KICAD_T> aTypes = {},
bool aIgnoreNets = false ) const;
unsigned int GetNodeCount( int aNet = -1 ) const;

View File

@ -237,7 +237,7 @@ bool PAD::FlashLayer( int aLayer ) const
return board && board->GetConnectivity()->IsConnectedOnLayer( this,
static_cast<int>( aLayer ),
types );
types, true );
case PAD_ATTRIB::NPTH:
if( GetShape() == PAD_SHAPE::CIRCLE && GetDrillShape() == PAD_DRILL_SHAPE_CIRCLE )