From 1ce0389e45b2b0d5a0d2bd854761861ed1cb259e Mon Sep 17 00:00:00 2001 From: Russell Johnson <47639332+Russ4262@users.noreply.github.com> Date: Sat, 13 Mar 2021 10:51:37 -0600 Subject: [PATCH] Path: Fix connected multi-face clearing bug Identified by MLampert. If multiple faces are selected at varying Z-heights, the `combineConnectedShapes()` method fails to connect them due to offset Z-heights. This fix places all input faces for that method into the same working plane. --- src/Mod/Path/PathScripts/PathPocketShape.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Mod/Path/PathScripts/PathPocketShape.py b/src/Mod/Path/PathScripts/PathPocketShape.py index f85dd3e81b..ca61e6b4f4 100644 --- a/src/Mod/Path/PathScripts/PathPocketShape.py +++ b/src/Mod/Path/PathScripts/PathPocketShape.py @@ -391,6 +391,10 @@ class ObjectPocket(PathPocketBase.ObjectPocket): self.horiz.append(face) self.exts.append(face) + # Place all self.horiz faces into same working plane + for h in self.horiz: + h.translate(FreeCAD.Vector(0.0, 0.0, 0.0 - h.BoundBox.ZMin)) + # check all faces and see if they are touching/overlapping and combine those into a compound self.horizontal = [] # pylint: disable=attribute-defined-outside-init for shape in PathGeom.combineConnectedShapes(self.horiz):