From c79610e1324d849305b22bdc2ccc57ee5001b619 Mon Sep 17 00:00:00 2001 From: Tomasz Wlostowski Date: Thu, 25 Feb 2021 00:36:31 +0100 Subject: [PATCH] router: post-rebase fixes --- pcbnew/router/pns_optimizer.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pcbnew/router/pns_optimizer.cpp b/pcbnew/router/pns_optimizer.cpp index 1baa42b60e..a451a0cc69 100644 --- a/pcbnew/router/pns_optimizer.cpp +++ b/pcbnew/router/pns_optimizer.cpp @@ -240,7 +240,8 @@ bool PRESERVE_VERTEX_CONSTRAINT::Check( int aVertex1, int aVertex2, const LINE* for( int i = aVertex1; i < aVertex2; i++ ) { - int dist = aCurrentPath.CSegment(i).Distance( m_v ); + SEG::ecoord dist = aCurrentPath.CSegment(i).SquaredDistance( m_v ); + if ( dist <= 1 ) { cv = true; @@ -604,7 +605,7 @@ bool OPTIMIZER::Optimize( LINE* aLine, LINE* aResult ) if ( m_effortLevel & RESTRICT_AREA ) { - auto c = new AREA_CONSTRAINT( m_world, m_restrictArea ); + auto c = new AREA_CONSTRAINT( m_world, m_restrictArea, m_restrictAreaIsStrict ); AddConstraint( c ); }