from Cura.util import profile
from Cura.util import resources
+from Cura.util.simpleModeSettings import SimpleModeSettings
class simpleModePanel(wx.Panel):
"Main user interface window for Quickprint mode"
continue
settings[setting.getName()] = setting.getDefault()
+ profile_setting = None
+ for button in self._print_profile_options:
+ if button.GetValue():
+ profile_setting = button.base_filename
+ break
+ material_setting = None
+ for button in self._print_material_options:
+ if button.GetValue():
+ material_setting = button.base_filename
+ break
+ other_settings = []
+ for button in self._print_other_options:
+ if button.GetValue():
+ other_settings.append(button.base_filename)
+
+ simple_settings = SimpleModeSettings.getSimpleSettings(profile_setting, material_setting, other_settings)
+ for setting in simple_settings.keys():
+ settings[setting] = simple_settings[setting]
+
for button in self._print_profile_options:
if button.GetValue():
cp = configparser.ConfigParser()
--- /dev/null
+from lulzbotMini import lulzbot_mini_settings
--- /dev/null
+hips_low_settings = [('print_speed', '50'),
+ ('infill_speed', '70'),
+ ('inset0_speed', '40'),
+ ('insetx_speed', '45'),
+ ('cool_min_layer_time', '15'),
+ ('cool_min_feedrate', '10')]
+
+hips_normal_settings = [('print_speed', '50'),
+ ('infill_speed', '60'),
+ ('inset0_speed', '30'),
+ ('insetx_speed', '35'),
+ ('cool_min_layer_time', '15'),
+ ('cool_min_feedrate', '10')]
+
+hips_high_settings = [('print_speed', '30'),
+ ('infill_speed', '30'),
+ ('inset0_speed', '20'),
+ ('insetx_speed', '25'),
+ ('cool_min_layer_time', '20'),
+ ('cool_min_feedrate', '5')]
+
+abs_low_settings = [('print_speed', '85'),
+ ('infill_speed', '60'),
+ ('inset0_speed', '50'),
+ ('insetx_speed', '55'),
+ ('cool_min_feedrate', '10')]
+
+abs_normal_settings = [('print_speed', '50'),
+ ('infill_speed', '55'),
+ ('inset0_speed', '45'),
+ ('insetx_speed', '50'),
+ ('cool_min_feedrate', '10')]
+
+abs_high_settings = [('print_speed', '50'),
+ ('infill_speed', '40'),
+ ('inset0_speed', '30'),
+ ('insetx_speed', '35'),
+ ('cool_min_feedrate', '5')]
+
+pla_low_settings = [('cool_min_feedrate', '10'),
+ ('infill_speed', '40'),
+ ('inset0_speed', '30'),
+ ('insetx_speed', '35')]
+pla_normal_settings = [('cool_min_feedrate', '10'),
+ ('infill_speed', '40'),
+ ('inset0_speed', '30'),
+ ('insetx_speed', '35')]
+pla_high_settings = [('cool_min_feedrate', '5'),
+ ('infill_speed', '30'),
+ ('inset0_speed', '25'),
+ ('insetx_speed', '27')]
+
+# LulzBot Mini slice settings for use with the simple slice selection.
+lulzbot_mini_settings = [{'Ini': 'mini'},
+ {'Material': '1_hips', 'Profile': '1_low',
+ 'Settings': hips_low_settings},
+ {'Material': '1_hips', 'Profile': '2_normal',
+ 'Settings': hips_normal_settings},
+ {'Material': '1_hips', 'Profile': '3_high',
+ 'Settings': hips_high_settings},
+
+ {'Material': '2_abs', 'Profile': '1_low',
+ 'Settings': abs_low_settings},
+ {'Material': '2_abs', 'Profile': '2_normal',
+ 'Settings': abs_normal_settings},
+ {'Material': '2_abs', 'Profile': '3_high',
+ 'Settings': abs_high_settings},
+
+ {'Material': '3_pla', 'Profile': '1_low',
+ 'Settings': pla_low_settings},
+ {'Material': '3_pla', 'Profile': '2_normal',
+ 'Settings': pla_normal_settings},
+ {'Material': '3_pla', 'Profile': '3_high',
+ 'Settings': pla_high_settings},
+
+ {'Profile': '3_high',
+ 'Settings': [('layer_height', '0.18')]},
+ {'Material': '3_pla', 'Profile': '3_high',
+ 'Settings': [('layer_height', '0.14')]}]
--- /dev/null
+from Cura.util.settings import lulzbot_mini_settings
+
+import ConfigParser as configparser
+from Cura.util import profile
+from Cura.util import resources
+
+class SimpleModeSettings(object):
+ # Set the Quickprint settings:
+ #
+ # Settings Format : Dictionary[machine_type] = machine_settings
+ # Dictionary[None] = other_machine_settings
+ #
+ # Machine settings Format : List of setting dictionaries
+ # Setting dictionary Format: Dictionary['Material'] = material ini filename
+ # Dictionary['Profile'] = profile ini filename
+ # Dictionary['Options'] = list of other options ini filenames
+ # Dictionary['Ini'] = Ini filename to load from extra/ subdir
+ # Dictionary['Settings'] = Option settings
+ # Option settings format : List of tuples ('profile setting', 'value')
+ # ('profile setting', callable function)
+ # Example :
+ # settings['prusa_i3'] = [
+ # {'Material': '1_pla', 'Profile': '2_normal', 'Ini': 'normal_pla'},
+ # {'Material': '2_abs', 'Profile': '1_high', 'Ini': 'prusa_i3/high_abs'},
+ # {'Material': '1_pla', 'Options': ['brim', 'support'],
+ # 'Settings': [('support', _('Everywhere')), ('platform_adhesion', 'Brim')]
+ # }
+ # ]
+ #
+ #
+ # All the settings in the list of machine settings will be checked. For
+ # each of those settings, the list of options will be verified and only the
+ # settings in which all the options match will be applied.
+ # The 'Settings' key in the dictionary will contain the settings to apply.
+ # Those settings will be a a list a tuples of key:value in which the value
+ # can be a callable function for greater control
+ #
+ # For example, a Dictionary with only 'Settings' will always be applied
+ # while a setting with {'Brim':True} will only be applied if the printBrim
+ # option is enabled, and settings with {'MaterialABS':True, 'TypeHigh':False}
+ # will only be applied for Low and Normal quality prints in ABS
+
+ settings = {"lulzbot_mini": lulzbot_mini_settings,
+ None: {}}
+
+
+ @staticmethod
+ def getSimpleSettings(profile_setting, material_setting, other_settings):
+ simple_settings = {}
+ machine_type = profile.getMachineSetting('machine_type')
+ if SimpleModeSettings.settings.has_key(machine_type):
+ machine_settings = SimpleModeSettings.settings[machine_type]
+ else:
+ machine_settings = SimpleModeSettings.settings[None]
+
+ for setting_dict in machine_settings:
+ settings = setting_dict.get('Settings', None)
+ ini = setting_dict.get('Ini', None)
+ print_material = setting_dict.get('Material', None)
+ print_profile = setting_dict.get('Profile', None)
+ print_others = setting_dict.get('Options', None)
+ # Check if the material/profile/other options match the settings
+ if (print_material is None or print_material == material_setting) and \
+ (print_profile is None or print_profile == profile_setting) and \
+ (print_others is None or len(set(print_others)) == len(set(print_others).intersection(set(other_settings)))):
+ if settings:
+ for item in settings:
+ if len(item) != 2 or not profile.isProfileSetting(item[0]):
+ continue
+ if hasattr(item[1], '__call__'):
+ simple_settings[item[0]] = item[1]()
+ else:
+ simple_settings[item[0]] = item[1]
+ if ini:
+ ini_file = resources.getSimpleModeIniFiles('extra', ini + '.ini')
+ if len(ini_file) > 0:
+ cp = configparser.ConfigParser()
+ cp.read(ini_file[0])
+ for setting in profile.settingsList:
+ if setting.isProfile():
+ if cp.has_option('profile', setting.getName()):
+ simple_settings[setting.getName()] = cp.get('profile', setting.getName())
+
+ return simple_settings
--- /dev/null
+[profile]
+filament_diameter = 2.85
+nozzle_size = 0.5
+wall_thickness = 1
+fill_density = 20
+retraction_speed = 10
+retraction_hop = 0.1
+bottom_thickness = 0.425
+layer0_width_factor = 125
+travel_speed = 175
+skirt_minimal_length = 250
+brim_line_count = 10
+raft_airgap = 0.5
+bottom_layer_speed = 15
+fan_full_height = 0.5
+retraction_minimal_extrusion = 0.005
--- /dev/null
+[info]
+name = HIPS
+
+[profile]
+fan_speed_max = 50
+print_temperature = 240
+print_bed_temperature = 110
+solid_layer_thickness = 0.8
+retraction_amount = 1
+fan_speed = 40
+start.gcode = ;This Gcode has been generated specifically for the LulzBot Mini
+ ;Basic settings: Layer height: {layer_height} Walls: {wall_thickness} Fill: {fill_density}
+ ;Filament Diameter: {filament_diameter}
+ ;Nozzle Size: {nozzle_size}
+ G21 ; metric values
+ G90 ; absolute positioning
+ M82 ; set extruder to absolute mode
+ M107 ; start with the fan off
+ G92 E0 ; set extruder position to 0
+ M140 S110 ; get bed heating up
+ G28 ; home all
+ M109 S150 ; set to cleaning temp and wait
+ G1 Z150 E-30 F75 ; suck up XXmm of filament
+ M109 S170 ; heat up rest of way
+ G1 X45 Y174 F11520 ; move behind scraper
+ G1 Z0 F1200 ; CRITICAL: set Z to height of top of scraper
+ G1 X45 Y174 Z-.5 F4000 ; wiping ; plunge into wipe pad
+ G1 X55 Y172 Z-.5 F4000 ; wiping
+ G1 X45 Y174 Z0 F4000 ; wiping
+ G1 X55 Y172 F4000 ; wiping
+ G1 X45 Y174 F4000 ; wiping
+ G1 X55 Y172 F4000 ; wiping
+ G1 X45 Y174 F4000 ; wiping
+ G1 X55 Y172 F4000 ; wiping
+ G1 X60 Y174 F4000 ; wiping
+ G1 X80 Y172 F4000 ; wiping
+ G1 X60 Y174 F4000 ; wiping
+ G1 X80 Y172 F4000 ; wiping
+ G1 X60 Y174 F4000 ; wiping
+ G1 X90 Y172 F4000 ; wiping
+ G1 X80 Y174 F4000 ; wiping
+ G1 X100 Y172 F4000 ; wiping
+ G1 X80 Y174 F4000 ; wiping
+ G1 X100 Y172 F4000 ; wiping
+ G1 X80 Y174 F4000 ; wiping
+ G1 X100 Y172 F4000 ; wiping
+ G1 X110 Y174 F4000 ; wiping
+ G1 X100 Y172 F4000 ; wiping
+ G1 X110 Y174 F4000 ; wiping
+ G1 X100 Y172 F4000 ; wiping
+ G1 X110 Y174 F4000 ; wiping
+ G1 X115 Y172 Z-0.5 F1000 ; wipe slower and bury noz in cleanish area
+ G1 Z10 ; raise z
+ G28 X0 Y0 ; home x and y
+ M109 S170 ; set to probing temp
+ M204 S300 ; set accel for probing
+ G29 ; Probe
+ M204 S2000 ; set accel back to normal
+ G1 X5 Y15 Z10 F5000 ; get out the way
+ M400 ; clear buffer
+ G4 S1 ; pause
+ M109 S{print_temperature} ; set extruder temp and wait
+ G4 S25 ; wait for bed to temp up
+ G1 Z2 E0 F75 ; extrude filament back into nozzle
+ M140 S{print_bed_temperature}; get bed temping up during first layer
+end.gcode = M400
+ M104 S0 ; Hotend off
+ M140 S0 ; heated bed heater off (if you have it)
+ M107 ; fans off
+ G92 E0 ; set extruder to 0
+ G1 E-3 F300 ; retract a bit to relieve pressure
+ G1 X5 Y5 Z156 F10000 ; move to cooling positioning
+ M190 R60 ; wait for bed to cool
+ M140 S0 ; Turn off bed temp
+ G1 X145 Y175 Z156 F1000 ; move to cooling positioning
+ M84 ; steppers off
+ G90 ; absolute positioning
+ ;{profile_string}
--- /dev/null
+[info]
+name = ABS
+
+[profile]
+fan_speed_max = 60
+print_temperature = 240
+print_bed_temperature = 110
+solid_layer_thickness = 0.8
+retraction_amount = 1
+fan_speed = 40
+start.gcode = ;This Gcode has been generated specifically for the LulzBot Mini
+ ;Basic settings: Layer height: {layer_height} Walls: {wall_thickness} Fill: {fill_density}
+ ;Filament Diameter: {filament_diameter}
+ ;Nozzle Size: {nozzle_size}
+ G21 ; metric values
+ G90 ; absolute positioning
+ M82 ; set extruder to absolute mode
+ M107 ; start with the fan off
+ G92 E0 ; set extruder position to 0
+ M140 S110 ; get bed heating up
+ G28 ; home all
+ M109 S150 ; set to cleaning temp and wait
+ G1 Z150 E-30 F75 ; suck up XXmm of filament
+ M109 S170 ; heat up rest of way
+ G1 X45 Y174 F11520 ; move behind scraper
+ G1 Z0 F1200 ; CRITICAL: set Z to height of top of scraper
+ G1 X45 Y174 Z-.5 F4000 ; wiping ; plunge into wipe pad
+ G1 X55 Y172 Z-.5 F4000 ; wiping
+ G1 X45 Y174 Z0 F4000 ; wiping
+ G1 X55 Y172 F4000 ; wiping
+ G1 X45 Y174 F4000 ; wiping
+ G1 X55 Y172 F4000 ; wiping
+ G1 X45 Y174 F4000 ; wiping
+ G1 X55 Y172 F4000 ; wiping
+ G1 X60 Y174 F4000 ; wiping
+ G1 X80 Y172 F4000 ; wiping
+ G1 X60 Y174 F4000 ; wiping
+ G1 X80 Y172 F4000 ; wiping
+ G1 X60 Y174 F4000 ; wiping
+ G1 X90 Y172 F4000 ; wiping
+ G1 X80 Y174 F4000 ; wiping
+ G1 X100 Y172 F4000 ; wiping
+ G1 X80 Y174 F4000 ; wiping
+ G1 X100 Y172 F4000 ; wiping
+ G1 X80 Y174 F4000 ; wiping
+ G1 X100 Y172 F4000 ; wiping
+ G1 X110 Y174 F4000 ; wiping
+ G1 X100 Y172 F4000 ; wiping
+ G1 X110 Y174 F4000 ; wiping
+ G1 X100 Y172 F4000 ; wiping
+ G1 X110 Y174 F4000 ; wiping
+ G1 X115 Y172 Z-0.5 F1000 ; wipe slower and bury noz in cleanish area
+ G1 Z10 ; raise z
+ G28 X0 Y0 ; home x and y
+ M109 S170 ; set to probing temp
+ M204 S300 ; set accel for probing
+ G29 ; Probe
+ M204 S2000 ; set accel back to normal
+ G1 X5 Y15 Z10 F5000 ; get out the way
+ M400 ; clear buffer
+ G4 S1 ; pause
+ M109 S{print_temperature} ; set extruder temp and wait
+ G4 S25 ; wait for bed to temp up
+ G1 Z2 E0 F75 ; extrude filament back into nozzle
+ M140 S{print_bed_temperature}; get bed temping up during first layer
+end.gcode = M400
+ M104 S0 ; Hotend off
+ M140 S0 ; heated bed heater off (if you have it)
+ M107 ; fans off
+ G92 E0 ; set extruder to 0
+ G1 E-3 F300 ; retract a bit to relieve pressure
+ G1 X5 Y5 Z156 F10000 ; move to cooling positioning
+ M190 R60 ; wait for bed to cool
+ M140 S0 ; Turn off bed temp
+ G1 X145 Y175 Z156 F1000 ; move to cooling positioning
+ M84 ; steppers off
+ G90 ; absolute positioning
+ ;{profile_string}
--- /dev/null
+[info]
+name = PLA
+
+[profile]
+print_temperature = 205
+print_bed_temperature = 60
+solid_layer_thickness = 1
+print_speed = 50
+retraction_amount = 1.5
+bottom_layer_speed = 15
+cool_min_layer_time = 20
+fan_speed = 75
+fan_speed_max = 100
+start.gcode = ;This Gcode has been generated specifically for the LulzBot Mini
+ ;Basic settings: Layer height: {layer_height} Walls: {wall_thickness} Fill: {fill_density}
+ ;Filament Diameter: {filament_diameter}
+ ;Nozzle Size: {nozzle_size}
+ G21 ; metric values
+ G90 ; absolute positioning
+ M82 ; set extruder to absolute mode
+ M107 ; start with the fan off
+ G92 E0 ; set extruder position to 0
+ M140 S{print_bed_temperature}; get bed heating up
+ G28 ; home all
+ M109 S140 ; set to cleaning temp and wait
+ G1 Z150 E-30 F75 ; suck up XXmm of filament
+ M109 S140 ; heat up rest of way
+ G1 X45 Y174 F11520 ; move behind scraper
+ G1 Z0 F1200 ; CRITICAL: set Z to height of top of scraper
+ G1 X45 Y174 Z-.5 F4000 ; wiping ; plunge into wipe pad
+ G1 X55 Y172 Z-.5 F4000 ; wiping
+ G1 X45 Y174 Z0 F4000 ; wiping
+ G1 X55 Y172 F4000 ; wiping
+ G1 X45 Y174 F4000 ; wiping
+ G1 X55 Y172 F4000 ; wiping
+ G1 X45 Y174 F4000 ; wiping
+ G1 X55 Y172 F4000 ; wiping
+ G1 X60 Y174 F4000 ; wiping
+ G1 X80 Y172 F4000 ; wiping
+ G1 X60 Y174 F4000 ; wiping
+ G1 X80 Y172 F4000 ; wiping
+ G1 X60 Y174 F4000 ; wiping
+ G1 X90 Y172 F4000 ; wiping
+ G1 X80 Y174 F4000 ; wiping
+ G1 X100 Y172 F4000 ; wiping
+ G1 X80 Y174 F4000 ; wiping
+ G1 X100 Y172 F4000 ; wiping
+ G1 X80 Y174 F4000 ; wiping
+ G1 X100 Y172 F4000 ; wiping
+ G1 X110 Y174 F4000 ; wiping
+ G1 X100 Y172 F4000 ; wiping
+ G1 X110 Y174 F4000 ; wiping
+ G1 X100 Y172 F4000 ; wiping
+ G1 X110 Y174 F4000 ; wiping
+ G1 X115 Y172 Z-0.5 F1000 ; wipe slower and bury noz in cleanish area
+ G1 Z10 ; raise z
+ G28 X0 Y0 ; home x and y
+ M109 S140 ; set to probing temp
+ M204 S300 ; set accel for probing
+ G29 ; Probe
+ M204 S2000 ; set accel back to normal
+ G1 X5 Y15 Z10 F5000 ; get out the way
+ G4 S1 ; pause
+ M400 ; clear buffer
+ M109 S{print_temperature} ; set extruder temp and wait
+ G4 S15 ; wait for bed to temp up
+ G1 Z2 E0 F75 ; extrude filament back into nozzle
+ M140 S{print_bed_temperature}; get bed temping up during first layer
+end.gcode = M400
+ M104 S0 ; Hotend off
+ M140 S0 ; heated bed heater off (if you have it)
+ M107 ; fans off
+ G92 E5 ; set extruder to 5mm for retract on print end
+ G1 X5 Y5 Z156 F10000 ; move to cooling positioning
+ M190 R60 ; wait for bed to cool
+ M140 S0 ; Turn off bed temp
+ G1 X145 Y175 Z156 F1000 ; move to cooling positioning
+ M84 ; steppers off
+ G90 ; absolute positioning
+ ;{profile_string}
--- /dev/null
+[info]\r
+name = Print support structure\r
+\r
+[profile]\r
+support = Everywhere\r
+support_type = Lines\r
+support_angle = 45\r
+support_fill_rate = 30\r
+support_xy_distance = 0.7\r
+support_z_distance = 0.05\r
--- /dev/null
+[info]\r
+name = Print Brim\r
+\r
+[profile]\r
+platform_adhesion = Brim\r
--- /dev/null
+[info]\r
+name = Fast print\r
+\r
+[profile]\r
+layer_height = 0.38\r
--- /dev/null
+[info]\r
+name = Normal print\r
+\r
+[profile]\r
+layer_height = 0.25\r
+\r
--- /dev/null
+[info]\r
+name = High quality\r
+\r
+[profile]\r
+# ABS and HIPS :\r
+#layer_height = 0.18\r
+\r
+# PLA :\r
+#layer_height = 0.14\r
+\r
+\r