From 09e92fc3fcbe67542e0ba9e16998189d68dde519 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sun, 22 Oct 2023 16:14:19 +0100 Subject: [PATCH] Cap self-intersecting outline violations. --- pcbnew/drc/drc_test_provider_misc.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pcbnew/drc/drc_test_provider_misc.cpp b/pcbnew/drc/drc_test_provider_misc.cpp index 71cfc943f3..99396b74c8 100644 --- a/pcbnew/drc/drc_test_provider_misc.cpp +++ b/pcbnew/drc/drc_test_provider_misc.cpp @@ -85,6 +85,11 @@ void DRC_TEST_PROVIDER_MISC::testOutline() OUTLINE_ERROR_HANDLER errorHandler = [&]( 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 std::swap( itemA, itemB ); @@ -94,7 +99,6 @@ void DRC_TEST_PROVIDER_MISC::testOutline() drcItem->SetItems( itemA, itemB ); reportViolation( drcItem, pt, Edge_Cuts ); - errorHandled = true; }; // Test for very small graphic items (a few nm size) that can create issues