From 4641fafa021c75376aaefedcd00e4d60fbb8cc63 Mon Sep 17 00:00:00 2001 From: Markus Lampert Date: Sat, 2 Jun 2018 10:24:19 -0700 Subject: [PATCH] Added support for rotated 2d shapes for engraving selection. --- src/Mod/Path/PathScripts/PathSelection.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Mod/Path/PathScripts/PathSelection.py b/src/Mod/Path/PathScripts/PathSelection.py index 35b20f34b2..a9f99ca75c 100644 --- a/src/Mod/Path/PathScripts/PathSelection.py +++ b/src/Mod/Path/PathScripts/PathSelection.py @@ -27,6 +27,7 @@ import FreeCAD import FreeCADGui import PathScripts.PathLog as PathLog import PathScripts.PathUtils as PathUtils +import math if False: PathLog.setLevel(PathLog.Level.DEBUG, PathLog.thisModule()) @@ -50,7 +51,7 @@ class ENGRAVEGate: except: return False - if shape.BoundBox.ZLength == 0.0 and len(shape.Wires) > 0: + if math.fabs(shape.Volume) < 1e-9 and len(shape.Wires) > 0: return True if shape.ShapeType == 'Edge':