From 2c862f0f728aba2099c28c1fa3fbdf89b479bb18 Mon Sep 17 00:00:00 2001 From: Sabin Iacob Date: Thu, 25 May 2017 22:50:17 +0300 Subject: [PATCH] Path: add zmax to the job weight so we drill the holes that are closer to the surface first --- src/Mod/Path/PathScripts/PathHelix.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Mod/Path/PathScripts/PathHelix.py b/src/Mod/Path/PathScripts/PathHelix.py index 25ea1af05d..fec64f78f9 100644 --- a/src/Mod/Path/PathScripts/PathHelix.py +++ b/src/Mod/Path/PathScripts/PathHelix.py @@ -409,8 +409,9 @@ class ObjectPathHelix(object): jobs[-1]["zmin"] -= obj.ThroughDepth.Value drill_jobs.extend(jobs) + if len(drill_jobs) > 0: - drill_jobs = PathUtils.sort_jobs(drill_jobs, ['xc', 'yc']) + drill_jobs = PathUtils.sort_jobs(drill_jobs, ['xc', 'yc'], ['xc', 'zmax']) for job in drill_jobs: output += helix_cut((job["xc"], job["yc"]), job["r_out"], job["r_in"], obj.DeltaR.Value,