From 978c2b074eed05b20518d03f838e25c3cb0e60c0 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Thu, 16 Feb 2023 17:39:47 +0000 Subject: [PATCH] Negative clearance means test will be ignored, not rule. --- pcbnew/drc/drc_engine.cpp | 8 -------- pcbnew/tools/board_inspection_tool.cpp | 13 +++++++++++-- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/pcbnew/drc/drc_engine.cpp b/pcbnew/drc/drc_engine.cpp index 48f051e919..16fc69f667 100644 --- a/pcbnew/drc/drc_engine.cpp +++ b/pcbnew/drc/drc_engine.cpp @@ -881,14 +881,6 @@ DRC_CONSTRAINT DRC_ENGINE::EvalRules( DRC_CONSTRAINT_T aConstraintType, const BO REPORT( wxString::Format( _( "Checking %s clearance: %s." ), EscapeHTML( c->constraint.GetName() ), MessageTextFromValue( c->constraint.m_Value.Min() ) ) ) - - if( c->constraint.GetValue().Min() < 0 ) - { - REPORT( implicit ? _( "Negative clearance specified; constraint ignored." ) - : _( "Negative clearance specified; rule ignored." ) ) - return true; - } - break; case DIFF_PAIR_MAX_UNCOUPLED_CONSTRAINT: diff --git a/pcbnew/tools/board_inspection_tool.cpp b/pcbnew/tools/board_inspection_tool.cpp index 87253a0dcc..93d5d9e931 100644 --- a/pcbnew/tools/board_inspection_tool.cpp +++ b/pcbnew/tools/board_inspection_tool.cpp @@ -772,8 +772,17 @@ int BOARD_INSPECTION_TOOL::InspectClearance( const TOOL_EVENT& aEvent ) reportCompileError( r ); r->Report( "" ); - r->Report( wxString::Format( _( "Resolved clearance: %s." ), - m_frame->StringFromValue( clearance, true ) ) ); + + if( clearance < 0 ) + { + r->Report( wxString::Format( _( "Resolved clearance: %s; clearance will not be tested." ), + m_frame->StringFromValue( clearance, true ) ) ); + } + else + { + r->Report( wxString::Format( _( "Resolved clearance: %s." ), + m_frame->StringFromValue( clearance, true ) ) ); + } } r->Flush();