From 5e4e049c1f60d8fef670ddd53b84f0679cc21f5a Mon Sep 17 00:00:00 2001 From: Timur Tabi Date: Thu, 1 Mar 2018 20:57:15 -0600 Subject: [PATCH 01/15] Add definition for Printrbot Simple Maker's Kit 1405 The Printrbot Simple Maker's Kit, model 1405, was a low-cost FDM printer without a heated bed and a 10x10cm print area. The print area can be extended to 185x100mm with the "Printrbot Simple XL Upgrade with Spool Rack for Maker's Kit 1405". More information can be found at http://printrbot.com/project/simple-makers/ --- .../printrbot_simple_makers_kit.def.json | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 resources/definitions/printrbot_simple_makers_kit.def.json diff --git a/resources/definitions/printrbot_simple_makers_kit.def.json b/resources/definitions/printrbot_simple_makers_kit.def.json new file mode 100644 index 0000000000..61aecd9240 --- /dev/null +++ b/resources/definitions/printrbot_simple_makers_kit.def.json @@ -0,0 +1,39 @@ +{ + "version": 2, + "name": "Printrbot Simple Maker's Kit (1405)", + "inherits": "fdmprinter", + "metadata": { + "visible": true, + "author": "Timur Tabi", + "manufacturer": "Printrbot", + "file_formats": "text/x-gcode", + "preferred_material": "*pla*" + }, + + "overrides": { + "machine_name": { "default_value": "Printrbot Simple Maker's Kit (1405)" }, + "machine_heated_bed": { "default_value": false }, + "machine_width": { "default_value": 100 }, + "machine_depth": { "default_value": 100 }, + "machine_height": { "default_value": 115 }, + "material_diameter": { "default_value": 1.75 }, + "machine_nozzle_size": { "default_value": 0.4 }, + "machine_head_with_fans_polygon": { + "default_value": [ + [-40, 1000], + [-40, -10], + [60, 1000], + [60, -10] + ] + }, + "gantry_height": { "default_value": 1000 }, + "machine_gcode_flavor": { "default_value": "RepRap (Marlin/Sprinter)" }, + + "machine_start_gcode": { + "default_value": "G21 ;metric values\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\nM107 ;start with the fan off\nG28 X0 Y0 ;home X/Y\nG28 Z0 ;home Z\nG92 E0 ;zero the extruded length\nG29 ;initiate auto bed leveling sequence" + }, + "machine_end_gcode": { + "default_value": "M104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nM106 S0 ;fan off\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit\nG1 Z+1 E-5 F9000 ;move Z up a bit and retract even more\nG28 X0 Y0 ;home X/Y, so the head is out of the way\nM84 ;steppers off\nG90 ;absolute positioning" + } + } +} From 4c61ea5ba9972d483f319a6fd8e3c4bc4bd3e27f Mon Sep 17 00:00:00 2001 From: THeijmans Date: Tue, 13 Mar 2018 11:45:19 +0100 Subject: [PATCH 02/15] Single extrusion settings for travels Updated single extrusion settings, so z hops are removed and travels are shortened for single extrusion. --- resources/definitions/ultimaker3.def.json | 4 ++-- .../quality/ultimaker3/um3_aa0.25_PC_Normal_Quality.inst.cfg | 1 - .../quality/ultimaker3/um3_aa0.25_PP_Normal_Quality.inst.cfg | 1 - .../quality/ultimaker3/um3_aa0.4_PC_Draft_Print.inst.cfg | 1 - resources/quality/ultimaker3/um3_aa0.4_PC_Fast_Print.inst.cfg | 1 - .../quality/ultimaker3/um3_aa0.4_PC_High_Quality.inst.cfg | 1 - .../quality/ultimaker3/um3_aa0.4_PC_Normal_Quality.inst.cfg | 1 - .../quality/ultimaker3/um3_aa0.4_PP_Draft_Print.inst.cfg | 2 -- resources/quality/ultimaker3/um3_aa0.4_PP_Fast_Print.inst.cfg | 2 -- .../quality/ultimaker3/um3_aa0.4_PP_Normal_Quality.inst.cfg | 2 -- .../quality/ultimaker3/um3_aa0.4_TPU_Draft_Print.inst.cfg | 1 - .../quality/ultimaker3/um3_aa0.4_TPU_Fast_Print.inst.cfg | 1 - .../quality/ultimaker3/um3_aa0.4_TPU_Normal_Quality.inst.cfg | 1 - .../quality/ultimaker3/um3_aa0.8_CPEP_Fast_Print.inst.cfg | 3 +-- .../ultimaker3/um3_aa0.8_CPEP_Superdraft_Print.inst.cfg | 3 +-- .../ultimaker3/um3_aa0.8_CPEP_Verydraft_Print.inst.cfg | 1 - resources/quality/ultimaker3/um3_aa0.8_PC_Fast_Print.inst.cfg | 1 - .../quality/ultimaker3/um3_aa0.8_PC_Superdraft_Print.inst.cfg | 1 - .../quality/ultimaker3/um3_aa0.8_PC_Verydraft_Print.inst.cfg | 1 - resources/variants/ultimaker3_aa04.inst.cfg | 1 + resources/variants/ultimaker3_bb04.inst.cfg | 1 + resources/variants/ultimaker3_extended_aa04.inst.cfg | 1 + resources/variants/ultimaker3_extended_bb04.inst.cfg | 1 + 23 files changed, 8 insertions(+), 25 deletions(-) diff --git a/resources/definitions/ultimaker3.def.json b/resources/definitions/ultimaker3.def.json index 29395e8fd5..1864a9b24a 100644 --- a/resources/definitions/ultimaker3.def.json +++ b/resources/definitions/ultimaker3.def.json @@ -126,7 +126,7 @@ "retraction_count_max": { "value": "10" }, "retraction_extrusion_window": { "value": "1" }, "retraction_hop": { "value": "2" }, - "retraction_hop_enabled": { "value": "True" }, + "retraction_hop_enabled": { "value": "extruders_enabled_count > 1" }, "retraction_hop_only_when_collides": { "value": "True" }, "retraction_min_travel": { "value": "5" }, "retraction_prime_speed": { "value": "15" }, @@ -150,7 +150,7 @@ "switch_extruder_prime_speed": { "value": "15" }, "switch_extruder_retraction_amount": { "value": "8" }, "top_bottom_thickness": { "value": "1" }, - "travel_avoid_distance": { "value": "3" }, + "travel_avoid_distance": { "value": "3 if extruders_enabled_count > 1 else machine_nozzle_tip_outer_diameter / 2 * 1.5" }, "wall_0_inset": { "value": "0" }, "wall_line_width_x": { "value": "round(wall_line_width * 0.3 / 0.35, 2)" }, "wall_thickness": { "value": "1" }, diff --git a/resources/quality/ultimaker3/um3_aa0.25_PC_Normal_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.25_PC_Normal_Quality.inst.cfg index 7c9fa32949..925af3f73c 100644 --- a/resources/quality/ultimaker3/um3_aa0.25_PC_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.25_PC_Normal_Quality.inst.cfg @@ -33,7 +33,6 @@ raft_airgap = 0.25 raft_interface_thickness = =max(layer_height * 1.5, 0.225) retraction_count_max = 80 retraction_hop = 2 -retraction_hop_enabled = True retraction_hop_only_when_collides = True retraction_min_travel = 0.8 retraction_prime_speed = 15 diff --git a/resources/quality/ultimaker3/um3_aa0.25_PP_Normal_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.25_PP_Normal_Quality.inst.cfg index 58e7fdc688..e12729878d 100644 --- a/resources/quality/ultimaker3/um3_aa0.25_PP_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.25_PP_Normal_Quality.inst.cfg @@ -37,7 +37,6 @@ retraction_count_max = 6 retraction_extra_prime_amount = 0.2 retraction_extrusion_window = 6.5 retraction_hop = 2 -retraction_hop_enabled = True retraction_hop_only_when_collides = True retraction_min_travel = 0.8 retraction_prime_speed = 13 diff --git a/resources/quality/ultimaker3/um3_aa0.4_PC_Draft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_PC_Draft_Print.inst.cfg index f8b4dd067c..fb185d95b8 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_PC_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_PC_Draft_Print.inst.cfg @@ -43,7 +43,6 @@ raft_interface_thickness = =max(layer_height * 1.5, 0.225) retraction_count_max = 80 retraction_extrusion_window = 1 retraction_hop = 2 -retraction_hop_enabled = True retraction_hop_only_when_collides = True retraction_min_travel = 0.8 retraction_prime_speed = 15 diff --git a/resources/quality/ultimaker3/um3_aa0.4_PC_Fast_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_PC_Fast_Print.inst.cfg index 1db3935180..ab53edfa73 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_PC_Fast_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_PC_Fast_Print.inst.cfg @@ -42,7 +42,6 @@ raft_interface_thickness = =max(layer_height * 1.5, 0.225) retraction_count_max = 80 retraction_extrusion_window = 1 retraction_hop = 2 -retraction_hop_enabled = True retraction_hop_only_when_collides = True retraction_min_travel = 0.8 retraction_prime_speed = 15 diff --git a/resources/quality/ultimaker3/um3_aa0.4_PC_High_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_PC_High_Quality.inst.cfg index 0f9e9b15b0..9900aed7d2 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_PC_High_Quality.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_PC_High_Quality.inst.cfg @@ -43,7 +43,6 @@ raft_interface_thickness = =max(layer_height * 1.5, 0.225) retraction_count_max = 80 retraction_extrusion_window = 1 retraction_hop = 2 -retraction_hop_enabled = True retraction_hop_only_when_collides = True retraction_min_travel = 0.8 retraction_prime_speed = 15 diff --git a/resources/quality/ultimaker3/um3_aa0.4_PC_Normal_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_PC_Normal_Quality.inst.cfg index 26a3136069..63be70e4e2 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_PC_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_PC_Normal_Quality.inst.cfg @@ -40,7 +40,6 @@ raft_interface_thickness = =max(layer_height * 1.5, 0.225) retraction_count_max = 80 retraction_extrusion_window = 1 retraction_hop = 2 -retraction_hop_enabled = True retraction_hop_only_when_collides = True retraction_min_travel = 0.8 retraction_prime_speed = 15 diff --git a/resources/quality/ultimaker3/um3_aa0.4_PP_Draft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_PP_Draft_Print.inst.cfg index 3fe25e563a..f543c3ae78 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_PP_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_PP_Draft_Print.inst.cfg @@ -44,7 +44,6 @@ retraction_count_max = 12 retraction_extra_prime_amount = 0.8 retraction_extrusion_window = 1 retraction_hop = 2 -retraction_hop_enabled = True retraction_hop_only_when_collides = True retraction_min_travel = 0.8 retraction_prime_speed = 18 @@ -60,7 +59,6 @@ support_angle = 50 switch_extruder_prime_speed = 15 switch_extruder_retraction_amount = 20 switch_extruder_retraction_speeds = 35 -travel_avoid_distance = 3 wall_0_inset = 0 wall_line_width_x = =line_width wall_thickness = =line_width * 3 \ No newline at end of file diff --git a/resources/quality/ultimaker3/um3_aa0.4_PP_Fast_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_PP_Fast_Print.inst.cfg index 4c92c7a14b..0d1fb6af58 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_PP_Fast_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_PP_Fast_Print.inst.cfg @@ -43,7 +43,6 @@ retraction_count_max = 12 retraction_extra_prime_amount = 0.8 retraction_extrusion_window = 1 retraction_hop = 2 -retraction_hop_enabled = True retraction_hop_only_when_collides = True retraction_min_travel = 0.8 retraction_prime_speed = 18 @@ -60,7 +59,6 @@ switch_extruder_prime_speed = 15 switch_extruder_retraction_amount = 20 switch_extruder_retraction_speeds = 35 top_bottom_thickness = 1.1 -travel_avoid_distance = 3 wall_0_inset = 0 wall_line_width_x = =line_width wall_thickness = =line_width * 3 \ No newline at end of file diff --git a/resources/quality/ultimaker3/um3_aa0.4_PP_Normal_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_PP_Normal_Quality.inst.cfg index db55956497..141015348f 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_PP_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_PP_Normal_Quality.inst.cfg @@ -42,7 +42,6 @@ retraction_count_max = 12 retraction_extra_prime_amount = 0.8 retraction_extrusion_window = 1 retraction_hop = 2 -retraction_hop_enabled = True retraction_hop_only_when_collides = True retraction_min_travel = 0.8 retraction_prime_speed = 18 @@ -59,7 +58,6 @@ switch_extruder_prime_speed = 15 switch_extruder_retraction_amount = 20 switch_extruder_retraction_speeds = 35 top_bottom_thickness = 1 -travel_avoid_distance = 3 wall_0_inset = 0 wall_line_width_x = =line_width wall_thickness = =line_width * 3 \ No newline at end of file diff --git a/resources/quality/ultimaker3/um3_aa0.4_TPU_Draft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_TPU_Draft_Print.inst.cfg index e2751a13ac..8c8b9691df 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_TPU_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_TPU_Draft_Print.inst.cfg @@ -42,7 +42,6 @@ retraction_count_max = 12 retraction_extra_prime_amount = 0.8 retraction_extrusion_window = 1 retraction_hop = 1.5 -retraction_hop_enabled = True retraction_hop_only_when_collides = True retraction_min_travel = =line_width * 2 retraction_prime_speed = 15 diff --git a/resources/quality/ultimaker3/um3_aa0.4_TPU_Fast_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_TPU_Fast_Print.inst.cfg index 13ff46cef4..0e3ad215d6 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_TPU_Fast_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_TPU_Fast_Print.inst.cfg @@ -43,7 +43,6 @@ retraction_count_max = 12 retraction_extra_prime_amount = 0.8 retraction_extrusion_window = 1 retraction_hop = 1.5 -retraction_hop_enabled = True retraction_hop_only_when_collides = True retraction_min_travel = =line_width * 2 retraction_prime_speed = 15 diff --git a/resources/quality/ultimaker3/um3_aa0.4_TPU_Normal_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_TPU_Normal_Quality.inst.cfg index 04454a9ff3..7e338e6a47 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_TPU_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_TPU_Normal_Quality.inst.cfg @@ -40,7 +40,6 @@ retraction_count_max = 12 retraction_extra_prime_amount = 0.8 retraction_extrusion_window = 1 retraction_hop = 1.5 -retraction_hop_enabled = True retraction_hop_only_when_collides = True retraction_min_travel = =line_width * 2 retraction_prime_speed = 15 diff --git a/resources/quality/ultimaker3/um3_aa0.8_CPEP_Fast_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.8_CPEP_Fast_Print.inst.cfg index 0a05e9aafd..3d9b4bb798 100644 --- a/resources/quality/ultimaker3/um3_aa0.8_CPEP_Fast_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.8_CPEP_Fast_Print.inst.cfg @@ -34,5 +34,4 @@ speed_wall_0 = =math.ceil(speed_wall * 35 / 40) support_bottom_distance = =support_z_distance support_line_width = =round(line_width * 0.6 / 0.7, 2) support_z_distance = =layer_height -top_bottom_thickness = 1.2 -travel_avoid_distance = 1.5 \ No newline at end of file +top_bottom_thickness = 1.2 \ No newline at end of file diff --git a/resources/quality/ultimaker3/um3_aa0.8_CPEP_Superdraft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.8_CPEP_Superdraft_Print.inst.cfg index 82efb6a57b..ccd87313e7 100644 --- a/resources/quality/ultimaker3/um3_aa0.8_CPEP_Superdraft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.8_CPEP_Superdraft_Print.inst.cfg @@ -35,5 +35,4 @@ speed_wall_0 = =math.ceil(speed_wall * 35 / 40) support_bottom_distance = =support_z_distance support_line_width = =round(line_width * 0.6 / 0.7, 2) support_z_distance = =layer_height -top_bottom_thickness = 1.2 -travel_avoid_distance = 1.5 \ No newline at end of file +top_bottom_thickness = 1.2 \ No newline at end of file diff --git a/resources/quality/ultimaker3/um3_aa0.8_CPEP_Verydraft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.8_CPEP_Verydraft_Print.inst.cfg index ff375b6e49..9ba6195df4 100644 --- a/resources/quality/ultimaker3/um3_aa0.8_CPEP_Verydraft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.8_CPEP_Verydraft_Print.inst.cfg @@ -36,4 +36,3 @@ support_bottom_distance = =support_z_distance support_line_width = =round(line_width * 0.6 / 0.7, 2) support_z_distance = =layer_height top_bottom_thickness = 1.2 -travel_avoid_distance = 1.5 \ No newline at end of file diff --git a/resources/quality/ultimaker3/um3_aa0.8_PC_Fast_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.8_PC_Fast_Print.inst.cfg index 0b666d2e0b..1d0c094496 100644 --- a/resources/quality/ultimaker3/um3_aa0.8_PC_Fast_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.8_PC_Fast_Print.inst.cfg @@ -28,4 +28,3 @@ speed_topbottom = =math.ceil(speed_print * 25 / 50) speed_wall = =math.ceil(speed_print * 40 / 50) speed_wall_0 = =math.ceil(speed_wall * 30 / 40) support_line_width = =round(line_width * 0.6 / 0.7, 2) -travel_avoid_distance = 3 \ No newline at end of file diff --git a/resources/quality/ultimaker3/um3_aa0.8_PC_Superdraft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.8_PC_Superdraft_Print.inst.cfg index de212df4af..23f654a586 100644 --- a/resources/quality/ultimaker3/um3_aa0.8_PC_Superdraft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.8_PC_Superdraft_Print.inst.cfg @@ -28,4 +28,3 @@ speed_topbottom = =math.ceil(speed_print * 25 / 50) speed_wall = =math.ceil(speed_print * 40 / 50) speed_wall_0 = =math.ceil(speed_wall * 30 / 40) support_line_width = =round(line_width * 0.6 / 0.7, 2) -travel_avoid_distance = 3 \ No newline at end of file diff --git a/resources/quality/ultimaker3/um3_aa0.8_PC_Verydraft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.8_PC_Verydraft_Print.inst.cfg index 3e0c669eeb..82986f68cf 100644 --- a/resources/quality/ultimaker3/um3_aa0.8_PC_Verydraft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.8_PC_Verydraft_Print.inst.cfg @@ -29,4 +29,3 @@ speed_topbottom = =math.ceil(speed_print * 25 / 50) speed_wall = =math.ceil(speed_print * 40 / 50) speed_wall_0 = =math.ceil(speed_wall * 30 / 40) support_line_width = =round(line_width * 0.6 / 0.7, 2) -travel_avoid_distance = 3 \ No newline at end of file diff --git a/resources/variants/ultimaker3_aa04.inst.cfg b/resources/variants/ultimaker3_aa04.inst.cfg index 0163024fa4..b9e15f5296 100644 --- a/resources/variants/ultimaker3_aa04.inst.cfg +++ b/resources/variants/ultimaker3_aa04.inst.cfg @@ -13,6 +13,7 @@ hardware_type = nozzle brim_width = 7 machine_nozzle_cool_down_speed = 0.9 machine_nozzle_id = AA 0.4 +machine_nozzle_tip_outer_diameter = 1.0 raft_acceleration = =acceleration_print raft_airgap = 0.3 raft_base_thickness = =resolveOrValue('layer_height_0') * 1.2 diff --git a/resources/variants/ultimaker3_bb04.inst.cfg b/resources/variants/ultimaker3_bb04.inst.cfg index 93b2025031..f3cb236c2b 100644 --- a/resources/variants/ultimaker3_bb04.inst.cfg +++ b/resources/variants/ultimaker3_bb04.inst.cfg @@ -21,6 +21,7 @@ jerk_support_interface = =math.ceil(jerk_support * 10 / 15) jerk_support_bottom = =math.ceil(jerk_support_interface * 1 / 10) machine_nozzle_heat_up_speed = 1.5 machine_nozzle_id = BB 0.4 +machine_nozzle_tip_outer_diameter = 1.0 prime_tower_purge_volume = 1 raft_base_speed = 20 raft_interface_speed = 20 diff --git a/resources/variants/ultimaker3_extended_aa04.inst.cfg b/resources/variants/ultimaker3_extended_aa04.inst.cfg index 94bee65b5d..8863088a8d 100644 --- a/resources/variants/ultimaker3_extended_aa04.inst.cfg +++ b/resources/variants/ultimaker3_extended_aa04.inst.cfg @@ -13,6 +13,7 @@ hardware_type = nozzle brim_width = 7 machine_nozzle_cool_down_speed = 0.9 machine_nozzle_id = AA 0.4 +machine_nozzle_tip_outer_diameter = 1.0 raft_acceleration = =acceleration_print raft_airgap = 0.3 raft_base_thickness = =resolveOrValue('layer_height_0') * 1.2 diff --git a/resources/variants/ultimaker3_extended_bb04.inst.cfg b/resources/variants/ultimaker3_extended_bb04.inst.cfg index a995acf77c..b5b35e85ac 100644 --- a/resources/variants/ultimaker3_extended_bb04.inst.cfg +++ b/resources/variants/ultimaker3_extended_bb04.inst.cfg @@ -21,6 +21,7 @@ jerk_support_interface = =math.ceil(jerk_support * 10 / 15) jerk_support_bottom = =math.ceil(jerk_support_interface * 1 / 10) machine_nozzle_heat_up_speed = 1.5 machine_nozzle_id = BB 0.4 +machine_nozzle_tip_outer_diameter = 1.0 prime_tower_purge_volume = 1 raft_base_speed = 20 raft_interface_speed = 20 From 6b7fc8b90355766795639cbf3a8f529cec1cf6e4 Mon Sep 17 00:00:00 2001 From: THeijmans Date: Tue, 13 Mar 2018 15:00:24 +0100 Subject: [PATCH 03/15] Removed retraction z hops from variants To make single extrusion mode work. --- resources/variants/ultimaker3_aa0.8.inst.cfg | 1 - resources/variants/ultimaker3_extended_aa0.8.inst.cfg | 1 - resources/variants/ultimaker3_extended_bb0.8.inst.cfg | 1 - 3 files changed, 3 deletions(-) diff --git a/resources/variants/ultimaker3_aa0.8.inst.cfg b/resources/variants/ultimaker3_aa0.8.inst.cfg index 9f011b9164..0bccf91b7c 100644 --- a/resources/variants/ultimaker3_aa0.8.inst.cfg +++ b/resources/variants/ultimaker3_aa0.8.inst.cfg @@ -45,7 +45,6 @@ retraction_amount = 6.5 retraction_count_max = 25 retraction_extrusion_window = 1 retraction_hop = 2 -retraction_hop_enabled = True retraction_hop_only_when_collides = True skin_overlap = 5 speed_equalize_flow_enabled = True diff --git a/resources/variants/ultimaker3_extended_aa0.8.inst.cfg b/resources/variants/ultimaker3_extended_aa0.8.inst.cfg index 2dfd64a94b..184416b06e 100644 --- a/resources/variants/ultimaker3_extended_aa0.8.inst.cfg +++ b/resources/variants/ultimaker3_extended_aa0.8.inst.cfg @@ -45,7 +45,6 @@ retraction_amount = 6.5 retraction_count_max = 25 retraction_extrusion_window = 1 retraction_hop = 2 -retraction_hop_enabled = True retraction_hop_only_when_collides = True skin_overlap = 5 speed_equalize_flow_enabled = True diff --git a/resources/variants/ultimaker3_extended_bb0.8.inst.cfg b/resources/variants/ultimaker3_extended_bb0.8.inst.cfg index 42d7d85728..8a1a9373f3 100644 --- a/resources/variants/ultimaker3_extended_bb0.8.inst.cfg +++ b/resources/variants/ultimaker3_extended_bb0.8.inst.cfg @@ -56,7 +56,6 @@ retraction_amount = 4.5 retraction_count_max = 15 retraction_extrusion_window = =retraction_amount retraction_hop = 2 -retraction_hop_enabled = True retraction_hop_only_when_collides = True retraction_min_travel = 5 retraction_prime_speed = 15 From 406e546195cd803499e9b112d5696e071bab77a4 Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Tue, 13 Mar 2018 17:29:20 +0100 Subject: [PATCH 04/15] CURA-5048 fixed nozzle dependent settings to update after setting machine nozzle diameter in a crude way --- cura/Settings/MachineManager.py | 6 ++++-- plugins/MachineSettingsAction/MachineSettingsAction.qml | 7 ++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index f52b90e80f..3c227fc04e 100755 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -831,10 +831,12 @@ class MachineManager(QObject): return self._default_extruder_position ## This will fire the propertiesChanged for all settings so they will be updated in the front-end + @pyqtSlot() def forceUpdateAllSettings(self): property_names = ["value", "resolve"] - for setting_key in self._global_container_stack.getAllKeys(): - self._global_container_stack.propertiesChanged.emit(setting_key, property_names) + for container in [self._global_container_stack] + list(self._global_container_stack.extruders.values()): + for setting_key in container.getAllKeys(): + container.propertiesChanged.emit(setting_key, property_names) @pyqtSlot(int, bool) def setExtruderEnabled(self, position: int, enabled) -> None: diff --git a/plugins/MachineSettingsAction/MachineSettingsAction.qml b/plugins/MachineSettingsAction/MachineSettingsAction.qml index f941ef87b4..b12f8f8696 100644 --- a/plugins/MachineSettingsAction/MachineSettingsAction.qml +++ b/plugins/MachineSettingsAction/MachineSettingsAction.qml @@ -382,6 +382,11 @@ Cura.MachineAction property string settingKey: "machine_nozzle_size" property string label: catalog.i18nc("@label", "Nozzle size") property string unit: catalog.i18nc("@label", "mm") + function afterOnEditingFinished() + { + // Somehow the machine_nozzle_size dependent settings are not updated otherwise + Cura.MachineManager.forceUpdateAllSettings() + } property bool isExtruderSetting: true } @@ -889,4 +894,4 @@ Cura.MachineAction watchedProperties: [ "value" ] storeIndex: manager.containerIndex } -} \ No newline at end of file +} From d2eb01d13778372590e81339820f0b01670008d9 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Tue, 13 Mar 2018 17:00:30 +0100 Subject: [PATCH 05/15] Fix material name update on sidebar CURA-5084 --- cura/Settings/MachineManager.py | 14 +------------- resources/qml/SidebarHeader.qml | 13 +++---------- resources/qml/WorkspaceSummaryDialog.qml | 2 +- 3 files changed, 5 insertions(+), 24 deletions(-) diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index cd9e75f33d..a6c70ee15f 100755 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -50,7 +50,6 @@ class MachineManager(QObject): self._global_container_stack = None # type: GlobalStack self._current_root_material_id = {} - self._current_root_material_name = {} self._current_quality_group = None self._current_quality_changes_group = None @@ -926,28 +925,18 @@ class MachineManager(QObject): return [] return sorted(list(self._global_container_stack.extruders.keys())) - ## Update _current_root_material_id and _current_root_material_name when - # the current root material was changed. + ## Update _current_root_material_id when the current root material was changed. def _onRootMaterialChanged(self): self._current_root_material_id = {} if self._global_container_stack: for position in self._global_container_stack.extruders: self._current_root_material_id[position] = self._global_container_stack.extruders[position].material.getMetaDataEntry("base_file") - self._current_root_material_name = {} - for position in self._global_container_stack.extruders: - if position not in self._current_root_material_name: - material = self._global_container_stack.extruders[position].material - self._current_root_material_name[position] = material.getName() @pyqtProperty("QVariant", notify = rootMaterialChanged) def currentRootMaterialId(self): return self._current_root_material_id - @pyqtProperty("QVariant", notify = rootMaterialChanged) - def currentRootMaterialName(self): - return self._current_root_material_name - ## Return the variant names in the extruder stack(s). ## For the variant in the global stack, use activeVariantBuildplateName @pyqtProperty("QVariant", notify = activeVariantChanged) @@ -1052,7 +1041,6 @@ class MachineManager(QObject): # The _current_root_material_id is used in the MaterialMenu to see which material is selected if root_material_id != self._current_root_material_id[position]: self._current_root_material_id[position] = root_material_id - self._current_root_material_name[position] = root_material_name self.rootMaterialChanged.emit() def activeMaterialsCompatible(self): diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index baceb5f683..74e189789d 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -346,15 +346,8 @@ Column { id: materialSelection - property var currentRootMaterialName: - { - var materials = Cura.MachineManager.currentRootMaterialName; - var materialName = ""; - if (base.currentExtruderIndex in materials) { - materialName = materials[base.currentExtruderIndex]; - } - return materialName; - } + property var activeExtruder: Cura.MachineManager.activeStack + property var currentRootMaterialName: activeExtruder.material.name text: currentRootMaterialName tooltip: currentRootMaterialName @@ -373,7 +366,7 @@ Column property var valueWarning: ! Cura.MachineManager.isActiveQualitySupported function isMaterialSupported () { - return Cura.ContainerManager.getContainerMetaDataEntry(Cura.MachineManager.activeMaterialId, "compatible") == "True" + return Cura.ContainerManager.getContainerMetaDataEntry(activeExtruder.material.id, "compatible") == "True" } } } diff --git a/resources/qml/WorkspaceSummaryDialog.qml b/resources/qml/WorkspaceSummaryDialog.qml index 1cfe36d14b..12eba13dd9 100644 --- a/resources/qml/WorkspaceSummaryDialog.qml +++ b/resources/qml/WorkspaceSummaryDialog.qml @@ -173,7 +173,7 @@ UM.Dialog } Label { - text: Cura.MachineManager.activeVariantNames[modelData] + ", " + Cura.MachineManager.currentRootMaterialName[modelData] + text: Cura.MachineManager.activeVariantNames[modelData] + ", " + Cura.MachineManager.getExtruder(modelData).material.name width: (parent.width / 3) | 0 } } From b83fd17038ce1baf3cc146ca68dd59ae474bda8c Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Tue, 13 Mar 2018 17:37:55 +0100 Subject: [PATCH 06/15] Fix GUI update upon material data change CURA-5084 --- cura/Settings/MachineManager.py | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index a6c70ee15f..ebfee39329 100755 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -128,6 +128,9 @@ class MachineManager(QObject): # When the materials lookup table gets updated, it can mean that a material has its name changed, which should # be reflected on the GUI. This signal emission makes sure that it happens. self._material_manager.materialsUpdated.connect(self.rootMaterialChanged) + # When the materials get updated, it can be that an activated material's diameter gets changed. In that case, + # a material update should be triggered to make sure that the machine still has compatible materials activated. + self._material_manager.materialsUpdated.connect(self._updateUponMaterialMetadataChange) self.rootMaterialChanged.connect(self._onRootMaterialChanged) activeQualityGroupChanged = pyqtSignal() @@ -1033,11 +1036,9 @@ class MachineManager(QObject): if container_node: self._global_container_stack.extruders[position].material = container_node.getContainer() root_material_id = container_node.metadata["base_file"] - root_material_name = container_node.getContainer().getName() else: self._global_container_stack.extruders[position].material = self._empty_material_container root_material_id = None - root_material_name = None # The _current_root_material_id is used in the MaterialMenu to see which material is selected if root_material_id != self._current_root_material_id[position]: self._current_root_material_id[position] = root_material_id @@ -1054,7 +1055,7 @@ class MachineManager(QObject): return True ## Update current quality type and machine after setting material - def _updateQualityWithMaterial(self): + def _updateQualityWithMaterial(self, *args): Logger.log("i", "Updating quality/quality_changes due to material change") current_quality_type = None if self._current_quality_group: @@ -1099,9 +1100,15 @@ class MachineManager(QObject): extruder = self._global_container_stack.extruders[position] current_material_base_name = extruder.material.getMetaDataEntry("base_file") - current_variant_name = extruder.variant.getMetaDataEntry("name") + current_variant_name = None + if extruder.variant.getId() != self._empty_variant_container.getId(): + current_variant_name = extruder.variant.getMetaDataEntry("name") - material_diameter = self._global_container_stack.getProperty("material_diameter", "value") + from UM.Settings.Interfaces import PropertyEvaluationContext + from cura.Settings.CuraContainerStack import _ContainerIndexes + context = PropertyEvaluationContext(extruder) + context.context["evaluate_from_container_index"] = _ContainerIndexes.DefinitionChanges + material_diameter = self._global_container_stack.getProperty("material_diameter", "value", context) candidate_materials = self._material_manager.getAvailableMaterials( self._global_container_stack.definition.getId(), current_variant_name, @@ -1116,6 +1123,11 @@ class MachineManager(QObject): self._setMaterial(position, new_material) continue + # The current material is not available, find the preferred one + material_node = self._material_manager.getDefaultMaterial(self._global_container_stack, current_variant_name) + if material_node is not None: + self._setMaterial(position, material_node) + ## Given a printer definition name, select the right machine instance. In case it doesn't exist, create a new # instance with the same network key. @pyqtSlot(str) @@ -1240,3 +1252,8 @@ class MachineManager(QObject): elif self._current_quality_group: name = self._current_quality_group.name return name + + def _updateUponMaterialMetadataChange(self): + with postponeSignals(*self._getContainerChangedSignals(), compress = CompressTechnique.CompressPerParameterValue): + self._updateMaterialWithVariant(None) + self._updateQualityWithMaterial() From 9f89678e42ba3e13f547e9ed8ded23024508372f Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 13 Mar 2018 13:40:17 +0100 Subject: [PATCH 07/15] Update when switching printers I confused globalContainerChanged with activeStackChanged. Contributes to issue CURA-4606. --- cura/Machines/Models/BrandMaterialsModel.py | 4 ++-- cura/Machines/Models/GenericMaterialsModel.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cura/Machines/Models/BrandMaterialsModel.py b/cura/Machines/Models/BrandMaterialsModel.py index e36c6448d3..f6c9a14632 100644 --- a/cura/Machines/Models/BrandMaterialsModel.py +++ b/cura/Machines/Models/BrandMaterialsModel.py @@ -53,8 +53,8 @@ class BrandMaterialsModel(ListModel): self._extruder_manager = CuraApplication.getInstance().getExtruderManager() self._material_manager = CuraApplication.getInstance().getMaterialManager() - self._machine_manager.globalContainerChanged.connect(self._update) - self._material_manager.materialsUpdated.connect(self._update) + self._machine_manager.activeStackChanged.connect(self._update) #Update when switching machines. + self._material_manager.materialsUpdated.connect(self._update) #Update when the list of materials changes. self._update() def setExtruderPosition(self, position: int): diff --git a/cura/Machines/Models/GenericMaterialsModel.py b/cura/Machines/Models/GenericMaterialsModel.py index 6b149448ea..2fac919f3e 100644 --- a/cura/Machines/Models/GenericMaterialsModel.py +++ b/cura/Machines/Models/GenericMaterialsModel.py @@ -15,8 +15,8 @@ class GenericMaterialsModel(BaseMaterialsModel): self._extruder_manager = CuraApplication.getInstance().getExtruderManager() self._material_manager = CuraApplication.getInstance().getMaterialManager() - self._machine_manager.globalContainerChanged.connect(self._update) - self._material_manager.materialsUpdated.connect(self._update) + self._machine_manager.activeStackChanged.connect(self._update) #Update when switching machines. + self._material_manager.materialsUpdated.connect(self._update) #Update when the list of materials changes. self._update() def _update(self): From 3cefacdfccf78222959b8d76ad70502969dd4cfa Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Wed, 14 Mar 2018 09:28:33 +0100 Subject: [PATCH 08/15] Remove root_material_nod is None check in MaterialManager CURA-5056 This will no longer happen. --- cura/Machines/MaterialManager.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/cura/Machines/MaterialManager.py b/cura/Machines/MaterialManager.py index 61b8bcd8e6..0a82fcc764 100644 --- a/cura/Machines/MaterialManager.py +++ b/cura/Machines/MaterialManager.py @@ -101,13 +101,6 @@ class MaterialManager(QObject): # GUID -> material group list self._guid_material_groups_map = defaultdict(list) for root_material_id, material_group in self._material_group_map.items(): - # This can happen when we are updating with incomplete data. - if material_group.root_material_node is None: - Logger.log("e", "Missing root material node for [%s]. Probably caused by update using incomplete data." - " Check all related signals for further debugging.", - material_group.name) - self._update_timer.start() - return guid = material_group.root_material_node.metadata["GUID"] self._guid_material_groups_map[guid].append(material_group) From 7ebd83f81527f157d679bd564a013a1811b2888f Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Wed, 14 Mar 2018 10:21:10 +0100 Subject: [PATCH 09/15] CURA-4400 get setting type from definition instead of whole stack improves speed of this call by a factor of 10 --- plugins/CuraEngineBackend/StartSliceJob.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py index f3f34f4c3d..96124a3514 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.py @@ -281,7 +281,7 @@ class StartSliceJob(Job): default_extruder_position = int(Application.getInstance().getMachineManager().defaultExtruderPosition) result = {} for key in stack.getAllKeys(): - setting_type = stack.getProperty(key, "type") + setting_type = stack.definition.getProperty(key, "type") value = stack.getProperty(key, "value") if setting_type == "extruder" and value == -1: # replace with the default value From dc427488a26fe829f8d55ca186d1b19ac02fee75 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Wed, 14 Mar 2018 10:29:48 +0100 Subject: [PATCH 10/15] Fix extruder position check in project loading CURA-5056 The field is now "position" instead of "extruder" --- plugins/3MFReader/ThreeMFWorkspaceReader.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/plugins/3MFReader/ThreeMFWorkspaceReader.py b/plugins/3MFReader/ThreeMFWorkspaceReader.py index 3c627a7655..c943fcd879 100755 --- a/plugins/3MFReader/ThreeMFWorkspaceReader.py +++ b/plugins/3MFReader/ThreeMFWorkspaceReader.py @@ -754,15 +754,13 @@ class ThreeMFWorkspaceReader(WorkspaceReader): quality_changes_containers = self._container_registry.findInstanceContainers(name = quality_changes_name, type = "quality_changes") for container in quality_changes_containers: - extruder_definition_id = container.getMetaDataEntry("extruder") - if not extruder_definition_id: + extruder_position = container.getMetaDataEntry("position") + if extruder_position is None: quality_changes_info.global_info.container = container else: - extruder_definition_metadata = self._container_registry.findDefinitionContainersMetadata(id = extruder_definition_id)[0] - position = extruder_definition_metadata["position"] - if position not in quality_changes_info.extruder_info_dict: - quality_changes_info.extruder_info_dict[position] = ContainerInfo(None, None, None) - container_info = quality_changes_info.extruder_info_dict[position] + if extruder_position not in quality_changes_info.extruder_info_dict: + quality_changes_info.extruder_info_dict[extruder_position] = ContainerInfo(None, None, None) + container_info = quality_changes_info.extruder_info_dict[extruder_position] container_info.container = container # If there is no quality changes for any extruder, create one. From 86afd6f5ff3d8d8f77d325ee80068c0fc08a90ac Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Wed, 14 Mar 2018 10:32:53 +0100 Subject: [PATCH 11/15] Do not overwrite existing metadata with in material deserializeMetadata() CURA-5056 --- plugins/3MFReader/ThreeMFWorkspaceReader.py | 8 ++--- .../XmlMaterialProfile/XmlMaterialProfile.py | 36 +++++++------------ 2 files changed, 15 insertions(+), 29 deletions(-) diff --git a/plugins/3MFReader/ThreeMFWorkspaceReader.py b/plugins/3MFReader/ThreeMFWorkspaceReader.py index c943fcd879..19e6b89f07 100755 --- a/plugins/3MFReader/ThreeMFWorkspaceReader.py +++ b/plugins/3MFReader/ThreeMFWorkspaceReader.py @@ -265,13 +265,9 @@ class ThreeMFWorkspaceReader(WorkspaceReader): for material_container_file in material_container_files: container_id = self._stripFileToId(material_container_file) - from hashlib import sha1 - hex_container_id = sha1(container_id.encode('utf-8')).hexdigest() - serialized = archive.open(material_container_file).read().decode("utf-8") - metadata_list = xml_material_profile.deserializeMetadata(serialized, hex_container_id) - reverse_map = {metadata["id"].replace(hex_container_id, container_id): container_id.replace(hex_container_id, container_id) - for metadata in metadata_list} + metadata_list = xml_material_profile.deserializeMetadata(serialized, container_id) + reverse_map = {metadata["id"]: container_id for metadata in metadata_list} reverse_material_id_dict.update(reverse_map) material_labels.append(self._getMaterialLabelFromSerialized(serialized)) diff --git a/plugins/XmlMaterialProfile/XmlMaterialProfile.py b/plugins/XmlMaterialProfile/XmlMaterialProfile.py index 333e2546b0..8b17721794 100644 --- a/plugins/XmlMaterialProfile/XmlMaterialProfile.py +++ b/plugins/XmlMaterialProfile/XmlMaterialProfile.py @@ -838,15 +838,11 @@ class XmlMaterialProfile(InstanceContainer): if machine_compatibility: new_material_id = container_id + "_" + machine_id - # The child or derived material container may already exist. This can happen when a material in a - # project file and the a material in Cura have the same ID. - # In the case if a derived material already exists, override that material container because if - # the data in the parent material has been changed, the derived ones should be updated too. - found_materials = ContainerRegistry.getInstance().findInstanceContainersMetadata(id = new_material_id) - if found_materials: - new_material_metadata = found_materials[0] - else: - new_material_metadata = {} + # Do not look for existing container/container metadata with the same ID although they may exist. + # In project loading and perhaps some other places, we only want to get information (metadata) + # from a file without changing the current state of the system. If we overwrite the existing + # metadata here, deserializeMetadata() will not be safe for retrieving information. + new_material_metadata = {} new_material_metadata.update(base_metadata) new_material_metadata["id"] = new_material_id @@ -854,8 +850,7 @@ class XmlMaterialProfile(InstanceContainer): new_material_metadata["machine_manufacturer"] = machine_manufacturer new_material_metadata["definition"] = machine_id - if len(found_materials) == 0: #This is a new material. - result_metadata.append(new_material_metadata) + result_metadata.append(new_material_metadata) buildplates = machine.iterfind("./um:buildplate", cls.__namespaces) buildplate_map = {} @@ -866,12 +861,12 @@ class XmlMaterialProfile(InstanceContainer): if buildplate_id is None: continue - variant_containers = ContainerRegistry.getInstance().findInstanceContainersMetadata(id = buildplate_id) - if not variant_containers: + variant_metadata = ContainerRegistry.getInstance().findInstanceContainersMetadata(id = buildplate_id) + if not variant_metadata: # It is not really properly defined what "ID" is so also search for variants by name. - variant_containers = ContainerRegistry.getInstance().findInstanceContainersMetadata(definition = machine_id, name = buildplate_id) + variant_metadata = ContainerRegistry.getInstance().findInstanceContainersMetadata(definition = machine_id, name = buildplate_id) - if not variant_containers: + if not variant_metadata: continue settings = buildplate.iterfind("./um:setting", cls.__namespaces) @@ -900,12 +895,8 @@ class XmlMaterialProfile(InstanceContainer): new_hotend_specific_material_id = container_id + "_" + machine_id + "_" + hotend_name.replace(" ", "_") - # Same as machine compatibility, keep the derived material containers consistent with the parent material - found_materials = ContainerRegistry.getInstance().findInstanceContainersMetadata(id = new_hotend_specific_material_id) - if found_materials: - new_hotend_material_metadata = found_materials[0] - else: - new_hotend_material_metadata = {} + # Same as above, do not overwrite existing metadata. + new_hotend_material_metadata = {} new_hotend_material_metadata.update(base_metadata) new_hotend_material_metadata["variant_name"] = hotend_name @@ -917,8 +908,7 @@ class XmlMaterialProfile(InstanceContainer): new_hotend_material_metadata["buildplate_compatible"] = buildplate_map["buildplate_compatible"] new_hotend_material_metadata["buildplate_recommended"] = buildplate_map["buildplate_recommended"] - if len(found_materials) == 0: - result_metadata.append(new_hotend_material_metadata) + result_metadata.append(new_hotend_material_metadata) # there is only one ID for a machine. Once we have reached here, it means we have already found # a workable ID for that machine, so there is no need to continue From cff1e8639dd2b0b12c628be7d513ee530cb8cf6a Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Wed, 14 Mar 2018 10:47:58 +0100 Subject: [PATCH 12/15] Fix preferred material PLA for printrbot simple makers kit CURA-5089 --- resources/definitions/printrbot_simple_makers_kit.def.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/resources/definitions/printrbot_simple_makers_kit.def.json b/resources/definitions/printrbot_simple_makers_kit.def.json index 61aecd9240..e2afd57826 100644 --- a/resources/definitions/printrbot_simple_makers_kit.def.json +++ b/resources/definitions/printrbot_simple_makers_kit.def.json @@ -6,8 +6,7 @@ "visible": true, "author": "Timur Tabi", "manufacturer": "Printrbot", - "file_formats": "text/x-gcode", - "preferred_material": "*pla*" + "file_formats": "text/x-gcode" }, "overrides": { From 4a16d04dd79fe8639f8381d44297e0bf3f74e8de Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Wed, 14 Mar 2018 10:50:54 +0100 Subject: [PATCH 13/15] CURA-5053 Changed printer type checking "Still hard coded but at least doesn't use `elif` because `elif`/`else if` should not exist in any programming language." - Grumpy Pedants & Ian >:[ --- .../PrinterOutput/NetworkedPrinterOutputDevice.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/cura/PrinterOutput/NetworkedPrinterOutputDevice.py b/cura/PrinterOutput/NetworkedPrinterOutputDevice.py index a4934b7f74..eefbd9ae12 100644 --- a/cura/PrinterOutput/NetworkedPrinterOutputDevice.py +++ b/cura/PrinterOutput/NetworkedPrinterOutputDevice.py @@ -56,12 +56,15 @@ class NetworkedPrinterOutputDevice(PrinterOutputDevice): self._connection_state_before_timeout = None # type: Optional[ConnectionState] printer_type = self._properties.get(b"machine", b"").decode("utf-8") - if printer_type.startswith("9511"): - self._printer_type = "ultimaker3_extended" - elif printer_type.startswith("9066"): - self._printer_type = "ultimaker3" - else: - self._printer_type = "unknown" + printer_type_identifiers = { + "9066": "ultimaker3", + "9511": "ultimaker3_extended" + } + self._printer_type = "Unknown" + for key, value in printer_type_identifiers.items(): + if printer_type.startswith(key): + self._printer_type = value + break def requestWrite(self, nodes, file_name=None, filter_by_machine=False, file_handler=None, **kwargs) -> None: raise NotImplementedError("requestWrite needs to be implemented") From f5f8bf19ecdd0e463b8eb3626639637cfd76e8d8 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Wed, 14 Mar 2018 11:05:32 +0100 Subject: [PATCH 14/15] Fix QML warnings --- resources/qml/SidebarHeader.qml | 7 ++++++- resources/qml/WorkspaceSummaryDialog.qml | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index 74e189789d..dcb351e866 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -347,7 +347,8 @@ Column id: materialSelection property var activeExtruder: Cura.MachineManager.activeStack - property var currentRootMaterialName: activeExtruder.material.name + property var hasActiveExtruder: activeExtruder != null + property var currentRootMaterialName: hasActiveExtruder ? activeExtruder.material.name : "" text: currentRootMaterialName tooltip: currentRootMaterialName @@ -366,6 +367,10 @@ Column property var valueWarning: ! Cura.MachineManager.isActiveQualitySupported function isMaterialSupported () { + if (!hasActiveExtruder) + { + return false; + } return Cura.ContainerManager.getContainerMetaDataEntry(activeExtruder.material.id, "compatible") == "True" } } diff --git a/resources/qml/WorkspaceSummaryDialog.qml b/resources/qml/WorkspaceSummaryDialog.qml index 12eba13dd9..cf19e45fdd 100644 --- a/resources/qml/WorkspaceSummaryDialog.qml +++ b/resources/qml/WorkspaceSummaryDialog.qml @@ -101,7 +101,7 @@ UM.Dialog } Label { - text: Cura.MachineManager.activeMachine.definition.name + text: (Cura.MachineManager.activeMachine == null) ? "" : Cura.MachineManager.activeMachine.definition.name width: (parent.width / 3) | 0 } } From 9f40e3925dcb02028fee554a78cdadf52ac4f47e Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Wed, 14 Mar 2018 11:07:38 +0100 Subject: [PATCH 15/15] CURA-5090 added timer to SettingInheritanceManager._update --- cura/Settings/SettingInheritanceManager.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/cura/Settings/SettingInheritanceManager.py b/cura/Settings/SettingInheritanceManager.py index 0d4cd02cdb..e317b20f68 100644 --- a/cura/Settings/SettingInheritanceManager.py +++ b/cura/Settings/SettingInheritanceManager.py @@ -1,7 +1,7 @@ # Copyright (c) 2017 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. -from PyQt5.QtCore import QObject, pyqtProperty, pyqtSignal +from PyQt5.QtCore import QObject, QTimer, pyqtProperty, pyqtSignal from UM.FlameProfiler import pyqtSlot from UM.Application import Application from UM.Logger import Logger @@ -30,6 +30,11 @@ class SettingInheritanceManager(QObject): ExtruderManager.getInstance().activeExtruderChanged.connect(self._onActiveExtruderChanged) self._onActiveExtruderChanged() + self._update_timer = QTimer() + self._update_timer.setInterval(500) + self._update_timer.setSingleShot(True) + self._update_timer.timeout.connect(self._update) + settingsWithIntheritanceChanged = pyqtSignal() ## Get the keys of all children settings with an override. @@ -226,9 +231,7 @@ class SettingInheritanceManager(QObject): self._onActiveExtruderChanged() def _onContainersChanged(self, container): - # TODO: Multiple container changes in sequence now cause quite a few recalculations. - # This isn't that big of an issue, but it could be in the future. - self._update() + self._update_timer.start() @staticmethod def createSettingInheritanceManager(engine=None, script_engine=None):