Respect DRCEpsilon in diff-pair coupling test.
Fixes https://gitlab.com/kicad/code/kicad/issues/12587
This commit is contained in:
parent
d6c7f46842
commit
9119b5072a
|
@ -18,15 +18,14 @@
|
|||
*/
|
||||
|
||||
|
||||
#include <common.h>
|
||||
#include <board.h>
|
||||
#include <board_design_settings.h>
|
||||
#include <pcb_track.h>
|
||||
|
||||
#include <drc/drc_engine.h>
|
||||
#include <drc/drc_item.h>
|
||||
#include <drc/drc_rule.h>
|
||||
#include <drc/drc_test_provider.h>
|
||||
#include <drc/drc_length_report.h>
|
||||
#include <drc/drc_rtree.h>
|
||||
|
||||
#include <geometry/shape_segment.h>
|
||||
|
@ -272,6 +271,8 @@ bool test::DRC_TEST_PROVIDER_DIFF_PAIR_COUPLING::Run()
|
|||
{
|
||||
m_board = m_drcEngine->GetBoard();
|
||||
|
||||
int epsilon = m_board->GetDesignSettings().GetDRCEpsilon();
|
||||
|
||||
std::map<DIFF_PAIR_KEY, DIFF_PAIR_ITEMS> dpRuleMatches;
|
||||
|
||||
auto evaluateDpConstraints =
|
||||
|
@ -399,10 +400,10 @@ bool test::DRC_TEST_PROVIDER_DIFF_PAIR_COUPLING::Run()
|
|||
const MINOPTMAX<int>& val = gapConstraint->GetValue();
|
||||
bool insideRange = true;
|
||||
|
||||
if( val.HasMin() && gap < val.Min() )
|
||||
if( val.HasMin() && gap < val.Min() - epsilon )
|
||||
insideRange = false;
|
||||
|
||||
if( val.HasMax() && gap > val.Max() )
|
||||
if( val.HasMax() && gap > val.Max() + epsilon )
|
||||
insideRange = false;
|
||||
|
||||
dp.couplingOK = insideRange;
|
||||
|
|
Loading…
Reference in New Issue