Skip to content

Commit

Permalink
Path: make toolcontrollers seamless
Browse files Browse the repository at this point in the history
  • Loading branch information
sliptonic authored and yorikvanhavre committed Mar 21, 2017
1 parent 7bdcfb0 commit c633e59
Show file tree
Hide file tree
Showing 5 changed files with 173 additions and 139 deletions.
12 changes: 1 addition & 11 deletions src/Mod/Path/Gui/Resources/panels/DlgToolCopy.ui
Expand Up @@ -10,7 +10,7 @@
<x>0</x>
<y>0</y>
<width>367</width>
<height>119</height>
<height>98</height>
</rect>
</property>
<property name="sizePolicy">
Expand All @@ -33,16 +33,6 @@
<item>
<widget class="QComboBox" name="cboTarget"/>
</item>
<item>
<widget class="QCheckBox" name="chkMakeController">
<property name="text">
<string>Create Tool Controllers</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
Expand Down
100 changes: 73 additions & 27 deletions src/Mod/Path/Gui/Resources/panels/ToolControl.ui
Expand Up @@ -7,18 +7,33 @@
<x>0</x>
<y>0</y>
<width>308</width>
<height>389</height>
<height>352</height>
</rect>
</property>
<property name="windowTitle">
<string>Tool Control</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLineEdit" name="tcoName">
<property name="readOnly">
<bool>true</bool>
<widget class="QFrame" name="frame_4">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLineEdit" name="tcoName">
<property name="readOnly">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="uiToolNum"/>
</item>
</layout>
</widget>
</item>
<item>
Expand All @@ -30,18 +45,15 @@
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="3" column="0">
<widget class="QLabel" name="txtToolDiameter">
<item row="1" column="0">
<widget class="QLabel" name="txtToolType">
<property name="text">
<string>Unknown</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QComboBox" name="cboToolSelect"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="txtToolType">
<item row="3" column="0">
<widget class="QLabel" name="txtToolDiameter">
<property name="text">
<string>Unknown</string>
</property>
Expand All @@ -54,6 +66,13 @@
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="txtToolName">
<property name="text">
<string>Unknown</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
Expand All @@ -73,44 +92,64 @@
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="horizFeed"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Vert. Feed</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="vertFeed"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Horiz Rapid</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="horizRapid">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Vert Rapid</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="Gui::InputField" name="horizFeed">
<property name="minimum">
<double>0.000000000000000</double>
</property>
<property name="unit" stdset="0">
<string notr="true">mm/s</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="Gui::InputField" name="vertFeed">
<property name="minimum">
<double>0.000000000000000</double>
</property>
<property name="unit" stdset="0">
<string notr="true">mm/s</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="Gui::InputField" name="horizRapid">
<property name="minimum">
<double>0.000000000000000</double>
</property>
<property name="unit" stdset="0">
<string notr="true">mm/s</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="vertRapid">
<property name="text">
<string/>
<widget class="Gui::InputField" name="vertRapid">
<property name="minimum">
<double>0.000000000000000</double>
</property>
<property name="unit" stdset="0">
<string notr="true">mm/s</string>
</property>
</widget>
</item>
Expand Down Expand Up @@ -159,6 +198,13 @@
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>Gui::InputField</class>
<extends>QLineEdit</extends>
<header>Gui/InputField.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>
11 changes: 1 addition & 10 deletions src/Mod/Path/PathScripts/PathJob.py
Expand Up @@ -67,7 +67,7 @@ def __init__(self, obj):
obj.PostProcessorArgs = PathPreferences.defaultPostProcessorArgs()
obj.addProperty("App::PropertyString", "MachineName", "Output", QtCore.QT_TRANSLATE_NOOP("App::Property","Name of the Machine that will use the CNC program"))

obj.addProperty("Path::PropertyTooltable", "Tooltable", "Base", QtCore.QT_TRANSLATE_NOOP("App::Property","The tooltable used for this CNC program"))
#obj.addProperty("Path::PropertyTooltable", "Tooltable", "Base", QtCore.QT_TRANSLATE_NOOP("App::Property","The tooltable used for this CNC program"))

obj.addProperty("App::PropertyEnumeration", "MachineUnits", "Output", QtCore.QT_TRANSLATE_NOOP("App::Property","Units that the machine works in, ie Metric or Inch"))
obj.MachineUnits = ['Metric', 'Inch']
Expand Down Expand Up @@ -206,15 +206,6 @@ def Create():
obj = FreeCAD.ActiveDocument.addObject("Path::FeatureCompoundPython", "Job")
PathScripts.PathJob.ObjectPathJob(obj)
PathLoadTool.CommandPathLoadTool.Create(obj.Name)
tl = obj.Group[0]
tool = Path.Tool()
tool.Diameter = 5.0
tool.Name = "Default Tool"
tool.CuttingEdgeHeight = 15.0
tool.ToolType = "EndMill"
tool.Material = "HighSpeedSteel"
obj.Tooltable.addTools(tool)
tl.ToolNumber = 1
obj.ViewObject.Proxy.deleteOnReject = True
obj.ViewObject.startEditing()
'''
Expand Down

0 comments on commit c633e59

Please sign in to comment.