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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user