Clear DRC caches before running soldermask tests again.

Fixes https://gitlab.com/kicad/code/kicad/issues/10922
This commit is contained in:
Jeff Young 2022-03-12 15:57:29 +00:00
parent 7fb4a2c0a5
commit db0b733be5
1 changed files with 7 additions and 1 deletions

View File

@ -122,7 +122,7 @@ void DRC_TEST_PROVIDER_SOLDER_MASK::addItemToRTrees( BOARD_ITEM* item )
} }
} }
if( ( zone->GetLayerSet() & LSET::AllCuMask() ).any() && !zone->GetIsRuleArea() ) if( zone->IsOnCopperLayer() && !zone->GetIsRuleArea() )
m_copperZones.push_back( zone ); m_copperZones.push_back( zone );
} }
else if( item->Type() == PCB_PAD_T ) else if( item->Type() == PCB_PAD_T )
@ -190,6 +190,9 @@ void DRC_TEST_PROVIDER_SOLDER_MASK::buildRTrees()
m_itemTree = std::make_unique<DRC_RTREE>(); m_itemTree = std::make_unique<DRC_RTREE>();
m_copperZones.clear(); m_copperZones.clear();
// Unlikely to be correct, but better than starting at 0
m_copperZones.reserve( m_board->Zones().size() );
forEachGeometryItem( s_allBasicItems, layers, forEachGeometryItem( s_allBasicItems, layers,
[&]( BOARD_ITEM* item ) -> bool [&]( BOARD_ITEM* item ) -> bool
{ {
@ -647,6 +650,9 @@ bool DRC_TEST_PROVIDER_SOLDER_MASK::Run()
if( !reportPhase( _( "Building solder mask..." ) ) ) if( !reportPhase( _( "Building solder mask..." ) ) )
return false; // DRC cancelled return false; // DRC cancelled
m_checkedPairs.clear();
m_maskApertureNetMap.clear();
buildRTrees(); buildRTrees();
if( !reportPhase( _( "Checking solder mask to silk clearance..." ) ) ) if( !reportPhase( _( "Checking solder mask to silk clearance..." ) ) )