1 __copyright__ = "Copyright (C) 2013 David Braam - Released under terms of the AGPLv3 License"
5 from Cura.util import profile
6 import cPickle as pickle
8 class simpleModePanel(wx.Panel):
9 "Main user interface window for Quickprint mode"
10 def __init__(self, parent, callback):
11 super(simpleModePanel, self).__init__(parent)
12 self._callback = callback
14 #toolsMenu = wx.Menu()
15 #i = toolsMenu.Append(-1, 'Switch to Normal mode...')
16 #self.Bind(wx.EVT_MENU, self.OnNormalSwitch, i)
17 #self.menubar.Insert(1, toolsMenu, 'Normal mode')
19 printTypePanel = wx.Panel(self)
20 self.printTypeHigh = wx.RadioButton(printTypePanel, -1, _("High quality print"), style=wx.RB_GROUP)
21 self.printTypeNormal = wx.RadioButton(printTypePanel, -1, _("Normal quality print"))
22 self.printTypeLow = wx.RadioButton(printTypePanel, -1, _("Fast low quality print"))
23 self.printTypeJoris = wx.RadioButton(printTypePanel, -1, _("Thin walled cup or vase"))
24 self.printTypeJoris.Hide()
26 printMaterialPanel = wx.Panel(self)
27 if profile.getMachineSetting('machine_type') == 'lulzbot_mini' or profile.getMachineSetting('machine_type') == 'lulzbot_TAZ_5' or profile.getMachineSetting('machine_type') == 'lulzbot_TAZ_4':
28 self.printMaterialHIPS = wx.RadioButton(printMaterialPanel, -1, _('HIPS'), style=wx.RB_GROUP)
29 self.printMaterialABS = wx.RadioButton(printMaterialPanel, -1, _('ABS'))
31 self.printMaterialABS = wx.RadioButton(printMaterialPanel, -1, _('ABS'), style=wx.RB_GROUP)
32 self.printMaterialPLA = wx.RadioButton(printMaterialPanel, -1, _('PLA'))
33 if profile.getMachineSetting('gcode_flavor') == 'UltiGCode':
34 printMaterialPanel.Show(False)
36 self.printSupport = wx.CheckBox(self, -1, _("Print support structure"))
37 self.printBrim = wx.CheckBox(self, -1, _("Print Brim"))
39 sizer = wx.GridBagSizer()
42 sb = wx.StaticBox(printTypePanel, label=_("Select a quickprint profile:"))
43 boxsizer = wx.StaticBoxSizer(sb, wx.VERTICAL)
44 boxsizer.Add(self.printTypeHigh)
45 boxsizer.Add(self.printTypeNormal)
46 boxsizer.Add(self.printTypeLow)
47 boxsizer.Add(self.printTypeJoris, border=5, flag=wx.TOP)
48 printTypePanel.SetSizer(wx.BoxSizer(wx.VERTICAL))
49 printTypePanel.GetSizer().Add(boxsizer, flag=wx.EXPAND)
50 sizer.Add(printTypePanel, (0,0), flag=wx.EXPAND)
52 sb = wx.StaticBox(printMaterialPanel, label=_("Material:"))
53 boxsizer = wx.StaticBoxSizer(sb, wx.VERTICAL)
54 if profile.getMachineSetting('machine_type') == 'lulzbot_mini' or profile.getMachineSetting('machine_type') == 'lulzbot_TAZ_5' or profile.getMachineSetting('machine_type') == 'lulzbot_TAZ_4':
55 boxsizer.Add(self.printMaterialHIPS)
56 boxsizer.Add(self.printMaterialABS)
57 boxsizer.Add(self.printMaterialPLA)
58 printMaterialPanel.SetSizer(wx.BoxSizer(wx.VERTICAL))
59 printMaterialPanel.GetSizer().Add(boxsizer, flag=wx.EXPAND)
60 sizer.Add(printMaterialPanel, (1,0), flag=wx.EXPAND)
62 sb = wx.StaticBox(self, label=_("Other:"))
63 boxsizer = wx.StaticBoxSizer(sb, wx.VERTICAL)
64 boxsizer.Add(self.printSupport)
65 boxsizer.Add(self.printBrim)
66 sizer.Add(boxsizer, (2,0), flag=wx.EXPAND)
68 self.printTypeNormal.SetValue(True)
69 if profile.getMachineSetting('machine_type') == 'lulzbot_mini' or profile.getMachineSetting('machine_type') == 'lulzbot_TAZ_5' or profile.getMachineSetting('machine_type') == 'lulzbot_TAZ_4':
70 self.printMaterialHIPS.SetValue(True)
72 self.printMaterialPLA.SetValue(True)
74 self.printTypeHigh.Bind(wx.EVT_RADIOBUTTON, lambda e: self._callback())
75 self.printTypeNormal.Bind(wx.EVT_RADIOBUTTON, lambda e: self._callback())
76 self.printTypeLow.Bind(wx.EVT_RADIOBUTTON, lambda e: self._callback())
77 #self.printTypeJoris.Bind(wx.EVT_RADIOBUTTON, lambda e: self._callback())
79 self.printMaterialPLA.Bind(wx.EVT_RADIOBUTTON, lambda e: self._callback())
80 self.printMaterialABS.Bind(wx.EVT_RADIOBUTTON, lambda e: self._callback())
81 if profile.getMachineSetting('machine_type') == 'lulzbot_mini' or profile.getMachineSetting('machine_type') == 'lulzbot_TAZ_5' or profile.getMachineSetting('machine_type') == 'lulzbot_TAZ_4':
82 self.printMaterialHIPS.Bind(wx.EVT_RADIOBUTTON, lambda e: self._callback())
84 self.printSupport.Bind(wx.EVT_CHECKBOX, lambda e: self._callback())
85 self.printBrim.Bind(wx.EVT_CHECKBOX, lambda e: self._callback())
89 def getSavedSettings(self):
91 return pickle.loads(str(profile.getProfileSetting('simpleModeSettings')))
95 def loadSettings(self):
96 settings = self.getSavedSettings()
97 for item in settings.keys():
98 if hasattr(self, item):
99 getattr(self, item).SetValue(settings[item])
101 def saveSettings(self):
103 settingItems = ['printTypeHigh', 'printTypeNormal', 'printTypeLow', 'printTypeJoris',
104 'printMaterialHIPS', 'printMaterialABS', 'printMaterialPLA',
105 'printSupport', 'printBrim']
107 for item in settingItems:
108 if hasattr(self, item):
109 settings[item] = getattr(self, item).GetValue()
111 profile.putProfileSetting('simpleModeSettings', pickle.dumps(settings))
113 def setupSlice(self):
115 put = profile.setTempOverride
116 get = profile.getProfileSetting
117 for setting in profile.settingsList:
118 if not setting.isProfile():
120 profile.setTempOverride(setting.getName(), setting.getDefault())
122 # LulzBot Mini slice settings for use with the simple slice selection.
123 if profile.getMachineSetting('machine_type') == 'lulzbot_mini':
124 put('filament_diameter', '2.85')
125 put('nozzle_size', '0.5')
126 put('wall_thickness', '1')
127 put('fill_density', '20')
128 put('retraction_speed', '10')
129 put('retraction_hop', '0.1')
130 put('bottom_thickness', '0.425')
131 put('layer0_width_factor', '125')
132 put('travel_speed', '175')
133 put('skirt_minimal_length', '250')
134 put('brim_line_count', '10')
135 put('raft_airgap', '0.5')
136 put('bottom_layer_speed', '15')
137 put('fan_full_height', '0.5')
138 put('retraction_minimal_extrusion', '0.005')
139 if self.printSupport.GetValue():
140 put('support', _("Everywhere"))
141 put('support_type', 'Lines')
142 put('support_angle', '45')
143 put('support_fill_rate', '30')
144 put('support_xy_distance', '0.7')
145 put('support_z_distance', '0.05')
146 if self.printBrim.GetValue():
147 put('platform_adhesion', 'Brim')
148 if self.printMaterialHIPS.GetValue() or self.printMaterialABS.GetValue():
149 put('print_temperature', '240')
150 put('print_bed_temperature', '110')
151 put('solid_layer_thickness', '0.8')
152 put('retraction_amount', '1')
153 put('fan_speed', '40')
154 put('start.gcode', """;This Gcode has been generated specifically for the LulzBot Mini
155 ;Basic settings: Layer height: {layer_height} Walls: {wall_thickness} Fill: {fill_density}
156 ;Filament Diameter: {filament_diameter}
157 ;Nozzle Size: {nozzle_size}
159 G90 ; absolute positioning
160 M82 ; set extruder to absolute mode
161 M107 ; start with the fan off
162 G92 E0 ; set extruder position to 0
163 M140 S110 ; get bed heating up
165 M109 S150 ; set to cleaning temp and wait
166 G1 Z150 E-30 F75 ; suck up XXmm of filament
167 M109 S170 ; heat up rest of way
168 G1 X45 Y174 F11520 ; move behind scraper
169 G1 Z0 F1200 ; CRITICAL: set Z to height of top of scraper
170 G1 X45 Y174 Z-.5 F4000 ; wiping ; plunge into wipe pad
171 G1 X55 Y172 Z-.5 F4000 ; wiping
172 G1 X45 Y174 Z0 F4000 ; wiping
173 G1 X55 Y172 F4000 ; wiping
174 G1 X45 Y174 F4000 ; wiping
175 G1 X55 Y172 F4000 ; wiping
176 G1 X45 Y174 F4000 ; wiping
177 G1 X55 Y172 F4000 ; wiping
178 G1 X60 Y174 F4000 ; wiping
179 G1 X80 Y172 F4000 ; wiping
180 G1 X60 Y174 F4000 ; wiping
181 G1 X80 Y172 F4000 ; wiping
182 G1 X60 Y174 F4000 ; wiping
183 G1 X90 Y172 F4000 ; wiping
184 G1 X80 Y174 F4000 ; wiping
185 G1 X100 Y172 F4000 ; wiping
186 G1 X80 Y174 F4000 ; wiping
187 G1 X100 Y172 F4000 ; wiping
188 G1 X80 Y174 F4000 ; wiping
189 G1 X100 Y172 F4000 ; wiping
190 G1 X110 Y174 F4000 ; wiping
191 G1 X100 Y172 F4000 ; wiping
192 G1 X110 Y174 F4000 ; wiping
193 G1 X100 Y172 F4000 ; wiping
194 G1 X110 Y174 F4000 ; wiping
195 G1 X115 Y172 Z-0.5 F1000 ; wipe slower and bury noz in cleanish area
197 G28 X0 Y0 ; home x and y
198 M109 S170 ; set to probing temp
199 M204 S300 ; set accel for probing
201 M204 S2000 ; set accel back to normal
202 G1 X5 Y15 Z10 F5000 ; get out the way
205 M109 S{print_temperature} ; set extruder temp and wait
206 G4 S25 ; wait for bed to temp up
207 G1 Z2 E0 F75 ; extrude filament back into nozzle
208 M140 S{print_bed_temperature}; get bed temping up during first layer
213 M140 S0 ; heated bed heater off (if you have it)
215 G92 E0 ; set extruder to 0
216 G1 E-3 F300 ; retract a bit to relieve pressure
217 G1 X5 Y5 Z156 F10000 ; move to cooling positioning
218 M190 R60 ; wait for bed to cool
219 M140 S0 ; Turn off bed temp
220 G1 X145 Y175 Z156 F1000 ; move to cooling positioning
222 G90 ; absolute positioning
225 if self.printMaterialHIPS.GetValue():
226 put('fan_speed_max', '50')
227 if self.printTypeLow.GetValue():
228 put('layer_height', '0.38')
229 put('print_speed', '50')
230 put('infill_speed', '70')
231 put('inset0_speed', '40')
232 put('insetx_speed', '45')
233 put('cool_min_layer_time', '15')
234 put('cool_min_feedrate', '10')
235 if self.printTypeNormal.GetValue():
236 put('layer_height', '0.25')
237 put('print_speed', '50')
238 put('infill_speed', '60')
239 put('inset0_speed', '30')
240 put('insetx_speed', '35')
241 put('cool_min_layer_time', '15')
242 put('cool_min_feedrate', '10')
243 if self.printTypeHigh.GetValue():
244 put('layer_height', '0.18')
245 put('print_speed', '30')
246 put('infill_speed', '30')
247 put('inset0_speed', '20')
248 put('insetx_speed', '25')
249 put('cool_min_layer_time', '20')
250 put('cool_min_feedrate', '5')
251 if self.printMaterialABS.GetValue():
252 put('fan_speed_max', '60')
253 if self.printTypeLow.GetValue():
254 put('layer_height', '0.38')
255 put('print_speed', '85')
256 put('infill_speed', '60')
257 put('inset0_speed', '50')
258 put('insetx_speed', '55')
259 put('cool_min_feedrate', '10')
260 if self.printTypeNormal.GetValue():
261 put('layer_height', '0.25')
262 put('print_speed', '50')
263 put('infill_speed', '55')
264 put('inset0_speed', '45')
265 put('insetx_speed', '50')
266 put('cool_min_feedrate', '10')
267 if self.printTypeHigh.GetValue():
268 put('layer_height', '0.18')
269 put('print_speed', '50')
270 put('infill_speed', '40')
271 put('inset0_speed', '30')
272 put('insetx_speed', '35')
273 put('cool_min_feedrate', '5')
274 elif self.printMaterialPLA.GetValue():
275 put('print_temperature', '205')
276 put('print_bed_temperature', '60')
277 put('solid_layer_thickness', '1')
278 put('print_speed', '50')
279 put('retraction_amount', '1.5')
280 put('bottom_layer_speed', '15')
281 put('cool_min_layer_time', '20')
282 put('fan_speed', '75')
283 put('fan_speed_max', '100')
284 put('start.gcode', """;This Gcode has been generated specifically for the LulzBot Mini
285 ;Basic settings: Layer height: {layer_height} Walls: {wall_thickness} Fill: {fill_density}
286 ;Filament Diameter: {filament_diameter}
287 ;Nozzle Size: {nozzle_size}
289 G90 ; absolute positioning
290 M82 ; set extruder to absolute mode
291 M107 ; start with the fan off
292 G92 E0 ; set extruder position to 0
293 M140 S{print_bed_temperature}; get bed heating up
295 M109 S140 ; set to cleaning temp and wait
296 G1 Z150 E-30 F75 ; suck up XXmm of filament
297 M109 S140 ; heat up rest of way
298 G1 X45 Y174 F11520 ; move behind scraper
299 G1 Z0 F1200 ; CRITICAL: set Z to height of top of scraper
300 G1 X45 Y174 Z-.5 F4000 ; wiping ; plunge into wipe pad
301 G1 X55 Y172 Z-.5 F4000 ; wiping
302 G1 X45 Y174 Z0 F4000 ; wiping
303 G1 X55 Y172 F4000 ; wiping
304 G1 X45 Y174 F4000 ; wiping
305 G1 X55 Y172 F4000 ; wiping
306 G1 X45 Y174 F4000 ; wiping
307 G1 X55 Y172 F4000 ; wiping
308 G1 X60 Y174 F4000 ; wiping
309 G1 X80 Y172 F4000 ; wiping
310 G1 X60 Y174 F4000 ; wiping
311 G1 X80 Y172 F4000 ; wiping
312 G1 X60 Y174 F4000 ; wiping
313 G1 X90 Y172 F4000 ; wiping
314 G1 X80 Y174 F4000 ; wiping
315 G1 X100 Y172 F4000 ; wiping
316 G1 X80 Y174 F4000 ; wiping
317 G1 X100 Y172 F4000 ; wiping
318 G1 X80 Y174 F4000 ; wiping
319 G1 X100 Y172 F4000 ; wiping
320 G1 X110 Y174 F4000 ; wiping
321 G1 X100 Y172 F4000 ; wiping
322 G1 X110 Y174 F4000 ; wiping
323 G1 X100 Y172 F4000 ; wiping
324 G1 X110 Y174 F4000 ; wiping
325 G1 X115 Y172 Z-0.5 F1000 ; wipe slower and bury noz in cleanish area
327 G28 X0 Y0 ; home x and y
328 M109 S140 ; set to probing temp
329 M204 S300 ; Set probing acceleration
331 M204 S2000 ; Restore standard acceleration
332 G1 X5 Y15 Z10 F5000 ; get out the way
335 M109 S{print_temperature} ; set extruder temp and wait
336 G4 S15 ; wait for bed to temp up
337 G1 Z2 E0 F75 ; extrude filament back into nozzle
338 M140 S{print_bed_temperature}; get bed temping up during first layer
343 M140 S0 ; heated bed heater off (if you have it)
345 G92 E5 ; set extruder to 5mm for retract on print end
346 G1 X5 Y5 Z156 E0 F10000 ; move to cooling positioning
347 M190 R50 ; wait for bed to cool
349 G1 X145 Y175 Z156 F1000 ; move to cooling positioning
351 G90 ; absolute positioning
354 if self.printTypeLow.GetValue():
355 put('layer_height', '0.38')
356 put('cool_min_feedrate', '10')
357 put('infill_speed', '40')
358 put('inset0_speed', '30')
359 put('insetx_speed', '35')
360 if self.printTypeNormal.GetValue():
361 put('layer_height', '0.25')
362 put('cool_min_feedrate', '10')
363 put('infill_speed', '40')
364 put('inset0_speed', '30')
365 put('insetx_speed', '35')
366 if self.printTypeHigh.GetValue():
367 put('layer_height', '0.14')
368 put('cool_min_feedrate', '5')
369 put('infill_speed', '30')
370 put('inset0_speed', '25')
371 put('insetx_speed', '27')
372 ### LulzBot TAZ 5 slice settings for use with the simple slice selection.
373 if profile.getMachineSetting('machine_type') == 'lulzbot_TAZ_5':
374 put('nozzle_size', '0.35')
375 put('wall_thickness', '1.05')
376 put('retraction_speed', '10')
377 put('retraction_hop', '0.1')
378 put('layer0_width_factor', '125')
379 put('travel_speed', '175')
380 put('bottom_layer_speed', '15')
381 put('skirt_minimal_length', '250')
382 put('fan_full_height', '0.5')
383 put('brim_line_count', '10')
384 put('print_temperature', '0')
385 put('print_bed_temperature', '0')
386 put('retraction_minimal_extrusion', '0.005')
387 if self.printSupport.GetValue():
388 put('support', _("Everywhere"))
389 put('support_type', 'Lines')
390 put('support_angle', '45')
391 put('support_fill_rate', '30')
392 put('support_xy_distance', '0.7')
393 put('support_z_distance', '0.05')
394 if self.printBrim.GetValue():
395 put('platform_adhesion', 'Brim')
396 put('start.gcode', """;Sliced at: {day} {date} {time} for use with the LulzBot TAZ 5
397 ;Basic settings: Layer height: {layer_height} Walls: {wall_thickness} Fill: {fill_density}
399 G90 ;absolute positioning
400 M82 ;set extruder to absolute mode
401 M107 ;start with the fan off
402 G28 X0 Y0 ;move X/Y to min endstops
403 G28 Z0 ;move Z to min endstops
404 G1 Z15.0 F{travel_speed};move the platform down 15mm
405 G92 E0 ; zero the extruded length
406 G1 F200 E0 ; extrude 3mm of feed stock
407 G92 E0 ; zero the extruded length again
408 G1 F{travel_speed} ; set travel speed
409 M203 X192 Y208 Z3 ; speed limits
410 M117 Printing... ; send message to LCD""")
411 put('end.gcode', """M400 ; wait for buffer to clear
413 M140 S0 ; heated bed heater off (if you have it)
415 G91 ; relative positioning
416 G1 E-1 F300 ; retract the filament a bit before lifting the nozzle, to release some of the pressure
417 G1 Z+0.5 E-5 X-20 Y-20 F3000 ; move Z up a bit and retract filament even more
418 G90 ; absolute positioning
419 G1 X0 Y250 ; move to cooling position
421 G90 ; absolute positioning
423 ;{profile_string}""")
424 if self.printMaterialHIPS.GetValue() or self.printMaterialABS.GetValue():
425 put('retraction_amount', '1')
426 put('fan_speed', '40')
427 if self.printMaterialHIPS.GetValue() or self.printMaterialPLA.GetValue():
428 put('raft_airgap', '0.5')
429 if self.printMaterialHIPS:
430 put('fan_speed_max', '50')
431 put('cool_min_layer_time', '20')
432 if self.printTypeLow.GetValue():
433 put('layer_height', '0.28')
434 put('solid_layer_thickness', '0.84')
435 put('infill_speed', '70')
436 put('inset0_speed', '40')
437 put('insetx_speed', '45')
438 if self.printTypeNormal.GetValue():
439 put('layer_height', '0.22')
440 put('solid_layer_thickness', '0.88')
441 put('infill_speed', '50')
442 put('inset0_speed', '30')
443 put('insetx_speed', '35')
444 if self.printTypeHigh.GetValue():
445 put('layer_height', '0.14')
446 put('solid_layer_thickness', '0.7')
447 put('infill_speed', '30')
448 put('inset0_speed', '20')
449 put('insetx_speed', '25')
450 if self.printMaterialABS.GetValue():
451 put('fan_speed_max', '60')
452 put('raft_airgap', '0.35')
453 if self.printTypeLow.GetValue():
454 put('layer_height', '0.28')
455 put('solid_layer_thickness', '0.84')
456 put('infill_speed', '60')
457 put('inset0_speed', '50')
458 put('insetx_speed', '55')
459 put('cool_min_layer_time', '15')
460 if self.printTypeNormal.GetValue():
461 put('layer_height', '0.22')
462 put('solid_layer_thickness', '0.88')
463 put('infill_speed', '55')
464 put('inset0_speed', '45')
465 put('insetx_speed', '50')
466 put('cool_min_layer_time', '15')
467 if self.printTypeHigh.GetValue():
468 put('layer_height', '0.16')
469 put('solid_layer_thickness', '0.74')
470 put('infill_speed', '40')
471 put('inset0_speed', '30')
472 put('insetx_speed', '35')
473 put('cool_min_layer_time', '20')
474 if self.printMaterialPLA.GetValue():
475 put('retraction_amount', '1.5')
476 put('fan_speed', '75')
477 put('fan_speed_max', '100')
478 if self.printTypeLow.GetValue():
479 put('layer_height', '0.28')
480 put('solid_layer_thickness', '0.84')
481 put('infill_speed', '80')
482 put('inset0_speed', '60')
483 put('insetx_speed', '70')
484 put('cool_min_layer_time', '15')
485 put('cool_min_feedrate', '15')
486 if self.printTypeNormal.GetValue():
487 put('layer_height', '0.21')
488 put('solid_layer_thickness', '0.84')
489 put('infill_speed', '60')
490 put('inset0_speed', '50')
491 put('insetx_speed', '55')
492 put('cool_min_layer_time', '15')
493 put('cool_min_feedrate', '10')
494 if self.printTypeHigh.GetValue():
495 put('layer_height', '0.14')
496 put('solid_layer_thickness', '0.7')
497 put('infill_speed', '50')
498 put('inset0_speed', '40')
499 put('insetx_speed', '45')
500 put('cool_min_layer_time', '20')
501 put('cool_min_feedrate', '5')
503 ### LulzBot TAZ 4 slice settings for use with the simple slice selection.
504 if profile.getMachineSetting('machine_type') == 'lulzbot_TAZ_4':
505 put('filament_diameter', '2.85')
506 put('nozzle_size', '0.35')
507 put('wall_thickness', '1.05')
508 put('solid_layer_thickness', '0.84')
509 put('retraction_amount', '1.5')
510 put('layer0_width_factor', '125')
511 put('print_temperature', '0')
512 put('print_bed_temperature', '0')
513 put('bottom_layer_speed', '30')
514 put('travel_speed', '175')
515 put('cool_min_layer_time', '15')
516 put('retraction_speed', '25')
517 put('start.gcode', """;This Gcode has been generated specifically for the LulzBot TAZ 4
518 ;Sliced at: {day} {date} {time}
519 ;Basic settings: Layer height: {layer_height} Walls: {wall_thickness} Fill: {fill_density}
520 ;Filament Diameter: {filament_diameter}
521 ;Print time: {print_time}
522 ;M190 S{print_bed_temperature} ;Uncomment to add your own bed temperature line
523 ;M109 S{print_temperature} ;Uncomment to add your own temperature line
525 G90 ;absolute positioning
526 M82 ;set extruder to absolute mode
527 M107 ;start with the fan off
528 G28 X0 Y0 ;move X/Y to min endstops
529 G28 Z0 ;move Z to min endstops
530 G1 Z15.0 F{travel_speed} ;move the platform down 15mm
531 G92 E0 ;zero the extruded length
532 G1 F200 E0 ;extrude 3mm of feed stock
533 G92 E0 ;zero the extruded length again
535 M203 X192 Y208 Z3 ;speed limits""")
536 put('end.gcode', """= M400
538 M140 S0 ;heated bed heater off (if you have it)
540 G91 ;relative positioning
541 G1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure
542 G1 Z+0.5 E-5 X-20 Y-20 F3000 ;move Z up a bit and retract filament even more
544 G90 ;absolute positioning
545 ;{profile_string}""")
546 if self.printSupport.GetValue():
547 put('support', _("Everywhere"))
548 put('support_type', 'Lines')
549 put('support_angle', '45')
550 put('support_fill_rate', '30')
551 put('support_xy_distance', '0.7')
552 put('support_z_distance', '0.05')
553 if self.printBrim.GetValue():
554 put('platform_adhesion', 'Brim')
555 if self.printMaterialHIPS.GetValue() or self.printMaterialABS.GetValue():
556 if self.printMaterialHIPS.GetValue():
557 if self.printTypeLow.GetValue():
558 put('layer_height', '0.28')
559 put('print_speed', '120')
560 put('retraction_hop', '0.1')
561 put('inset0_speed', '80')
562 put('insetx_speed', '100')
563 put('fan_full_height', '1')
564 put('fan_speed', '25')
565 put('fan_speed_max', '30')
566 if self.printTypeNormal.GetValue():
567 put('layer_height', '0.21')
568 put('print_speed', '100')
569 put('inset0_speed', '60')
570 put('insetx_speed', '80')
571 put('skirt_minimal_length', '250')
572 put('fan_full_height', '0.35')
573 put('fan_speed', '50')
574 put('fan_speed_max', '50')
575 if self.printTypeHigh.GetValue():
576 put('layer_height', '0.14')
577 put('print_speed', '60')
578 put('inset0_speed', '40')
579 put('insetx_speed', '50')
580 put('fan_full_height', '0.56')
581 put('fan_speed', '50')
582 put('fan_speed_max', '60')
583 put('cool_min_feedrate', '8')
584 if self.printMaterialABS.GetValue():
585 if self.printTypeLow.GetValue():
586 put('layer_height', '0.28')
587 put('print_speed', '120')
588 put('retraction_hop', '0.1')
589 put('inset0_speed', '80')
590 put('insetx_speed', '100')
591 put('fan_full_height', '5')
592 put('fan_speed', '25')
593 put('fan_speed_max', '30')
594 if self.printTypeNormal.GetValue():
595 put('layer_height', '0.21')
596 put('print_speed', '100')
597 put('inset0_speed', '60')
598 put('insetx_speed', '80')
599 put('fan_speed', '25')
600 put('fan_speed_max', '25')
601 put('fill_overlap', '5')
602 if self.printTypeHigh.GetValue():
603 put('layer_height', '0.14')
604 put('print_speed', '60')
605 put('retraction_hop', '0.1')
606 put('inset0_speed', '40')
607 put('insetx_speed', '50')
608 put('fan_full_height', '5')
609 put('fan_speed', '40')
610 put('fan_speed_max', '75')
611 elif self.printMaterialPLA.GetValue():
612 if self.printTypeLow.GetValue():
613 put('layer_height', '0.28')
614 put('print_speed', '120')
615 put('retraction_hop', '0.1')
616 put('inset0_speed', '80')
617 put('insetx_speed', '100')
618 put('skirt_minimal_length', '250')
619 put('fan_full_height', '1')
620 put('fan_speed', '75')
621 put('cool_min_feedrate', '15')
622 put('fill_overlap', '0')
623 if self.printTypeNormal.GetValue():
624 put('layer_height', '0.21')
625 put('print_speed', '100')
626 put('retraction_hop', '0.1')
627 put('inset0_speed', '60')
628 put('insetx_speed', '80')
629 put('skirt_minimal_length', '250')
630 put('fan_full_height', '1')
631 put('fan_speed', '75')
632 put('cool_min_feedrate', '15')
633 if self.printTypeHigh.GetValue():
634 put('layer_height', '0.14')
635 put('print_speed', '60')
636 put('inset0_speed', '40')
637 put('insetx_speed', '50')
638 put('skirt_minimal_length', '0')
639 put('fan_full_height', '0.28')
640 put('fill_overlap', '10')
641 elif not profile.getMachineSetting('machine_type') == 'lulzbot_mini' and not profile.getMachineSetting('machine_type') == 'lulzbot_TAZ_5' and not profile.getMachineSetting('machine_type') == 'lulzbot_TAZ_4':
642 nozzle_size = float(get('nozzle_size'))
643 if self.printBrim.GetValue():
644 put('platform_adhesion', 'Brim')
645 put('brim_line_count', '10')
646 if self.printTypeNormal.GetValue():
647 put('wall_thickness', nozzle_size * 2.0)
648 put('layer_height', '0.10')
649 put('fill_density', '20')
650 elif self.printTypeLow.GetValue():
651 put('wall_thickness', nozzle_size * 2.5)
652 put('layer_height', '0.20')
653 put('fill_density', '10')
654 put('print_speed', '60')
655 put('cool_min_layer_time', '3')
656 put('bottom_layer_speed', '30')
657 elif self.printTypeHigh.GetValue():
658 put('wall_thickness', nozzle_size * 2.0)
659 put('layer_height', '0.06')
660 put('fill_density', '20')
661 put('bottom_layer_speed', '15')
662 elif self.printTypeJoris.GetValue():
663 put('wall_thickness', nozzle_size * 1.5)
664 if self.printSupport.GetValue():
665 put('support', _("Exterior Only"))
666 put('filament_diameter', '2.85')
667 if self.printMaterialPLA.GetValue():
669 if self.printMaterialABS.GetValue():
670 put('print_bed_temperature', '100')
671 put('platform_adhesion', 'Brim')
672 put('filament_flow', '107')
673 put('print_temperature', '245')
675 def updateProfileToControls(self):