Renamed Path Chamfer op to Deburr.
This commit is contained in:
@@ -29,11 +29,11 @@ SET(PathScripts_SRCS
|
||||
PathScripts/PathArray.py
|
||||
PathScripts/PathCircularHoleBase.py
|
||||
PathScripts/PathCircularHoleBaseGui.py
|
||||
PathScripts/PathChamfer.py
|
||||
PathScripts/PathChamferGui.py
|
||||
PathScripts/PathComment.py
|
||||
PathScripts/PathCopy.py
|
||||
PathScripts/PathCustom.py
|
||||
PathScripts/PathDeburr.py
|
||||
PathScripts/PathDeburrGui.py
|
||||
PathScripts/PathDressup.py
|
||||
PathScripts/PathDressupAxisMap.py
|
||||
PathScripts/PathDressupDogbone.py
|
||||
@@ -130,8 +130,8 @@ SET(PathScripts_post_SRCS
|
||||
SET(PathTests_SRCS
|
||||
PathTests/__init__.py
|
||||
PathTests/PathTestUtils.py
|
||||
PathTests/TestPathChamfer.py
|
||||
PathTests/TestPathCore.py
|
||||
PathTests/TestPathDeburr.py
|
||||
PathTests/TestPathDepthParams.py
|
||||
PathTests/TestPathDressupDogbone.py
|
||||
PathTests/TestPathDressupHoldingTags.py
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
<file>icons/Path-Array.svg</file>
|
||||
<file>icons/Path-Axis.svg</file>
|
||||
<file>icons/Path-BaseGeometry.svg</file>
|
||||
<file>icons/Path-Chamfer.svg</file>
|
||||
<file>icons/Path-Comment.svg</file>
|
||||
<file>icons/Path-Compound.svg</file>
|
||||
<file>icons/Path-Contour.svg</file>
|
||||
<file>icons/Path-Copy.svg</file>
|
||||
<file>icons/Path-Custom.svg</file>
|
||||
<file>icons/Path-Datums.svg</file>
|
||||
<file>icons/Path-Deburr.svg</file>
|
||||
<file>icons/Path-Depths.svg</file>
|
||||
<file>icons/Path-Dressup.svg</file>
|
||||
<file>icons/Path-Drilling.svg</file>
|
||||
@@ -92,7 +92,7 @@
|
||||
<file>panels/PageBaseLocationEdit.ui</file>
|
||||
<file>panels/PageDepthsEdit.ui</file>
|
||||
<file>panels/PageHeightsEdit.ui</file>
|
||||
<file>panels/PageOpChamferEdit.ui</file>
|
||||
<file>panels/PageOpDeburrEdit.ui</file>
|
||||
<file>panels/PageOpDrillingEdit.ui</file>
|
||||
<file>panels/PageOpEngraveEdit.ui</file>
|
||||
<file>panels/PageOpHelixEdit.ui</file>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
id="svg2816"
|
||||
version="1.1"
|
||||
inkscape:version="0.92.3 (2405546, 2018-03-11)"
|
||||
sodipodi:docname="Path-Chamfer.svg">
|
||||
sodipodi:docname="Path-Deburr.svg">
|
||||
<defs
|
||||
id="defs2818">
|
||||
<linearGradient
|
||||
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
@@ -71,9 +71,9 @@ class PathWorkbench (Workbench):
|
||||
FreeCADGui.addIconPath(":/icons")
|
||||
# load python modules
|
||||
from PathScripts import PathArray
|
||||
from PathScripts import PathChamferGui
|
||||
from PathScripts import PathComment
|
||||
from PathScripts import PathCustom
|
||||
from PathScripts import PathDeburrGui
|
||||
from PathScripts import PathDressupAxisMap
|
||||
from PathScripts import PathDressupDogbone
|
||||
from PathScripts import PathDressupDragknife
|
||||
@@ -123,7 +123,7 @@ class PathWorkbench (Workbench):
|
||||
prepcmdlist.append("Path_Shape")
|
||||
extracmdlist.extend(["Path_Area", "Path_Area_Workplane"])
|
||||
|
||||
engravecmdlist = sorted(engravecmdlist + ['Path_Chamfer'])
|
||||
engravecmdlist = sorted(engravecmdlist + ['Path_Deburr'])
|
||||
engravecmdgroup = ['Path_EngraveTools']
|
||||
FreeCADGui.addCommand('Path_EngraveTools', PathCommandGroup(engravecmdlist, QtCore.QT_TRANSLATE_NOOP("Path", 'Engraving Operations')))
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
# ***************************************************************************
|
||||
|
||||
import Path
|
||||
import PathScripts.PathChamfer as PathChamfer
|
||||
import PathScripts.PathDeburr as PathDeburr
|
||||
import PathScripts.PathLog as PathLog
|
||||
import PathTests.PathTestUtils as PathTestUtils
|
||||
import math
|
||||
@@ -32,7 +32,7 @@ PathLog.setLevel(PathLog.Level.INFO, PathLog.thisModule())
|
||||
#PathLog.trackModule(PathLog.thisModule())
|
||||
|
||||
|
||||
class TestPathChamfer(PathTestUtils.PathTestBase):
|
||||
class TestPathDeburr(PathTestUtils.PathTestBase):
|
||||
|
||||
def test00(self):
|
||||
'''Verify chamfer depth and offset for an end mill.'''
|
||||
@@ -41,14 +41,14 @@ class TestPathChamfer(PathTestUtils.PathTestBase):
|
||||
tool.FlatRadius = 0
|
||||
tool.CuttingEdgeAngle = 180
|
||||
|
||||
(depth, offset) = PathChamfer.toolDepthAndOffset(1, 0.01, tool)
|
||||
(depth, offset) = PathDeburr.toolDepthAndOffset(1, 0.01, tool)
|
||||
self.assertRoughly(0.01, depth)
|
||||
self.assertRoughly(9, offset)
|
||||
|
||||
# legacy tools - no problem, same result
|
||||
tool.CuttingEdgeAngle = 0
|
||||
|
||||
(depth, offset) = PathChamfer.toolDepthAndOffset(1, 0.01, tool)
|
||||
(depth, offset) = PathDeburr.toolDepthAndOffset(1, 0.01, tool)
|
||||
self.assertRoughly(0.01, depth)
|
||||
self.assertRoughly(9, offset)
|
||||
|
||||
@@ -58,11 +58,11 @@ class TestPathChamfer(PathTestUtils.PathTestBase):
|
||||
tool.FlatRadius = 0
|
||||
tool.CuttingEdgeAngle = 90
|
||||
|
||||
(depth, offset) = PathChamfer.toolDepthAndOffset(1, 0, tool)
|
||||
(depth, offset) = PathDeburr.toolDepthAndOffset(1, 0, tool)
|
||||
self.assertRoughly(1, depth)
|
||||
self.assertRoughly(0, offset)
|
||||
|
||||
(depth, offset) = PathChamfer.toolDepthAndOffset(1, 0.2, tool)
|
||||
(depth, offset) = PathDeburr.toolDepthAndOffset(1, 0.2, tool)
|
||||
self.assertRoughly(1.2, depth)
|
||||
self.assertRoughly(0.2, offset)
|
||||
|
||||
@@ -72,11 +72,11 @@ class TestPathChamfer(PathTestUtils.PathTestBase):
|
||||
tool.FlatRadius = 0.3
|
||||
tool.CuttingEdgeAngle = 90
|
||||
|
||||
(depth, offset) = PathChamfer.toolDepthAndOffset(1, 0, tool)
|
||||
(depth, offset) = PathDeburr.toolDepthAndOffset(1, 0, tool)
|
||||
self.assertRoughly(1, depth)
|
||||
self.assertRoughly(0.3, offset)
|
||||
|
||||
(depth, offset) = PathChamfer.toolDepthAndOffset(2, 0.2, tool)
|
||||
(depth, offset) = PathDeburr.toolDepthAndOffset(2, 0.2, tool)
|
||||
self.assertRoughly(2.2, depth)
|
||||
self.assertRoughly(0.5, offset)
|
||||
|
||||
@@ -88,10 +88,10 @@ class TestPathChamfer(PathTestUtils.PathTestBase):
|
||||
|
||||
td = 1.73205
|
||||
|
||||
(depth, offset) = PathChamfer.toolDepthAndOffset(1, 0, tool)
|
||||
(depth, offset) = PathDeburr.toolDepthAndOffset(1, 0, tool)
|
||||
self.assertRoughly(td, depth)
|
||||
self.assertRoughly(10, offset)
|
||||
|
||||
(depth, offset) = PathChamfer.toolDepthAndOffset(3, 1, tool)
|
||||
(depth, offset) = PathDeburr.toolDepthAndOffset(3, 1, tool)
|
||||
self.assertRoughly(td * 3 + 1, depth)
|
||||
self.assertRoughly(10 + td, offset)
|
||||
@@ -38,5 +38,5 @@ from PathTests.TestPathTool import TestPathTool
|
||||
from PathTests.TestPathTooltable import TestPathTooltable
|
||||
from PathTests.TestPathToolController import TestPathToolController
|
||||
from PathTests.TestPathSetupSheet import TestPathSetupSheet
|
||||
from PathTests.TestPathChamfer import TestPathChamfer
|
||||
from PathTests.TestPathDeburr import TestPathDeburr
|
||||
|
||||
|
||||
Reference in New Issue
Block a user