diff --git a/src/Mod/Path/PathScripts/PathPocketShape.py b/src/Mod/Path/PathScripts/PathPocketShape.py index c57778be53..169541f116 100644 --- a/src/Mod/Path/PathScripts/PathPocketShape.py +++ b/src/Mod/Path/PathScripts/PathPocketShape.py @@ -138,12 +138,17 @@ class ObjectPocket(PathPocketBase.ObjectPocket): # check all faces and see if they are touching/overlapping and combine and simplify self.horizontal = PathGeom.combineHorizontalFaces(self.horiz) - # Move all faces to final depth before extrusion + # Move all faces to final depth less buffer before extrusion + # Small negative buffer is applied to compensate for internal significant digits/rounding issue + if self.job.GeometryTolerance.Value == 0.0: + buffer = 0.000001 + else: + buffer = self.job.GeometryTolerance.Value / 10.0 for h in self.horizontal: - h.translate(FreeCAD.Vector(0.0, 0.0, obj.FinalDepth.Value - h.BoundBox.ZMin)) + h.translate(FreeCAD.Vector(0.0, 0.0, obj.FinalDepth.Value - h.BoundBox.ZMin - buffer)) - # extrude all faces up to StartDepth and those are the removal shapes - extent = FreeCAD.Vector(0, 0, obj.StartDepth.Value - obj.FinalDepth.Value) + # extrude all faces up to StartDepth plus buffer and those are the removal shapes + extent = FreeCAD.Vector(0, 0, obj.StartDepth.Value - obj.FinalDepth.Value + buffer) self.removalshapes = [(face.removeSplitter().extrude(extent), False) for face in self.horizontal] else: # process the job base object as a whole