--- a/printrun-src/printrun/gui/controls.py Wed Jan 20 10:17:01 2021 +0100 +++ b/printrun-src/printrun/gui/controls.py Wed Jan 20 11:37:03 2021 +0100 @@ -1,3 +1,6 @@ +# FILE MODIFIED BY NEOSOFT - MALTE DI DONATO +# Embed Lasercut controls + # This file is part of the Printrun suite. # # Printrun is free software: you can redistribute it and/or modify @@ -50,6 +53,8 @@ else: e_base_line = base_line + 2 + lasercut_base_line = 11 + pos_mapping = { "htemp_label": (base_line + 0, 0), "htemp_off": (base_line + 0, 2), @@ -68,6 +73,14 @@ "tempdisp": (tempdisp_line, 0), "extrude": (3, 0), "reverse": (3, 2), + "lasercut_optionsbtn": (lasercut_base_line, 0), + "lasercut_printbtn": (lasercut_base_line, 2), + "lasercut_material_thickness": (lasercut_base_line+1, 4), + "lasercut_material_thickness_label": (lasercut_base_line+1, 0), + "lasercut_pass_count": (lasercut_base_line+2, 4), + "lasercut_pass_count_label": (lasercut_base_line+2, 0), + "lasercut_pass_zdiff": (lasercut_base_line+3, 4), + "lasercut_pass_zdiff_label": (lasercut_base_line+3, 0), } span_mapping = { @@ -125,6 +138,30 @@ container = self container.Add(widget, *args, **kwargs) + # Lasercutter quick controls # + + root.lc_optionsbtn = make_button(parentpanel, _("Lasercutter options"), lambda e: PronterOptions(root, "Laser"), _("Open Lasercutter options"), style = wx.BU_EXACTFIT) + root.printerControls.append(root.lc_optionsbtn) + add("lasercut_optionsbtn", root.lc_optionsbtn, flag = wx.EXPAND) + + root.lc_printbtn = make_button(parentpanel, _("Start cutting"), root.on_lc_printfile, _("Start printjob with lasercutting features"), style = wx.BU_EXACTFIT) + root.printerControls.append(root.lc_printbtn) + add("lasercut_printbtn", root.lc_printbtn, flag = wx.EXPAND) + + + root.lc_pass_count = speed_spin = FloatSpin(parentpanel, -1, value = root.settings.lc_pass_count, min_val = 1, max_val = 10, digits = 0, style = wx.ALIGN_LEFT, size = (80, -1)) + add("lasercut_pass_count", root.lc_pass_count) + add("lasercut_pass_count_label", wx.StaticText(parentpanel, -1, _("Number of cutting passes:")), flag = wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_LEFT) + + root.lc_pass_zdiff = speed_spin = FloatSpin(parentpanel, -1, increment = 0.1, value = root.settings.lc_pass_zdiff, min_val = -2, max_val = 2, digits = 1, style = wx.ALIGN_LEFT, size = (80, -1)) + add("lasercut_pass_zdiff", root.lc_pass_zdiff) + add("lasercut_pass_zdiff_label", wx.StaticText(parentpanel, -1, _("Z movement after each cut:")), flag = wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_LEFT) + + root.lc_material_thickness = speed_spin = FloatSpin(parentpanel, -1, increment = 0.1, value = root.settings.lc_material_thickness, min_val = 0, max_val = 75, digits = 1, style = wx.ALIGN_LEFT, size = (80, -1)) + add("lasercut_material_thickness", root.lc_material_thickness) + add("lasercut_material_thickness_label", wx.StaticText(parentpanel, -1, _("Material Thickness:")), flag = wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_LEFT) + + # Hotend & bed temperatures # # Hotend temp