소스 검색

Bug fixed: the Toolchange Z parameter is not saved in the program/project defaults.
Solution:
Added: 'Toolchange Z' entry in the Options -> Excellon Options
Also made sure that the "Toolchange Z" parameter is saved in the defaults.json file and also loaded. Added it into the dimensions list so it can be converted in between IN and MM units.

Marius Stanciu 10 년 전
부모
커밋
6dc107e462
2개의 변경된 파일15개의 추가작업 그리고 3개의 파일을 삭제
  1. 5 1
      FlatCAMApp.py
  2. 10 2
      FlatCAMGUI.py

+ 5 - 1
FlatCAMApp.py

@@ -221,6 +221,7 @@ class App(QtCore.QObject):
             "excellon_travelz": self.defaults_form.excellon_group.travelz_entry,
             "excellon_feedrate": self.defaults_form.excellon_group.feedrate_entry,
             "excellon_spindlespeed": self.defaults_form.excellon_group.spindlespeed_entry,
+            "excellon_toolchangez": self.defaults_form.excellon_group.toolchangez_entry,
             "geometry_plot": self.defaults_form.geometry_group.plot_cb,
             "geometry_cutz": self.defaults_form.geometry_group.cutz_entry,
             "geometry_travelz": self.defaults_form.geometry_group.travelz_entry,
@@ -262,6 +263,7 @@ class App(QtCore.QObject):
             "excellon_travelz": 0.1,
             "excellon_feedrate": 3.0,
             "excellon_spindlespeed": None,
+            "excellon_toolchangez": 1.0,
             "geometry_plot": True,
             "geometry_cutz": -0.002,
             "geometry_travelz": 0.1,
@@ -346,6 +348,7 @@ class App(QtCore.QObject):
             "excellon_travelz": self.options_form.excellon_group.travelz_entry,
             "excellon_feedrate": self.options_form.excellon_group.feedrate_entry,
             "excellon_spindlespeed": self.options_form.excellon_group.spindlespeed_entry,
+            "excellon_toolchangez": self.options_form.excellon_group.toolchangez_entry,
             "geometry_plot": self.options_form.geometry_group.plot_cb,
             "geometry_cutz": self.options_form.geometry_group.cutz_entry,
             "geometry_travelz": self.options_form.geometry_group.travelz_entry,
@@ -386,6 +389,7 @@ class App(QtCore.QObject):
             "excellon_travelz": 0.1,
             "excellon_feedrate": 3.0,
             "excellon_spindlespeed": None,
+            "excellon_toolchangez": 1.0,
             "geometry_plot": True,
             "geometry_cutz": -0.002,
             "geometry_travelz": 0.1,
@@ -1146,7 +1150,7 @@ class App(QtCore.QObject):
         # Options to scale
         dimensions = ['gerber_isotooldia', 'gerber_cutoutmargin', 'gerber_cutoutgapsize',
                       'gerber_noncoppermargin', 'gerber_bboxmargin', 'excellon_drillz',
-                      'excellon_travelz', 'excellon_feedrate', 'cncjob_tooldia',
+                      'excellon_travelz', 'excellon_feedrate', 'excellon_toolchangez', 'cncjob_tooldia',
                       'geometry_cutz', 'geometry_travelz', 'geometry_feedrate',
                       'geometry_cnctooldia', 'geometry_painttooldia', 'geometry_paintoverlap',
                       'geometry_paintmargin']

+ 10 - 2
FlatCAMGUI.py

@@ -586,14 +586,22 @@ class ExcellonOptionsGroupUI(OptionsGroupUI):
         self.feedrate_entry = LengthEntry()
         grid1.addWidget(self.feedrate_entry, 2, 1)
 
+        toolchangezlabel = QtGui.QLabel('Toolchange Z:')
+        toolchangezlabel.setToolTip(
+            "Tool Z where user can change drill bit\n"
+        )
+        grid1.addWidget(toolchangezlabel, 3, 0)
+        self.toolchangez_entry = LengthEntry()
+        grid1.addWidget(self.toolchangez_entry, 3, 1)
+
         spdlabel = QtGui.QLabel('Spindle speed:')
         spdlabel.setToolTip(
             "Speed of the spindle\n"
             "in RPM (optional)"
         )
-        grid1.addWidget(spdlabel, 3, 0)
+        grid1.addWidget(spdlabel, 4, 0)
         self.spindlespeed_entry = IntEntry(allow_empty=True)
-        grid1.addWidget(self.spindlespeed_entry, 3, 1)
+        grid1.addWidget(self.spindlespeed_entry, 4, 1)
 
 
 class GeometryOptionsGroupUI(OptionsGroupUI):