Renamed Path Chamfer op to Deburr.
This commit is contained in:
@@ -58,17 +58,17 @@ def toolDepthAndOffset(width, extraDepth, tool):
|
||||
offset = toolOffset + extraOffset
|
||||
return (depth, offset)
|
||||
|
||||
class ObjectChamfer(PathEngraveBase.ObjectOp):
|
||||
'''Proxy class for Chamfer operation.'''
|
||||
class ObjectDeburr(PathEngraveBase.ObjectOp):
|
||||
'''Proxy class for Deburr operation.'''
|
||||
|
||||
def opFeatures(self, obj):
|
||||
return PathOp.FeatureTool | PathOp.FeatureHeights | PathOp.FeatureBaseEdges | PathOp.FeatureBaseFaces
|
||||
|
||||
def initOperation(self, obj):
|
||||
PathLog.track(obj.Label)
|
||||
obj.addProperty('App::PropertyDistance', 'Width', 'Chamfer', QtCore.QT_TRANSLATE_NOOP('PathChamfer', 'The desired width of the chamfer'))
|
||||
obj.addProperty('App::PropertyDistance', 'ExtraDepth', 'Chamfer', QtCore.QT_TRANSLATE_NOOP('PathChamfer', 'The additional depth of the tool path'))
|
||||
obj.addProperty('App::PropertyEnumeration', 'Join', 'Chamfer', QtCore.QT_TRANSLATE_NOOP('PathChamfer', 'How to join chamfer segments'))
|
||||
obj.addProperty('App::PropertyDistance', 'Width', 'Deburr', QtCore.QT_TRANSLATE_NOOP('PathDeburr', 'The desired width of the chamfer'))
|
||||
obj.addProperty('App::PropertyDistance', 'ExtraDepth', 'Deburr', QtCore.QT_TRANSLATE_NOOP('PathDeburr', 'The additional depth of the tool path'))
|
||||
obj.addProperty('App::PropertyEnumeration', 'Join', 'Deburr', QtCore.QT_TRANSLATE_NOOP('PathDeburr', 'How to join chamfer segments'))
|
||||
obj.Join = ['Round', 'Miter']
|
||||
obj.setEditorMode('Join', 2) # hide for now
|
||||
|
||||
@@ -126,9 +126,9 @@ def SetupProperties():
|
||||
return setup
|
||||
|
||||
def Create(name, obj = None):
|
||||
'''Create(name) ... Creates and returns a Chamfer operation.'''
|
||||
'''Create(name) ... Creates and returns a Deburr operation.'''
|
||||
if obj is None:
|
||||
obj = FreeCAD.ActiveDocument.addObject("Path::FeaturePython", name)
|
||||
proxy = ObjectChamfer(obj, name)
|
||||
proxy = ObjectDeburr(obj, name)
|
||||
return obj
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
import PathScripts.PathChamfer as PathChamfer
|
||||
import PathScripts.PathDeburr as PathDeburr
|
||||
import PathScripts.PathGui as PathGui
|
||||
import PathScripts.PathLog as PathLog
|
||||
import PathScripts.PathOpGui as PathOpGui
|
||||
@@ -32,10 +32,10 @@ import PathScripts.PathSelection as PathSelection
|
||||
|
||||
from PySide import QtCore, QtGui
|
||||
|
||||
__title__ = "Path Chamfer Operation UI"
|
||||
__title__ = "Path Deburr Operation UI"
|
||||
__author__ = "sliptonic (Brad Collette)"
|
||||
__url__ = "http://www.freecadweb.org"
|
||||
__doc__ = "Chamfer operation page controller and command implementation."
|
||||
__doc__ = "Deburr operation page controller and command implementation."
|
||||
|
||||
if False:
|
||||
PathLog.setLevel(PathLog.Level.DEBUG, PathLog.thisModule())
|
||||
@@ -48,10 +48,10 @@ def translate(context, text, disambig=None):
|
||||
|
||||
|
||||
class TaskPanelOpPage(PathOpGui.TaskPanelPage):
|
||||
'''Page controller class for the Chamfer operation.'''
|
||||
'''Page controller class for the Deburr operation.'''
|
||||
|
||||
def getForm(self):
|
||||
return FreeCADGui.PySideUic.loadUi(":/panels/PageOpChamferEdit.ui")
|
||||
return FreeCADGui.PySideUic.loadUi(":/panels/PageOpDeburrEdit.ui")
|
||||
|
||||
def initPage(self, obj):
|
||||
self.opImagePath = "{}Mod/Path/Images/Ops/{}".format(FreeCAD.getHomePath(), 'chamfer.svg')
|
||||
@@ -99,13 +99,13 @@ class TaskPanelOpPage(PathOpGui.TaskPanelPage):
|
||||
self.form.value_h.editingFinished.connect(self.updateExtraDepth)
|
||||
|
||||
|
||||
Command = PathOpGui.SetupOperation('Chamfer',
|
||||
PathChamfer.Create,
|
||||
Command = PathOpGui.SetupOperation('Deburr',
|
||||
PathDeburr.Create,
|
||||
TaskPanelOpPage,
|
||||
'Path-Chamfer',
|
||||
QtCore.QT_TRANSLATE_NOOP("PathChamfer", "Chamfer"),
|
||||
QtCore.QT_TRANSLATE_NOOP("PathChamfer", "Creates a Chamfer Path along Edges or around Faces"),
|
||||
PathChamfer.SetupProperties)
|
||||
'Path-Deburr',
|
||||
QtCore.QT_TRANSLATE_NOOP("PathDeburr", "Deburr"),
|
||||
QtCore.QT_TRANSLATE_NOOP("PathDeburr", "Creates a Deburr Path along Edges or around Faces"),
|
||||
PathDeburr.SetupProperties)
|
||||
|
||||
FreeCAD.Console.PrintLog("Loading PathChamferGui... done\n")
|
||||
FreeCAD.Console.PrintLog("Loading PathDeburrGui... done\n")
|
||||
|
||||
@@ -190,7 +190,7 @@ def engraveselect():
|
||||
|
||||
def chamferselect():
|
||||
FreeCADGui.Selection.addSelectionGate(CHAMFERGate())
|
||||
FreeCAD.Console.PrintWarning("Chamfer Select Mode\n")
|
||||
FreeCAD.Console.PrintWarning("Deburr Select Mode\n")
|
||||
|
||||
def profileselect():
|
||||
FreeCADGui.Selection.addSelectionGate(PROFILEGate())
|
||||
@@ -210,8 +210,8 @@ def surfaceselect():
|
||||
|
||||
def select(op):
|
||||
opsel = {}
|
||||
opsel['Chamfer'] = chamferselect
|
||||
opsel['Contour'] = contourselect
|
||||
opsel['Deburr'] = chamferselect
|
||||
opsel['Drilling'] = drillselect
|
||||
opsel['Engrave'] = engraveselect
|
||||
opsel['Helix'] = drillselect
|
||||
|
||||
Reference in New Issue
Block a user