Cap self-intersecting outline violations.

This commit is contained in:
Jeff Young 2023-10-22 16:14:19 +01:00
parent 47e25d617e
commit 09e92fc3fc
1 changed files with 5 additions and 1 deletions

View File

@ -85,6 +85,11 @@ void DRC_TEST_PROVIDER_MISC::testOutline()
OUTLINE_ERROR_HANDLER errorHandler = OUTLINE_ERROR_HANDLER errorHandler =
[&]( const wxString& msg, BOARD_ITEM* itemA, BOARD_ITEM* itemB, const VECTOR2I& pt ) [&]( const wxString& msg, BOARD_ITEM* itemA, BOARD_ITEM* itemB, const VECTOR2I& pt )
{ {
errorHandled = true;
if( m_drcEngine->IsErrorLimitExceeded( DRCE_INVALID_OUTLINE ) )
return;
if( !itemA ) // If we only have a single item, make sure it's A if( !itemA ) // If we only have a single item, make sure it's A
std::swap( itemA, itemB ); std::swap( itemA, itemB );
@ -94,7 +99,6 @@ void DRC_TEST_PROVIDER_MISC::testOutline()
drcItem->SetItems( itemA, itemB ); drcItem->SetItems( itemA, itemB );
reportViolation( drcItem, pt, Edge_Cuts ); reportViolation( drcItem, pt, Edge_Cuts );
errorHandled = true;
}; };
// Test for very small graphic items (a few nm size) that can create issues // Test for very small graphic items (a few nm size) that can create issues