From 02e0278e45100e34c69c88e60920bed680835b76 Mon Sep 17 00:00:00 2001 From: Sabin Iacob Date: Fri, 26 May 2017 08:54:40 +0300 Subject: [PATCH] Path: use the actual values instead of absolute values when calculating distance --- src/Mod/Path/PathScripts/PathUtils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Path/PathScripts/PathUtils.py b/src/Mod/Path/PathScripts/PathUtils.py index d4f80fffb3..fd6aab8be4 100644 --- a/src/Mod/Path/PathScripts/PathUtils.py +++ b/src/Mod/Path/PathScripts/PathUtils.py @@ -526,7 +526,7 @@ def sort_jobs(locations, keys, attractors=[]): """ square Euclidean distance """ d = 0 for k in keys: - d += (abs(a[k]) - abs(b[k])) ** 2 + d += (a[k] - b[k]) ** 2 return d