Browse Source

Fix wxCHECK_MSG in DRC

The layers check needs to look for testing against technical layers for
those vias that pass the outer layers
newinvert
Seth Hillbrand 3 years ago
parent
commit
e4fe27993e
  1. 26
      pcbnew/drc/drc_test_provider_physical_clearance.cpp

26
pcbnew/drc/drc_test_provider_physical_clearance.cpp

@ -647,7 +647,18 @@ int DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::testItemAgainstItem( BOARD_ITEM* aItem
if( aItem->Type() == PCB_VIA_T )
{
wxCHECK_MSG( aItem->GetLayerSet().Contains( aLayer ), violations,
LSET layers = aItem->GetLayerSet();
if( layers.Contains( F_Cu ) )
layers |= LSET::FrontBoardTechMask().set( F_CrtYd );
if( layers.Contains( B_Cu ) )
layers |= LSET::BackBoardTechMask().set( B_CrtYd );
if( layers.Contains( F_Cu ) && layers.Contains( B_Cu ) )
layers |= LSET::AllCuMask();
wxCHECK_MSG( layers.Contains( aLayer ), violations,
wxT( "Bug! Vias should only be checked for layers on which they exist" ) );
itemHoleShape = aItem->GetEffectiveHoleShape();
@ -659,7 +670,18 @@ int DRC_TEST_PROVIDER_PHYSICAL_CLEARANCE::testItemAgainstItem( BOARD_ITEM* aItem
if( other->Type() == PCB_VIA_T )
{
wxCHECK_MSG( other->GetLayerSet().Contains( aLayer ), violations,
LSET layers = other->GetLayerSet();
if( layers.Contains( F_Cu ) )
layers |= LSET::FrontBoardTechMask().set( F_CrtYd );
if( layers.Contains( B_Cu ) )
layers |= LSET::BackBoardTechMask().set( B_CrtYd );
if( layers.Contains( F_Cu ) && layers.Contains( B_Cu ) )
layers |= LSET::AllCuMask();
wxCHECK_MSG( layers.Contains( aLayer ), violations,
wxT( "Bug! Vias should only be checked for layers on which they exist" ) );
otherHoleShape = other->GetEffectiveHoleShape();

Loading…
Cancel
Save