G1 X{new_x} Y{new_y} Z{new_z} F{travel_speed}
G1 E36 F5000
G92 E0
-""",
-}
-preferencesDefaultSettings = {
- 'startMode': 'Simple',
- 'lastFile': os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'resources', 'example', 'UltimakerRobot_support.stl')),
- 'machine_width': '205',
- 'machine_depth': '205',
- 'machine_height': '200',
- 'machine_type': 'unknown',
- 'machine_center_is_zero': 'False',
- 'ultimaker_extruder_upgrade': 'False',
- 'has_heated_bed': 'False',
- 'reprap_name': 'RepRap',
- 'extruder_amount': '1',
- 'extruder_offset_x1': '-22.0',
- 'extruder_offset_y1': '0.0',
- 'extruder_offset_x2': '0.0',
- 'extruder_offset_y2': '0.0',
- 'extruder_offset_x3': '0.0',
- 'extruder_offset_y3': '0.0',
- 'filament_density': '1300',
- 'steps_per_e': '0',
- 'serial_port': 'AUTO',
- 'serial_port_auto': '',
- 'serial_baud': 'AUTO',
- 'serial_baud_auto': '',
- 'slicer': 'Cura (Skeinforge based)',
- 'save_profile': 'False',
- 'filament_cost_kg': '0',
- 'filament_cost_meter': '0',
- 'sdpath': '',
- 'sdshortnames': 'False',
- 'check_for_updates': 'True',
- 'submit_slice_information': 'False',
-
- 'planner_always_autoplace': 'True',
- 'extruder_head_size_min_x': '75.0',
- 'extruder_head_size_min_y': '18.0',
- 'extruder_head_size_max_x': '18.0',
- 'extruder_head_size_max_y': '35.0',
- 'extruder_head_size_height': '60.0',
-
- 'model_colour': '#7AB645',
- 'model_colour2': '#CB3030',
- 'model_colour3': '#DDD93C',
- 'model_colour4': '#4550D3',
-
- 'window_maximized': 'True',
- 'window_pos_x': '-1',
- 'window_pos_y': '-1',
- 'window_width': '-1',
- 'window_height': '-1',
- 'window_normal_sash': '320',
-}
+""", str, 'alteration', 'alteration')
+
+setting('startMode', 'Simple', ['Simple', 'Normal'], 'preference', 'hidden')
+setting('lastFile', os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'resources', 'example', 'UltimakerRobot_support.stl')), str, 'preference', 'hidden')
+setting('machine_width', '205', float, 'preference', 'hidden').setLabel('Maximum width (mm)', 'Size of the machine in mm')
+setting('machine_depth', '205', float, 'preference', 'hidden').setLabel('Maximum depth (mm)', 'Size of the machine in mm')
+setting('machine_height', '200', float, 'preference', 'hidden').setLabel('Maximum height (mm)', 'Size of the machine in mm')
+setting('machine_type', 'unknown', str, 'preference', 'hidden')
+setting('machine_center_is_zero', 'False', bool, 'preference', 'hidden')
+setting('ultimaker_extruder_upgrade', 'False', bool, 'preference', 'hidden')
+setting('has_heated_bed', 'False', bool, 'preference', 'hidden').setLabel('Heated bed', 'If you have an heated bed, this enabled heated bed settings (requires restart)')
+setting('reprap_name', 'RepRap', str, 'preference', 'hidden')
+setting('extruder_amount', '1', ['1','2','3','4'], 'preference', 'hidden').setLabel('Extruder count', 'Amount of extruders in your machine.')
+setting('extruder_offset_x1', '-21.6', float, 'preference', 'hidden').setLabel('Offset X', 'The offset of your secondary extruder compared to the primary.')
+setting('extruder_offset_y1', '0.0', float, 'preference', 'hidden').setLabel('Offset Y', 'The offset of your secondary extruder compared to the primary.')
+setting('extruder_offset_x2', '0.0', float, 'preference', 'hidden').setLabel('Offset X', 'The offset of your secondary extruder compared to the primary.')
+setting('extruder_offset_y2', '0.0', float, 'preference', 'hidden').setLabel('Offset Y', 'The offset of your secondary extruder compared to the primary.')
+setting('extruder_offset_x3', '0.0', float, 'preference', 'hidden').setLabel('Offset X', 'The offset of your secondary extruder compared to the primary.')
+setting('extruder_offset_y3', '0.0', float, 'preference', 'hidden').setLabel('Offset Y', 'The offset of your secondary extruder compared to the primary.')
+setting('filament_physical_density', '1300', float, 'preference', 'hidden').setRange(500.0, 3000.0).setLabel('Density (kg/m3)', 'Weight of the filament per m3. Around 1300 for PLA. And around 1040 for ABS. This value is used to estimate the weight if the filament used for the print.')
+setting('steps_per_e', '0', float, 'preference', 'hidden').setRange(0).setLabel('E-Steps per 1mm filament', 'Amount of steps per mm filament extrusion')
+setting('serial_port', 'AUTO', str, 'preference', 'hidden').setLabel('Serial port', 'Serial port to use for communication with the printer')
+setting('serial_port_auto', '', str, 'preference', 'hidden')
+setting('serial_baud', 'AUTO', str, 'preference', 'hidden').setLabel('Baudrate', 'Speed of the serial port communication\nNeeds to match your firmware settings\nCommon values are 250000, 115200, 57600')
+setting('serial_baud_auto', '', int, 'preference', 'hidden')
+setting('save_profile', 'False', bool, 'preference', 'hidden').setLabel('Save profile on slice', 'When slicing save the profile as [stl_file]_profile.ini next to the model.')
+setting('filament_cost_kg', '0', float, 'preference', 'hidden').setLabel('Cost (price/kg)', 'Cost of your filament per kg, to estimate the cost of the final print.')
+setting('filament_cost_meter', '0', float, 'preference', 'hidden').setLabel('Cost (price/m)', 'Cost of your filament per meter, to estimate the cost of the final print.')
+setting('sdpath', '', str, 'preference', 'hidden').setLabel('SD card drive', 'Location of your SD card, when using the copy to SD feature.')
+setting('sdshortnames', 'False', bool, 'preference', 'hidden').setLabel('Copy to SD with 8.3 names', 'Save the gcode files in short filenames, so they are properly shown on the UltiController')
+setting('check_for_updates', 'True', bool, 'preference', 'hidden').setLabel('Check for updates', 'Check for newer versions of Cura on startup')
+setting('submit_slice_information', 'False', bool, 'preference', 'hidden').setLabel('Send usage statistics', 'Submit anonymous usage information to improve next versions of Cura')
+
+setting('planner_always_autoplace', 'True', bool, 'preference', 'hidden')
+setting('extruder_head_size_min_x', '75.0', float, 'preference', 'hidden')
+setting('extruder_head_size_min_y', '18.0', float, 'preference', 'hidden')
+setting('extruder_head_size_max_x', '18.0', float, 'preference', 'hidden')
+setting('extruder_head_size_max_y', '35.0', float, 'preference', 'hidden')
+setting('extruder_head_size_height', '60.0', float, 'preference', 'hidden')
+
+setting('model_colour', '#7AB645', str, 'preference', 'hidden').setLabel('Model colour')
+setting('model_colour2', '#CB3030', str, 'preference', 'hidden').setLabel('Model colour (2)')
+setting('model_colour3', '#DDD93C', str, 'preference', 'hidden').setLabel('Model colour (3)')
+setting('model_colour4', '#4550D3', str, 'preference', 'hidden').setLabel('Model colour (4)')
+
- setting('window_maximized', 'False', bool, 'preference', 'hidden')
++setting('window_maximized', 'True', bool, 'preference', 'hidden')
+setting('window_pos_x', '-1', float, 'preference', 'hidden')
+setting('window_pos_y', '-1', float, 'preference', 'hidden')
+setting('window_width', '-1', float, 'preference', 'hidden')
+setting('window_height', '-1', float, 'preference', 'hidden')
+setting('window_normal_sash', '320', float, 'preference', 'hidden')
+
+validators.warningAbove(settingsDictionary['layer_height'], lambda : (float(getProfileSetting('nozzle_size')) * 80.0 / 100.0), "Thicker layers then %.2fmm (80%% nozzle size) usually give bad results and are not recommended.")
+validators.wallThicknessValidator(settingsDictionary['wall_thickness'])
+validators.warningAbove(settingsDictionary['print_speed'], 150.0, "It is highly unlikely that your machine can achieve a printing speed above 150mm/s")
+validators.printSpeedValidator(settingsDictionary['print_speed'])
+validators.warningAbove(settingsDictionary['print_temperature'], 260.0, "Temperatures above 260C could damage your machine, be careful!")
+validators.warningAbove(settingsDictionary['print_temperature2'], 260.0, "Temperatures above 260C could damage your machine, be careful!")
+validators.warningAbove(settingsDictionary['print_temperature3'], 260.0, "Temperatures above 260C could damage your machine, be careful!")
+validators.warningAbove(settingsDictionary['print_temperature4'], 260.0, "Temperatures above 260C could damage your machine, be careful!")
+validators.warningAbove(settingsDictionary['filament_diameter'], 3.5, "Are you sure your filament is that thick? Normal filament is around 3mm or 1.75mm.")
+validators.warningAbove(settingsDictionary['filament_diameter2'], 3.5, "Are you sure your filament is that thick? Normal filament is around 3mm or 1.75mm.")
+validators.warningAbove(settingsDictionary['filament_diameter3'], 3.5, "Are you sure your filament is that thick? Normal filament is around 3mm or 1.75mm.")
+validators.warningAbove(settingsDictionary['filament_diameter4'], 3.5, "Are you sure your filament is that thick? Normal filament is around 3mm or 1.75mm.")
+validators.warningAbove(settingsDictionary['travel_speed'], 300.0, "It is highly unlikely that your machine can achieve a travel speed above 300mm/s")
+validators.warningAbove(settingsDictionary['bottom_thickness'], lambda : (float(getProfileSetting('nozzle_size')) * 3.0 / 4.0), "A bottom layer of more then %.2fmm (3/4 nozzle size) usually give bad results and is not recommended.")
+
+#Conditions for multiple extruders
+settingsDictionary['print_temperature2'].addCondition(lambda : int(getPreference('extruder_amount')) > 1)
+settingsDictionary['print_temperature3'].addCondition(lambda : int(getPreference('extruder_amount')) > 2)
+settingsDictionary['print_temperature4'].addCondition(lambda : int(getPreference('extruder_amount')) > 3)
+settingsDictionary['filament_diameter2'].addCondition(lambda : int(getPreference('extruder_amount')) > 1)
+settingsDictionary['filament_diameter3'].addCondition(lambda : int(getPreference('extruder_amount')) > 2)
+settingsDictionary['filament_diameter4'].addCondition(lambda : int(getPreference('extruder_amount')) > 3)
+settingsDictionary['support_dual_extrusion'].addCondition(lambda : int(getPreference('extruder_amount')) > 1)
+#Heated bed
+settingsDictionary['print_bed_temperature'].addCondition(lambda : getPreference('has_heated_bed') == 'True')
#########################################################
## Profile and preferences functions