Path: fix bug in drilling

hemispherical faces have an odd edge that doesn't have a Curve attribute.
This commit is contained in:
sliptonic
2017-06-11 14:25:51 -05:00
committed by Yorik van Havre
parent 7048ce77c3
commit 239514e825
3 changed files with 19 additions and 16 deletions

View File

@@ -260,18 +260,16 @@ class ObjectProfile:
FreeCAD.Console.PrintWarning ("found a base object which is not a face. Can't continue.")
return
if obj.processHoles:
for wire in holes:
f = Part.makeFace(wire, 'Part::FaceMakerSimple')
drillable = PathUtils.isDrillable(baseobject.Shape, wire)
if (drillable and obj.processCircles) or (not drillable and obj.processHoles):
env = PathUtils.getEnvelope(baseobject.Shape, subshape=f, stockheight=obj.StartDepth)
try:
commandlist.extend(self._buildPathArea(obj, baseobject=env, isHole=True, start=None).Commands)
except Exception as e:
FreeCAD.Console.PrintError(e)
FreeCAD.Console.PrintError("Something unexpected happened. Unable to generate a contour path. Check project and tool config.")
for wire in holes:
f = Part.makeFace(wire, 'Part::FaceMakerSimple')
drillable = PathUtils.isDrillable(baseobject.Shape, wire)
if (drillable and obj.processCircles) or (not drillable and obj.processHoles):
env = PathUtils.getEnvelope(baseobject.Shape, subshape=f, stockheight=obj.StartDepth)
try:
commandlist.extend(self._buildPathArea(obj, baseobject=env, isHole=True, start=None).Commands)
except Exception as e:
FreeCAD.Console.PrintError(e)
FreeCAD.Console.PrintError("Something unexpected happened. Unable to generate a contour path. Check project and tool config.")
if len(faces) > 0:
profileshape = Part.makeCompound(faces)