From fe291607a44a5b63f062f1c109ab399faf0ab1a4 Mon Sep 17 00:00:00 2001 From: sliptonic Date: Sat, 3 Dec 2016 15:06:15 -0600 Subject: [PATCH] PATH: More reasonble defaults for new tools --- src/Mod/Path/CMakeLists.txt | 101 +++++++++--------- src/Mod/Path/Gui/Resources/panels/ToolEdit.ui | 28 ++++- .../PathScripts/PathToolLibraryManager.py | 4 +- 3 files changed, 77 insertions(+), 56 deletions(-) diff --git a/src/Mod/Path/CMakeLists.txt b/src/Mod/Path/CMakeLists.txt index 487f68d0f..2eb3a902e 100644 --- a/src/Mod/Path/CMakeLists.txt +++ b/src/Mod/Path/CMakeLists.txt @@ -16,67 +16,66 @@ INSTALL( SET(PathScripts_SRCS PathCommands.py - PathScripts/DogboneDressup.py - PathScripts/DragknifeDressup.py - PathScripts/PathAreaUtils.py - PathScripts/PathArray.py - PathScripts/PathComment.py - PathScripts/PathCompoundExtended.py + PathScripts/__init__.py + PathScripts/PostUtils.py + PathScripts/example_pre.py + PathScripts/opensbp_pre.py + PathScripts/opensbp_post.py + PathScripts/example_post.py + PathScripts/linuxcnc_post.py + PathScripts/centroid_post.py + PathScripts/comparams_post.py + PathScripts/dynapath_post.py + PathScripts/generic_post.py + PathScripts/dumper_post.py + PathScripts/rml_post.py + PathScripts/TooltableEditor.py + PathScripts/PathProfile.py + PathScripts/PathProfileEdges.py PathScripts/PathContour.py - PathScripts/PathCopy.py - PathScripts/PathCustom.py - PathScripts/PathDressup.py - PathScripts/PathDrilling.py - PathScripts/PathEngrave.py - PathScripts/PathFacePocket.py - PathScripts/PathFaceProfile.py - PathScripts/PathFixture.py - PathScripts/PathFromShape.py - PathScripts/PathGeom.py - PathScripts/PathHop.py - PathScripts/PathInspect.py - PathScripts/PathJob.py - PathScripts/PathKurveUtils.py - PathScripts/PathLoadTool.py PathScripts/PathMillFace.py + PathScripts/PathPocket.py + PathScripts/PathDrilling.py + PathScripts/PathDressup.py + PathScripts/DragknifeDressup.py + PathScripts/PathHop.py + PathScripts/PathUtils.py + PathScripts/PathSelection.py + PathScripts/PathFixture.py + PathScripts/PathCopy.py + PathScripts/PathCompoundExtended.py + PathScripts/PathJob.py + PathScripts/PathStock.py PathScripts/PathPlane.py PathScripts/PathPocket.py PathScripts/PathPost.py PathScripts/PathPostProcessor.py - PathScripts/PathPreferences.py - PathScripts/PathPreferencesPathJob.py - PathScripts/PathProfile.py - PathScripts/PathProfileEdges.py - PathScripts/PathRemote.py - PathScripts/PathSanity.py - PathScripts/PathSelection.py - PathScripts/PathSimpleCopy.py - PathScripts/PathStock.py - PathScripts/PathStop.py - PathScripts/PathSurface.py + PathScripts/PathLoadTool.py PathScripts/PathToolLenOffset.py - PathScripts/PathToolLibraryManager.py - PathScripts/PathUtils.py - PathScripts/PostUtils.py - PathScripts/TooltableEditor.py - PathScripts/__init__.py - PathScripts/centroid_post.py - PathScripts/comparams_post.py - PathScripts/dumper_post.py - PathScripts/dynapath_post.py - PathScripts/example_post.py - PathScripts/example_pre.py - PathScripts/generic_post.py - PathScripts/linuxcnc_post.py - PathScripts/opensbp_post.py - PathScripts/opensbp_pre.py - PathScripts/rml_post.py + PathScripts/PathComment.py + PathScripts/PathStop.py + PathScripts/PathFromShape.py + PathScripts/PathKurveUtils.py + PathScripts/PathAreaUtils.py PathScripts/slic3r_pre.py - PathTests/PathTestUtils.py - PathTests/TestPathGeom.py - PathTests/TestPathPost.py + PathScripts/PathFaceProfile.py + PathScripts/PathFacePocket.py + PathScripts/PathArray.py + PathScripts/PathCustom.py + PathScripts/PathInspect.py + PathScripts/PathSimpleCopy.py + PathScripts/PathEngrave.py + PathScripts/PathSurface.py + PathScripts/PathSanity.py + PathScripts/PathToolLibraryManager.py + PathScripts/DogboneDressup.py + PathScripts/PathPreferencesPathJob.py + PathScripts/PathPreferences.py + PathTests/__init__.py PathTests/test_linuxcnc_00.ngc + PathTests/TestPathDepthParams.py + PathTests/TestPathPost.py TestPathApp.py ) diff --git a/src/Mod/Path/Gui/Resources/panels/ToolEdit.ui b/src/Mod/Path/Gui/Resources/panels/ToolEdit.ui index ce7ec3c3d..45a60cb1b 100644 --- a/src/Mod/Path/Gui/Resources/panels/ToolEdit.ui +++ b/src/Mod/Path/Gui/Resources/panels/ToolEdit.ui @@ -6,8 +6,8 @@ 0 0 - 423 - 435 + 361 + 418 @@ -31,7 +31,14 @@ - + + + 50 + + + Display Name + + @@ -42,6 +49,9 @@ + + 6 + Drill @@ -162,6 +172,12 @@ mm + + 0.010000000000000 + + + 5.000000000000000 + @@ -232,6 +248,12 @@ mm + + 0.100000000000000 + + + 10.000000000000000 + diff --git a/src/Mod/Path/PathScripts/PathToolLibraryManager.py b/src/Mod/Path/PathScripts/PathToolLibraryManager.py index 746b4e071..f252b06fc 100644 --- a/src/Mod/Path/PathScripts/PathToolLibraryManager.py +++ b/src/Mod/Path/PathScripts/PathToolLibraryManager.py @@ -356,7 +356,6 @@ class EditorPanel(): pass def getType(self, tooltype): - print("tooltype: ", tooltype) "gets a combobox index number for a given type or viceversa" toolslist = ["Drill", "CenterDrill", "CounterSink", "CounterBore", "Reamer", "Tap", "EndMill", "SlotCutter", "BallEndMill", @@ -389,8 +388,9 @@ class EditorPanel(): def addTool(self): t = Path.Tool() - print (t) + print ("adding a new tool") editform = FreeCADGui.PySideUic.loadUi(":/panels/ToolEdit.ui") + r = editform.exec_() if r: if editform.NameField.text():