- Levelling Tool - disable the UI if the Gcode is not segmented for autolevelling (perhaps recreate the GCode as segmented?)

- in camlib.CNCjob class fixed the linear2gcode_extra() method to be able to do GCode segmentation.
This commit is contained in:
Marius Stanciu
2021-01-04 16:52:23 +02:00
committed by Marius
parent e726899167
commit 2aab71e037
4 changed files with 27 additions and 3 deletions

View File

@@ -1968,6 +1968,11 @@ class ToolDrilling(AppTool, Excellon):
job_obj.fr_decimals = int(self.app.defaults["cncjob_fr_decimals"])
job_obj.multitool = True
# it does not matter for the Excellon codes because we are not going to autolevel GCode out of Excellon
# but it is here for uniformity between the Geometry and Excellon objects
job_obj.segx = self.app.defaults["geometry_segx"]
job_obj.segy = self.app.defaults["geometry_segy"]
# first drill point
job_obj.xy_toolchange = self.app.defaults["tools_drill_toolchangexy"]
x_tc, y_tc = [0, 0]

View File

@@ -293,7 +293,7 @@ class ToolLevelling(AppTool, CNCjob):
self.ui.al_method_radio.set_value('v')
target_obj = self.app.collection.get_by_name(self.ui.object_combo.get_value())
if target_obj:
if target_obj and target_obj.is_segmented_gcode is True:
self.ui.al_frame.setDisabled(False)
self.ui.al_mode_radio.set_value(target_obj.options['tools_al_mode'])
self.on_controller_change()
@@ -327,7 +327,7 @@ class ToolLevelling(AppTool, CNCjob):
self.app.inform.emit('[ERROR_NOTCL] %s: %s' % (_("Could not retrieve object"), str(obj_name)))
return
if target_obj is None:
if target_obj is None or target_obj.is_segmented_gcode is False:
self.ui.al_frame.setDisabled(True)
else:
self.ui.al_frame.setDisabled(False)