|
1 # FILE MODIFIED BY NEOSOFT - MALTE DI DONATO |
|
2 # Embed Lasercut controls |
|
3 |
1 # This file is part of the Printrun suite. |
4 # This file is part of the Printrun suite. |
2 # |
5 # |
3 # Printrun is free software: you can redistribute it and/or modify |
6 # Printrun is free software: you can redistribute it and/or modify |
4 # it under the terms of the GNU General Public License as published by |
7 # it under the terms of the GNU General Public License as published by |
5 # the Free Software Foundation, either version 3 of the License, or |
8 # the Free Software Foundation, either version 3 of the License, or |
70 "htemp_gauge": (gauges_base_line + 0, 0), |
73 "htemp_gauge": (gauges_base_line + 0, 0), |
71 "btemp_gauge": (gauges_base_line + 1, 0), |
74 "btemp_gauge": (gauges_base_line + 1, 0), |
72 "tempdisp": (tempdisp_line, 0), |
75 "tempdisp": (tempdisp_line, 0), |
73 "extrude": (3, 0), |
76 "extrude": (3, 0), |
74 "reverse": (3, 2), |
77 "reverse": (3, 2), |
75 "lasercut": (lasercut_base_line, 0), |
78 "lasercut_optionsbtn": (lasercut_base_line, 0), |
|
79 "lasercut_printbtn": (lasercut_base_line, 2), |
76 "lasercut_material_thickness": (lasercut_base_line+1, 4), |
80 "lasercut_material_thickness": (lasercut_base_line+1, 4), |
77 "lasercut_material_thickness_label": (lasercut_base_line+1, 0), |
81 "lasercut_material_thickness_label": (lasercut_base_line+1, 0), |
78 "lasercut_pass_count": (lasercut_base_line+2, 4), |
82 "lasercut_pass_count": (lasercut_base_line+2, 4), |
79 "lasercut_pass_count_label": (lasercut_base_line+2, 0), |
83 "lasercut_pass_count_label": (lasercut_base_line+2, 0), |
80 "lasercut_pass_zdiff": (lasercut_base_line+3, 4), |
84 "lasercut_pass_zdiff": (lasercut_base_line+3, 4), |
134 del kwargs["container"] |
138 del kwargs["container"] |
135 else: |
139 else: |
136 container = self |
140 container = self |
137 container.Add(widget, *args, **kwargs) |
141 container.Add(widget, *args, **kwargs) |
138 |
142 |
|
143 # Lasercutter quick controls # |
|
144 |
|
145 root.lc_optionsbtn = make_button(parentpanel, _("Lasercutter options"), lambda e: PronterOptions(root, "Laser"), _("Open Lasercutter options"), style = wx.BU_EXACTFIT) |
|
146 root.printerControls.append(root.lc_optionsbtn) |
|
147 add("lasercut_optionsbtn", root.lc_optionsbtn, flag = wx.EXPAND) |
|
148 |
|
149 root.lc_printbtn = make_button(parentpanel, _("Start cutting"), root.on_lc_printfile, _("Start printjob with lasercutting features"), style = wx.BU_EXACTFIT) |
|
150 root.printerControls.append(root.lc_printbtn) |
|
151 add("lasercut_printbtn", root.lc_printbtn, flag = wx.EXPAND) |
|
152 |
|
153 |
|
154 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)) |
|
155 add("lasercut_pass_count", root.lc_pass_count) |
|
156 add("lasercut_pass_count_label", wx.StaticText(parentpanel, -1, _("Number of cutting passes:")), flag = wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_LEFT) |
|
157 |
|
158 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)) |
|
159 add("lasercut_pass_zdiff", root.lc_pass_zdiff) |
|
160 add("lasercut_pass_zdiff_label", wx.StaticText(parentpanel, -1, _("Z movement after each cut:")), flag = wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_LEFT) |
|
161 |
|
162 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)) |
|
163 add("lasercut_material_thickness", root.lc_material_thickness) |
|
164 add("lasercut_material_thickness_label", wx.StaticText(parentpanel, -1, _("Material Thickness:")), flag = wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_LEFT) |
|
165 |
|
166 |
|
167 |
139 # Hotend & bed temperatures # |
168 # Hotend & bed temperatures # |
140 |
169 |
141 # Hotend temp |
170 # Hotend temp |
142 add("htemp_label", wx.StaticText(parentpanel, -1, _("Heat:")), flag = wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_RIGHT) |
171 add("htemp_label", wx.StaticText(parentpanel, -1, _("Heat:")), flag = wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_RIGHT) |
143 htemp_choices = [root.temps[i] + " (" + i + ")" for i in sorted(root.temps.keys(), key = lambda x:root.temps[x])] |
172 htemp_choices = [root.temps[i] + " (" + i + ")" for i in sorted(root.temps.keys(), key = lambda x:root.temps[x])] |
307 |
336 |
308 if root.display_graph: |
337 if root.display_graph: |
309 root.graph = Graph(parentpanel, wx.ID_ANY, root) |
338 root.graph = Graph(parentpanel, wx.ID_ANY, root) |
310 add("tempgraph", root.graph, flag = wx.EXPAND | wx.ALL, border = 5) |
339 add("tempgraph", root.graph, flag = wx.EXPAND | wx.ALL, border = 5) |
311 root.graph.Bind(wx.EVT_LEFT_DOWN, root.graph.show_graph_window) |
340 root.graph.Bind(wx.EVT_LEFT_DOWN, root.graph.show_graph_window) |
312 |
|
313 # Lasercutter quick controls # |
|
314 |
|
315 root.lc_optionsbtn = make_button(parentpanel, _("Lasercutter options"), lambda e: PronterOptions(root, "Laser"), _("Open Lasercutter options"), style = wx.BU_EXACTFIT) |
|
316 root.printerControls.append(root.lc_optionsbtn) |
|
317 add("lasercut", root.lc_optionsbtn, flag = wx.EXPAND) |
|
318 |
|
319 root.lc_pass_count = speed_spin = FloatSpin(parentpanel, -1, value = 1, min_val = 1, max_val = 10, digits = 0, style = wx.ALIGN_LEFT, size = (80, -1)) |
|
320 add("lasercut_pass_count", root.lc_pass_count) |
|
321 add("lasercut_pass_count_label", wx.StaticText(parentpanel, -1, _("Number of cutting passes:")), flag = wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_LEFT) |
|
322 |
|
323 root.lc_pass_zdiff = speed_spin = FloatSpin(parentpanel, -1, increment = 0.1, value = -1, min_val = -2, max_val = 2, digits = 1, style = wx.ALIGN_LEFT, size = (80, -1)) |
|
324 add("lasercut_pass_zdiff", root.lc_pass_zdiff) |
|
325 add("lasercut_pass_zdiff_label", wx.StaticText(parentpanel, -1, _("Z movement after each cut:")), flag = wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_LEFT) |
|
326 |
|
327 root.lc_material_thickness = speed_spin = FloatSpin(parentpanel, -1, increment = 0.1, value = 4, min_val = 0, max_val = 75, digits = 1, style = wx.ALIGN_LEFT, size = (80, -1)) |
|
328 add("lasercut_material_thickness", root.lc_material_thickness) |
|
329 add("lasercut_material_thickness_label", wx.StaticText(parentpanel, -1, _("Material Thickness:")), flag = wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_LEFT) |
|
330 |
341 |
331 # Extrusion controls # |
342 # Extrusion controls # |
332 |
343 |
333 # Extrusion settings |
344 # Extrusion settings |
334 esettingspanel = root.newPanel(parentpanel) |
345 esettingspanel = root.newPanel(parentpanel) |