From 6cc162828601ed9bbeef5601e21fac1ade586643 Mon Sep 17 00:00:00 2001 From: Sabin Iacob Date: Thu, 14 Mar 2019 22:02:26 +0200 Subject: [PATCH] Path: sort shapes in PathAreaOp before executing --- src/Mod/Path/PathScripts/PathAreaOp.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Mod/Path/PathScripts/PathAreaOp.py b/src/Mod/Path/PathScripts/PathAreaOp.py index 158eb9e8b7..9b7d0dff44 100644 --- a/src/Mod/Path/PathScripts/PathAreaOp.py +++ b/src/Mod/Path/PathScripts/PathAreaOp.py @@ -249,6 +249,16 @@ class ObjectOp(PathOp.ObjectOp): shapes = self.areaOpShapes(obj) + jobs = [{ + 'x': s[0].BoundBox.XMin, + 'y': s[0].BoundBox.YMin, + 'shape': s + } for s in shapes] + + jobs = PathUtils.sort_jobs(jobs, ['x', 'y']) + + shapes = [j['shape'] for j in jobs] + sims = [] for (shape, isHole) in shapes: try: