Skip to content

Commit

Permalink
PATH: More reasonble defaults for new tools
Browse files Browse the repository at this point in the history
  • Loading branch information
sliptonic committed Dec 11, 2016
1 parent 68d3e18 commit fe29160
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 53 deletions.
95 changes: 47 additions & 48 deletions src/Mod/Path/CMakeLists.txt
Expand Up @@ -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/PathMillFace.py
PathScripts/PathPocket.py
PathScripts/PathDrilling.py
PathScripts/PathEngrave.py
PathScripts/PathFacePocket.py
PathScripts/PathFaceProfile.py
PathScripts/PathFixture.py
PathScripts/PathFromShape.py
PathScripts/PathGeom.py
PathScripts/PathDressup.py
PathScripts/DragknifeDressup.py
PathScripts/PathHop.py
PathScripts/PathInspect.py
PathScripts/PathUtils.py
PathScripts/PathSelection.py
PathScripts/PathFixture.py
PathScripts/PathCopy.py
PathScripts/PathCompoundExtended.py
PathScripts/PathJob.py
PathScripts/PathKurveUtils.py
PathScripts/PathLoadTool.py
PathScripts/PathMillFace.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/PathLoadTool.py
PathScripts/PathToolLenOffset.py
PathScripts/PathComment.py
PathScripts/PathStop.py
PathScripts/PathFromShape.py
PathScripts/PathKurveUtils.py
PathScripts/PathAreaUtils.py
PathScripts/slic3r_pre.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/PathToolLenOffset.py
PathScripts/PathSanity.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/slic3r_pre.py
PathTests/PathTestUtils.py
PathTests/TestPathGeom.py
PathTests/TestPathPost.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
)

Expand Down
28 changes: 25 additions & 3 deletions src/Mod/Path/Gui/Resources/panels/ToolEdit.ui
Expand Up @@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>423</width>
<height>435</height>
<width>361</width>
<height>418</height>
</rect>
</property>
<property name="windowTitle">
Expand All @@ -31,7 +31,14 @@
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="NameField"/>
<widget class="QLineEdit" name="NameField">
<property name="maxLength">
<number>50</number>
</property>
<property name="placeholderText">
<string>Display Name</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_2">
Expand All @@ -42,6 +49,9 @@
</item>
<item row="2" column="1">
<widget class="QComboBox" name="TypeField">
<property name="currentIndex">
<number>6</number>
</property>
<item>
<property name="text">
<string>Drill</string>
Expand Down Expand Up @@ -162,6 +172,12 @@
<property name="suffix">
<string>mm</string>
</property>
<property name="minimum">
<double>0.010000000000000</double>
</property>
<property name="value">
<double>5.000000000000000</double>
</property>
</widget>
</item>
<item row="8" column="0">
Expand Down Expand Up @@ -232,6 +248,12 @@
<property name="suffix">
<string>mm</string>
</property>
<property name="minimum">
<double>0.100000000000000</double>
</property>
<property name="value">
<double>10.000000000000000</double>
</property>
</widget>
</item>
</layout>
Expand Down
4 changes: 2 additions & 2 deletions src/Mod/Path/PathScripts/PathToolLibraryManager.py
Expand Up @@ -356,7 +356,6 @@ def getFields(self):
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",
Expand Down Expand Up @@ -389,8 +388,9 @@ def getMaterial(self, material):

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():
Expand Down

0 comments on commit fe29160

Please sign in to comment.