From d008303ae78d0973309ea54f5f18b502031131a7 Mon Sep 17 00:00:00 2001 From: Russell Johnson <47639332+Russ4262@users.noreply.github.com> Date: Thu, 27 May 2021 20:20:47 -0500 Subject: [PATCH] Path: Code cleanup, remove duplication, fix `obj.removalshape` shape --- src/Mod/Path/PathScripts/PathPocketShape.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Mod/Path/PathScripts/PathPocketShape.py b/src/Mod/Path/PathScripts/PathPocketShape.py index 902fb21c44..a35326b9be 100644 --- a/src/Mod/Path/PathScripts/PathPocketShape.py +++ b/src/Mod/Path/PathScripts/PathPocketShape.py @@ -84,6 +84,7 @@ class ObjectPocket(PathPocketBase.ObjectPocket): def areaOpShapes(self, obj): '''areaOpShapes(obj) ... return shapes representing the solids to be removed.''' PathLog.track() + self.removalshapes = [] # self.isDebug = True if PathLog.getLevel(PathLog.thisModule()) == 4 else False self.removalshapes = [] @@ -162,7 +163,8 @@ class ObjectPocket(PathPocketBase.ObjectPocket): # shape.tessellate(0.05) # originally 0.1 if self.removalshapes: - obj.removalshape = self.removalshapes[0][0] + obj.removalshape = Part.makeCompound([tup[0] for tup in self.removalshapes]) + return self.removalshapes # Support methods