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.
This commit is contained in:
Russell Johnson
2021-03-13 10:51:37 -06:00
parent e954bf0f2a
commit 1ce0389e45

View File

@@ -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):