Get the outline of the syntesized shape for PocketShape before extruding.

This greatly improves the robustness of the algorithm and gives PathArea less chances to mess it up.
This commit is contained in:
Markus Lampert
2018-06-20 21:19:23 -07:00
parent e68062af2f
commit f492909234

View File

@@ -110,10 +110,13 @@ class ObjectPocket(PathPocketBase.ObjectPocket):
f.translate(FreeCAD.Vector(0, 0, obj.FinalDepth.Value - f.BoundBox.ZMin))
# check all faces and see if they are touching/overlapping and combine those into a compound
self.horizontal = PathGeom.combineConnectedShapes(self.horiz)
for shape in self.horizontal:
self.horizontal = []
for shape in PathGeom.combineConnectedShapes(self.horiz):
shape.sewShape()
shape.tessellate(0.1)
wire = TechDraw.findShapeOutline(shape, 1, FreeCAD.Vector(0, 0, 1))
wire.translate(FreeCAD.Vector(0, 0, obj.FinalDepth.Value - wire.BoundBox.ZMin))
self.horizontal.append(Part.Face(wire))
# extrude all faces up to StartDepth and those are the removal shapes
extent = FreeCAD.Vector(0, 0, obj.StartDepth.Value - obj.FinalDepth.Value)