Path.Area: add greedy sort mode

This commit is contained in:
Zheng, Lei
2017-09-21 18:23:24 +08:00
committed by wmayer
parent ca9f583ff0
commit 598fff8b40
3 changed files with 80 additions and 20 deletions

View File

@@ -118,8 +118,14 @@ class ObjectPocket(PathAreaOp.ObjectOp):
# if MinTravel is turned on, set path sorting to 3DSort
# 3DSort shouldn't be used without a valid start point. Can cause
# tool crash without it.
#
# ml: experimental feature, turning off for now (see https://forum.freecadweb.org/viewtopic.php?f=15&t=24422&start=30#p192458)
#if obj.MinTravel and obj.UseStartPoint and obj.StartPoint is not None:
# params['sort_mode'] = 2
# realthunder: I've fixed it with a new sorting algorithm, which I
# tested fine, but of course need more test. Please let know if there is
# any problem
#
if obj.MinTravel and obj.UseStartPoint and obj.StartPoint is not None:
params['sort_mode'] = 3
params['threshold'] = self.radius * 2
return params