Path: Add new Slot operation

New slotting operation:
- Accepts selection of up to two features.
- Selectable features include: faces, edges, and vertices.
- User may select a single face or edge, or a pair of features.
- The path may be extended at the start and end.
- The path may be reversed.
- The path may be altered to the perpendicular in some cases.
- A unique Slot icon is included.
- Includes simple collision detection with warning message.
This commit is contained in:
Russell Johnson
2020-06-18 19:55:38 -05:00
parent e1cfaf1298
commit f323e635bd
9 changed files with 2743 additions and 5 deletions

View File

@@ -233,6 +233,17 @@ class PROBEGate:
pass
class ALLGate(PathBaseGate):
def allow(self, doc, obj, sub): # pylint: disable=unused-argument
if sub and sub[0:6] == 'Vertex':
return True
if sub and sub[0:4] == 'Edge':
return True
if sub and sub[0:4] == 'Face':
return True
return False
def contourselect():
FreeCADGui.Selection.addSelectionGate(CONTOURGate())
FreeCAD.Console.PrintWarning("Contour Select Mode\n")
@@ -278,6 +289,10 @@ def adaptiveselect():
FreeCAD.Console.PrintWarning("Adaptive Select Mode\n")
def slotselect():
FreeCADGui.Selection.addSelectionGate(ALLGate())
FreeCAD.Console.PrintWarning("Slot Cutter Select Mode\n")
def surfaceselect():
gate = False
if(MESHGate() or FACEGate()):
@@ -305,6 +320,7 @@ def select(op):
opsel['Profile Edges'] = eselect # (depreciated)
opsel['Profile Faces'] = fselect # (depreciated)
opsel['Profile'] = profileselect
opsel['Slot'] = slotselect
opsel['Surface'] = surfaceselect
opsel['Waterline'] = surfaceselect
opsel['Adaptive'] = adaptiveselect