PATH: fix for drilling border case
If only single hole of a given size is found, it was ignored. Doh!
This commit is contained in:
parent
6d1eddc22f
commit
4262544bbf
|
@ -134,7 +134,7 @@ class PathWorkbench (Workbench):
|
||||||
if len(FreeCADGui.Selection.getSelection()) == 1:
|
if len(FreeCADGui.Selection.getSelection()) == 1:
|
||||||
if FreeCADGui.Selection.getSelection()[0].isDerivedFrom("Path::Feature"):
|
if FreeCADGui.Selection.getSelection()[0].isDerivedFrom("Path::Feature"):
|
||||||
self.appendContextMenu("", ["Path_Inspect"])
|
self.appendContextMenu("", ["Path_Inspect"])
|
||||||
if "Profile" or "Contour" in FreeCADGui.Selection.getSelection()[0].Name:
|
if FreeCADGui.Selection.getSelection()[0].Name in ["Profile", "Contour"]:
|
||||||
self.appendContextMenu("", ["Add_Tag"])
|
self.appendContextMenu("", ["Add_Tag"])
|
||||||
self.appendContextMenu("", ["Set_StartPoint"])
|
self.appendContextMenu("", ["Set_StartPoint"])
|
||||||
self.appendContextMenu("", ["Set_EndPoint"])
|
self.appendContextMenu("", ["Set_EndPoint"])
|
||||||
|
|
|
@ -266,6 +266,12 @@ class ObjectDrilling:
|
||||||
FreeCAD.Console.PrintWarning("Drillable location already in the list" + "\n")
|
FreeCAD.Console.PrintWarning("Drillable location already in the list" + "\n")
|
||||||
else:
|
else:
|
||||||
baselist.append(item)
|
baselist.append(item)
|
||||||
|
else:
|
||||||
|
if item in baselist:
|
||||||
|
FreeCAD.Console.PrintWarning("Drillable location already in the list" + "\n")
|
||||||
|
else:
|
||||||
|
baselist.append(item)
|
||||||
|
|
||||||
|
|
||||||
if sub[0:4] == 'Edge':
|
if sub[0:4] == 'Edge':
|
||||||
drillableEdges = []
|
drillableEdges = []
|
||||||
|
@ -277,7 +283,7 @@ class ObjectDrilling:
|
||||||
if candidateedge.Curve.Radius == o.Curve.Radius and candidateedge.Curve.Center.z == o.Curve.Center.z:
|
if candidateedge.Curve.Radius == o.Curve.Radius and candidateedge.Curve.Center.z == o.Curve.Center.z:
|
||||||
drillableEdges.append("Edge" + str(i+1))
|
drillableEdges.append("Edge" + str(i+1))
|
||||||
if len(drillableEdges) > 1:
|
if len(drillableEdges) > 1:
|
||||||
reply = QtGui.QMessageBox.question(None,"","Multiple drillable faces found. Drill them all?",
|
reply = QtGui.QMessageBox.question(None,"","Multiple drillable edges found. Drill them all?",
|
||||||
QtGui.QMessageBox.Yes | QtGui.QMessageBox.No, QtGui.QMessageBox.No)
|
QtGui.QMessageBox.Yes | QtGui.QMessageBox.No, QtGui.QMessageBox.No)
|
||||||
if reply == QtGui.QMessageBox.Yes:
|
if reply == QtGui.QMessageBox.Yes:
|
||||||
for i in drillableEdges:
|
for i in drillableEdges:
|
||||||
|
@ -292,6 +298,11 @@ class ObjectDrilling:
|
||||||
FreeCAD.Console.PrintWarning("Drillable location already in the list" + "\n")
|
FreeCAD.Console.PrintWarning("Drillable location already in the list" + "\n")
|
||||||
else:
|
else:
|
||||||
baselist.append(item)
|
baselist.append(item)
|
||||||
|
else:
|
||||||
|
if item in baselist:
|
||||||
|
FreeCAD.Console.PrintWarning("Drillable location already in the list" + "\n")
|
||||||
|
else:
|
||||||
|
baselist.append(item)
|
||||||
|
|
||||||
print baselist
|
print baselist
|
||||||
obj.Base = baselist
|
obj.Base = baselist
|
||||||
|
|
Loading…
Reference in New Issue
Block a user