Fixes: lp:1664349 (DRC complaining about not connected pads even if they are not on a copper layer)

(happens when creating pads with complex shapes)
https://bugs.launchpad.net/kicad/+bug/1664349
This commit is contained in:
jean-pierre charras 2017-02-14 14:40:34 +01:00
parent 877a65dcc7
commit 19fef1e9ba
3 changed files with 11 additions and 1 deletions

View File

@ -214,6 +214,10 @@ void NETINFO_LIST::buildListOfNets()
if( pad->GetNetCode() == NETINFO_LIST::UNCONNECTED ) // pad not connected
continue;
if( !( pad->GetLayerSet() & LSET::AllCuMask() ).any() )
// pad not a copper layer (happens when building complex shapes)
continue;
// Add pad to the appropriate list of pads
NETINFO_ITEM* net = pad->GetNet();

View File

@ -96,6 +96,7 @@ void CONNECTIONS::SearchConnectionsPadsToIntersectingPads()
if( !( pad->GetLayerSet() & candidate_pad->GetLayerSet() ).any() )
continue;
if( pad->HitTest( item->GetPoint() ) )
{
pad->m_PadsConnected.push_back( candidate_pad );
@ -227,6 +228,7 @@ void CONNECTIONS::BuildPadsCandidatesList()
{
m_candidates.clear();
m_candidates.reserve( m_sortedPads.size() );
for( unsigned ii = 0; ii < m_sortedPads.size(); ii++ )
{
D_PAD * pad = m_sortedPads[ii];

View File

@ -567,11 +567,15 @@ void PCB_BASE_FRAME::build_ratsnest_module( MODULE* aModule )
m_Pcb->m_LocalRatsnest.clear();
// collect active pads of the module:
for( pad_ref = aModule->Pads(); pad_ref; pad_ref = pad_ref->Next() )
for( pad_ref = aModule->Pads(); pad_ref; pad_ref = pad_ref->Next() )
{
if( pad_ref->GetNetCode() == NETINFO_LIST::UNCONNECTED )
continue;
if( !( pad_ref->GetLayerSet() & LSET::AllCuMask() ).any() )
// pad not a copper layer (happens when building complex shapes)
continue;
localPadList.push_back( pad_ref );
pad_ref->SetSubRatsnest( 0 );
pad_ref->SetSubNet( 0 );