From 67feaab385d831f109c4d82b5f9e0bbd3291d8db Mon Sep 17 00:00:00 2001 From: Thomas Karl Pietrowski Date: Wed, 25 Apr 2018 18:01:45 +0200 Subject: [PATCH 01/71] Updating changelog about engine icon Added more details about the work I did. Additionally, I think your effort in designing the final icon should be also mentioned! I'm left-handed with UI designing as you know.. --- plugins/ChangeLogPlugin/ChangeLog.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/ChangeLogPlugin/ChangeLog.txt b/plugins/ChangeLogPlugin/ChangeLog.txt index d132f17b5c..1aea958e37 100755 --- a/plugins/ChangeLogPlugin/ChangeLog.txt +++ b/plugins/ChangeLogPlugin/ChangeLog.txt @@ -66,8 +66,8 @@ Generate a cube mesh to prevent support material generation in specific areas of *Real bridging - smartavionics New experimental feature that detects bridges, adjusting the print speed, slow and fan speed to enhance print quality on bridging parts. -*Updated CuraEngine executable - thopiekar -The CuraEngine executable now contains a dedicated icon, author information and a license. +*Updated CuraEngine executable - thopiekar & Ultimaker B.V. +The CuraEngine executable contains a dedicated icon, author and license info on Windows now. The icon has been designed by Ultimaker B.V. *Use RapidJSON and ClipperLib from system libraries Application updated to use verified copies of libraries, reducing maintenance time keeping them up to date (the operating system is now responsible), as well as reducing the amount of code shipped (as necessary code is already on the user’s system). From 86d4c51e62f3e075b104fd9f39ed2c31bf87cb07 Mon Sep 17 00:00:00 2001 From: Thomas Karl Pietrowski Date: Wed, 25 Apr 2018 18:04:12 +0200 Subject: [PATCH 02/71] Adding some love I doubt (too) serious people will stand this.. --- plugins/ChangeLogPlugin/ChangeLog.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/ChangeLogPlugin/ChangeLog.txt b/plugins/ChangeLogPlugin/ChangeLog.txt index 1aea958e37..9cb9a60e79 100755 --- a/plugins/ChangeLogPlugin/ChangeLog.txt +++ b/plugins/ChangeLogPlugin/ChangeLog.txt @@ -66,7 +66,7 @@ Generate a cube mesh to prevent support material generation in specific areas of *Real bridging - smartavionics New experimental feature that detects bridges, adjusting the print speed, slow and fan speed to enhance print quality on bridging parts. -*Updated CuraEngine executable - thopiekar & Ultimaker B.V. +*Updated CuraEngine executable - thopiekar & Ultimaker B.V. ❤️ The CuraEngine executable contains a dedicated icon, author and license info on Windows now. The icon has been designed by Ultimaker B.V. *Use RapidJSON and ClipperLib from system libraries From b9872cc2698843e120b4aa7389f6883597631395 Mon Sep 17 00:00:00 2001 From: Kristel88 Date: Mon, 30 Apr 2018 16:28:25 +0200 Subject: [PATCH 03/71] PP formula based temperature fixes S5 --- .../ultimaker_s5/um_s5_aa0.4_PP_Draft_Print.inst.cfg | 10 +++++----- .../ultimaker_s5/um_s5_aa0.4_PP_Fast_Print.inst.cfg | 10 +++++----- .../um_s5_aa0.4_PP_Normal_Quality.inst.cfg | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_PP_Draft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_PP_Draft_Print.inst.cfg index 0d3e855d4b..1c6acb608c 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_PP_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_PP_Draft_Print.inst.cfg @@ -29,11 +29,11 @@ line_width = =machine_nozzle_size * 0.95 machine_min_cool_heat_time_window = 15 machine_nozzle_cool_down_speed = 0.85 machine_nozzle_heat_up_speed = 1.5 -material_bed_temperature_layer_0 = 95 -material_final_print_temperature = 205 -material_initial_print_temperature = 210 -material_print_temperature = 215 -material_print_temperature_layer_0 = 220 +material_bed_temperature_layer_0 = =material_bed_temperature + 5 +material_final_print_temperature = =material_print_temperature - 10 +material_initial_print_temperature = =material_print_temperature - 5 +material_print_temperature = =default_material_print_temperature - 5 +material_print_temperature_layer_0 = =material_print_temperature + 5 material_standby_temperature = 100 multiple_mesh_overlap = 0 prime_tower_enable = False diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_PP_Fast_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_PP_Fast_Print.inst.cfg index d42d809ea9..a78e0a64e4 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_PP_Fast_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_PP_Fast_Print.inst.cfg @@ -29,11 +29,11 @@ line_width = =machine_nozzle_size * 0.95 machine_min_cool_heat_time_window = 15 machine_nozzle_cool_down_speed = 0.85 machine_nozzle_heat_up_speed = 1.5 -material_bed_temperature_layer_0 = 95 -material_final_print_temperature = 195 -material_initial_print_temperature = 205 -material_print_temperature = 207 -material_print_temperature_layer_0 = 210 +material_bed_temperature_layer_0 = =material_bed_temperature + 5 +material_final_print_temperature = =material_print_temperature - 12 +material_initial_print_temperature = =material_print_temperature - 2 +material_print_temperature = =default_material_print_temperature - 13 +material_print_temperature_layer_0 = =material_print_temperature + 3 material_standby_temperature = 100 multiple_mesh_overlap = 0 prime_tower_enable = False diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_PP_Normal_Quality.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_PP_Normal_Quality.inst.cfg index 4687bf4a99..e6c767fe71 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_PP_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_PP_Normal_Quality.inst.cfg @@ -29,11 +29,11 @@ line_width = =machine_nozzle_size * 0.95 machine_min_cool_heat_time_window = 15 machine_nozzle_cool_down_speed = 0.85 machine_nozzle_heat_up_speed = 1.5 -material_bed_temperature_layer_0 = 95 -material_final_print_temperature = 195 -material_initial_print_temperature = 200 -material_print_temperature = 205 -material_print_temperature_layer_0 = 208 +material_bed_temperature_layer_0 = =material_bed_temperature + 5 +material_final_print_temperature = =material_print_temperature - 10 +material_initial_print_temperature = =material_print_temperature - 5 +material_print_temperature = =default_material_print_temperature - 15 +material_print_temperature_layer_0 = =material_print_temperature + 3 material_standby_temperature = 100 multiple_mesh_overlap = 0 prime_tower_enable = False From 51ebb351ebef0577f7b110679c3a0db0a822bec0 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Tue, 1 May 2018 12:35:02 +0200 Subject: [PATCH 04/71] Add some missing units to machine settings --- resources/definitions/fdmprinter.def.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 1ec210b99e..d85e06ffd9 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -227,6 +227,7 @@ { "label": "Outer nozzle diameter", "description": "The outer diameter of the tip of the nozzle.", + "unit": "mm", "default_value": 1, "type": "float", "settable_per_mesh": false, @@ -238,6 +239,7 @@ { "label": "Nozzle length", "description": "The height difference between the tip of the nozzle and the lowest part of the print head.", + "unit": "mm", "default_value": 3, "type": "float", "settable_per_mesh": false, @@ -261,6 +263,7 @@ { "label": "Heat zone length", "description": "The distance from the tip of the nozzle in which heat from the nozzle is transferred to the filament.", + "unit": "mm", "default_value": 16, "type": "float", "settable_per_mesh": false, @@ -271,6 +274,7 @@ { "label": "Filament Park Distance", "description": "The distance from the tip of the nozzle where to park the filament when an extruder is no longer used.", + "unit": "mm", "default_value": 16, "value": "machine_heat_zone_length", "type": "float", From c1b5d940bac8b2c64b2ede234160bbccb5b5cc61 Mon Sep 17 00:00:00 2001 From: Kristel88 Date: Tue, 1 May 2018 13:41:52 +0200 Subject: [PATCH 05/71] 0.25 PP temperature formula S5 In line with UM3 --- .../um_s5_aa0.25_PP_Normal_Quality.inst.cfg | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.25_PP_Normal_Quality.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.25_PP_Normal_Quality.inst.cfg index f70f7e5ed1..2ca5fc0407 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.25_PP_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.25_PP_Normal_Quality.inst.cfg @@ -25,11 +25,11 @@ jerk_enabled = True jerk_print = 25 line_width = =machine_nozzle_size * 0.92 machine_min_cool_heat_time_window = 15 -material_bed_temperature_layer_0 = 90 -material_final_print_temperature = 195 -material_initial_print_temperature = 200 -material_print_temperature = 205 -material_print_temperature_layer_0 = 208 +material_bed_temperature_layer_0 = =material_bed_temperature + 5 +material_final_print_temperature = =material_print_temperature - 10 +material_initial_print_temperature = =material_print_temperature - 5 +material_print_temperature = =default_material_print_temperature - 15 +material_print_temperature_layer_0 = =material_print_temperature + 3 multiple_mesh_overlap = 0 prime_tower_enable = False prime_tower_size = 16 From 352cb9184cecb02d8263877b2c3b41fd0e3f07b9 Mon Sep 17 00:00:00 2001 From: Kristel88 Date: Wed, 2 May 2018 10:52:20 +0200 Subject: [PATCH 06/71] S5 profile updates More formulas en more in line with UM3 --- .../um_s5_aa0.4_ABS_Draft_Print.inst.cfg | 5 +++-- .../um_s5_aa0.4_ABS_Fast_Print.inst.cfg | 5 +++-- .../um_s5_aa0.4_ABS_High_Quality.inst.cfg | 5 +++-- .../um_s5_aa0.4_ABS_Normal_Quality.inst.cfg | 4 ++-- .../um_s5_aa0.4_CPE_Draft_Print.inst.cfg | 4 ++-- .../um_s5_aa0.4_CPE_Fast_Print.inst.cfg | 5 ++--- .../um_s5_aa0.4_CPE_High_Quality.inst.cfg | 3 ++- .../um_s5_aa0.4_CPE_Normal_Quality.inst.cfg | 5 ++--- .../um_s5_aa0.4_TPU_Draft_Print.inst.cfg | 3 +-- .../um_s5_aa0.4_TPU_Fast_Print.inst.cfg | 2 +- .../um_s5_aa0.4_TPU_Normal_Quality.inst.cfg | 2 +- .../um_s5_aa0.8_PLA_Draft_Print.inst.cfg | 13 +++++++------ .../um_s5_aa0.8_PLA_Superdraft_Print.inst.cfg | 14 ++++++++------ .../um_s5_aa0.8_PLA_Verydraft_Print.inst.cfg | 14 ++++++++------ 14 files changed, 45 insertions(+), 39 deletions(-) diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_ABS_Draft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_ABS_Draft_Print.inst.cfg index 21ce503633..76489dd60c 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_ABS_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_ABS_Draft_Print.inst.cfg @@ -26,5 +26,6 @@ speed_wall = =math.ceil(speed_print * 45 / 60) speed_wall_0 = =math.ceil(speed_wall * 35 / 45) wall_thickness = 1 -infill_line_width = 0.4 -speed_infill = 50 +infill_line_width = =round(line_width * 0.4 / 0.35, 2) +speed_infill = =math.ceil(speed_print * 50 / 60) + diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_ABS_Fast_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_ABS_Fast_Print.inst.cfg index 1ca4533188..451ef4b830 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_ABS_Fast_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_ABS_Fast_Print.inst.cfg @@ -25,5 +25,6 @@ speed_topbottom = =math.ceil(speed_print * 30 / 60) speed_wall = =math.ceil(speed_print * 40 / 60) speed_wall_0 = =math.ceil(speed_wall * 30 / 40) -infill_line_width = 0.4 -speed_infill = 45 +infill_line_width = =round(line_width * 0.4 / 0.35, 2) +speed_infill = =math.ceil(speed_print * 45 / 60) + diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_ABS_High_Quality.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_ABS_High_Quality.inst.cfg index 1d3541435a..ebe73bc54d 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_ABS_High_Quality.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_ABS_High_Quality.inst.cfg @@ -24,5 +24,6 @@ speed_layer_0 = 20 speed_topbottom = =math.ceil(speed_print * 30 / 50) speed_wall = =math.ceil(speed_print * 30 / 50) -infill_line_width = 0.4 -speed_infill = 40 +infill_line_width = =round(line_width * 0.4 / 0.35, 2) +speed_infill = =math.ceil(speed_print * 40 / 50) + diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_ABS_Normal_Quality.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_ABS_Normal_Quality.inst.cfg index 0fe89a30eb..df8b4e9251 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_ABS_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_ABS_Normal_Quality.inst.cfg @@ -23,5 +23,5 @@ speed_layer_0 = 20 speed_topbottom = =math.ceil(speed_print * 30 / 55) speed_wall = =math.ceil(speed_print * 30 / 55) -infill_line_width = 0.4 -speed_infill = 40 +infill_line_width = =round(line_width * 0.4 / 0.35, 2) +speed_infill = =math.ceil(speed_print * 40 / 55) diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_Draft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_Draft_Print.inst.cfg index b2cb1394d3..16cc836dc4 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_Draft_Print.inst.cfg @@ -15,6 +15,7 @@ variant = AA 0.4 material_print_temperature = =default_material_print_temperature + 10 material_initial_print_temperature = =material_print_temperature - 5 material_final_print_temperature = =material_print_temperature - 10 +material_standby_temperature = 100 skin_overlap = 20 speed_print = 60 speed_layer_0 = 20 @@ -23,8 +24,7 @@ speed_wall = =math.ceil(speed_print * 45 / 60) speed_wall_0 = =math.ceil(speed_wall * 35 / 45) wall_thickness = 1 -jerk_travel = 50 infill_pattern = zigzag -speed_infill = 50 +speed_infill = =math.ceil(speed_print * 50 / 60) prime_tower_purge_volume = 1 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_Fast_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_Fast_Print.inst.cfg index 7de22070f3..c7aa532422 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_Fast_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_Fast_Print.inst.cfg @@ -16,14 +16,13 @@ cool_min_speed = 7 material_print_temperature = =default_material_print_temperature + 5 material_initial_print_temperature = =material_print_temperature - 5 material_final_print_temperature = =material_print_temperature - 10 +material_standby_temperature = 100 speed_print = 60 speed_layer_0 = 20 speed_topbottom = =math.ceil(speed_print * 30 / 60) speed_wall = =math.ceil(speed_print * 40 / 60) speed_wall_0 = =math.ceil(speed_wall * 30 / 40) -jerk_travel = 50 - infill_pattern = zigzag -speed_infill = 50 +speed_infill = =math.ceil(speed_print * 50 / 60) prime_tower_purge_volume = 1 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_High_Quality.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_High_Quality.inst.cfg index d1ee4756e8..597dbe7fed 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_High_Quality.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_High_Quality.inst.cfg @@ -18,6 +18,7 @@ machine_nozzle_heat_up_speed = 1.5 material_print_temperature = =default_material_print_temperature - 5 material_initial_print_temperature = =material_print_temperature - 5 material_final_print_temperature = =material_print_temperature - 10 +material_standby_temperature = 100 speed_print = 50 speed_layer_0 = 20 speed_topbottom = =math.ceil(speed_print * 30 / 50) @@ -26,5 +27,5 @@ speed_wall = =math.ceil(speed_print * 30 / 50) jerk_travel = 50 infill_pattern = zigzag -speed_infill = 40 +speed_infill = =math.ceil(speed_print * 40 / 50) prime_tower_purge_volume = 1 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_Normal_Quality.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_Normal_Quality.inst.cfg index 53a4451114..acd8ed5bf4 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_Normal_Quality.inst.cfg @@ -16,13 +16,12 @@ machine_nozzle_cool_down_speed = 0.85 machine_nozzle_heat_up_speed = 1.5 material_initial_print_temperature = =material_print_temperature - 5 material_final_print_temperature = =material_print_temperature - 10 +material_standby_temperature = 100 speed_print = 55 speed_layer_0 = 20 speed_topbottom = =math.ceil(speed_print * 30 / 55) speed_wall = =math.ceil(speed_print * 30 / 55) -jerk_travel = 50 - infill_pattern = zigzag -speed_infill = 45 +speed_infill = =math.ceil(speed_print * 45 / 55) prime_tower_purge_volume = 1 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_TPU_Draft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_TPU_Draft_Print.inst.cfg index b4679f6a06..b53cdd4249 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_TPU_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_TPU_Draft_Print.inst.cfg @@ -18,6 +18,7 @@ brim_width = 8.75 cool_fan_speed_max = 100 cool_min_layer_time_fan_speed_max = 6 cool_min_speed = 4 +gradual_infill_step_height = =5 * layer_height infill_line_width = =round(line_width * 0.38 / 0.38, 2) infill_overlap = 0 infill_pattern = cross_3d @@ -61,5 +62,3 @@ travel_avoid_distance = 1.5 wall_0_inset = 0 wall_line_width_x = =line_width wall_thickness = 0.76 - -jerk_travel = 50 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_TPU_Fast_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_TPU_Fast_Print.inst.cfg index 025dd45ee7..e5e3b44e91 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_TPU_Fast_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_TPU_Fast_Print.inst.cfg @@ -18,6 +18,7 @@ brim_width = 8.75 cool_fan_speed_max = 100 cool_min_layer_time_fan_speed_max = 6 cool_min_speed = 4 +gradual_infill_step_height = =5 * layer_height infill_line_width = =round(line_width * 0.38 / 0.38, 2) infill_overlap = 0 infill_pattern = cross_3d @@ -62,4 +63,3 @@ wall_0_inset = 0 wall_line_width_x = =line_width wall_thickness = 0.76 -jerk_travel = 50 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_TPU_Normal_Quality.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_TPU_Normal_Quality.inst.cfg index 81a3a23ae1..263de9078a 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_TPU_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_TPU_Normal_Quality.inst.cfg @@ -18,6 +18,7 @@ brim_width = 8.75 cool_fan_speed_max = 100 cool_min_layer_time_fan_speed_max = 6 cool_min_speed = 4 +gradual_infill_step_height = =5 * layer_height infill_line_width = =round(line_width * 0.38 / 0.38, 2) infill_overlap = 0 infill_pattern = cross_3d @@ -61,4 +62,3 @@ wall_0_inset = 0 wall_line_width_x = =line_width wall_thickness = 0.76 -jerk_travel = 50 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.8_PLA_Draft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.8_PLA_Draft_Print.inst.cfg index 430b1a92a3..ed4855d4bd 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.8_PLA_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.8_PLA_Draft_Print.inst.cfg @@ -16,7 +16,7 @@ cool_fan_full_at_height = =layer_height_0 + 2 * layer_height cool_fan_speed_max = =100 cool_min_speed = 2 gradual_infill_step_height = =3 * layer_height -infill_line_width = =round(line_width * 0.65 / 0.75, 2) +infill_pattern = triangles = =round(line_width * 0.65 / 0.75, 2) infill_pattern = cubic line_width = =machine_nozzle_size * 0.9375 machine_nozzle_cool_down_speed = 0.75 @@ -24,10 +24,10 @@ machine_nozzle_heat_up_speed = 1.6 material_final_print_temperature = =max(-273.15, material_print_temperature - 15) material_initial_print_temperature = =max(-273.15, material_print_temperature - 10) material_print_temperature = =default_material_print_temperature + 10 -prime_tower_enable = False +material_standby_temperature = 100 +prime_tower_enable = True support_angle = 70 support_line_width = =line_width * 0.75 -support_pattern = ='triangles' support_xy_distance = =wall_line_width_0 * 1.5 top_bottom_thickness = =layer_height * 4 wall_line_width = =round(line_width * 0.75 / 0.75, 2) @@ -36,8 +36,9 @@ wall_thickness = =wall_line_width_0 + wall_line_width_x retract_at_layer_change = False speed_print = 45 -speed_wall = =round(speed_print * 40 / 45) -speed_wall_0 = =round(speed_print * 35 / 45) -speed_topbottom = =round(speed_print * 35 / 45) +speed_topbottom = =math.ceil(speed_print * 35 / 45) +speed_wall = =math.ceil(speed_print * 40 / 45) +speed_wall_x = =speed_wall +speed_wall_0 = =math.ceil(speed_wall * 35 / 40) infill_sparse_density = 15 layer_height_0 = 0.4 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.8_PLA_Superdraft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.8_PLA_Superdraft_Print.inst.cfg index c500c5173c..5a7ad493d6 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.8_PLA_Superdraft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.8_PLA_Superdraft_Print.inst.cfg @@ -17,18 +17,19 @@ cool_fan_speed_max = =100 cool_min_speed = 2 gradual_infill_step_height = =3 * layer_height infill_line_width = =round(line_width * 0.65 / 0.75, 2) -infill_pattern = cubic +infill_pattern = triangles +layer_height = 0.4 line_width = =machine_nozzle_size * 0.9375 machine_nozzle_cool_down_speed = 0.75 machine_nozzle_heat_up_speed = 1.6 material_final_print_temperature = =max(-273.15, material_print_temperature - 15) material_initial_print_temperature = =max(-273.15, material_print_temperature - 10) material_print_temperature = =default_material_print_temperature + 15 -prime_tower_enable = False +material_standby_temperature = 100 +prime_tower_enable = True raft_margin = 10 support_angle = 70 support_line_width = =line_width * 0.75 -support_pattern = ='triangles' support_xy_distance = =wall_line_width_0 * 1.5 top_bottom_thickness = =layer_height * 4 wall_line_width = =round(line_width * 0.75 / 0.75, 2) @@ -36,8 +37,9 @@ wall_line_width_x = =round(wall_line_width * 0.625 / 0.75, 2) wall_thickness = =wall_line_width_0 + wall_line_width_x retract_at_layer_change = False speed_print = 45 -speed_wall = =round(speed_print * 40 / 45) -speed_wall_0 = =round(speed_print * 35 / 45) -speed_topbottom = =round(speed_print * 35 / 45) +speed_topbottom = =math.ceil(speed_print * 35 / 45) +speed_wall = =math.ceil(speed_print * 40 / 45) +speed_wall_x = =speed_wall +speed_wall_0 = =math.ceil(speed_wall * 35 / 40) infill_sparse_density = 15 layer_height_0 = 0.4 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.8_PLA_Verydraft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.8_PLA_Verydraft_Print.inst.cfg index bc99237cba..c06478acfc 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.8_PLA_Verydraft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.8_PLA_Verydraft_Print.inst.cfg @@ -17,17 +17,18 @@ cool_fan_speed_max = =100 cool_min_speed = 2 gradual_infill_step_height = =3 * layer_height infill_line_width = =round(line_width * 0.65 / 0.75, 2) -infill_pattern = cubic +infill_pattern = triangles +layer_height = 0.3 line_width = =machine_nozzle_size * 0.9375 machine_nozzle_cool_down_speed = 0.75 machine_nozzle_heat_up_speed = 1.6 material_final_print_temperature = =max(-273.15, material_print_temperature - 15) material_initial_print_temperature = =max(-273.15, material_print_temperature - 10) material_print_temperature = =default_material_print_temperature + 10 -prime_tower_enable = False +material_standby_temperature = 100 +prime_tower_enable = True support_angle = 70 support_line_width = =line_width * 0.75 -support_pattern = ='triangles' support_xy_distance = =wall_line_width_0 * 1.5 top_bottom_thickness = =layer_height * 4 wall_line_width = =round(line_width * 0.75 / 0.75, 2) @@ -35,8 +36,9 @@ wall_line_width_x = =round(wall_line_width * 0.625 / 0.75, 2) wall_thickness = =wall_line_width_0 + wall_line_width_x retract_at_layer_change = False speed_print = 45 -speed_wall = =round(speed_print * 40 / 45) -speed_wall_0 = =round(speed_print * 35 / 45) -speed_topbottom = =round(speed_print * 35 / 45) +speed_topbottom = =math.ceil(speed_print * 35 / 45) +speed_wall = =math.ceil(speed_print * 40 / 45) +speed_wall_x = =speed_wall +speed_wall_0 = =math.ceil(speed_wall * 35 / 40) infill_sparse_density = 15 layer_height_0 = 0.4 From ef436cafbb166e107f9fa90b1488d54a3ef98b89 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Wed, 2 May 2018 16:13:02 +0200 Subject: [PATCH 07/71] Improve thumbnail rendering --- plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml b/plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml index e0e25982db..9e1a7c5a86 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml @@ -1,7 +1,7 @@ // Copyright (c) 2018 Ultimaker B.V. // Toolbox is released under the terms of the LGPLv3 or higher. -import QtQuick 2.2 +import QtQuick 2.3 import QtQuick.Controls 1.4 import QtQuick.Controls.Styles 1.4 import QtQuick.Layouts 1.3 @@ -38,6 +38,7 @@ Item height: UM.Theme.getSize("toolbox_thumbnail_small").height - 26 fillMode: Image.PreserveAspectFit source: model.icon_url || "../images/logobot.svg" + mipmap: true } } Column From 3d0a0da035c5199c26c52a68530772e6d149e00b Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Wed, 2 May 2018 16:22:19 +0200 Subject: [PATCH 08/71] Fix text rendering on some OSX systems --- plugins/Toolbox/resources/qml/ToolboxFooter.qml | 2 +- plugins/Toolbox/resources/qml/ToolboxInstalledTile.qml | 2 +- plugins/Toolbox/resources/qml/ToolboxTabButton.qml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/Toolbox/resources/qml/ToolboxFooter.qml b/plugins/Toolbox/resources/qml/ToolboxFooter.qml index 098a52d49a..b83d14a08b 100644 --- a/plugins/Toolbox/resources/qml/ToolboxFooter.qml +++ b/plugins/Toolbox/resources/qml/ToolboxFooter.qml @@ -49,7 +49,7 @@ Item implicitHeight: Math.floor(UM.Theme.getSize("toolbox_footer_button").height) color: control.hovered ? UM.Theme.getColor("primary_hover") : UM.Theme.getColor("primary") } - label: Text + label: Label { color: UM.Theme.getColor("button_text") font: UM.Theme.getFont("default_bold") diff --git a/plugins/Toolbox/resources/qml/ToolboxInstalledTile.qml b/plugins/Toolbox/resources/qml/ToolboxInstalledTile.qml index ff27e004b2..2389cca7e7 100644 --- a/plugins/Toolbox/resources/qml/ToolboxInstalledTile.qml +++ b/plugins/Toolbox/resources/qml/ToolboxInstalledTile.qml @@ -130,7 +130,7 @@ Item color: UM.Theme.getColor("lining") } } - label: Text + label: Label { text: control.text color: UM.Theme.getColor("text") diff --git a/plugins/Toolbox/resources/qml/ToolboxTabButton.qml b/plugins/Toolbox/resources/qml/ToolboxTabButton.qml index a61e77d241..0f759c75fb 100644 --- a/plugins/Toolbox/resources/qml/ToolboxTabButton.qml +++ b/plugins/Toolbox/resources/qml/ToolboxTabButton.qml @@ -25,7 +25,7 @@ Button height: UM.Theme.getSize("sidebar_header_highlight").height } } - label: Text + label: Label { text: control.text color: From a3436bb24b0fb50eef089f070844f9928b765940 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Wed, 2 May 2018 16:25:27 +0200 Subject: [PATCH 09/71] Fix title color on dark theme --- plugins/Toolbox/resources/qml/ToolboxDetailPage.qml | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml b/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml index 5a73bcc981..98cc396f91 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml @@ -56,6 +56,7 @@ Item } text: details.name font: UM.Theme.getFont("large") + color: UM.Theme.getColor("text") wrapMode: Text.WordWrap width: parent.width height: UM.Theme.getSize("toolbox_property_label").height From 132a1a19513aabbb395b07275eae39a92937cc96 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Wed, 2 May 2018 17:20:15 +0200 Subject: [PATCH 10/71] Fix binding loop errors --- plugins/Toolbox/resources/qml/ToolboxDetailTile.qml | 2 +- .../Toolbox/resources/qml/ToolboxDownloadsShowcaseTile.qml | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/Toolbox/resources/qml/ToolboxDetailTile.qml b/plugins/Toolbox/resources/qml/ToolboxDetailTile.qml index 6bad12236b..82b973609f 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDetailTile.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDetailTile.qml @@ -11,7 +11,7 @@ Item id: tile property bool installed: toolbox.isInstalled(model.id) width: detailList.width - UM.Theme.getSize("wide_margin").width - height: Math.max(UM.Theme.getSize("toolbox_detail_tile").height, childrenRect.height + UM.Theme.getSize("default_margin").height) + height: normalData.height + supportedConfigsChart.height + 3 * UM.Theme.getSize("default_margin").height Item { id: normalData diff --git a/plugins/Toolbox/resources/qml/ToolboxDownloadsShowcaseTile.qml b/plugins/Toolbox/resources/qml/ToolboxDownloadsShowcaseTile.qml index a699e9dae6..d6ba984774 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDownloadsShowcaseTile.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDownloadsShowcaseTile.qml @@ -9,7 +9,7 @@ import UM 1.1 as UM Item { width: UM.Theme.getSize("toolbox_thumbnail_large").width - height: childrenRect.height + height: thumbnail.height + packageName.height Rectangle { id: highlight @@ -44,10 +44,11 @@ Item } Label { + id: packageName text: model.name anchors { - bottom: parent.bottom + top: thumbnail.bottom horizontalCenter: parent.horizontalCenter } verticalAlignment: Text.AlignVCenter From ecbfae2f27523dacbbe2d7ec9c4f8125ac560f28 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Wed, 2 May 2018 17:22:00 +0200 Subject: [PATCH 11/71] Remove minimise button from toolbox dialog --- plugins/Toolbox/resources/qml/Toolbox.qml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/Toolbox/resources/qml/Toolbox.qml b/plugins/Toolbox/resources/qml/Toolbox.qml index cdbe2f0710..f7784ec7ce 100644 --- a/plugins/Toolbox/resources/qml/Toolbox.qml +++ b/plugins/Toolbox/resources/qml/Toolbox.qml @@ -12,6 +12,8 @@ Window property var selection: null title: catalog.i18nc("@title", "Toolbox") modality: Qt.ApplicationModal + flags: Qt.Dialog | Qt.CustomizeWindowHint | Qt.WindowTitleHint | Qt.WindowCloseButtonHint + width: 720 * screenScaleFactor height: 640 * screenScaleFactor minimumWidth: 720 * screenScaleFactor From d326e91008dc246494360421ba3ecdd02333096c Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Wed, 2 May 2018 17:54:48 +0200 Subject: [PATCH 12/71] Fix dpi scaling --- plugins/Toolbox/resources/qml/ToolboxDetailTile.qml | 4 ++-- plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/Toolbox/resources/qml/ToolboxDetailTile.qml b/plugins/Toolbox/resources/qml/ToolboxDetailTile.qml index 82b973609f..3888b314e0 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDetailTile.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDetailTile.qml @@ -79,8 +79,8 @@ Item { background: Rectangle { - implicitWidth: 96 - implicitHeight: 30 + implicitWidth: 96 * screenScaleFactor + implicitHeight: 30 * screenScaleFactor color: { if (installed) diff --git a/plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml b/plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml index 9e1a7c5a86..b1586e5c52 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml @@ -34,8 +34,8 @@ Item Image { anchors.centerIn: parent - width: UM.Theme.getSize("toolbox_thumbnail_small").width - 26 - height: UM.Theme.getSize("toolbox_thumbnail_small").height - 26 + width: UM.Theme.getSize("toolbox_thumbnail_small").width - UM.Theme.getSize("default_margin").width + height: UM.Theme.getSize("toolbox_thumbnail_small").height - UM.Theme.getSize("default_margin").width fillMode: Image.PreserveAspectFit source: model.icon_url || "../images/logobot.svg" mipmap: true From 1f542f176d4d42fe2d8a12f90f4e27e0f02676d9 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Wed, 2 May 2018 19:18:03 +0200 Subject: [PATCH 13/71] Fix some more image rendering occurrences --- plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml | 3 ++- plugins/Toolbox/resources/qml/ToolboxDetailPage.qml | 3 ++- plugins/Toolbox/resources/qml/ToolboxDownloadsShowcaseTile.qml | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml b/plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml index 6c87f9d2e2..06801b068a 100644 --- a/plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml +++ b/plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml @@ -1,7 +1,7 @@ // Copyright (c) 2018 Ultimaker B.V. // Toolbox is released under the terms of the LGPLv3 or higher. -import QtQuick 2.2 +import QtQuick 2.3 import QtQuick.Controls 1.4 import QtQuick.Controls.Styles 1.4 import UM 1.1 as UM @@ -32,6 +32,7 @@ Item height: UM.Theme.getSize("toolbox_thumbnail_medium").height fillMode: Image.PreserveAspectFit source: details.icon_url || "../images/logobot.svg" + mipmap: true anchors { top: parent.top diff --git a/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml b/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml index 98cc396f91..6af1c2e76e 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml @@ -1,7 +1,7 @@ // Copyright (c) 2018 Ultimaker B.V. // Toolbox is released under the terms of the LGPLv3 or higher. -import QtQuick 2.2 +import QtQuick 2.3 import QtQuick.Controls 1.4 import QtQuick.Controls.Styles 1.4 import UM 1.1 as UM @@ -33,6 +33,7 @@ Item height: UM.Theme.getSize("toolbox_thumbnail_medium").height fillMode: Image.PreserveAspectFit source: details.icon_url || "../images/logobot.svg" + mipmap: true anchors { top: parent.top diff --git a/plugins/Toolbox/resources/qml/ToolboxDownloadsShowcaseTile.qml b/plugins/Toolbox/resources/qml/ToolboxDownloadsShowcaseTile.qml index d6ba984774..f665404df7 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDownloadsShowcaseTile.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDownloadsShowcaseTile.qml @@ -1,7 +1,7 @@ // Copyright (c) 2018 Ultimaker B.V. // Toolbox is released under the terms of the LGPLv3 or higher. -import QtQuick 2.2 +import QtQuick 2.3 import QtQuick.Controls 1.4 import QtQuick.Controls.Styles 1.4 import UM 1.1 as UM @@ -40,6 +40,7 @@ Item height: UM.Theme.getSize("toolbox_thumbnail_large").height - 2 * UM.Theme.getSize("default_margin").height fillMode: Image.PreserveAspectFit source: model.icon_url || "../images/logobot.svg" + mipmap: true } } Label From 46e7a6665d0f314e922a86ae4c7cbd3d61d8c475 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Wed, 2 May 2018 19:20:52 +0200 Subject: [PATCH 14/71] Theme link colors --- plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml | 1 + plugins/Toolbox/resources/qml/ToolboxDetailPage.qml | 1 + plugins/Toolbox/resources/qml/ToolboxInstalledTile.qml | 1 + 3 files changed, 3 insertions(+) diff --git a/plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml b/plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml index 06801b068a..3858e2c122 100644 --- a/plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml +++ b/plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml @@ -115,6 +115,7 @@ Item } font: UM.Theme.getFont("very_small") color: UM.Theme.getColor("text") + linkColor: UM.Theme.getColor("text_link") onLinkActivated: Qt.openUrlExternally(link) } } diff --git a/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml b/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml index 6af1c2e76e..cee06bf9e2 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml @@ -135,6 +135,7 @@ Item } font: UM.Theme.getFont("very_small") color: UM.Theme.getColor("text") + linkColor: UM.Theme.getColor("text_link") onLinkActivated: Qt.openUrlExternally(link) } } diff --git a/plugins/Toolbox/resources/qml/ToolboxInstalledTile.qml b/plugins/Toolbox/resources/qml/ToolboxInstalledTile.qml index 2389cca7e7..0ed71845f5 100644 --- a/plugins/Toolbox/resources/qml/ToolboxInstalledTile.qml +++ b/plugins/Toolbox/resources/qml/ToolboxInstalledTile.qml @@ -89,6 +89,7 @@ Item horizontalAlignment: Text.AlignLeft onLinkActivated: Qt.openUrlExternally("mailto:" + model.author_email + "?Subject=Cura: " + model.name + " Plugin") color: model.enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("lining") + linkColor: UM.Theme.getColor("text_link") } } Column From ca8b7bb1da1352336ef13a3a78f5e021cde588c2 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Wed, 2 May 2018 20:34:50 +0200 Subject: [PATCH 15/71] Fix QML warnings --- plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml | 6 +++--- plugins/Toolbox/resources/qml/ToolboxDetailPage.qml | 6 +++--- plugins/Toolbox/resources/qml/ToolboxLicenseDialog.qml | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml b/plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml index 3858e2c122..04b055ed66 100644 --- a/plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml +++ b/plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml @@ -9,7 +9,7 @@ import UM 1.1 as UM Item { id: page - property var details: base.selection + property var details: base.selection || {} anchors.fill: parent ToolboxBackColumn { @@ -54,7 +54,7 @@ Item rightMargin: UM.Theme.getSize("wide_margin").width bottomMargin: UM.Theme.getSize("default_margin").height } - text: details.name + text: details.name || "" font: UM.Theme.getFont("large") wrapMode: Text.WordWrap width: parent.width @@ -63,7 +63,7 @@ Item Label { id: description - text: details.description + text: details.description || "" anchors { top: title.bottom diff --git a/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml b/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml index cee06bf9e2..c1419fb620 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml @@ -9,7 +9,7 @@ import UM 1.1 as UM Item { id: page - property var details: base.selection + property var details: base.selection || {} anchors.fill: parent width: parent.width ToolboxBackColumn @@ -55,7 +55,7 @@ Item rightMargin: UM.Theme.getSize("wide_margin").width bottomMargin: UM.Theme.getSize("default_margin").height } - text: details.name + text: details.name || "" font: UM.Theme.getFont("large") color: UM.Theme.getColor("text") wrapMode: Text.WordWrap @@ -106,7 +106,7 @@ Item spacing: Math.floor(UM.Theme.getSize("narrow_margin").height) Label { - text: details.version + text: details.version || "" font: UM.Theme.getFont("very_small") color: UM.Theme.getColor("text") } diff --git a/plugins/Toolbox/resources/qml/ToolboxLicenseDialog.qml b/plugins/Toolbox/resources/qml/ToolboxLicenseDialog.qml index 33bc466d29..b8baf7bc83 100644 --- a/plugins/Toolbox/resources/qml/ToolboxLicenseDialog.qml +++ b/plugins/Toolbox/resources/qml/ToolboxLicenseDialog.qml @@ -42,7 +42,7 @@ UM.Dialog anchors.right: parent.right anchors.topMargin: UM.Theme.getSize("default_margin").height readOnly: true - text: licenseDialog.licenseContent + text: licenseDialog.licenseContent || "" } } rightButtons: From 685b80fc3af65a54249147b2ab08afd28ea083d6 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Wed, 2 May 2018 21:56:23 +0200 Subject: [PATCH 16/71] Fix more QML warnings --- .../resources/qml/ToolboxCompatibilityChart.qml | 12 ++++++------ plugins/Toolbox/resources/qml/ToolboxDetailTile.qml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/plugins/Toolbox/resources/qml/ToolboxCompatibilityChart.qml b/plugins/Toolbox/resources/qml/ToolboxCompatibilityChart.qml index 1c58b46b96..4f5589d8d0 100644 --- a/plugins/Toolbox/resources/qml/ToolboxCompatibilityChart.qml +++ b/plugins/Toolbox/resources/qml/ToolboxCompatibilityChart.qml @@ -36,8 +36,8 @@ Item Label { anchors.verticalCenter: parent.verticalCenter - elide: styleData.elideMode - text: styleData.value + elide: styleData.elideMode || Text.ElideNone + text: styleData.value || "" color: UM.Theme.getColor("text") font: UM.Theme.getFont("default_bold") } @@ -55,8 +55,8 @@ Item Label { anchors.verticalCenter: parent.verticalCenter - elide: styleData.elideMode - text: styleData.value + elide: styleData.elideMode || Text.ElideNone + text: styleData.value || "" color: UM.Theme.getColor("text_medium") font: UM.Theme.getFont("default") } @@ -67,8 +67,8 @@ Item Label { anchors.verticalCenter: parent.verticalCenter - elide: styleData.elideMode - text: styleData.value + elide: styleData.elideMode || Text.ElideNone + text: styleData.value || "" color: UM.Theme.getColor("text_medium") font: UM.Theme.getFont("default") } diff --git a/plugins/Toolbox/resources/qml/ToolboxDetailTile.qml b/plugins/Toolbox/resources/qml/ToolboxDetailTile.qml index e93fdb646f..b50a7466e4 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDetailTile.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDetailTile.qml @@ -12,7 +12,7 @@ Item property bool installed: toolbox.isInstalled(model.id) property var packageData: model width: detailList.width - UM.Theme.getSize("wide_margin").width - height: normalData.height + supportedConfigsChart.height + 3 * UM.Theme.getSize("default_margin").height + height: normalData.height + compatibilityChart.height + 3 * UM.Theme.getSize("default_margin").height Item { id: normalData From c2c5228eeee985dca0f4d5b153679caa5234afb7 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Wed, 2 May 2018 23:19:13 +0200 Subject: [PATCH 17/71] Fix plugin details Previous fix for QML warnings broke the details display. --- plugins/Toolbox/resources/qml/ToolboxDetailPage.qml | 2 +- plugins/Toolbox/resources/qml/ToolboxDetailTile.qml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml b/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml index c35b9ff618..d57acac52d 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml @@ -9,7 +9,7 @@ import UM 1.1 as UM Item { id: page - property var details: base.selection || {} + property var details: base.selection anchors.fill: parent width: parent.width ToolboxBackColumn diff --git a/plugins/Toolbox/resources/qml/ToolboxDetailTile.qml b/plugins/Toolbox/resources/qml/ToolboxDetailTile.qml index b50a7466e4..a5982f8c43 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDetailTile.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDetailTile.qml @@ -12,7 +12,7 @@ Item property bool installed: toolbox.isInstalled(model.id) property var packageData: model width: detailList.width - UM.Theme.getSize("wide_margin").width - height: normalData.height + compatibilityChart.height + 3 * UM.Theme.getSize("default_margin").height + height: normalData.height + compatibilityChart.height + 4 * UM.Theme.getSize("default_margin").height Item { id: normalData From 45e32e6c058711dcd37e94b115b072e60135322e Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Thu, 3 May 2018 09:12:35 +0200 Subject: [PATCH 18/71] CURA-5296 Quick hack to test using a list of IDs --- cura/CuraPackageManager.py | 54 +++++++++++++++++++++++++++++++++++--- 1 file changed, 50 insertions(+), 4 deletions(-) diff --git a/cura/CuraPackageManager.py b/cura/CuraPackageManager.py index 4006cddd77..4187db31c0 100644 --- a/cura/CuraPackageManager.py +++ b/cura/CuraPackageManager.py @@ -15,6 +15,28 @@ from UM.Logger import Logger from UM.Resources import Resources from UM.Version import Version +BUNDLED = [ + "DagomaChromatikPLA", + "FABtotumABS", + "FABtotumNylon", + "FABtotumPLA", + "FABtotumTPU", + "FiberlogyHDPLA", + "Filo3DPLA", + "IMADE3DJellyBOXPETG", + "IMADE3DJellyBOXPLA", + "UltimakerABS", + "UltimakerCPE", + "UltimakerNylon", + "UltimakerPC", + "UltimakerPLA", + "UltimakerPVA", + "VertexDeltaABS", + "VertexDeltaPET", + "VertexDeltaPLA", + "VertexDeltaTPU" +] + class CuraPackageManager(QObject): Version = 1 @@ -114,8 +136,7 @@ class CuraPackageManager(QObject): managed_package_id_set = installed_package_id_set | self._to_remove_package_set - # TODO: For absolutely no reason, this function seems to run in a loop - # even though no loop is ever called with it. + # TODO: This function seems to run in a loop even though no loop is ever called with it. # map of -> -> installed_packages_dict = {} @@ -136,6 +157,31 @@ class CuraPackageManager(QObject): # We also need to get information from the plugin registry such as if a plugin is active package_info["is_active"] = self._plugin_registry.isActivePlugin(package_id) + # HACK: This is to know which packages are bundled and therefore always installed. + for package_id in BUNDLED: + package_info = { + "package_id": package_id, + "package_type": "material", + "package_version": "1.0.0", + "description": "", + "cura_version": 4, + "website": "", + "display_name": package_id, + "author": { + "author_id": "Ultimaker", + "display_name": "Ultimaker B.V.", + "email": "materials@ultimaker.com", + "website": "http://www.ultimaker.com/materials" + }, + "tags": [], + "is_active": True, + "is_bundled": True + } + package_type = package_info["package_type"] + if package_type not in installed_packages_dict: + installed_packages_dict[package_type] = [] + installed_packages_dict[package_type].append( package_info ) + # Also get all bundled plugins all_metadata = self._plugin_registry.getAllMetaData() for item in all_metadata: @@ -147,7 +193,7 @@ class CuraPackageManager(QObject): if package_id in Application.getInstance().getRequiredPlugins(): continue - plugin_package_info["is_bundled"] = True if plugin_package_info["author"]["display_name"] == "Ultimaker B.V." else False + plugin_package_info["is_bundled"] = plugin_package_info["package_id"] in BUNDLED plugin_package_info["is_active"] = self._plugin_registry.isActivePlugin(package_id) package_type = "plugin" if package_type not in installed_packages_dict: @@ -172,7 +218,7 @@ class CuraPackageManager(QObject): "email": "", "website": "", }, - "tags": ["plugin"], + "tags": ["plugin"] } return package_metadata From 367129686054498034ee380387cad2ae7b2c8ff2 Mon Sep 17 00:00:00 2001 From: Kristel88 Date: Thu, 3 May 2018 14:39:06 +0200 Subject: [PATCH 19/71] Updates PLA 0.8 S5 2 mistakes in previous pull request --- .../ultimaker_s5/um_s5_aa0.4_CPE_High_Quality.inst.cfg | 2 -- .../quality/ultimaker_s5/um_s5_aa0.8_PLA_Draft_Print.inst.cfg | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_High_Quality.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_High_Quality.inst.cfg index 597dbe7fed..05323e1ec1 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_High_Quality.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_High_Quality.inst.cfg @@ -24,8 +24,6 @@ speed_layer_0 = 20 speed_topbottom = =math.ceil(speed_print * 30 / 50) speed_wall = =math.ceil(speed_print * 30 / 50) -jerk_travel = 50 - infill_pattern = zigzag speed_infill = =math.ceil(speed_print * 40 / 50) prime_tower_purge_volume = 1 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.8_PLA_Draft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.8_PLA_Draft_Print.inst.cfg index ed4855d4bd..13294045fe 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.8_PLA_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.8_PLA_Draft_Print.inst.cfg @@ -16,8 +16,8 @@ cool_fan_full_at_height = =layer_height_0 + 2 * layer_height cool_fan_speed_max = =100 cool_min_speed = 2 gradual_infill_step_height = =3 * layer_height -infill_pattern = triangles = =round(line_width * 0.65 / 0.75, 2) -infill_pattern = cubic +infill_line_width = =round(line_width * 0.65 / 0.75, 2) +infill_pattern = triangles line_width = =machine_nozzle_size * 0.9375 machine_nozzle_cool_down_speed = 0.75 machine_nozzle_heat_up_speed = 1.6 From dfd9283ed5ceeeb9ce4200a6f4fd0b7a2bceac81 Mon Sep 17 00:00:00 2001 From: Aleksei S Date: Fri, 4 May 2018 10:29:09 +0200 Subject: [PATCH 20/71] Project name after importing CURA-5323 --- cura/PrintInformation.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cura/PrintInformation.py b/cura/PrintInformation.py index 22f7ea5407..0de57d00e0 100644 --- a/cura/PrintInformation.py +++ b/cura/PrintInformation.py @@ -337,12 +337,16 @@ class PrintInformation(QObject): if is_gcode or is_project_file or (is_empty or (self._base_name == "" and self._base_name != name)): # Only take the file name part, Note : file name might have 'dot' in name as well if is_project_file: - # This is for .curaproject + # This is for .curaproject, loaded as project self._base_name = ".".join(filename_parts) elif len(filename_parts) > 1: if "gcode" in filename_parts: gcode_index = filename_parts.index('gcode') self._base_name = ".".join(filename_parts[0:gcode_index]) + elif "curaproject" in filename_parts: + #load a project and import only models + curaproject_index = filename_parts.index('curaproject') + self._base_name = ".".join(filename_parts[0:curaproject_index]) else: self._base_name = name else: From 89322b9db6d69ea7916e95fedcfe70079ba31da9 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Fri, 4 May 2018 10:41:45 +0200 Subject: [PATCH 21/71] Move toolbox button style into theme --- .../resources/qml/ToolboxDetailTile.qml | 53 +----------------- resources/themes/cura-light/styles.qml | 55 +++++++++++++++++++ resources/themes/cura-light/theme.json | 3 +- 3 files changed, 59 insertions(+), 52 deletions(-) diff --git a/plugins/Toolbox/resources/qml/ToolboxDetailTile.qml b/plugins/Toolbox/resources/qml/ToolboxDetailTile.qml index a5982f8c43..7056cb3777 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDetailTile.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDetailTile.qml @@ -76,58 +76,9 @@ Item } enabled: installed || !(toolbox.isDownloading && toolbox.activePackage != model) //Don't allow installing while another download is running. opacity: enabled ? 1.0 : 0.5 - style: ButtonStyle - { - background: Rectangle - { - implicitWidth: 96 * screenScaleFactor - implicitHeight: 30 * screenScaleFactor - color: - { - if (installed) - { - return UM.Theme.getColor("action_button_disabled") - } - else - { - if ( control.hovered ) - { - return UM.Theme.getColor("primary_hover") - } - else - { - return UM.Theme.getColor("primary") - } - } - } - } - label: Label - { - text: control.text - color: - { - if (installed) - { - return UM.Theme.getColor("action_button_disabled_text") - } - else - { - if ( control.hovered ) - { - return UM.Theme.getColor("button_text_hover") - } - else - { - return UM.Theme.getColor("button_text") - } - } - } - verticalAlignment: Text.AlignVCenter - horizontalAlignment: Text.AlignHCenter - font: UM.Theme.getFont("default_bold") - } - } + property alias installed: tile.installed + style: UM.Theme.styles.toolbox_action_button onClicked: { if (installed) diff --git a/resources/themes/cura-light/styles.qml b/resources/themes/cura-light/styles.qml index 6b454b7cf1..14e7d196a7 100755 --- a/resources/themes/cura-light/styles.qml +++ b/resources/themes/cura-light/styles.qml @@ -1033,4 +1033,59 @@ QtObject { label: Item { } } } + + property Component toolbox_action_button: Component { + ButtonStyle + { + background: Rectangle + { + implicitWidth: UM.Theme.getSize("toolbox_action_button").width + implicitHeight: UM.Theme.getSize("toolbox_action_button").height + color: + { + if (control.installed) + { + return UM.Theme.getColor("action_button_disabled") + } + else + { + if (control.hovered) + { + return UM.Theme.getColor("primary_hover") + } + else + { + return UM.Theme.getColor("primary") + } + } + + } + } + label: Label + { + text: control.text + color: + { + if (control.installed) + { + return UM.Theme.getColor("action_button_disabled_text") + } + else + { + if (control.hovered) + { + return UM.Theme.getColor("button_text_hover") + } + else + { + return UM.Theme.getColor("button_text") + } + } + } + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignHCenter + font: UM.Theme.getFont("default_bold") + } + } + } } diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index c78a51a3a9..1be61b523a 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -460,6 +460,7 @@ "toolbox_header": [1.0, 4.0], "toolbox_action_button": [8.0, 2.5], "toolbox_progress_bar": [8.0, 0.5], - "toolbox_chart_row": [1.0, 2.0] + "toolbox_chart_row": [1.0, 2.0], + "toolbox_action_button": [8.0, 2.5] } } From 1f675f505f611ce3dcb8473b88aa227c36e51bc9 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Fri, 4 May 2018 10:42:03 +0200 Subject: [PATCH 22/71] Tweak margins --- plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml b/plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml index b1586e5c52..17b28fe136 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml @@ -34,8 +34,8 @@ Item Image { anchors.centerIn: parent - width: UM.Theme.getSize("toolbox_thumbnail_small").width - UM.Theme.getSize("default_margin").width - height: UM.Theme.getSize("toolbox_thumbnail_small").height - UM.Theme.getSize("default_margin").width + width: UM.Theme.getSize("toolbox_thumbnail_small").width - UM.Theme.getSize("wide_margin").width + height: UM.Theme.getSize("toolbox_thumbnail_small").height - UM.Theme.getSize("wide_margin").width fillMode: Image.PreserveAspectFit source: model.icon_url || "../images/logobot.svg" mipmap: true From 4e305079ec9a99a26fda9cfd1c2403ec005da371 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Fri, 4 May 2018 11:42:45 +0200 Subject: [PATCH 23/71] Simplify --- plugins/Toolbox/resources/qml/ToolboxCompatibilityChart.qml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/Toolbox/resources/qml/ToolboxCompatibilityChart.qml b/plugins/Toolbox/resources/qml/ToolboxCompatibilityChart.qml index 4f5589d8d0..3c225c521a 100644 --- a/plugins/Toolbox/resources/qml/ToolboxCompatibilityChart.qml +++ b/plugins/Toolbox/resources/qml/ToolboxCompatibilityChart.qml @@ -36,7 +36,7 @@ Item Label { anchors.verticalCenter: parent.verticalCenter - elide: styleData.elideMode || Text.ElideNone + elide: Text.ElideRight text: styleData.value || "" color: UM.Theme.getColor("text") font: UM.Theme.getFont("default_bold") @@ -55,7 +55,7 @@ Item Label { anchors.verticalCenter: parent.verticalCenter - elide: styleData.elideMode || Text.ElideNone + elide: Text.ElideRight text: styleData.value || "" color: UM.Theme.getColor("text_medium") font: UM.Theme.getFont("default") @@ -67,7 +67,7 @@ Item Label { anchors.verticalCenter: parent.verticalCenter - elide: styleData.elideMode || Text.ElideNone + elide: Text.ElideRight text: styleData.value || "" color: UM.Theme.getColor("text_medium") font: UM.Theme.getFont("default") From 6b214d244378b2c1bd19dda95f353bc2f73a3392 Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Fri, 4 May 2018 13:05:29 +0200 Subject: [PATCH 24/71] CURA-4644 Change the return type to QObject --- plugins/Toolbox/src/Toolbox.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/Toolbox/src/Toolbox.py b/plugins/Toolbox/src/Toolbox.py index 2f6f39d005..0451494d14 100644 --- a/plugins/Toolbox/src/Toolbox.py +++ b/plugins/Toolbox/src/Toolbox.py @@ -403,7 +403,7 @@ class Toolbox(QObject, Extension): if bytes_sent == bytes_total: self.setIsDownloading(False) self._download_reply.downloadProgress.disconnect(self._onDownloadProgress) - # Optional[Dict[str, Any]]: return self._active_package From 736f28bdb9a64747a3c4179db14db71bc554d80a Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 4 May 2018 13:30:11 +0200 Subject: [PATCH 25/71] Move platform model slightly further down Otherwise it clips with the build volume. This looks much nicer. --- resources/definitions/vertex_k8400.def.json | 2 +- resources/definitions/vertex_k8400_dual.def.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/definitions/vertex_k8400.def.json b/resources/definitions/vertex_k8400.def.json index 8abf9acd7f..92c016aa70 100644 --- a/resources/definitions/vertex_k8400.def.json +++ b/resources/definitions/vertex_k8400.def.json @@ -8,7 +8,7 @@ "file_formats": "text/x-gcode", "icon": "icon_ultimaker2", "platform": "Vertex_build_panel.stl", - "platform_offset": [0, -2, 0], + "platform_offset": [0, -3, 0], "supports_usb_connection": true, "supported_actions": ["MachineSettingsAction"] }, diff --git a/resources/definitions/vertex_k8400_dual.def.json b/resources/definitions/vertex_k8400_dual.def.json index fc006a1d5f..e4b4f609c1 100644 --- a/resources/definitions/vertex_k8400_dual.def.json +++ b/resources/definitions/vertex_k8400_dual.def.json @@ -8,7 +8,7 @@ "file_formats": "text/x-gcode", "icon": "icon_ultimaker2", "platform": "Vertex_build_panel.stl", - "platform_offset": [0, -2, 0], + "platform_offset": [0, -3, 0], "machine_extruder_trains": { "0": "vertex_k8400_dual_1st", "1": "vertex_k8400_dual_2nd" From b00d51a6eb668d734cb54398f5e1f4c02d550256 Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Fri, 4 May 2018 14:03:26 +0200 Subject: [PATCH 26/71] CURA-4644 Set the property in the component where is being used. --- plugins/Toolbox/resources/qml/ToolboxCompatibilityChart.qml | 1 + plugins/Toolbox/resources/qml/ToolboxDetailTile.qml | 3 ++- plugins/Toolbox/src/PackagesModel.py | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/Toolbox/resources/qml/ToolboxCompatibilityChart.qml b/plugins/Toolbox/resources/qml/ToolboxCompatibilityChart.qml index 1c58b46b96..f0066c2698 100644 --- a/plugins/Toolbox/resources/qml/ToolboxCompatibilityChart.qml +++ b/plugins/Toolbox/resources/qml/ToolboxCompatibilityChart.qml @@ -8,6 +8,7 @@ import UM 1.1 as UM Item { + property var packageData anchors.topMargin: UM.Theme.getSize("default_margin").height height: visible ? childrenRect.height : 0 visible: packageData.type == "material" && packageData.has_configs diff --git a/plugins/Toolbox/resources/qml/ToolboxDetailTile.qml b/plugins/Toolbox/resources/qml/ToolboxDetailTile.qml index b2b41d30ea..dab90f8e06 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDetailTile.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDetailTile.qml @@ -10,7 +10,6 @@ Item { id: tile property bool installed: toolbox.isInstalled(model.id) - property var packageData: model width: detailList.width - UM.Theme.getSize("wide_margin").width height: Math.max(UM.Theme.getSize("toolbox_detail_tile").height, childrenRect.height + UM.Theme.getSize("default_margin").height) Item @@ -46,6 +45,7 @@ Item font: UM.Theme.getFont("default") } } + Item { id: controls @@ -164,6 +164,7 @@ Item id: compatibilityChart anchors.top: normalData.bottom width: normalData.width + packageData: model } Rectangle diff --git a/plugins/Toolbox/src/PackagesModel.py b/plugins/Toolbox/src/PackagesModel.py index 611d24af9d..d1905e1742 100644 --- a/plugins/Toolbox/src/PackagesModel.py +++ b/plugins/Toolbox/src/PackagesModel.py @@ -59,7 +59,7 @@ class PackagesModel(ListModel): "version": package["package_version"], "author_id": package["author"]["author_id"] if "author_id" in package["author"] else package["author"]["name"], "author_name": package["author"]["display_name"] if "display_name" in package["author"] else package["author"]["name"], - "author_email": package["author"]["email"] if "email" in package["author"] else "None", + "author_email": package["author"]["email"] if "email" in package["author"] else None, "description": package["description"], "icon_url": package["icon_url"] if "icon_url" in package else None, "image_urls": package["image_urls"] if "image_urls" in package else None, From 8c4dc1cc2b5d7cf3b18c311da81b11df444a0153 Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Fri, 4 May 2018 14:59:59 +0200 Subject: [PATCH 27/71] CURA-5264 Don't need the if statement since the hardware-typeid is the right value to look at and it is in the firmware api. --- plugins/UM3NetworkPrinting/UM3OutputDevicePlugin.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/plugins/UM3NetworkPrinting/UM3OutputDevicePlugin.py b/plugins/UM3NetworkPrinting/UM3OutputDevicePlugin.py index 2add388db6..74a4b044ff 100644 --- a/plugins/UM3NetworkPrinting/UM3OutputDevicePlugin.py +++ b/plugins/UM3NetworkPrinting/UM3OutputDevicePlugin.py @@ -189,14 +189,10 @@ class UM3OutputDevicePlugin(OutputDevicePlugin): b"name": system_info["name"].encode("utf-8"), b"address": address.encode("utf-8"), b"firmware_version": system_info["firmware"].encode("utf-8"), - b"manual": b"true" + b"manual": b"true", + b"machine": str(system_info['hardware']["typeid"]).encode("utf-8") } - if "hardware" in system_info and 'typeid' in system_info["hardware"]: - properties[b"machine"] = str(system_info['hardware']["typeid"]).encode("utf-8") - else: - properties[b"machine"] = system_info["variant"].encode("utf-8") - if has_cluster_capable_firmware: # Cluster needs an additional request, before it's completed. properties[b"incomplete"] = b"true" From 2283bb530debdcbe6ac4c544f7920377c1cb01dc Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Fri, 4 May 2018 15:49:37 +0200 Subject: [PATCH 28/71] CURA-4644 Fix unselectable item in the Toolbox --- plugins/Toolbox/resources/qml/ToolboxDownloadsGrid.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/Toolbox/resources/qml/ToolboxDownloadsGrid.qml b/plugins/Toolbox/resources/qml/ToolboxDownloadsGrid.qml index 12578d15f6..3dc36db365 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDownloadsGrid.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDownloadsGrid.qml @@ -11,7 +11,7 @@ Column { // HACK: GridLayouts don't render to the correct height with odd numbers of // items, so if odd, add some extra space. - height: grid.model.items.length % 2 == 0 ? childrenRect.height : childrenRect.height + UM.Theme.getSize("toolbox_thumbnail_small").height + height: childrenRect.height width: parent.width spacing: UM.Theme.getSize("default_margin").height Label @@ -36,6 +36,7 @@ Column delegate: ToolboxDownloadsGridTile { Layout.preferredWidth: (grid.width - (grid.columns - 1) * grid.columnSpacing) / grid.columns + Layout.preferredHeight: UM.Theme.getSize("toolbox_thumbnail_small").height } } } From ffd1c5cc09e988f098060e97db551230edd2d1a8 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 4 May 2018 15:49:34 +0200 Subject: [PATCH 29/71] Run Mypy as normal automated test This tests all code for good style. Contributes to issue CURA-5330. --- cmake/CuraTests.cmake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cmake/CuraTests.cmake b/cmake/CuraTests.cmake index ffe4616bf3..801f054bc3 100644 --- a/cmake/CuraTests.cmake +++ b/cmake/CuraTests.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2017 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. enable_testing() @@ -53,3 +53,9 @@ foreach(_plugin ${_plugins}) cura_add_test(NAME pytest-${_plugin_name} DIRECTORY ${_plugin_directory} PYTHONPATH "${_plugin_directory}|${CMAKE_SOURCE_DIR}|${URANIUM_DIR}") endif() endforeach() + +#Add code style test. +add_test( + NAME "code-style" + COMMAND ${PYTHON_EXECUTABLE} run_mypy.py WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} +) \ No newline at end of file From 651f2ffbc929a9984d2f1cc24a052f83444d27f1 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 4 May 2018 15:50:05 +0200 Subject: [PATCH 30/71] Return proper exit value if test failed Return 1 then. Contributes to issue CURA-5330. --- run_mypy.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/run_mypy.py b/run_mypy.py index 88adea8db9..a72c555b8a 100644 --- a/run_mypy.py +++ b/run_mypy.py @@ -46,14 +46,9 @@ def main(): print("------------- Checking module {mod}".format(**locals())) result = subprocess.run([sys.executable, mypyModule, "-p", mod]) if result.returncode != 0: - print(""" - Module {mod} failed checking. :( - """.format(**locals())) - break + print("\nModule {mod} failed checking. :(".format(**locals())) + return 1 else: - print(""" - - Done checking. All is good. - """) + print("\n\nDone checking. All is good.") return 0 sys.exit(main()) From 551cfa9d719d921c03d8afb7daf584b6973db859 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 4 May 2018 15:53:51 +0200 Subject: [PATCH 31/71] Ignore Mypy cache Don't want to commit that accidentally after running tests. Contributes to issue CURA-5330. --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index c0cb27efe0..d991fedb73 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,7 @@ CuraEngine.exe LC_MESSAGES .cache *.qmlc +.mypy_cache #MacOS .DS_Store From 58289a7b45b2654b7b0b128f3ca4b1ed5ffa9e9e Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Fri, 4 May 2018 17:28:39 +0200 Subject: [PATCH 32/71] Remove useful comment --- plugins/Toolbox/resources/qml/ToolboxDownloadsGrid.qml | 2 -- 1 file changed, 2 deletions(-) diff --git a/plugins/Toolbox/resources/qml/ToolboxDownloadsGrid.qml b/plugins/Toolbox/resources/qml/ToolboxDownloadsGrid.qml index 3dc36db365..5b9697eda2 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDownloadsGrid.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDownloadsGrid.qml @@ -9,8 +9,6 @@ import UM 1.1 as UM Column { - // HACK: GridLayouts don't render to the correct height with odd numbers of - // items, so if odd, add some extra space. height: childrenRect.height width: parent.width spacing: UM.Theme.getSize("default_margin").height From 00d8427e423b073a10d31e5cc3037dd0978d1696 Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Mon, 7 May 2018 10:30:45 +0200 Subject: [PATCH 33/71] Add sanity check for GlobalStack CURA-5045 --- cura/Settings/ExtruderManager.py | 3 ++- cura/Settings/GlobalStack.py | 17 +++++++++++++++++ cura/Settings/MachineManager.py | 7 +++++-- .../MachineSettingsAction.py | 2 -- 4 files changed, 24 insertions(+), 5 deletions(-) diff --git a/cura/Settings/ExtruderManager.py b/cura/Settings/ExtruderManager.py index c2fe929957..51e7e81fef 100755 --- a/cura/Settings/ExtruderManager.py +++ b/cura/Settings/ExtruderManager.py @@ -402,7 +402,8 @@ class ExtruderManager(QObject): # Register the extruder trains by position for extruder_train in extruder_trains: - self._extruder_trains[global_stack_id][extruder_train.getMetaDataEntry("position")] = extruder_train + extruder_position = extruder_train.getMetaDataEntry("position") + self._extruder_trains[global_stack_id][extruder_position] = extruder_train # regardless of what the next stack is, we have to set it again, because of signal routing. ??? extruder_train.setParent(global_stack) diff --git a/cura/Settings/GlobalStack.py b/cura/Settings/GlobalStack.py index 5d8a4505a5..cea59bcb70 100755 --- a/cura/Settings/GlobalStack.py +++ b/cura/Settings/GlobalStack.py @@ -153,6 +153,23 @@ class GlobalStack(CuraContainerStack): return True + ## Perform some sanity checks on the global stack + # Sanity check for extruders; they must have positions 0 and up to machine_extruder_count - 1 + def isValid(self): + container_registry = ContainerRegistry.getInstance() + extruder_trains = container_registry.findContainerStacks(type = "extruder_train", machine = self.getId()) + + machine_extruder_count = self.getProperty("machine_extruder_count", "value") + extruder_check_position = set() + for extruder_train in extruder_trains: + extruder_position = extruder_train.getMetaDataEntry("position") + extruder_check_position.add(extruder_position) + + for check_position in range(machine_extruder_count): + if str(check_position) not in extruder_check_position: + return False + return True + ## private: global_stack_mime = MimeType( diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index 14f4f5fc33..c2b1e6dc5f 100755 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -6,6 +6,7 @@ import time #Type hinting. from typing import List, Dict, TYPE_CHECKING, Optional +from UM.ConfigurationErrorMessage import ConfigurationErrorMessage from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator from UM.Signal import Signal @@ -165,8 +166,6 @@ class MachineManager(QObject): if active_machine_id != "" and ContainerRegistry.getInstance().findContainerStacksMetadata(id = active_machine_id): # An active machine was saved, so restore it. self.setActiveMachine(active_machine_id) - # Make sure _active_container_stack is properly initiated - ExtruderManager.getInstance().setActiveExtruderIndex(0) def _onOutputDevicesChanged(self) -> None: self._printer_output_devices = [] @@ -357,6 +356,10 @@ class MachineManager(QObject): return global_stack = containers[0] + if not global_stack.isValid(): + # Mark global stack as invalid + ConfigurationErrorMessage.getInstance().addFaultyContainers(global_stack.getId()) + return # We're done here ExtruderManager.getInstance().setActiveExtruderIndex(0) # Switch to first extruder self._global_container_stack = global_stack Application.getInstance().setGlobalContainerStack(global_stack) diff --git a/plugins/MachineSettingsAction/MachineSettingsAction.py b/plugins/MachineSettingsAction/MachineSettingsAction.py index ded59bf934..7d5b317475 100755 --- a/plugins/MachineSettingsAction/MachineSettingsAction.py +++ b/plugins/MachineSettingsAction/MachineSettingsAction.py @@ -56,8 +56,6 @@ class MachineSettingsAction(MachineAction): if self._isEmptyDefinitionChanges(definition_changes_id): return - self._container_registry.removeContainer(definition_changes_id) - def _reset(self): if not self._global_container_stack: return From b5764237473d8a18e416d330536423f901f83c5f Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Mon, 7 May 2018 11:49:30 +0200 Subject: [PATCH 34/71] Adapt ovewritten method signature --- cura/Settings/ExtruderStack.py | 2 +- cura/Settings/GlobalStack.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cura/Settings/ExtruderStack.py b/cura/Settings/ExtruderStack.py index 8dcaaf302e..5e944b401f 100644 --- a/cura/Settings/ExtruderStack.py +++ b/cura/Settings/ExtruderStack.py @@ -38,7 +38,7 @@ class ExtruderStack(CuraContainerStack): # # This will set the next stack and ensure that we register this stack as an extruder. @override(ContainerStack) - def setNextStack(self, stack: CuraContainerStack) -> None: + def setNextStack(self, stack: CuraContainerStack, connect_signals: bool = True) -> None: super().setNextStack(stack) stack.addExtruder(self) self.addMetaDataEntry("machine", stack.id) diff --git a/cura/Settings/GlobalStack.py b/cura/Settings/GlobalStack.py index 5d8a4505a5..2e10863a81 100755 --- a/cura/Settings/GlobalStack.py +++ b/cura/Settings/GlobalStack.py @@ -125,7 +125,7 @@ class GlobalStack(CuraContainerStack): # # This will simply raise an exception since the Global stack cannot have a next stack. @override(ContainerStack) - def setNextStack(self, next_stack: ContainerStack) -> None: + def setNextStack(self, stack: CuraContainerStack, connect_signals: bool = True) -> None: raise Exceptions.InvalidOperationError("Global stack cannot have a next stack!") # protected: From 4cfd047b116959f58f8ccbf40f96e7f0fb793d86 Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Mon, 7 May 2018 15:47:03 +0200 Subject: [PATCH 35/71] CURA-5296 Simplifications to CuraPackageManager --- cura/CuraPackageManager.py | 103 +++++++++++++------------------------ 1 file changed, 36 insertions(+), 67 deletions(-) diff --git a/cura/CuraPackageManager.py b/cura/CuraPackageManager.py index e499b1276f..941b71cfee 100644 --- a/cura/CuraPackageManager.py +++ b/cura/CuraPackageManager.py @@ -40,8 +40,7 @@ BUNDLED = [ class CuraPackageManager(QObject): Version = 1 - # The prefix that's added to all files for an installed package to avoid naming conflicts with user created - # files. + # The prefix that's added to all files for an installed package to avoid naming conflicts with user created files. PREFIX_PLACE_HOLDER = "-CP;" def __init__(self, parent = None): @@ -54,11 +53,13 @@ class CuraPackageManager(QObject): # JSON file that keeps track of all installed packages. self._package_management_file_path = os.path.join(os.path.abspath(Resources.getDataStoragePath()), "packages.json") - self._installed_package_dict = {} # a dict of all installed packages - self._to_remove_package_set = set() # a set of packages that need to be removed at the next start - self._to_install_package_dict = {} # a dict of packages that need to be installed at the next start - installedPackagesChanged = pyqtSignal() # Emitted whenever the installed packages collection have been changed. + self._bundled_package_dict = {} # A dict of all bundled packages + self._installed_package_dict = {} # A dict of all installed packages + self._to_remove_package_set = set() # A set of packages that need to be removed at the next start + self._to_install_package_dict = {} # A dict of packages that need to be installed at the next start + + installedPackagesChanged = pyqtSignal() # Emitted whenever the installed packages collection have been changed. def initialize(self): self._loadManagementData() @@ -77,6 +78,7 @@ class CuraPackageManager(QObject): with open(self._package_management_file_path, "r", encoding = "utf-8") as f: management_dict = json.load(f, encoding = "utf-8") + self._bundled_package_dict = management_dict.get("bundled", {}) self._installed_package_dict = management_dict.get("installed", {}) self._to_remove_package_set = set(management_dict.get("to_remove", [])) self._to_install_package_dict = management_dict.get("to_install", {}) @@ -89,11 +91,12 @@ class CuraPackageManager(QObject): with container_registry.lockFile(): with open(self._package_management_file_path, "w", encoding = "utf-8") as f: data_dict = {"version": CuraPackageManager.Version, + "bundled": self._bundled_package_dict, "installed": self._installed_package_dict, "to_remove": list(self._to_remove_package_set), "to_install": self._to_install_package_dict} data_dict["to_remove"] = list(data_dict["to_remove"]) - json.dump(data_dict, f) + json.dump(data_dict, f, sort_keys = True, indent = 4) Logger.log("i", "Package management file %s is saved", self._package_management_file_path) # (for initialize) Removes all packages that have been scheduled to be removed. @@ -120,89 +123,55 @@ class CuraPackageManager(QObject): return package_info if package_id in self._installed_package_dict: - package_info = self._installed_package_dict.get(package_id) + package_info = self._installed_package_dict[package_id]["package_info"] return package_info - for section, packages in self.getAllInstalledPackagesInfo().items(): - for package in packages: - if package["package_id"] == package_id: - return package + if package_id in self._bundled_package_dict: + package_info = self._bundled_package_dict[package_id]["package_info"] + return package_info return None def getAllInstalledPackagesInfo(self) -> dict: - installed_package_id_set = set(self._installed_package_dict.keys()) | set(self._to_install_package_dict.keys()) - installed_package_id_set = installed_package_id_set.difference(self._to_remove_package_set) - managed_package_id_set = installed_package_id_set | self._to_remove_package_set - - # TODO: This function seems to run in a loop even though no loop is ever called with it. + # Add bundled, installed, and to-install packages to the set of installed package IDs + all_installed_ids = set() + all_installed_ids = all_installed_ids.union(set(self._bundled_package_dict.keys())) + all_installed_ids = all_installed_ids.union(set(self._installed_package_dict.keys())) + all_installed_ids = all_installed_ids.union(set(self._to_install_package_dict.keys())) + all_installed_ids = all_installed_ids.difference(self._to_remove_package_set) # map of -> -> installed_packages_dict = {} - for package_id in installed_package_id_set: + for package_id in all_installed_ids: + + # Skip required plugins as they should not be tampered with if package_id in Application.getInstance().getRequiredPlugins(): continue + + # Add bundled plugins + if package_id in self._bundled_package_dict: + package_info = self._bundled_package_dict[package_id]["package_info"] + + # Add installed plugins + if package_id in self._installed_package_dict: + package_info = self._installed_package_dict[package_id]["package_info"] + + # Add to install plugins if package_id in self._to_install_package_dict: package_info = self._to_install_package_dict[package_id]["package_info"] - else: - package_info = self._installed_package_dict[package_id] - package_info["is_bundled"] = False - - package_type = package_info["package_type"] - if package_type not in installed_packages_dict: - installed_packages_dict[package_type] = [] - installed_packages_dict[package_type].append( package_info ) # We also need to get information from the plugin registry such as if a plugin is active package_info["is_active"] = self._plugin_registry.isActivePlugin(package_id) - # HACK: This is to know which packages are bundled and therefore always installed. - for package_id in BUNDLED: - package_info = { - "package_id": package_id, - "package_type": "material", - "package_version": "1.0.0", - "description": "", - "cura_version": 4, - "website": "", - "display_name": package_id, - "author": { - "author_id": "Ultimaker", - "display_name": "Ultimaker B.V.", - "email": "materials@ultimaker.com", - "website": "http://www.ultimaker.com/materials" - }, - "tags": [], - "is_active": True, - "is_bundled": True - } + # If there is not a section in the dict for this type, add it package_type = package_info["package_type"] if package_type not in installed_packages_dict: installed_packages_dict[package_type] = [] + + # Finally, add the data installed_packages_dict[package_type].append( package_info ) - # Also get all bundled plugins - all_metadata = self._plugin_registry.getAllMetaData() - for item in all_metadata: - if item == {}: - continue - - plugin_package_info = self.__convertPluginMetadataToPackageMetadata(item) - # Only gather the bundled plugins here. - package_id = plugin_package_info["package_id"] - if package_id in managed_package_id_set: - continue - if package_id in Application.getInstance().getRequiredPlugins(): - continue - - plugin_package_info["is_bundled"] = plugin_package_info["package_id"] in BUNDLED - plugin_package_info["is_active"] = self._plugin_registry.isActivePlugin(package_id) - package_type = "plugin" - if package_type not in installed_packages_dict: - installed_packages_dict[package_type] = [] - installed_packages_dict[package_type].append( plugin_package_info ) - return installed_packages_dict def __convertPluginMetadataToPackageMetadata(self, plugin_metadata: dict) -> dict: From 304c23b87e79bd1627b6c62f301ad811bb997517 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 8 May 2018 10:43:55 +0200 Subject: [PATCH 36/71] Fix check for existence of gcode_dict variable getattr raises an error if it doesn't exist. It doesn't make the variable None or anything. --- plugins/GCodeWriter/GCodeWriter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/GCodeWriter/GCodeWriter.py b/plugins/GCodeWriter/GCodeWriter.py index f25e249db1..c01d48be4c 100644 --- a/plugins/GCodeWriter/GCodeWriter.py +++ b/plugins/GCodeWriter/GCodeWriter.py @@ -66,9 +66,9 @@ class GCodeWriter(MeshWriter): active_build_plate = Application.getInstance().getMultiBuildPlateModel().activeBuildPlate scene = Application.getInstance().getController().getScene() - gcode_dict = getattr(scene, "gcode_dict") - if not gcode_dict: + if not hasattr(scene, "gcode_dict"): return False + gcode_dict = getattr(scene, "gcode_dict") gcode_list = gcode_dict.get(active_build_plate, None) if gcode_list is not None: has_settings = False From 9779c41071304a348fb7c41040ff6c7c4e90438e Mon Sep 17 00:00:00 2001 From: Aleksei S Date: Tue, 8 May 2018 10:47:59 +0200 Subject: [PATCH 37/71] Use MimeTypeDatabase to find loaded file extension and set proper project name CURA-5323 --- cura/PrintInformation.py | 33 ++++++++++++++---------------- plugins/3MFReader/ThreeMFReader.py | 10 +++++++++ plugins/GCodeReader/GCodeReader.py | 10 +++++++++ 3 files changed, 35 insertions(+), 18 deletions(-) diff --git a/cura/PrintInformation.py b/cura/PrintInformation.py index 0de57d00e0..6737ebdfb9 100644 --- a/cura/PrintInformation.py +++ b/cura/PrintInformation.py @@ -16,6 +16,7 @@ from UM.Qt.Duration import Duration from UM.Preferences import Preferences from UM.Scene.SceneNode import SceneNode from UM.i18n import i18nCatalog +from UM.MimeTypeDatabase import MimeTypeDatabase catalog = i18nCatalog("cura") @@ -322,7 +323,7 @@ class PrintInformation(QObject): # when a file is opened using the terminal; the filename comes from _onFileLoaded and still contains its # extension. This cuts the extension off if necessary. - name = os.path.splitext(name)[0] + check_name = os.path.splitext(name)[0] filename_parts = os.path.basename(base_name).split(".") # If it's a gcode, also always update the job name @@ -333,25 +334,21 @@ class PrintInformation(QObject): # if this is a profile file, always update the job name # name is "" when I first had some meshes and afterwards I deleted them so the naming should start again - is_empty = name == "" - if is_gcode or is_project_file or (is_empty or (self._base_name == "" and self._base_name != name)): + is_empty = check_name == "" + if is_gcode or is_project_file or (is_empty or (self._base_name == "" and self._base_name != check_name)): # Only take the file name part, Note : file name might have 'dot' in name as well - if is_project_file: - # This is for .curaproject, loaded as project - self._base_name = ".".join(filename_parts) - elif len(filename_parts) > 1: - if "gcode" in filename_parts: - gcode_index = filename_parts.index('gcode') - self._base_name = ".".join(filename_parts[0:gcode_index]) - elif "curaproject" in filename_parts: - #load a project and import only models - curaproject_index = filename_parts.index('curaproject') - self._base_name = ".".join(filename_parts[0:curaproject_index]) - else: - self._base_name = name - else: - self._base_name = name + data = '' + try: + mime_type = MimeTypeDatabase.getMimeTypeForFile(name) + data = mime_type.stripExtension(name) + except: + Logger.log("w", "Unsupported Mime Type Database file extension") + + if data is not None: + self._base_name = data + else: + self._base_name = '' self._updateJobName() diff --git a/plugins/3MFReader/ThreeMFReader.py b/plugins/3MFReader/ThreeMFReader.py index 6c2fb9a59d..9eec09b202 100755 --- a/plugins/3MFReader/ThreeMFReader.py +++ b/plugins/3MFReader/ThreeMFReader.py @@ -15,6 +15,7 @@ from UM.Math.Vector import Vector from UM.Mesh.MeshBuilder import MeshBuilder from UM.Mesh.MeshReader import MeshReader from UM.Scene.GroupDecorator import GroupDecorator +from UM.MimeTypeDatabase import MimeTypeDatabase, MimeType from cura.Settings.ExtruderManager import ExtruderManager from cura.Scene.CuraSceneNode import CuraSceneNode @@ -25,6 +26,15 @@ from cura.Machines.QualityManager import getMachineDefinitionIDForQualitySearch MYPY = False + +MimeTypeDatabase.addMimeType( + MimeType( + name = "application/x-cura-project-file", + comment = "Cura Project File", + suffixes = ["curaproject.3mf"] + ) +) + try: if not MYPY: import xml.etree.cElementTree as ET diff --git a/plugins/GCodeReader/GCodeReader.py b/plugins/GCodeReader/GCodeReader.py index 6f872bc6f7..80a6bea98a 100755 --- a/plugins/GCodeReader/GCodeReader.py +++ b/plugins/GCodeReader/GCodeReader.py @@ -5,10 +5,20 @@ from UM.FileHandler.FileReader import FileReader from UM.Mesh.MeshReader import MeshReader from UM.i18n import i18nCatalog from UM.Preferences import Preferences +from UM.MimeTypeDatabase import MimeTypeDatabase, MimeType catalog = i18nCatalog("cura") from . import MarlinFlavorParser, RepRapFlavorParser + +MimeTypeDatabase.addMimeType( + MimeType( + name = "application/x-cura-gcode-file", + comment = "Cura GCode File", + suffixes = ["gcode", "gcode.gz"] + ) +) + # Class for loading and parsing G-code files class GCodeReader(MeshReader): From d083426497631ea2ab1ca1276121de46cb300726 Mon Sep 17 00:00:00 2001 From: Aleksei S Date: Tue, 8 May 2018 10:59:05 +0200 Subject: [PATCH 38/71] Added MimeTypeDatabase for UFP extension CURA-5323 --- plugins/UFPWriter/__init__.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/plugins/UFPWriter/__init__.py b/plugins/UFPWriter/__init__.py index 9db6b042f8..a2ec99044f 100644 --- a/plugins/UFPWriter/__init__.py +++ b/plugins/UFPWriter/__init__.py @@ -11,6 +11,16 @@ except ImportError: from UM.i18n import i18nCatalog #To translate the file format description. from UM.Mesh.MeshWriter import MeshWriter #For the binary mode flag. +from UM.MimeTypeDatabase import MimeTypeDatabase, MimeType + + +MimeTypeDatabase.addMimeType( + MimeType( + name = "application/x-cura-stl-file", + comment = "Cura UFP File", + suffixes = ["ufp"] + ) +) i18n_catalog = i18nCatalog("cura") From 0accdc63201fbc373a2ef3f6851bbd6d3433f7a5 Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Tue, 8 May 2018 11:54:19 +0200 Subject: [PATCH 39/71] Cura-5296 Use separate packages.json files in app and user data --- cura/CuraPackageManager.py | 88 +- plugins/MachineSettingsAction/plugin.json | 2 +- .../qml/ToolboxActionButtonStyle.qml | 29 + .../resources/qml/ToolboxInstalledTile.qml | 62 +- plugins/Toolbox/src/PackagesModel.py | 17 +- plugins/UM3NetworkPrinting/plugin.json | 2 +- plugins/UltimakerMachineActions/plugin.json | 2 +- plugins/UserAgreement/plugin.json | 2 +- resources/packages.json | 1157 +++++++++++++++++ 9 files changed, 1278 insertions(+), 83 deletions(-) create mode 100644 plugins/Toolbox/resources/qml/ToolboxActionButtonStyle.qml create mode 100644 resources/packages.json diff --git a/cura/CuraPackageManager.py b/cura/CuraPackageManager.py index 941b71cfee..0e1d235555 100644 --- a/cura/CuraPackageManager.py +++ b/cura/CuraPackageManager.py @@ -15,28 +15,6 @@ from UM.Logger import Logger from UM.Resources import Resources from UM.Version import Version -BUNDLED = [ - "DagomaChromatikPLA", - "FABtotumABS", - "FABtotumNylon", - "FABtotumPLA", - "FABtotumTPU", - "FiberlogyHDPLA", - "Filo3DPLA", - "IMADE3DJellyBOXPETG", - "IMADE3DJellyBOXPLA", - "UltimakerABS", - "UltimakerCPE", - "UltimakerNylon", - "UltimakerPC", - "UltimakerPLA", - "UltimakerPVA", - "VertexDeltaABS", - "VertexDeltaPET", - "VertexDeltaPLA", - "VertexDeltaTPU" -] - class CuraPackageManager(QObject): Version = 1 @@ -51,8 +29,14 @@ class CuraPackageManager(QObject): self._plugin_registry = self._application.getPluginRegistry() # JSON file that keeps track of all installed packages. - self._package_management_file_path = os.path.join(os.path.abspath(Resources.getDataStoragePath()), - "packages.json") + self._bundled_package_management_file_path = os.path.join( + Application.getInstallPrefix(), + Application.getInstance().getApplicationName(), + "resources", + "packages.json" + ) + self._user_package_management_file_path = os.path.join(os.path.abspath(Resources.getDataStoragePath()), "packages.json") + self._bundled_package_dict = {} # A dict of all bundled packages self._installed_package_dict = {} # A dict of all installed packages @@ -68,36 +52,42 @@ class CuraPackageManager(QObject): # (for initialize) Loads the package management file if exists def _loadManagementData(self) -> None: - if not os.path.exists(self._package_management_file_path): - Logger.log("i", "Package management file %s doesn't exist, do nothing", self._package_management_file_path) + if not os.path.exists(self._bundled_package_management_file_path): + Logger.log("w", "Bundled package management file could not be found!") + return + if not os.path.exists(self._user_package_management_file_path): + Logger.log("i", "User package management file %s doesn't exist, do nothing", self._user_package_management_file_path) return # Need to use the file lock here to prevent concurrent I/O from other processes/threads container_registry = self._application.getContainerRegistry() with container_registry.lockFile(): - with open(self._package_management_file_path, "r", encoding = "utf-8") as f: - management_dict = json.load(f, encoding = "utf-8") - self._bundled_package_dict = management_dict.get("bundled", {}) + # Load the bundled packages: + with open(self._bundled_package_management_file_path, "r", encoding = "utf-8") as f: + self._bundled_package_dict = json.load(f, encoding = "utf-8") + Logger.log("i", "Loaded bundled packages data from %s", self._bundled_package_management_file_path) + + # Load the user packages: + with open(self._user_package_management_file_path, "r", encoding="utf-8") as f: + management_dict = json.load(f, encoding="utf-8") self._installed_package_dict = management_dict.get("installed", {}) self._to_remove_package_set = set(management_dict.get("to_remove", [])) self._to_install_package_dict = management_dict.get("to_install", {}) - - Logger.log("i", "Package management file %s is loaded", self._package_management_file_path) + Logger.log("i", "Loaded user packages management file from %s", self._user_package_management_file_path) def _saveManagementData(self) -> None: # Need to use the file lock here to prevent concurrent I/O from other processes/threads container_registry = self._application.getContainerRegistry() with container_registry.lockFile(): - with open(self._package_management_file_path, "w", encoding = "utf-8") as f: + with open(self._user_package_management_file_path, "w", encoding = "utf-8") as f: data_dict = {"version": CuraPackageManager.Version, - "bundled": self._bundled_package_dict, "installed": self._installed_package_dict, "to_remove": list(self._to_remove_package_set), "to_install": self._to_install_package_dict} data_dict["to_remove"] = list(data_dict["to_remove"]) json.dump(data_dict, f, sort_keys = True, indent = 4) - Logger.log("i", "Package management file %s is saved", self._package_management_file_path) + Logger.log("i", "Package management file %s was saved", self._user_package_management_file_path) # (for initialize) Removes all packages that have been scheduled to be removed. def _removeAllScheduledPackages(self) -> None: @@ -136,9 +126,13 @@ class CuraPackageManager(QObject): # Add bundled, installed, and to-install packages to the set of installed package IDs all_installed_ids = set() - all_installed_ids = all_installed_ids.union(set(self._bundled_package_dict.keys())) - all_installed_ids = all_installed_ids.union(set(self._installed_package_dict.keys())) - all_installed_ids = all_installed_ids.union(set(self._to_install_package_dict.keys())) + + if self._bundled_package_dict.keys(): + all_installed_ids = all_installed_ids.union(set(self._bundled_package_dict.keys())) + if self._installed_package_dict.keys(): + all_installed_ids = all_installed_ids.union(set(self._installed_package_dict.keys())) + if self._to_install_package_dict.keys(): + all_installed_ids = all_installed_ids.union(set(self._to_install_package_dict.keys())) all_installed_ids = all_installed_ids.difference(self._to_remove_package_set) # map of -> -> @@ -162,15 +156,23 @@ class CuraPackageManager(QObject): package_info = self._to_install_package_dict[package_id]["package_info"] # We also need to get information from the plugin registry such as if a plugin is active - package_info["is_active"] = self._plugin_registry.isActivePlugin(package_id) + if package_info["package_type"] == "plugin": + package_info["is_active"] = self._plugin_registry.isActivePlugin(package_id) + else: + package_info["is_active"] = self._plugin_registry.isActivePlugin(package_id) + + # If the package ID is in bundled, label it as such + if package_info["package_id"] in self._bundled_package_dict.keys(): + package_info["is_bundled"] = True + else: + package_info["is_bundled"] = False # If there is not a section in the dict for this type, add it - package_type = package_info["package_type"] - if package_type not in installed_packages_dict: - installed_packages_dict[package_type] = [] - + if package_info["package_type"] not in installed_packages_dict: + installed_packages_dict[package_info["package_type"]] = [] + # Finally, add the data - installed_packages_dict[package_type].append( package_info ) + installed_packages_dict[package_info["package_type"]].append( package_info ) return installed_packages_dict diff --git a/plugins/MachineSettingsAction/plugin.json b/plugins/MachineSettingsAction/plugin.json index af63e3a9c8..703a145deb 100644 --- a/plugins/MachineSettingsAction/plugin.json +++ b/plugins/MachineSettingsAction/plugin.json @@ -2,7 +2,7 @@ "name": "Machine Settings action", "author": "fieldOfView", "version": "1.0.0", - "description": "Provides a way to change machine settings (such as build volume, nozzle size, etc)", + "description": "Provides a way to change machine settings (such as build volume, nozzle size, etc.).", "api": 4, "i18n-catalog": "cura" } diff --git a/plugins/Toolbox/resources/qml/ToolboxActionButtonStyle.qml b/plugins/Toolbox/resources/qml/ToolboxActionButtonStyle.qml new file mode 100644 index 0000000000..eff74278c9 --- /dev/null +++ b/plugins/Toolbox/resources/qml/ToolboxActionButtonStyle.qml @@ -0,0 +1,29 @@ +// Copyright (c) 2018 Ultimaker B.V. +// Toolbox is released under the terms of the LGPLv3 or higher. + +import QtQuick 2.2 +import QtQuick.Controls 1.4 +import QtQuick.Controls.Styles 1.4 +import UM 1.1 as UM + +ButtonStyle +{ + background: Rectangle + { + implicitWidth: UM.Theme.getSize("toolbox_action_button").width + implicitHeight: UM.Theme.getSize("toolbox_action_button").height + color: "transparent" + border + { + width: UM.Theme.getSize("default_lining").width + color: UM.Theme.getColor("lining") + } + } + label: Label + { + text: control.text + color: UM.Theme.getColor("text") + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignHCenter + } +} \ No newline at end of file diff --git a/plugins/Toolbox/resources/qml/ToolboxInstalledTile.qml b/plugins/Toolbox/resources/qml/ToolboxInstalledTile.qml index 0ed71845f5..ad6d610e44 100644 --- a/plugins/Toolbox/resources/qml/ToolboxInstalledTile.qml +++ b/plugins/Toolbox/resources/qml/ToolboxInstalledTile.qml @@ -26,7 +26,7 @@ Item Column { id: pluginInfo - property var color: isEnabled ? UM.Theme.getColor("text") : UM.Theme.getColor("lining") + property var color: model.package_type === "plugin" && !isEnabled ? UM.Theme.getColor("lining") : UM.Theme.getColor("text") height: parent.height anchors { @@ -49,12 +49,11 @@ Item Text { text: model.description + maximumLineCount: 3 + elide: Text.ElideRight width: parent.width - height: UM.Theme.getSize("toolbox_property_label").height - clip: true wrapMode: Text.WordWrap color: pluginInfo.color - elide: Text.ElideRight } } Column @@ -104,19 +103,11 @@ Item right: parent.right topMargin: UM.Theme.getSize("default_margin").height } - Button { - id: removeButton - text: - { - if (model.is_bundled) - { - return isEnabled ? catalog.i18nc("@action:button", "Disable") : catalog.i18nc("@action:button", "Enable") - } - else - { - return catalog.i18nc("@action:button", "Uninstall") - } - } + Button + { + id: disableButton + text: isEnabled ? catalog.i18nc("@action:button", "Disable") : catalog.i18nc("@action:button", "Enable") + visible: model.type == "plugin" enabled: !toolbox.isDownloading style: ButtonStyle { @@ -139,24 +130,36 @@ Item horizontalAlignment: Text.AlignHCenter } } - onClicked: + onClicked: toolbox.isEnabled(model.id) ? toolbox.disable(model.id) : toolbox.enable(model.id) + } + Button + { + id: removeButton + text: catalog.i18nc("@action:button", "Uninstall") + visible: !model.is_bundled + enabled: !toolbox.isDownloading + style: ButtonStyle { - if (model.is_bundled) + background: Rectangle { - if (toolbox.isEnabled(model.id)) + implicitWidth: UM.Theme.getSize("toolbox_action_button").width + implicitHeight: UM.Theme.getSize("toolbox_action_button").height + color: "transparent" + border { - toolbox.disable(model.id) - } - else - { - toolbox.enable(model.id) + width: UM.Theme.getSize("default_lining").width + color: UM.Theme.getColor("lining") } } - else + label: Label { - toolbox.uninstall(model.id) + text: control.text + color: UM.Theme.getColor("text") + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignHCenter } } + onClicked: toolbox.uninstall(model.id) } Button { @@ -180,10 +183,7 @@ Item font: UM.Theme.getFont("default_bold") } } - onClicked: - { - toolbox.update(model.id); - } + onClicked: toolbox.update(model.id) } ProgressBar { diff --git a/plugins/Toolbox/src/PackagesModel.py b/plugins/Toolbox/src/PackagesModel.py index d1905e1742..5ec3eba1d8 100644 --- a/plugins/Toolbox/src/PackagesModel.py +++ b/plugins/Toolbox/src/PackagesModel.py @@ -28,8 +28,9 @@ class PackagesModel(ListModel): self.addRoleName(Qt.UserRole + 11, "download_url") self.addRoleName(Qt.UserRole + 12, "last_updated") self.addRoleName(Qt.UserRole + 13, "is_bundled") - self.addRoleName(Qt.UserRole + 14, "has_configs") - self.addRoleName(Qt.UserRole + 15, "supported_configs") + self.addRoleName(Qt.UserRole + 14, "is_enabled") + self.addRoleName(Qt.UserRole + 15, "has_configs") + self.addRoleName(Qt.UserRole + 16, "supported_configs") # List of filters for queries. The result is the union of the each list of results. self._filter = {} # type: Dict[str, str] @@ -52,20 +53,26 @@ class PackagesModel(ListModel): configs_model = ConfigsModel() configs_model.setConfigs(package["data"]["supported_configs"]) + if "author_id" not in package["author"] or "display_name" not in package["author"]: + package["author"]["author_id"] = "" + package["author"]["display_name"] = "" + # raise Exception("Detected a package with malformed author data.") + items.append({ "id": package["package_id"], "type": package["package_type"], "name": package["display_name"], "version": package["package_version"], - "author_id": package["author"]["author_id"] if "author_id" in package["author"] else package["author"]["name"], - "author_name": package["author"]["display_name"] if "display_name" in package["author"] else package["author"]["name"], + "author_id": package["author"]["author_id"], + "author_name": package["author"]["display_name"], "author_email": package["author"]["email"] if "email" in package["author"] else None, - "description": package["description"], + "description": package["description"] if "description" in package else None, "icon_url": package["icon_url"] if "icon_url" in package else None, "image_urls": package["image_urls"] if "image_urls" in package else None, "download_url": package["download_url"] if "download_url" in package else None, "last_updated": package["last_updated"] if "last_updated" in package else None, "is_bundled": package["is_bundled"] if "is_bundled" in package else False, + "is_enabled": package["is_enabled"] if "is_enabled" in package else False, "has_configs": has_configs, "supported_configs": configs_model }) diff --git a/plugins/UM3NetworkPrinting/plugin.json b/plugins/UM3NetworkPrinting/plugin.json index 5a845a0516..e7b59fadd6 100644 --- a/plugins/UM3NetworkPrinting/plugin.json +++ b/plugins/UM3NetworkPrinting/plugin.json @@ -1,7 +1,7 @@ { "name": "UM3 Network Connection", "author": "Ultimaker B.V.", - "description": "Manages network connections to Ultimaker 3 printers", + "description": "Manages network connections to Ultimaker 3 printers.", "version": "1.0.0", "api": 4, "i18n-catalog": "cura" diff --git a/plugins/UltimakerMachineActions/plugin.json b/plugins/UltimakerMachineActions/plugin.json index c9bb1a89e4..57b3e6bc8f 100644 --- a/plugins/UltimakerMachineActions/plugin.json +++ b/plugins/UltimakerMachineActions/plugin.json @@ -2,7 +2,7 @@ "name": "Ultimaker machine actions", "author": "Ultimaker B.V.", "version": "1.0.0", - "description": "Provides machine actions for Ultimaker machines (such as bed leveling wizard, selecting upgrades, etc)", + "description": "Provides machine actions for Ultimaker machines (such as bed leveling wizard, selecting upgrades, etc.).", "api": 4, "i18n-catalog": "cura" } diff --git a/plugins/UserAgreement/plugin.json b/plugins/UserAgreement/plugin.json index aa5dbb1258..b10abc5640 100644 --- a/plugins/UserAgreement/plugin.json +++ b/plugins/UserAgreement/plugin.json @@ -2,7 +2,7 @@ "name": "UserAgreement", "author": "Ultimaker B.V.", "version": "1.0.0", - "description": "Ask the user once if he/she agrees with our license", + "description": "Ask the user once if he/she agrees with our license.", "api": 4, "i18n-catalog": "cura" } diff --git a/resources/packages.json b/resources/packages.json new file mode 100644 index 0000000000..0b03bdd0d7 --- /dev/null +++ b/resources/packages.json @@ -0,0 +1,1157 @@ +{ + "3MFReader": { + "package_info": { + "package_id": "3MFReader", + "package_type": "plugin", + "display_name": "3MF Reader", + "description": "Provides support for reading 3MF files.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://ultimaker.com", + "author": { + "author_id": "Ultimaker", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "3MFWriter": { + "package_info": { + "package_id": "3MFWriter", + "package_type": "plugin", + "display_name": "3MF Writer", + "description": "Provides support for writing 3MF files.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://ultimaker.com", + "author": { + "author_id": "Ultimaker", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "AutoSave": { + "package_info": { + "package_id": "AutoSave", + "package_type": "plugin", + "display_name": "Auto-Save", + "description": "Automatically saves Preferences, Machines and Profiles after changes.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://ultimaker.com", + "author": { + "author_id": "Ultimaker", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "ChangeLogPlugin": { + "package_info": { + "package_id": "ChangeLogPlugin", + "package_type": "plugin", + "display_name": "Change Log", + "description": "Shows changes since latest checked version.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://ultimaker.com", + "author": { + "author_id": "Ultimaker", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "CuraEngineBackend": { + "package_info": { + "package_id": "CuraEngineBackend", + "package_type": "plugin", + "display_name": "CuraEngine Backend", + "description": "Provides the link to the CuraEngine slicing backend.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://ultimaker.com", + "author": { + "author_id": "Ultimaker", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "CuraProfileReader": { + "package_info": { + "package_id": "CuraProfileReader", + "package_type": "plugin", + "display_name": "Cura Profile Reader", + "description": "Provides support for importing Cura profiles.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://ultimaker.com", + "author": { + "author_id": "Ultimaker", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "CuraProfileWriter": { + "package_info": { + "package_id": "CuraProfileWriter", + "package_type": "plugin", + "display_name": "Cura Profile Writer", + "description": "Provides support for exporting Cura profiles.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://ultimaker.com", + "author": { + "author_id": "Ultimaker", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "FirmwareUpdateChecker": { + "package_info": { + "package_id": "FirmwareUpdateChecker", + "package_type": "plugin", + "display_name": "Firmware Update Checker", + "description": "Checks for firmware updates.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://ultimaker.com", + "author": { + "author_id": "Ultimaker", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "GCodeGzReader": { + "package_info": { + "package_id": "GCodeGzReader", + "package_type": "plugin", + "display_name": "Compressed G-code Reader", + "description": "Reads g-code from a compressed archive.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://ultimaker.com", + "author": { + "author_id": "Ultimaker", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "GCodeGzWriter": { + "package_info": { + "package_id": "GCodeGzWriter", + "package_type": "plugin", + "display_name": "Compressed G-code Writer", + "description": "Writes g-code to a compressed archive.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://ultimaker.com", + "author": { + "author_id": "Ultimaker", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "GCodeProfileReader": { + "package_info": { + "package_id": "GCodeProfileReader", + "package_type": "plugin", + "display_name": "G-Code Profile Reader", + "description": "Provides support for importing profiles from g-code files.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://ultimaker.com", + "author": { + "author_id": "Ultimaker", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "GCodeReader": { + "package_info": { + "package_id": "GCodeReader", + "package_type": "plugin", + "display_name": "G-Code Reader", + "description": "Allows loading and displaying G-code files.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://ultimaker.com", + "author": { + "author_id": "VictorLarchenko", + "display_name": "Victor Larchenko", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "GCodeWriter": { + "package_info": { + "package_id": "GCodeWriter", + "package_type": "plugin", + "display_name": "G-Code Writer", + "description": "Writes g-code to a file.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://ultimaker.com", + "author": { + "author_id": "Ultimaker", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "ImageReader": { + "package_info": { + "package_id": "ImageReader", + "package_type": "plugin", + "display_name": "Image Reader", + "description": "Enables ability to generate printable geometry from 2D image files.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://ultimaker.com", + "author": { + "author_id": "Ultimaker", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "LegacyProfileReader": { + "package_info": { + "package_id": "LegacyProfileReader", + "package_type": "plugin", + "display_name": "Legacy Cura Profile Reader", + "description": "Provides support for importing profiles from legacy Cura versions.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://ultimaker.com", + "author": { + "author_id": "Ultimaker", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "MachineSettingsAction": { + "package_info": { + "package_id": "MachineSettingsAction", + "package_type": "plugin", + "display_name": "Machine Settings Action", + "description": "Provides a way to change machine settings (such as build volume, nozzle size, etc.).", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://ultimaker.com", + "author": { + "author_id": "fieldOfView", + "display_name": "fieldOfView", + "email": null, + "website": "https://ultimaker.com" + } + } + }, + "ModelChecker": { + "package_info": { + "package_id": "ModelChecker", + "package_type": "plugin", + "display_name": "Model Checker", + "description": "Checks models and print configuration for possible printing issues and give suggestions.", + "package_version": "0.1.0", + "cura_version": 4, + "website": "https://ultimaker.com", + "author": { + "author_id": "Ultimaker", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "MonitorStage": { + "package_info": { + "package_id": "MonitorStage", + "package_type": "plugin", + "display_name": "Monitor Stage", + "description": "Provides a monitor stage in Cura.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://ultimaker.com", + "author": { + "author_id": "Ultimaker", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "PerObjectSettingsTool": { + "package_info": { + "package_id": "PerObjectSettingsTool", + "package_type": "plugin", + "display_name": "Per-Object Settings Tool", + "description": "Provides the per-model settings.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://ultimaker.com", + "author": { + "author_id": "Ultimaker", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "PostProcessingPlugin": { + "package_info": { + "package_id": "PostProcessingPlugin", + "package_type": "plugin", + "display_name": "Post Processing", + "description": "Extension that allows for user created scripts for post processing.", + "package_version": "2.2.0", + "cura_version": 4, + "website": "https://ultimaker.com", + "author": { + "author_id": "Ultimaker", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "PrepareStage": { + "package_info": { + "package_id": "PrepareStage", + "package_type": "plugin", + "display_name": "Prepare Stage", + "description": "Provides a prepare stage in Cura.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://ultimaker.com", + "author": { + "author_id": "Ultimaker", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "RemovableDriveOutputDevice": { + "package_info": { + "package_id": "RemovableDriveOutputDevice", + "package_type": "plugin", + "display_name": "Removable Drive Output Device", + "description": "Provides removable drive hotplugging and writing support.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://ultimaker.com", + "author": { + "author_id": "Ultimaker", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "SimulationView": { + "package_info": { + "package_id": "SimulationView", + "package_type": "plugin", + "display_name": "Simulation View", + "description": "Provides the Simulation view.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://ultimaker.com", + "author": { + "author_id": "Ultimaker", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "SliceInfoPlugin": { + "package_info": { + "package_id": "SliceInfoPlugin", + "package_type": "plugin", + "display_name": "Slice Info", + "description": "Submits anonymous slice info. Can be disabled through preferences.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://ultimaker.com", + "author": { + "author_id": "Ultimaker", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "SolidView": { + "package_info": { + "package_id": "SolidView", + "package_type": "plugin", + "display_name": "Solid View", + "description": "Provides a normal solid mesh view.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://ultimaker.com", + "author": { + "author_id": "Ultimaker", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "SupportEraser": { + "package_info": { + "package_id": "SupportEraser", + "package_type": "plugin", + "display_name": "Support Eraser Tool", + "description": "Creates an eraser mesh to block the printing of support in certain places.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://ultimaker.com", + "author": { + "author_id": "Ultimaker", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "Toolbox": { + "package_info": { + "package_id": "Toolbox", + "package_type": "plugin", + "display_name": "Toolbox", + "description": "Find, manage and install new Cura packages.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://ultimaker.com", + "author": { + "author_id": "Ultimaker", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "UFPWriter": { + "package_info": { + "package_id": "UFPWriter", + "package_type": "plugin", + "display_name": "UFP Writer", + "description": "Provides support for writing Ultimaker Format Packages.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://ultimaker.com", + "author": { + "author_id": "Ultimaker", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "UltimakerMachineActions": { + "package_info": { + "package_id": "UltimakerMachineActions", + "package_type": "plugin", + "display_name": "Ultimaker Machine Actions", + "description": "Provides machine actions for Ultimaker machines (such as bed leveling wizard, selecting upgrades, etc.).", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://ultimaker.com", + "author": { + "author_id": "Ultimaker", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "UM3NetworkPrinting": { + "package_info": { + "package_id": "UM3NetworkPrinting", + "package_type": "plugin", + "display_name": "UM3 Network Printing", + "description": "Manages network connections to Ultimaker 3 printers.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://ultimaker.com", + "author": { + "author_id": "Ultimaker", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "USBPrinting": { + "package_info": { + "package_id": "USBPrinting", + "package_type": "plugin", + "display_name": "USB Printing", + "description": "Accepts G-Code and sends them to a printer. Plugin can also update firmware.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://ultimaker.com", + "author": { + "author_id": "Ultimaker", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "UserAgreement": { + "package_info": { + "package_id": "UserAgreement", + "package_type": "plugin", + "display_name": "User Agreement", + "description": "Ask the user once if he/she agrees with our license.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://ultimaker.com", + "author": { + "author_id": "Ultimaker", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "VersionUpgrade21to22": { + "package_info": { + "package_id": "VersionUpgrade", + "package_type": "plugin", + "display_name": "Version Upgrade 2.1 to 2.2", + "description": "Upgrades configurations from Cura 2.1 to Cura 2.2.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://ultimaker.com", + "author": { + "author_id": "Ultimaker", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "VersionUpgrade22to24": { + "package_info": { + "package_id": "VersionUpgrade", + "package_type": "plugin", + "display_name": "Version Upgrade 2.2 to 2.4", + "description": "Upgrades configurations from Cura 2.2 to Cura 2.4.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://ultimaker.com", + "author": { + "author_id": "Ultimaker", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "VersionUpgrade25to26": { + "package_info": { + "package_id": "VersionUpgrade", + "package_type": "plugin", + "display_name": "Version Upgrade 2.5 to 2.6", + "description": "Upgrades configurations from Cura 2.5 to Cura 2.6.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://ultimaker.com", + "author": { + "author_id": "Ultimaker", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "VersionUpgrade26to27": { + "package_info": { + "package_id": "VersionUpgrade", + "package_type": "plugin", + "display_name": "Version Upgrade 2.6 to 2.7", + "description": "Upgrades configurations from Cura 2.6 to Cura 2.7.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://ultimaker.com", + "author": { + "author_id": "Ultimaker", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "VersionUpgrade27to30": { + "package_info": { + "package_id": "VersionUpgrade", + "package_type": "plugin", + "display_name": "Version Upgrade 2.7 to 3.0", + "description": "Upgrades configurations from Cura 2.7 to Cura 3.0.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://ultimaker.com", + "author": { + "author_id": "Ultimaker", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "VersionUpgrade30to31": { + "package_info": { + "package_id": "VersionUpgrade", + "package_type": "plugin", + "display_name": "Version Upgrade 3.0 to 3.1", + "description": "Upgrades configurations from Cura 3.0 to Cura 3.1.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://ultimaker.com", + "author": { + "author_id": "Ultimaker", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "VersionUpgrade32to33": { + "package_info": { + "package_id": "VersionUpgrade", + "package_type": "plugin", + "display_name": "Version Upgrade 3.2 to 3.3", + "description": "Upgrades configurations from Cura 3.2 to Cura 3.3.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://ultimaker.com", + "author": { + "author_id": "Ultimaker", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "VersionUpgrade33to34": { + "package_info": { + "package_id": "VersionUpgrade", + "package_type": "plugin", + "display_name": "Version Upgrade 3.3 to 3.4", + "description": "Upgrades configurations from Cura 3.3 to Cura 3.4.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://ultimaker.com", + "author": { + "author_id": "Ultimaker", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "X3DReader": { + "package_info": { + "package_id": "X3DReader", + "package_type": "plugin", + "display_name": "X3D Reader", + "description": "Provides support for reading X3D files.", + "package_version": "0.5.0", + "cura_version": 4, + "website": "https://ultimaker.com", + "author": { + "author_id": "SevaAlekseyev", + "display_name": "Seva Alekseyev", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "XmlMaterialProfile": { + "package_info": { + "package_id": "XMLMaterialProfile", + "package_type": "plugin", + "display_name": "XML Material Profiles", + "description": "Provides capabilities to read and write XML-based material profiles.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://ultimaker.com", + "author": { + "author_id": "Ultimaker", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "XRayView": { + "package_info": { + "package_id": "XRayView", + "package_type": "plugin", + "display_name": "X-Ray View", + "description": "Provides the X-Ray view.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://ultimaker.com", + "author": { + "author_id": "Ultimaker", + "display_name": "Ultimaker B.V.", + "email": "plugins@ultimaker.com", + "website": "https://ultimaker.com" + } + } + }, + "DagomaChromatikPLA": { + "filename": "/Users/i.paschal/Library/Application Support/cura/3.2/cache/cura_packages/DagomaChromatikPLA.curapackage", + "package_info": { + "package_id": "DagomaChromatikPLA", + "package_type": "material", + "display_name": "Dagoma Chromatik PLA", + "description": "Filament testé et approuvé pour les imprimantes 3D Dagoma. Chromatik est l'idéal pour débuter et suivre les tutoriels premiers pas. Il vous offre qualité et résistance pour chacune de vos impressions.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://dagoma.fr/boutique/filaments.html", + "author": { + "author_id": "Dagoma", + "display_name": "Dagoma", + "email": null, + "website": "https://dagoma.fr" + } + } + }, + "FABtotumABS": { + "filename": "/Users/i.paschal/Library/Application Support/cura/3.2/cache/cura_packages/FABtotumABS.curapackage", + "package_info": { + "package_id": "FABtotumABS", + "package_type": "material", + "display_name": "FABtotum ABS", + "description": "This material is easy to be extruded but it is not the simplest to use. It is one of the most used in 3D printing to get very well finished objects. It is not sustainable and its smoke can be dangerous if inhaled. The reason to prefer this filament to PLA is mainly because of its precision and mechanical specs. ABS (for plastic) stands for Acrylonitrile Butadiene Styrene and it is a thermoplastic which is widely used in everyday objects. It can be printed with any FFF 3D printer which can get to high temperatures as it must be extruded in a range between 220° and 245°, so it’s compatible with all versions of the FABtotum Personal fabricator.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://store.fabtotum.com/eu/products/filaments.html?filament_type=40", + "author": { + "author_id": "FABtotum", + "display_name": "FABtotum S.R.L.", + "email": "info@fabtotum.com", + "website": "https://www.fabtotum.com" + } + } + }, + "FABtotumNylon": { + "filename": "/Users/i.paschal/Library/Application Support/cura/3.2/cache/cura_packages/FABtotumNylon.curapackage", + "package_info": { + "package_id": "FABtotumNylon", + "package_type": "material", + "display_name": "FABtotum Nylon", + "description": "When 3D printing started this material was not listed among the extrudable filaments. It is flexible as well as resistant to tractions. It is well known for its uses in textile but also in industries which require a strong and flexible material. There are different kinds of Nylon: 3D printing mostly uses Nylon 6 and Nylon 6.6, which are the most common. It requires higher temperatures to be printed, so a 3D printer must be able to reach them (around 240°C): the FABtotum, of course, can.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://store.fabtotum.com/eu/products/filaments.html?filament_type=53", + "author": { + "author_id": "FABtotum", + "display_name": "FABtotum S.R.L.", + "email": "info@fabtotum.com", + "website": "https://www.fabtotum.com" + } + } + }, + "FABtotumPLA": { + "filename": "/Users/i.paschal/Library/Application Support/cura/3.2/cache/cura_packages/FABtotumPLA.curapackage", + "package_info": { + "package_id": "FABtotumPLA", + "package_type": "material", + "display_name": "FABtotum PLA", + "description": "It is the most common filament used for 3D printing. It is studied to be bio-degradable as it comes from corn starch’s sugar mainly. It is completely made of renewable sources and has no footprint on polluting. PLA stands for PolyLactic Acid and it is a thermoplastic that today is still considered the easiest material to be 3D printed. It can be extruded at lower temperatures: the standard range of FABtotum’s one is between 185° and 195°.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://store.fabtotum.com/eu/products/filaments.html?filament_type=39", + "author": { + "author_id": "FABtotum", + "display_name": "FABtotum S.R.L.", + "email": "info@fabtotum.com", + "website": "https://www.fabtotum.com" + } + } + }, + "FABtotumTPU": { + "filename": "/Users/i.paschal/Library/Application Support/cura/3.2/cache/cura_packages/FABtotumTPU.curapackage", + "package_info": { + "package_id": "FABtotumTPU", + "package_type": "material", + "display_name": "FABtotum TPU Shore 98A", + "description": "", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://store.fabtotum.com/eu/products/filaments.html?filament_type=66", + "author": { + "author_id": "FABtotum", + "display_name": "FABtotum S.R.L.", + "email": "info@fabtotum.com", + "website": "https://www.fabtotum.com" + } + } + }, + "FiberlogyHDPLA": { + "filename": "/Users/i.paschal/Library/Application Support/cura/3.2/cache/cura_packages/FiberlogyHDPLA.curapackage", + "package_info": { + "package_id": "FiberlogyHDPLA", + "package_type": "material", + "display_name": "Fiberlogy HD PLA", + "description": "With our HD PLA you have many more options. You can use this material in two ways. Choose the one you like best. You can use it as a normal PLA and get prints characterized by a very good adhesion between the layers and high precision. You can also make your prints acquire similar properties to that of ABS – better impact resistance and high temperature resistance. All you need is an oven. Yes, an oven! By annealing our HD PLA in an oven, in accordance with the manual, you will avoid all the inconveniences of printing with ABS, such as unpleasant odour or hazardous fumes.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "http://fiberlogy.com/en/fiberlogy-filaments/filament-hd-pla/", + "author": { + "author_id": "Fiberlogy", + "diplay_name": "Fiberlogy S.A.", + "email": "grzegorz.h@fiberlogy.com", + "website": "http://fiberlogy.com" + } + } + }, + "Filo3DPLA": { + "filename": "/Users/i.paschal/Library/Application Support/cura/3.2/cache/cura_packages/Filo3DPLA.curapackage", + "package_info": { + "package_id": "Filo3DPLA", + "package_type": "material", + "display_name": "Filo3D PLA", + "description": "Fast, safe and reliable printing. PLA is ideal for the fast and reliable printing of parts and prototypes with a great surface quality.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://dagoma.fr", + "author": { + "author_id": "Dagoma", + "display_name": "Dagoma", + "email": null, + "website": "https://dagoma.fr" + } + } + }, + "IMADE3DJellyBOXPETG": { + "filename": "/Users/i.paschal/Library/Application Support/cura/3.2/cache/cura_packages/IMADE3DJellyBOXPETG.curapackage", + "package_info": { + "package_id": "IMADE3DJellyBOXPETG", + "package_type": "material", + "display_name": "IMADE3D JellyBOX PETG", + "description": "", + "package_version": "1.0.0", + "cura_version": 4, + "website": "http://shop.imade3d.com/filament.html", + "author": { + "author_id": "IMADE3D", + "display_name": "IMADE3D", + "email": "info@imade3d.com", + "website": "https://www.imade3d.com" + } + } + }, + "IMADE3DJellyBOXPLA": { + "filename": "/Users/i.paschal/Library/Application Support/cura/3.2/cache/cura_packages/IMADE3DJellyBOXPLA.curapackage", + "package_info": { + "package_id": "IMADE3DJellyBOXPLA", + "package_type": "material", + "display_name": "IMADE3D JellyBOX PLA", + "description": "", + "package_version": "1.0.0", + "cura_version": 4, + "website": "http://shop.imade3d.com/filament.html", + "author": { + "author_id": "IMADE3D", + "display_name": "IMADE3D", + "email": "info@imade3d.com", + "website": "https://www.imade3d.com" + } + } + }, + "OctofiberPLA": { + "filename": "/Users/i.paschal/Library/Application Support/cura/3.2/cache/cura_packages/OctoFiberPLA.curapackage", + "package_info": { + "package_id": "OctofiberPLA", + "package_type": "material", + "display_name": "Octofiber PLA", + "description": "PLA material from Octofiber.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://nl.octofiber.com/3d-printing-filament/pla.html", + "author": { + "author_id": "Octofiber", + "display_name": "Octofiber", + "email": "info@octofiber.com", + "website": "https://nl.octofiber.com" + } + } + }, + "PolyFlexPLA": { + "filename": "/Users/i.paschal/Library/Application Support/cura/3.2/cache/cura_packages/PolyFlexPLA.curapackage", + "package_info": { + "package_id": "PolyFlexPLA", + "package_type": "material", + "display_name": "PolyFlex™ PLA", + "description": "PolyFlex™ is a highly flexible yet easy to print 3D printing material. Featuring good elasticity and a large strain-to- failure, PolyFlex™ opens up a completely new realm of applications.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "http://www.polymaker.com/shop/polyflex/", + "author": { + "author_id": "Polymaker", + "display_name": "Polymaker L.L.C.", + "email": "inquiry@polymaker.com", + "website": "https://www.polymaker.com" + } + } + }, + "PolyMaxPLA": { + "filename": "/Users/i.paschal/Library/Application Support/cura/3.2/cache/cura_packages/PolyMaxPLA.curapackage", + "package_info": { + "package_id": "PolyMaxPLA", + "package_type": "material", + "display_name": "PolyMax™ PLA", + "description": "PolyMax™ PLA is a 3D printing material with excellent mechanical properties and printing quality. PolyMax™ PLA has an impact resistance of up to nine times that of regular PLA, and better overall mechanical properties than ABS.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "http://www.polymaker.com/shop/polymax/", + "author": { + "author_id": "Polymaker", + "display_name": "Polymaker L.L.C.", + "email": "inquiry@polymaker.com", + "website": "https://www.polymaker.com" + } + } + }, + "PolyPlusPLA": { + "filename": "/Users/i.paschal/Library/Application Support/cura/3.2/cache/cura_packages/PolyPlusPLA.curapackage", + "package_info": { + "package_id": "PolyPlusPLA", + "package_type": "material", + "display_name": "PolyPlus™ PLA True Colour", + "description": "PolyPlus™ PLA is a premium PLA designed for all desktop FDM/FFF 3D printers. It is produced with our patented Jam-Free™ technology that ensures consistent extrusion and prevents jams.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "http://www.polymaker.com/shop/polyplus-true-colour/", + "author": { + "author_id": "Polymaker", + "display_name": "Polymaker L.L.C.", + "email": "inquiry@polymaker.com", + "website": "https://www.polymaker.com" + } + } + }, + "PolyWoodPLA": { + "filename": "/Users/i.paschal/Library/Application Support/cura/3.2/cache/cura_packages/PolyWoodPLA.curapackage", + "package_info": { + "package_id": "PolyWoodPLA", + "package_type": "material", + "display_name": "PolyWood™ PLA", + "description": "PolyWood™ is a wood mimic printing material that contains no actual wood ensuring a clean Jam-Free™ printing experience.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "http://www.polymaker.com/shop/polywood/", + "author": { + "author_id": "Polymaker", + "display_name": "Polymaker L.L.C.", + "email": "inquiry@polymaker.com", + "website": "https://www.polymaker.com" + } + } + }, + "UltimakerABS": { + "filename": "/Users/i.paschal/Library/Application Support/cura/3.2/cache/cura_packages/UltimakerABS.curapackage", + "package_info": { + "package_id": "UltimakerABS", + "package_type": "material", + "display_name": "Ultimaker ABS", + "description": "Example package for material and quality profiles for Ultimaker materials.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://ultimaker.com/products/materials/abs", + "author": { + "author_id": "Ultimaker", + "display_name": "Ultimaker B.V.", + "email": "materials@ultimaker.com", + "website": "https://ultimaker.com", + "description": "Professional 3D printing made accessible.", + "support_website": "https://ultimaker.com/en/resources/troubleshooting/materials" + } + } + }, + "UltimakerCPE": { + "filename": "/Users/i.paschal/Library/Application Support/cura/3.2/cache/cura_packages/UltimakerCPE.curapackage", + "package_info": { + "package_id": "UltimakerCPE", + "package_type": "material", + "display_name": "Ultimaker CPE", + "description": "Example package for material and quality profiles for Ultimaker materials.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://ultimaker.com/products/materials/abs", + "author": { + "author_id": "Ultimaker", + "display_name": "Ultimaker B.V.", + "email": "materials@ultimaker.com", + "website": "https://ultimaker.com", + "description": "Professional 3D printing made accessible.", + "support_website": "https://ultimaker.com/en/resources/troubleshooting/materials" + } + } + }, + "UltimakerNylon": { + "filename": "/Users/i.paschal/Library/Application Support/cura/3.2/cache/cura_packages/UltimakerNylon.curapackage", + "package_info": { + "package_id": "UltimakerNylon", + "package_type": "material", + "display_name": "Ultimaker Nylon", + "description": "Example package for material and quality profiles for Ultimaker materials.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://ultimaker.com/products/materials/abs", + "author": { + "author_id": "Ultimaker", + "display_name": "Ultimaker B.V.", + "email": "materials@ultimaker.com", + "website": "https://ultimaker.com", + "description": "Professional 3D printing made accessible.", + "support_website": "https://ultimaker.com/en/resources/troubleshooting/materials" + } + } + }, + "UltimakerPLA": { + "filename": "/Users/i.paschal/Library/Application Support/cura/3.2/cache/cura_packages/UltimakerPLA.curapackage", + "package_info": { + "package_id": "UltimakerPLA", + "package_type": "material", + "display_name": "Ultimaker PLA", + "description": "Example package for material and quality profiles for Ultimaker materials.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://ultimaker.com/products/materials/abs", + "author": { + "author_id": "Ultimaker", + "display_name": "Ultimaker B.V.", + "email": "materials@ultimaker.com", + "website": "https://ultimaker.com", + "description": "Professional 3D printing made accessible.", + "support_website": "https://ultimaker.com/en/resources/troubleshooting/materials" + } + } + }, + "UltimakerPVA": { + "filename": "/Users/i.paschal/Library/Application Support/cura/3.2/cache/cura_packages/UltimakerPVA.curapackage", + "package_info": { + "package_id": "UltimakerPVA", + "package_type": "material", + "display_name": "Ultimaker PVA", + "description": "Example package for material and quality profiles for Ultimaker materials.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://ultimaker.com/products/materials/abs", + "author": { + "author_id": "Ultimaker", + "display_name": "Ultimaker B.V.", + "email": "materials@ultimaker.com", + "website": "https://ultimaker.com", + "description": "Professional 3D printing made accessible.", + "support_website": "https://ultimaker.com/en/resources/troubleshooting/materials" + } + } + }, + "VertexDeltaABS": { + "filename": "/Users/i.paschal/Library/Application Support/cura/3.2/cache/cura_packages/VertexDeltaABS.curapackage", + "package_info": { + "package_id": "VertexDeltaABS", + "package_type": "material", + "display_name": "Vertex Delta ABS", + "description": "ABS material and quality files for the Delta Vertex K8800.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://vertex3dprinter.eu", + "author": { + "author_id": "Velleman", + "display_name": "Velleman N.V.", + "email": "info@velleman.eu", + "website": "https://www.vellemanprojects.eu" + } + } + }, + "VertexDeltaPET": { + "filename": "/Users/i.paschal/Library/Application Support/cura/3.2/cache/cura_packages/VertexDeltaPET.curapackage", + "package_info": { + "package_id": "VertexDeltaPET", + "package_type": "material", + "display_name": "Vertex Delta PET", + "description": "ABS material and quality files for the Delta Vertex K8800.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://vertex3dprinter.eu", + "author": { + "author_id": "Velleman", + "display_name": "Velleman N.V.", + "email": "info@velleman.eu", + "website": "https://www.vellemanprojects.eu" + } + } + }, + "VertexDeltaPLA": { + "filename": "/Users/i.paschal/Library/Application Support/cura/3.2/cache/cura_packages/VertexDeltaPLA.curapackage", + "package_info": { + "package_id": "VertexDeltaPLA", + "package_type": "material", + "display_name": "Vertex Delta PLA", + "description": "ABS material and quality files for the Delta Vertex K8800.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://vertex3dprinter.eu", + "author": { + "author_id": "Velleman", + "display_name": "Velleman N.V.", + "email": "info@velleman.eu", + "website": "https://www.vellemanprojects.eu" + } + } + }, + "VertexDeltaTPU": { + "filename": "/Users/i.paschal/Library/Application Support/cura/3.2/cache/cura_packages/VertexDeltaTPU.curapackage", + "package_info": { + "package_id": "VertexDeltaTPU", + "package_type": "material", + "display_name": "Vertex Delta TPU", + "description": "ABS material and quality files for the Delta Vertex K8800.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://vertex3dprinter.eu", + "author": { + "author_id": "Velleman", + "display_name": "Velleman N.V.", + "email": "info@velleman.eu", + "website": "https://www.vellemanprojects.eu" + } + } + } +} \ No newline at end of file From 4b931326fd42c2f1c3c622a4447a338b5a187ee5 Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Tue, 8 May 2018 15:04:19 +0200 Subject: [PATCH 40/71] CURA-5296 Set packages version with super secret method --- plugins/Toolbox/src/Toolbox.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/Toolbox/src/Toolbox.py b/plugins/Toolbox/src/Toolbox.py index 0451494d14..1b2d0f5cfc 100644 --- a/plugins/Toolbox/src/Toolbox.py +++ b/plugins/Toolbox/src/Toolbox.py @@ -18,6 +18,7 @@ from UM.Extension import Extension from UM.i18n import i18nCatalog from UM.Version import Version +import cura.CuraVersion from cura.CuraApplication import CuraApplication from .AuthorsModel import AuthorsModel from .PackagesModel import PackagesModel @@ -34,7 +35,7 @@ class Toolbox(QObject, Extension): self._application = Application.getInstance() self._package_manager = None self._plugin_registry = Application.getInstance().getPluginRegistry() - self._packages_version = self._plugin_registry.APIVersion + self._packages_version = cura.CuraVersion.CuraPackagesVersion if hasattr(cura.CuraVersion, "CuraPackagesVersion") else self._plugin_registry.APIVersion # type:ignore self._api_version = 1 self._api_url = "https://api-staging.ultimaker.com/cura-packages/v{api_version}/cura/v{package_version}".format( api_version = self._api_version, package_version = self._packages_version) From 0561c66e4720ba3f06ce07da2f461a181be66ba4 Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Tue, 8 May 2018 15:38:18 +0200 Subject: [PATCH 41/71] CURA-5096 Remove unused leftovers --- resources/packages.json | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/resources/packages.json b/resources/packages.json index 0b03bdd0d7..fb5da42fa7 100644 --- a/resources/packages.json +++ b/resources/packages.json @@ -731,7 +731,6 @@ } }, "DagomaChromatikPLA": { - "filename": "/Users/i.paschal/Library/Application Support/cura/3.2/cache/cura_packages/DagomaChromatikPLA.curapackage", "package_info": { "package_id": "DagomaChromatikPLA", "package_type": "material", @@ -749,7 +748,6 @@ } }, "FABtotumABS": { - "filename": "/Users/i.paschal/Library/Application Support/cura/3.2/cache/cura_packages/FABtotumABS.curapackage", "package_info": { "package_id": "FABtotumABS", "package_type": "material", @@ -767,7 +765,6 @@ } }, "FABtotumNylon": { - "filename": "/Users/i.paschal/Library/Application Support/cura/3.2/cache/cura_packages/FABtotumNylon.curapackage", "package_info": { "package_id": "FABtotumNylon", "package_type": "material", @@ -785,7 +782,6 @@ } }, "FABtotumPLA": { - "filename": "/Users/i.paschal/Library/Application Support/cura/3.2/cache/cura_packages/FABtotumPLA.curapackage", "package_info": { "package_id": "FABtotumPLA", "package_type": "material", @@ -803,7 +799,6 @@ } }, "FABtotumTPU": { - "filename": "/Users/i.paschal/Library/Application Support/cura/3.2/cache/cura_packages/FABtotumTPU.curapackage", "package_info": { "package_id": "FABtotumTPU", "package_type": "material", @@ -821,7 +816,6 @@ } }, "FiberlogyHDPLA": { - "filename": "/Users/i.paschal/Library/Application Support/cura/3.2/cache/cura_packages/FiberlogyHDPLA.curapackage", "package_info": { "package_id": "FiberlogyHDPLA", "package_type": "material", @@ -839,7 +833,6 @@ } }, "Filo3DPLA": { - "filename": "/Users/i.paschal/Library/Application Support/cura/3.2/cache/cura_packages/Filo3DPLA.curapackage", "package_info": { "package_id": "Filo3DPLA", "package_type": "material", @@ -857,7 +850,6 @@ } }, "IMADE3DJellyBOXPETG": { - "filename": "/Users/i.paschal/Library/Application Support/cura/3.2/cache/cura_packages/IMADE3DJellyBOXPETG.curapackage", "package_info": { "package_id": "IMADE3DJellyBOXPETG", "package_type": "material", @@ -875,7 +867,6 @@ } }, "IMADE3DJellyBOXPLA": { - "filename": "/Users/i.paschal/Library/Application Support/cura/3.2/cache/cura_packages/IMADE3DJellyBOXPLA.curapackage", "package_info": { "package_id": "IMADE3DJellyBOXPLA", "package_type": "material", @@ -893,7 +884,6 @@ } }, "OctofiberPLA": { - "filename": "/Users/i.paschal/Library/Application Support/cura/3.2/cache/cura_packages/OctoFiberPLA.curapackage", "package_info": { "package_id": "OctofiberPLA", "package_type": "material", @@ -911,7 +901,6 @@ } }, "PolyFlexPLA": { - "filename": "/Users/i.paschal/Library/Application Support/cura/3.2/cache/cura_packages/PolyFlexPLA.curapackage", "package_info": { "package_id": "PolyFlexPLA", "package_type": "material", @@ -929,7 +918,6 @@ } }, "PolyMaxPLA": { - "filename": "/Users/i.paschal/Library/Application Support/cura/3.2/cache/cura_packages/PolyMaxPLA.curapackage", "package_info": { "package_id": "PolyMaxPLA", "package_type": "material", @@ -947,7 +935,6 @@ } }, "PolyPlusPLA": { - "filename": "/Users/i.paschal/Library/Application Support/cura/3.2/cache/cura_packages/PolyPlusPLA.curapackage", "package_info": { "package_id": "PolyPlusPLA", "package_type": "material", @@ -965,7 +952,6 @@ } }, "PolyWoodPLA": { - "filename": "/Users/i.paschal/Library/Application Support/cura/3.2/cache/cura_packages/PolyWoodPLA.curapackage", "package_info": { "package_id": "PolyWoodPLA", "package_type": "material", @@ -983,7 +969,6 @@ } }, "UltimakerABS": { - "filename": "/Users/i.paschal/Library/Application Support/cura/3.2/cache/cura_packages/UltimakerABS.curapackage", "package_info": { "package_id": "UltimakerABS", "package_type": "material", @@ -1003,7 +988,6 @@ } }, "UltimakerCPE": { - "filename": "/Users/i.paschal/Library/Application Support/cura/3.2/cache/cura_packages/UltimakerCPE.curapackage", "package_info": { "package_id": "UltimakerCPE", "package_type": "material", @@ -1023,7 +1007,6 @@ } }, "UltimakerNylon": { - "filename": "/Users/i.paschal/Library/Application Support/cura/3.2/cache/cura_packages/UltimakerNylon.curapackage", "package_info": { "package_id": "UltimakerNylon", "package_type": "material", @@ -1043,7 +1026,6 @@ } }, "UltimakerPLA": { - "filename": "/Users/i.paschal/Library/Application Support/cura/3.2/cache/cura_packages/UltimakerPLA.curapackage", "package_info": { "package_id": "UltimakerPLA", "package_type": "material", @@ -1063,7 +1045,6 @@ } }, "UltimakerPVA": { - "filename": "/Users/i.paschal/Library/Application Support/cura/3.2/cache/cura_packages/UltimakerPVA.curapackage", "package_info": { "package_id": "UltimakerPVA", "package_type": "material", @@ -1083,7 +1064,6 @@ } }, "VertexDeltaABS": { - "filename": "/Users/i.paschal/Library/Application Support/cura/3.2/cache/cura_packages/VertexDeltaABS.curapackage", "package_info": { "package_id": "VertexDeltaABS", "package_type": "material", @@ -1101,7 +1081,6 @@ } }, "VertexDeltaPET": { - "filename": "/Users/i.paschal/Library/Application Support/cura/3.2/cache/cura_packages/VertexDeltaPET.curapackage", "package_info": { "package_id": "VertexDeltaPET", "package_type": "material", @@ -1119,7 +1098,6 @@ } }, "VertexDeltaPLA": { - "filename": "/Users/i.paschal/Library/Application Support/cura/3.2/cache/cura_packages/VertexDeltaPLA.curapackage", "package_info": { "package_id": "VertexDeltaPLA", "package_type": "material", @@ -1137,7 +1115,6 @@ } }, "VertexDeltaTPU": { - "filename": "/Users/i.paschal/Library/Application Support/cura/3.2/cache/cura_packages/VertexDeltaTPU.curapackage", "package_info": { "package_id": "VertexDeltaTPU", "package_type": "material", From db15b1c2a1ac11d798d3b8641ee4642bbc7e5dfe Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Tue, 8 May 2018 16:28:28 +0200 Subject: [PATCH 42/71] CURA-5296 Fix packages.json path --- cura/CuraPackageManager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cura/CuraPackageManager.py b/cura/CuraPackageManager.py index 0e1d235555..b3a1451e6b 100644 --- a/cura/CuraPackageManager.py +++ b/cura/CuraPackageManager.py @@ -30,8 +30,8 @@ class CuraPackageManager(QObject): # JSON file that keeps track of all installed packages. self._bundled_package_management_file_path = os.path.join( - Application.getInstallPrefix(), - Application.getInstance().getApplicationName(), + os.path.dirname(os.path.abspath(__file__)), + "..", "resources", "packages.json" ) From d6ad8ed09e89fd7d7f49f096004b700ad6fe1b6b Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Tue, 8 May 2018 16:52:09 +0200 Subject: [PATCH 43/71] CURA-5296 Move installed plugins to "installed" dict --- cura/CuraPackageManager.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cura/CuraPackageManager.py b/cura/CuraPackageManager.py index b3a1451e6b..0a59dac677 100644 --- a/cura/CuraPackageManager.py +++ b/cura/CuraPackageManager.py @@ -35,8 +35,10 @@ class CuraPackageManager(QObject): "resources", "packages.json" ) - self._user_package_management_file_path = os.path.join(os.path.abspath(Resources.getDataStoragePath()), "packages.json") - + self._user_package_management_file_path = os.path.join( + os.path.abspath(Resources.getDataStoragePath()), + "packages.json" + ) self._bundled_package_dict = {} # A dict of all bundled packages self._installed_package_dict = {} # A dict of all installed packages @@ -100,6 +102,8 @@ class CuraPackageManager(QObject): def _installAllScheduledPackages(self) -> None: for package_id, installation_package_data in self._to_install_package_dict.items(): self._installPackage(installation_package_data) + self._installed_package_dict[package_id] = self._to_install_package_dict[package_id] + self._saveManagementData() self._to_install_package_dict.clear() self._saveManagementData() From 4a78825f554b01984decf42a4d18996686df3823 Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Tue, 8 May 2018 17:03:09 +0200 Subject: [PATCH 44/71] CURA-5296 Delete package info individually --- cura/CuraPackageManager.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cura/CuraPackageManager.py b/cura/CuraPackageManager.py index 0a59dac677..d93631b63a 100644 --- a/cura/CuraPackageManager.py +++ b/cura/CuraPackageManager.py @@ -100,12 +100,13 @@ class CuraPackageManager(QObject): # (for initialize) Installs all packages that have been scheduled to be installed. def _installAllScheduledPackages(self) -> None: - for package_id, installation_package_data in self._to_install_package_dict.items(): - self._installPackage(installation_package_data) + + while self._to_install_package_dict: + package_id, package_info = list(self._to_install_package_dict.items())[0] + self._installPackage(package_info) self._installed_package_dict[package_id] = self._to_install_package_dict[package_id] + del self._to_install_package_dict[package_id] self._saveManagementData() - self._to_install_package_dict.clear() - self._saveManagementData() # Checks the given package is installed. If so, return a dictionary that contains the package's information. def getInstalledPackageInfo(self, package_id: str) -> Optional[dict]: From 45fc8480a1e04d691c53c3fa286e0a9c220fc529 Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Wed, 9 May 2018 13:18:02 +0200 Subject: [PATCH 45/71] CURA-5296 fix first startup not loading bundled packages --- cura/CuraPackageManager.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/cura/CuraPackageManager.py b/cura/CuraPackageManager.py index d93631b63a..e3e187ad50 100644 --- a/cura/CuraPackageManager.py +++ b/cura/CuraPackageManager.py @@ -54,9 +54,16 @@ class CuraPackageManager(QObject): # (for initialize) Loads the package management file if exists def _loadManagementData(self) -> None: + # The bundles package management file should always be there if not os.path.exists(self._bundled_package_management_file_path): Logger.log("w", "Bundled package management file could not be found!") return + # Load the bundled packages: + with open(self._bundled_package_management_file_path, "r", encoding = "utf-8") as f: + self._bundled_package_dict = json.load(f, encoding = "utf-8") + Logger.log("i", "Loaded bundled packages data from %s", self._bundled_package_management_file_path) + + # Load the user package management file if not os.path.exists(self._user_package_management_file_path): Logger.log("i", "User package management file %s doesn't exist, do nothing", self._user_package_management_file_path) return @@ -65,11 +72,6 @@ class CuraPackageManager(QObject): container_registry = self._application.getContainerRegistry() with container_registry.lockFile(): - # Load the bundled packages: - with open(self._bundled_package_management_file_path, "r", encoding = "utf-8") as f: - self._bundled_package_dict = json.load(f, encoding = "utf-8") - Logger.log("i", "Loaded bundled packages data from %s", self._bundled_package_management_file_path) - # Load the user packages: with open(self._user_package_management_file_path, "r", encoding="utf-8") as f: management_dict = json.load(f, encoding="utf-8") From af06096e080d7fae92b66d20b8d8f8b98ac8bd52 Mon Sep 17 00:00:00 2001 From: Ruben D Date: Wed, 9 May 2018 11:13:53 +0200 Subject: [PATCH 46/71] Add typing As per code style. Contributes to issue CURA-5330. --- plugins/GCodeReader/FlavorParser.py | 48 ++++++++++++++++------------- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/plugins/GCodeReader/FlavorParser.py b/plugins/GCodeReader/FlavorParser.py index 2679cc23a4..91f68db743 100644 --- a/plugins/GCodeReader/FlavorParser.py +++ b/plugins/GCodeReader/FlavorParser.py @@ -1,4 +1,4 @@ -# Copyright (c) 2017 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. from UM.Application import Application @@ -23,12 +23,16 @@ from cura.Settings.ExtruderManager import ExtruderManager import numpy import math import re +from typing import Dict, List, NamedTuple, Optional, Union from collections import namedtuple -# This parser is intented for interpret the common firmware codes among all the different flavors +Position = NamedTuple("Position", [("x", float), ("y", float), ("z", float), ("f", float), ("e", List[float])]) + +## This parser is intended to interpret the common firmware codes among all the +# different flavors class FlavorParser: - def __init__(self): + def __init__(self) -> None: Application.getInstance().hideMessageSignal.connect(self._onHideMessage) self._cancelled = False self._message = None @@ -45,7 +49,7 @@ class FlavorParser: Preferences.getInstance().addPreference("gcodereader/show_caution", True) - def _clearValues(self): + def _clearValues(self) -> None: self._extruder_number = 0 self._extrusion_length_offset = [0] self._layer_type = LayerPolygon.Inset0Type @@ -57,7 +61,7 @@ class FlavorParser: self._is_absolute_extrusion = True # It can become absolute (M82, default) or relative (M83) @staticmethod - def _getValue(line, code): + def _getValue(line: str, code: str) -> Optional[Union[str, int, float]]: n = line.find(code) if n < 0: return None @@ -72,29 +76,29 @@ class FlavorParser: except: return None - def _getInt(self, line, code): + def _getInt(self, line: str, code: str) -> Optional[int]: value = self._getValue(line, code) try: return int(value) except: return None - def _getFloat(self, line, code): + def _getFloat(self, line: str, code: str) -> Optional[float]: value = self._getValue(line, code) try: return float(value) except: return None - def _onHideMessage(self, message): + def _onHideMessage(self, message: str) -> None: if message == self._message: self._cancelled = True @staticmethod - def _getNullBoundingBox(): + def _getNullBoundingBox() -> AxisAlignedBox: return AxisAlignedBox(minimum=Vector(0, 0, 0), maximum=Vector(10, 10, 10)) - def _createPolygon(self, layer_thickness, path, extruder_offsets): + def _createPolygon(self, layer_thickness: float, path: List[Position], extruder_offsets: List[float]) -> bool: countvalid = 0 for point in path: if point[5] > 0: @@ -140,12 +144,12 @@ class FlavorParser: this_layer.polygons.append(this_poly) return True - def _createEmptyLayer(self, layer_number): + def _createEmptyLayer(self, layer_number: int) -> None: self._layer_data_builder.addLayer(layer_number) self._layer_data_builder.setLayerHeight(layer_number, 0) self._layer_data_builder.setLayerThickness(layer_number, 0) - def _calculateLineWidth(self, current_point, previous_point, current_extrusion, previous_extrusion, layer_thickness): + def _calculateLineWidth(self, current_point: Position, previous_point: Position, current_extrusion: float, previous_extrusion: float, layer_thickness: float) -> float: # Area of the filament Af = (self._filament_diameter / 2) ** 2 * numpy.pi # Length of the extruded filament @@ -167,7 +171,7 @@ class FlavorParser: return 0.35 return line_width - def _gCode0(self, position, params, path): + def _gCode0(self, position: Position, params: Position, path: List[Position]) -> Position: x, y, z, f, e = position if self._is_absolute_positioning: @@ -203,7 +207,7 @@ class FlavorParser: _gCode1 = _gCode0 ## Home the head. - def _gCode28(self, position, params, path): + def _gCode28(self, position: Position, params: Position, path: List[Position]) -> Position: return self._position( params.x if params.x is not None else position.x, params.y if params.y is not None else position.y, @@ -212,20 +216,20 @@ class FlavorParser: position.e) ## Set the absolute positioning - def _gCode90(self, position, params, path): + def _gCode90(self, position: Position, params: Position, path: List[Position]) -> Position: self._is_absolute_positioning = True self._is_absolute_extrusion = True return position ## Set the relative positioning - def _gCode91(self, position, params, path): + def _gCode91(self, position: Position, params: Position, path: List[Position]) -> Position: self._is_absolute_positioning = False self._is_absolute_extrusion = False return position ## Reset the current position to the values specified. # For example: G92 X10 will set the X to 10 without any physical motion. - def _gCode92(self, position, params, path): + def _gCode92(self, position: Position, params: Position, path: List[Position]) -> Position: if params.e is not None: # Sometimes a G92 E0 is introduced in the middle of the GCode so we need to keep those offsets for calculate the line_width self._extrusion_length_offset[self._extruder_number] += position.e[self._extruder_number] - params.e @@ -237,7 +241,7 @@ class FlavorParser: params.f if params.f is not None else position.f, position.e) - def processGCode(self, G, line, position, path): + def processGCode(self, G: int, line: str, position: Position, path: List[Position]) -> Position: func = getattr(self, "_gCode%s" % G, None) line = line.split(";", 1)[0] # Remove comments (if any) if func is not None: @@ -264,21 +268,21 @@ class FlavorParser: return func(position, params, path) return position - def processTCode(self, T, line, position, path): + def processTCode(self, T: int, line: str, position: Position, path: List[Position]) -> Position: self._extruder_number = T if self._extruder_number + 1 > len(position.e): self._extrusion_length_offset.extend([0] * (self._extruder_number - len(position.e) + 1)) position.e.extend([0] * (self._extruder_number - len(position.e) + 1)) return position - def processMCode(self, M, line, position, path): + def processMCode(self, M: int, line: str, position: Position, path: List[Position]) -> Position: pass _type_keyword = ";TYPE:" _layer_keyword = ";LAYER:" ## For showing correct x, y offsets for each extruder - def _extruderOffsets(self): + def _extruderOffsets(self) -> Dict[int, float]: result = {} for extruder in ExtruderManager.getInstance().getExtruderStacks(): result[int(extruder.getMetaData().get("position", "0"))] = [ @@ -286,7 +290,7 @@ class FlavorParser: extruder.getProperty("machine_nozzle_offset_y", "value")] return result - def processGCodeStream(self, stream): + def processGCodeStream(self, stream: str) -> Optional[CuraSceneNode]: Logger.log("d", "Preparing to load GCode") self._cancelled = False # We obtain the filament diameter from the selected extruder to calculate line widths From fb2a8c8d57ae60f235acbd97d19aec66f4379367 Mon Sep 17 00:00:00 2001 From: Ruben D Date: Wed, 9 May 2018 11:29:45 +0200 Subject: [PATCH 47/71] Fix typing of paths There is still something up with the E values. Most probably an actual bug. We'll investigate. Contributes to issue CURA-5330. --- plugins/GCodeReader/FlavorParser.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/plugins/GCodeReader/FlavorParser.py b/plugins/GCodeReader/FlavorParser.py index 91f68db743..a0b112bc5e 100644 --- a/plugins/GCodeReader/FlavorParser.py +++ b/plugins/GCodeReader/FlavorParser.py @@ -26,7 +26,7 @@ import re from typing import Dict, List, NamedTuple, Optional, Union from collections import namedtuple -Position = NamedTuple("Position", [("x", float), ("y", float), ("z", float), ("f", float), ("e", List[float])]) +Position = NamedTuple("Position", [("x", float), ("y", float), ("z", float), ("f", float), ("e", float)]) ## This parser is intended to interpret the common firmware codes among all the # different flavors @@ -98,7 +98,7 @@ class FlavorParser: def _getNullBoundingBox() -> AxisAlignedBox: return AxisAlignedBox(minimum=Vector(0, 0, 0), maximum=Vector(10, 10, 10)) - def _createPolygon(self, layer_thickness: float, path: List[Position], extruder_offsets: List[float]) -> bool: + def _createPolygon(self, layer_thickness: float, path: List[List[Union[float, int]]], extruder_offsets: List[float]) -> bool: countvalid = 0 for point in path: if point[5] > 0: @@ -171,7 +171,7 @@ class FlavorParser: return 0.35 return line_width - def _gCode0(self, position: Position, params: Position, path: List[Position]) -> Position: + def _gCode0(self, position: Position, params: Position, path: List[List[Union[float, int]]]) -> Position: x, y, z, f, e = position if self._is_absolute_positioning: @@ -207,7 +207,7 @@ class FlavorParser: _gCode1 = _gCode0 ## Home the head. - def _gCode28(self, position: Position, params: Position, path: List[Position]) -> Position: + def _gCode28(self, position: Position, params: Position, path: List[List[Union[float, int]]]) -> Position: return self._position( params.x if params.x is not None else position.x, params.y if params.y is not None else position.y, @@ -216,20 +216,20 @@ class FlavorParser: position.e) ## Set the absolute positioning - def _gCode90(self, position: Position, params: Position, path: List[Position]) -> Position: + def _gCode90(self, position: Position, params: Position, path: List[List[Union[float, int]]]) -> Position: self._is_absolute_positioning = True self._is_absolute_extrusion = True return position ## Set the relative positioning - def _gCode91(self, position: Position, params: Position, path: List[Position]) -> Position: + def _gCode91(self, position: Position, params: Position, path: List[List[Union[float, int]]]) -> Position: self._is_absolute_positioning = False self._is_absolute_extrusion = False return position ## Reset the current position to the values specified. # For example: G92 X10 will set the X to 10 without any physical motion. - def _gCode92(self, position: Position, params: Position, path: List[Position]) -> Position: + def _gCode92(self, position: Position, params: Position, path: List[List[Union[float, int]]]) -> Position: if params.e is not None: # Sometimes a G92 E0 is introduced in the middle of the GCode so we need to keep those offsets for calculate the line_width self._extrusion_length_offset[self._extruder_number] += position.e[self._extruder_number] - params.e @@ -241,7 +241,7 @@ class FlavorParser: params.f if params.f is not None else position.f, position.e) - def processGCode(self, G: int, line: str, position: Position, path: List[Position]) -> Position: + def processGCode(self, G: int, line: str, position: Position, path: List[List[Union[float, int]]]) -> Position: func = getattr(self, "_gCode%s" % G, None) line = line.split(";", 1)[0] # Remove comments (if any) if func is not None: @@ -268,7 +268,7 @@ class FlavorParser: return func(position, params, path) return position - def processTCode(self, T: int, line: str, position: Position, path: List[Position]) -> Position: + def processTCode(self, T: int, line: str, position: Position, path: List[List[Union[float, int]]]) -> Position: self._extruder_number = T if self._extruder_number + 1 > len(position.e): self._extrusion_length_offset.extend([0] * (self._extruder_number - len(position.e) + 1)) @@ -282,7 +282,7 @@ class FlavorParser: _layer_keyword = ";LAYER:" ## For showing correct x, y offsets for each extruder - def _extruderOffsets(self) -> Dict[int, float]: + def _extruderOffsets(self) -> Dict[int, List[float]]: result = {} for extruder in ExtruderManager.getInstance().getExtruderStacks(): result[int(extruder.getMetaData().get("position", "0"))] = [ From 6772dc9ea79736085773398c1c8917c8bc50d252 Mon Sep 17 00:00:00 2001 From: Ruben D Date: Wed, 9 May 2018 13:25:15 +0200 Subject: [PATCH 48/71] Show g-code in position it would print Rather than trying to retrieve from the g-code what the position was that it was originally sliced. It was trying to find whether it was sliced for a printer with center_is_zero by seeing if there are any negative coordinates in the g-code, which was faulty. Now we don't even try to do that any more. We just find where the print would end up if it were printed with the currently selected printer. Contributes to issue CURA-5068 and fixes #3634. --- plugins/GCodeReader/FlavorParser.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/plugins/GCodeReader/FlavorParser.py b/plugins/GCodeReader/FlavorParser.py index a0b112bc5e..9a043f4961 100644 --- a/plugins/GCodeReader/FlavorParser.py +++ b/plugins/GCodeReader/FlavorParser.py @@ -56,7 +56,6 @@ class FlavorParser: self._layer_number = 0 self._previous_z = 0 self._layer_data_builder = LayerDataBuilder.LayerDataBuilder() - self._center_is_zero = False self._is_absolute_positioning = True # It can be absolute (G90) or relative (G91) self._is_absolute_extrusion = True # It can become absolute (M82, default) or relative (M83) @@ -262,8 +261,6 @@ class FlavorParser: f = float(item[1:]) / 60 if item[0] == "E": e = float(item[1:]) - if self._is_absolute_positioning and ((x is not None and x < 0) or (y is not None and y < 0)): - self._center_is_zero = True params = self._position(x, y, z, f, e) return func(position, params, path) return position @@ -275,7 +272,7 @@ class FlavorParser: position.e.extend([0] * (self._extruder_number - len(position.e) + 1)) return position - def processMCode(self, M: int, line: str, position: Position, path: List[Position]) -> Position: + def processMCode(self, M: int, line: str, position: Position, path: List[List[Union[float, int]]]) -> Position: pass _type_keyword = ";TYPE:" @@ -458,10 +455,9 @@ class FlavorParser: Logger.log("w", "File doesn't contain any valid layers") settings = Application.getInstance().getGlobalContainerStack() - machine_width = settings.getProperty("machine_width", "value") - machine_depth = settings.getProperty("machine_depth", "value") - - if not self._center_is_zero: + if not settings.getProperty("machine_center_is_zero", "value"): + machine_width = settings.getProperty("machine_width", "value") + machine_depth = settings.getProperty("machine_depth", "value") scene_node.setPosition(Vector(-machine_width / 2, 0, machine_depth / 2)) Logger.log("d", "GCode loading finished") From b17685d07519ef858900e358b3026bebed2acdf1 Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Wed, 9 May 2018 13:59:45 +0200 Subject: [PATCH 49/71] CURA-5296 fix model property mismatch --- plugins/Toolbox/resources/qml/ToolboxInstalledTile.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/Toolbox/resources/qml/ToolboxInstalledTile.qml b/plugins/Toolbox/resources/qml/ToolboxInstalledTile.qml index ad6d610e44..dd089debca 100644 --- a/plugins/Toolbox/resources/qml/ToolboxInstalledTile.qml +++ b/plugins/Toolbox/resources/qml/ToolboxInstalledTile.qml @@ -26,7 +26,7 @@ Item Column { id: pluginInfo - property var color: model.package_type === "plugin" && !isEnabled ? UM.Theme.getColor("lining") : UM.Theme.getColor("text") + property var color: model.type === "plugin" && !isEnabled ? UM.Theme.getColor("lining") : UM.Theme.getColor("text") height: parent.height anchors { From cf61059449c1c0b317ffa93f776ff2b1a035a470 Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Wed, 9 May 2018 14:19:30 +0200 Subject: [PATCH 50/71] CURA-5296 added version upgrades to required plugins --- cura/CuraApplication.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index d490b1cfbf..0bbfcf6b97 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -287,7 +287,17 @@ class CuraApplication(QtApplication): "RotateTool", "ScaleTool", "SelectionTool", - "TranslateTool" + "TranslateTool", + + # Version upgrades: + "VersionUpgrade21to22", + "VersionUpgrade22to24", + "VersionUpgrade25to26", + "VersionUpgrade26to27", + "VersionUpgrade27to30", + "VersionUpgrade30to31", + "VersionUpgrade32to33", + "VersionUpgrade33to34", ]) self._physics = None self._volume = None From 6b44ec8e4a297e517deea6d360a53d3e948eb043 Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Wed, 9 May 2018 14:24:10 +0200 Subject: [PATCH 51/71] CURA-5296 undo add version upgrade to required plugins --- cura/CuraApplication.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 0bbfcf6b97..c8adfbc93b 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -288,16 +288,6 @@ class CuraApplication(QtApplication): "ScaleTool", "SelectionTool", "TranslateTool", - - # Version upgrades: - "VersionUpgrade21to22", - "VersionUpgrade22to24", - "VersionUpgrade25to26", - "VersionUpgrade26to27", - "VersionUpgrade27to30", - "VersionUpgrade30to31", - "VersionUpgrade32to33", - "VersionUpgrade33to34", ]) self._physics = None self._volume = None From dff36da895c203c1f9cbbdc384c1fecbd1840f1a Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Wed, 9 May 2018 14:33:43 +0200 Subject: [PATCH 52/71] CURA-5296 set correct package_id for version upgrades in packages.json --- resources/packages.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/resources/packages.json b/resources/packages.json index fb5da42fa7..c299102498 100644 --- a/resources/packages.json +++ b/resources/packages.json @@ -545,7 +545,7 @@ }, "VersionUpgrade21to22": { "package_info": { - "package_id": "VersionUpgrade", + "package_id": "VersionUpgrade21to22", "package_type": "plugin", "display_name": "Version Upgrade 2.1 to 2.2", "description": "Upgrades configurations from Cura 2.1 to Cura 2.2.", @@ -562,7 +562,7 @@ }, "VersionUpgrade22to24": { "package_info": { - "package_id": "VersionUpgrade", + "package_id": "VersionUpgrade22to24", "package_type": "plugin", "display_name": "Version Upgrade 2.2 to 2.4", "description": "Upgrades configurations from Cura 2.2 to Cura 2.4.", @@ -579,7 +579,7 @@ }, "VersionUpgrade25to26": { "package_info": { - "package_id": "VersionUpgrade", + "package_id": "VersionUpgrade25to26", "package_type": "plugin", "display_name": "Version Upgrade 2.5 to 2.6", "description": "Upgrades configurations from Cura 2.5 to Cura 2.6.", @@ -596,7 +596,7 @@ }, "VersionUpgrade26to27": { "package_info": { - "package_id": "VersionUpgrade", + "package_id": "VersionUpgrade26to27", "package_type": "plugin", "display_name": "Version Upgrade 2.6 to 2.7", "description": "Upgrades configurations from Cura 2.6 to Cura 2.7.", @@ -613,7 +613,7 @@ }, "VersionUpgrade27to30": { "package_info": { - "package_id": "VersionUpgrade", + "package_id": "VersionUpgrade27to30", "package_type": "plugin", "display_name": "Version Upgrade 2.7 to 3.0", "description": "Upgrades configurations from Cura 2.7 to Cura 3.0.", @@ -630,7 +630,7 @@ }, "VersionUpgrade30to31": { "package_info": { - "package_id": "VersionUpgrade", + "package_id": "VersionUpgrade30to31", "package_type": "plugin", "display_name": "Version Upgrade 3.0 to 3.1", "description": "Upgrades configurations from Cura 3.0 to Cura 3.1.", @@ -647,7 +647,7 @@ }, "VersionUpgrade32to33": { "package_info": { - "package_id": "VersionUpgrade", + "package_id": "VersionUpgrade32to33", "package_type": "plugin", "display_name": "Version Upgrade 3.2 to 3.3", "description": "Upgrades configurations from Cura 3.2 to Cura 3.3.", @@ -664,7 +664,7 @@ }, "VersionUpgrade33to34": { "package_info": { - "package_id": "VersionUpgrade", + "package_id": "VersionUpgrade33to34", "package_type": "plugin", "display_name": "Version Upgrade 3.3 to 3.4", "description": "Upgrades configurations from Cura 3.3 to Cura 3.4.", @@ -1131,4 +1131,4 @@ } } } -} \ No newline at end of file +} From 20a2ea4f2c8635da5392f68592ca21284b0abdfe Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Wed, 9 May 2018 17:09:21 +0200 Subject: [PATCH 53/71] CURA-5296 Don't crash if no CuraVersion --- plugins/Toolbox/src/Toolbox.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/plugins/Toolbox/src/Toolbox.py b/plugins/Toolbox/src/Toolbox.py index 1b2d0f5cfc..2a168fc963 100644 --- a/plugins/Toolbox/src/Toolbox.py +++ b/plugins/Toolbox/src/Toolbox.py @@ -18,7 +18,7 @@ from UM.Extension import Extension from UM.i18n import i18nCatalog from UM.Version import Version -import cura.CuraVersion +import cura from cura.CuraApplication import CuraApplication from .AuthorsModel import AuthorsModel from .PackagesModel import PackagesModel @@ -35,7 +35,15 @@ class Toolbox(QObject, Extension): self._application = Application.getInstance() self._package_manager = None self._plugin_registry = Application.getInstance().getPluginRegistry() - self._packages_version = cura.CuraVersion.CuraPackagesVersion if hasattr(cura.CuraVersion, "CuraPackagesVersion") else self._plugin_registry.APIVersion # type:ignore + + if hasattr(cura, "CuraVersion"): + if hasattr(cura.CuraVersion, "CuraPackagesVersion"): + self._packages_version = cura.CuraVersion.CuraPackagesVersion + else: + self._packages_version = self._plugin_registry.APIVersion + else: + self._packages_version = self._plugin_registry.APIVersion + self._api_version = 1 self._api_url = "https://api-staging.ultimaker.com/cura-packages/v{api_version}/cura/v{package_version}".format( api_version = self._api_version, package_version = self._packages_version) From 3dda3f04fbb2d1fd39116c92faf235a6ea6fd3d9 Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Thu, 10 May 2018 08:42:14 +0200 Subject: [PATCH 54/71] CURA-5296 Improvement to using CuraVersion --- plugins/Toolbox/src/Toolbox.py | 40 ++++++++++++++++------------------ 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/plugins/Toolbox/src/Toolbox.py b/plugins/Toolbox/src/Toolbox.py index 2a168fc963..492439f860 100644 --- a/plugins/Toolbox/src/Toolbox.py +++ b/plugins/Toolbox/src/Toolbox.py @@ -26,7 +26,6 @@ from .ConfigsModel import ConfigsModel i18n_catalog = i18nCatalog("cura") - ## The Toolbox class is responsible of communicating with the server through the API class Toolbox(QObject, Extension): def __init__(self, parent=None) -> None: @@ -35,15 +34,7 @@ class Toolbox(QObject, Extension): self._application = Application.getInstance() self._package_manager = None self._plugin_registry = Application.getInstance().getPluginRegistry() - - if hasattr(cura, "CuraVersion"): - if hasattr(cura.CuraVersion, "CuraPackagesVersion"): - self._packages_version = cura.CuraVersion.CuraPackagesVersion - else: - self._packages_version = self._plugin_registry.APIVersion - else: - self._packages_version = self._plugin_registry.APIVersion - + self._packages_version = self._getPackagesVersion() self._api_version = 1 self._api_url = "https://api-staging.ultimaker.com/cura-packages/v{api_version}/cura/v{package_version}".format( api_version = self._api_version, package_version = self._packages_version) @@ -75,22 +66,22 @@ class Toolbox(QObject, Extension): # Data: self._metadata = { - "authors": [], - "packages": [], - "plugins_showcase": [], - "plugins_installed": [], - "materials_showcase": [], + "authors": [], + "packages": [], + "plugins_showcase": [], + "plugins_installed": [], + "materials_showcase": [], "materials_installed": [] } # Models: self._models = { - "authors": AuthorsModel(self), - "packages": PackagesModel(self), - "plugins_showcase": PackagesModel(self), - "plugins_available": PackagesModel(self), - "plugins_installed": PackagesModel(self), - "materials_showcase": AuthorsModel(self), + "authors": AuthorsModel(self), + "packages": PackagesModel(self), + "plugins_showcase": PackagesModel(self), + "plugins_available": PackagesModel(self), + "plugins_installed": PackagesModel(self), + "materials_showcase": AuthorsModel(self), "materials_available": PackagesModel(self), "materials_installed": PackagesModel(self) } @@ -163,6 +154,13 @@ class Toolbox(QObject, Extension): def _onAppInitialized(self) -> None: self._package_manager = Application.getInstance().getCuraPackageManager() + def _getPackagesVersion(self) -> int: + if not hasattr(cura, "CuraVersion"): + return self._plugin_registry.APIVersion + if not hasattr(cura.CuraVersion, "CuraPackagesVersion"): + return self._plugin_registry.APIVersion + return cura.CuraVersion.CuraPackagesVersion + @pyqtSlot() def browsePackages(self) -> None: # Create the network manager: From 6f402c9ea91af060d1299a4b5369e78ddb6a57bd Mon Sep 17 00:00:00 2001 From: ChrisTerBeke Date: Fri, 11 May 2018 09:00:24 +0200 Subject: [PATCH 55/71] Fix pre-installed Ultimaker PC material --- resources/packages.json | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/resources/packages.json b/resources/packages.json index c299102498..8d58f226b0 100644 --- a/resources/packages.json +++ b/resources/packages.json @@ -1025,6 +1025,25 @@ } } }, + "UltimakerPC": { + "package_info": { + "package_id": "UltimakerPC", + "package_type": "material", + "display_name": "Ultimaker PC", + "description": "Example package for material and quality profiles for Ultimaker materials.", + "package_version": "1.0.0", + "cura_version": 4, + "website": "https://ultimaker.com/products/materials/pc", + "author": { + "author_id": "Ultimaker", + "display_name": "Ultimaker B.V.", + "email": "materials@ultimaker.com", + "website": "https://ultimaker.com", + "description": "Professional 3D printing made accessible.", + "support_website": "https://ultimaker.com/en/resources/troubleshooting/materials" + } + } + }, "UltimakerPLA": { "package_info": { "package_id": "UltimakerPLA", From 8e3e5f50b4d3d7fb5263fe1a90ca66f3ae7e8943 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 11 May 2018 09:32:52 +0200 Subject: [PATCH 56/71] Improve translation of short time format It wasn't short enough. Fixes #3692. --- resources/i18n/de_DE/cura.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/i18n/de_DE/cura.po b/resources/i18n/de_DE/cura.po index 2c44fd7da5..046c5a30d6 100644 --- a/resources/i18n/de_DE/cura.po +++ b/resources/i18n/de_DE/cura.po @@ -3558,7 +3558,7 @@ msgstr "Druckeinrichtung deaktiviert\nG-Code-Dateien können nicht geändert wer #: /home/ruben/Projects/Cura/resources/qml/Sidebar.qml:380 msgctxt "@label Hours and minutes" msgid "00h 00min" -msgstr "00 Stunden 00 Minuten" +msgstr "00 St. 00 M." #: /home/ruben/Projects/Cura/resources/qml/Sidebar.qml:398 msgctxt "@tooltip" @@ -5493,7 +5493,7 @@ msgstr "Cura-Profil-Reader" #~ msgctxt "@label" #~ msgid "00h 00min" -#~ msgstr "00 Stunden 00 Minuten" +#~ msgstr "00 St. 00 M." #~ msgctxt "@tooltip" #~ msgid "Time information" @@ -5517,7 +5517,7 @@ msgstr "Cura-Profil-Reader" #~ msgctxt "@label" #~ msgid "Check material compatibility" -#~ msgstr "Materialkompatibilität prüfen" #~ msgctxt "name" #~ msgid "UM3 Network Connection (Cluster)" From 7d725936efd63cbb8f06330f2b88083ad9294771 Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Fri, 11 May 2018 11:43:34 +0200 Subject: [PATCH 57/71] Clean up the package manager a bit: - Remove an unused method. - Safely check if the plugin info exist --- cura/CuraPackageManager.py | 37 +++++++------------------------------ 1 file changed, 7 insertions(+), 30 deletions(-) diff --git a/cura/CuraPackageManager.py b/cura/CuraPackageManager.py index e3e187ad50..6b8391832d 100644 --- a/cura/CuraPackageManager.py +++ b/cura/CuraPackageManager.py @@ -130,7 +130,6 @@ class CuraPackageManager(QObject): return None def getAllInstalledPackagesInfo(self) -> dict: - # Add bundled, installed, and to-install packages to the set of installed package IDs all_installed_ids = set() @@ -150,6 +149,7 @@ class CuraPackageManager(QObject): if package_id in Application.getInstance().getRequiredPlugins(): continue + package_info = None # Add bundled plugins if package_id in self._bundled_package_dict: package_info = self._bundled_package_dict[package_id]["package_info"] @@ -162,47 +162,24 @@ class CuraPackageManager(QObject): if package_id in self._to_install_package_dict: package_info = self._to_install_package_dict[package_id]["package_info"] + if package_info is None: + continue + # We also need to get information from the plugin registry such as if a plugin is active - if package_info["package_type"] == "plugin": - package_info["is_active"] = self._plugin_registry.isActivePlugin(package_id) - else: - package_info["is_active"] = self._plugin_registry.isActivePlugin(package_id) + package_info["is_active"] = self._plugin_registry.isActivePlugin(package_id) # If the package ID is in bundled, label it as such - if package_info["package_id"] in self._bundled_package_dict.keys(): - package_info["is_bundled"] = True - else: - package_info["is_bundled"] = False + package_info["is_bundled"] = package_info["package_id"] in self._bundled_package_dict.keys() # If there is not a section in the dict for this type, add it if package_info["package_type"] not in installed_packages_dict: installed_packages_dict[package_info["package_type"]] = [] # Finally, add the data - installed_packages_dict[package_info["package_type"]].append( package_info ) + installed_packages_dict[package_info["package_type"]].append(package_info) return installed_packages_dict - def __convertPluginMetadataToPackageMetadata(self, plugin_metadata: dict) -> dict: - package_metadata = { - "package_id": plugin_metadata["id"], - "package_type": "plugin", - "display_name": plugin_metadata["plugin"]["name"], - "description": plugin_metadata["plugin"].get("description"), - "package_version": plugin_metadata["plugin"]["version"], - "cura_version": int(plugin_metadata["plugin"]["api"]), - "website": "", - "author_id": plugin_metadata["plugin"].get("author", "UnknownID"), - "author": { - "author_id": plugin_metadata["plugin"].get("author", "UnknownID"), - "display_name": plugin_metadata["plugin"].get("author", ""), - "email": "", - "website": "", - }, - "tags": ["plugin"] - } - return package_metadata - # Checks if the given package is installed. def isPackageInstalled(self, package_id: str) -> bool: return self.getInstalledPackageInfo(package_id) is not None From 16c9c4a3887e97c8d3ae8baee789be33325487e3 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 11 May 2018 11:47:18 +0200 Subject: [PATCH 58/71] Don't correct bed origin any more It's not needed with current versions of the Printrbot Simple version of Marlin, or even the version that the printers are shipped with. Thanks to tenten8401 for the debugging. Fixes #3711. --- resources/definitions/printrbot_simple.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/definitions/printrbot_simple.def.json b/resources/definitions/printrbot_simple.def.json index 7c86617ce5..e56a9d8647 100644 --- a/resources/definitions/printrbot_simple.def.json +++ b/resources/definitions/printrbot_simple.def.json @@ -32,7 +32,7 @@ "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\nG92 X132.4 Y20 ;correct bed origin (G29 changes it)" + "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 806b1f707ffa66d4a8dc8dfc72fdc7bee671fe06 Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Fri, 11 May 2018 14:03:28 +0200 Subject: [PATCH 59/71] Change layout of the installed plugins tab. - There were some alignment problems when there were more than 2 buttons in a column (disable, uninstall and update) - Now the progress bar shows on top of the "Update" button. --- .../resources/qml/ToolboxInstalledTile.qml | 247 +++++------------- .../qml/ToolboxInstalledTileActions.qml | 93 +++++++ resources/themes/cura-light/theme.json | 3 - 3 files changed, 159 insertions(+), 184 deletions(-) create mode 100644 plugins/Toolbox/resources/qml/ToolboxInstalledTileActions.qml diff --git a/plugins/Toolbox/resources/qml/ToolboxInstalledTile.qml b/plugins/Toolbox/resources/qml/ToolboxInstalledTile.qml index dd089debca..6004832a57 100644 --- a/plugins/Toolbox/resources/qml/ToolboxInstalledTile.qml +++ b/plugins/Toolbox/resources/qml/ToolboxInstalledTile.qml @@ -1,21 +1,18 @@ // Copyright (c) 2018 Ultimaker B.V. // Toolbox is released under the terms of the LGPLv3 or higher. -import QtQuick 2.2 +import QtQuick 2.7 import QtQuick.Controls 1.4 import QtQuick.Controls.Styles 1.4 import UM 1.1 as UM Item { + height: UM.Theme.getSize("toolbox_installed_tile").height + width: parent.width property bool canUpdate: false property bool isEnabled: true - height: UM.Theme.getSize("toolbox_installed_tile").height - anchors - { - left: parent.left - right: parent.right - } + Rectangle { color: UM.Theme.getColor("lining") @@ -23,198 +20,86 @@ Item height: UM.Theme.getSize("default_lining").height anchors.bottom: parent.bottom } - Column + Row { - id: pluginInfo - property var color: model.type === "plugin" && !isEnabled ? UM.Theme.getColor("lining") : UM.Theme.getColor("text") + id: tileRow height: parent.height - anchors - { - left: parent.left - top: parent.top - right: authorInfo.left - topMargin: UM.Theme.getSize("default_margin").height - rightMargin: UM.Theme.getSize("default_margin").width - } - Label - { - text: model.name - width: parent.width - height: UM.Theme.getSize("toolbox_property_label").height - wrapMode: Text.WordWrap - verticalAlignment: Text.AlignVCenter - font: UM.Theme.getFont("default_bold") - color: pluginInfo.color - } - Text - { - text: model.description - maximumLineCount: 3 - elide: Text.ElideRight - width: parent.width - wrapMode: Text.WordWrap - color: pluginInfo.color - } - } - Column - { - id: authorInfo - height: parent.height - width: Math.floor(UM.Theme.getSize("toolbox_action_button").width * 1.25) - anchors - { - top: parent.top - topMargin: UM.Theme.getSize("default_margin").height - right: pluginActions.left - rightMargin: UM.Theme.getSize("default_margin").width - } - Label - { - text: - { - if (model.author_email) - { - return "" + model.author_name + "" - } - else - { - return model.author_name - } - } - width: parent.width - height: UM.Theme.getSize("toolbox_property_label").height - wrapMode: Text.WordWrap - verticalAlignment: Text.AlignVCenter - horizontalAlignment: Text.AlignLeft - onLinkActivated: Qt.openUrlExternally("mailto:" + model.author_email + "?Subject=Cura: " + model.name + " Plugin") - color: model.enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("lining") - linkColor: UM.Theme.getColor("text_link") - } - } - Column - { - id: pluginActions - width: childrenRect.width - height: childrenRect.height - spacing: UM.Theme.getSize("default_margin").height - anchors - { - top: parent.top - right: parent.right - topMargin: UM.Theme.getSize("default_margin").height - } - Button + width: parent.width + spacing: UM.Theme.getSize("default_margin").width + topPadding: UM.Theme.getSize("default_margin").height + + CheckBox { id: disableButton - text: isEnabled ? catalog.i18nc("@action:button", "Disable") : catalog.i18nc("@action:button", "Enable") + checked: isEnabled visible: model.type == "plugin" + width: visible ? UM.Theme.getSize("checkbox").width : 0 enabled: !toolbox.isDownloading - style: ButtonStyle - { - background: Rectangle - { - implicitWidth: UM.Theme.getSize("toolbox_action_button").width - implicitHeight: UM.Theme.getSize("toolbox_action_button").height - color: "transparent" - border - { - width: UM.Theme.getSize("default_lining").width - color: UM.Theme.getColor("lining") - } - } - label: Label - { - text: control.text - color: UM.Theme.getColor("text") - verticalAlignment: Text.AlignVCenter - horizontalAlignment: Text.AlignHCenter - } - } + style: UM.Theme.styles.checkbox onClicked: toolbox.isEnabled(model.id) ? toolbox.disable(model.id) : toolbox.enable(model.id) } - Button + Column { - id: removeButton - text: catalog.i18nc("@action:button", "Uninstall") - visible: !model.is_bundled - enabled: !toolbox.isDownloading - style: ButtonStyle + id: pluginInfo + topPadding: UM.Theme.getSize("default_margin").height / 2 + property var color: model.type === "plugin" && !isEnabled ? UM.Theme.getColor("lining") : UM.Theme.getColor("text") + width: tileRow.width - (authorInfo.width + pluginActions.width + 2 * tileRow.spacing + ((disableButton.visible) ? disableButton.width + tileRow.spacing : 0)) + Label { - background: Rectangle + text: model.name + width: parent.width + height: UM.Theme.getSize("toolbox_property_label").height + wrapMode: Text.WordWrap + font: UM.Theme.getFont("default_bold") + color: pluginInfo.color + } + Label + { + text: model.description + maximumLineCount: 3 + elide: Text.ElideRight + width: parent.width + wrapMode: Text.WordWrap + color: pluginInfo.color + } + } + Column + { + id: authorInfo + width: Math.floor(UM.Theme.getSize("toolbox_action_button").width * 1.25) + + Label + { + text: { - implicitWidth: UM.Theme.getSize("toolbox_action_button").width - implicitHeight: UM.Theme.getSize("toolbox_action_button").height - color: "transparent" - border + if (model.author_email) { - width: UM.Theme.getSize("default_lining").width - color: UM.Theme.getColor("lining") + return "" + model.author_name + "" + } + else + { + return model.author_name } } - label: Label - { - text: control.text - color: UM.Theme.getColor("text") - verticalAlignment: Text.AlignVCenter - horizontalAlignment: Text.AlignHCenter - } + width: parent.width + height: UM.Theme.getSize("toolbox_property_label").height + wrapMode: Text.WordWrap + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignLeft + onLinkActivated: Qt.openUrlExternally("mailto:" + model.author_email + "?Subject=Cura: " + model.name + " Plugin") + color: model.enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("lining") + linkColor: UM.Theme.getColor("text_link") } - onClicked: toolbox.uninstall(model.id) } - Button + ToolboxInstalledTileActions { - id: updateButton - text: catalog.i18nc("@action:button", "Update") - visible: canUpdate - style: ButtonStyle - { - background: Rectangle - { - implicitWidth: UM.Theme.getSize("toolbox_action_button").width - implicitHeight: UM.Theme.getSize("toolbox_action_button").height - color: control.hovered ? UM.Theme.getColor("primary_hover") : UM.Theme.getColor("primary") - } - label: Label - { - text: control.text - color: control.hovered ? UM.Theme.getColor("button_text") : UM.Theme.getColor("button_text_hover") - verticalAlignment: Text.AlignVCenter - horizontalAlignment: Text.AlignHCenter - font: UM.Theme.getFont("default_bold") - } - } - onClicked: toolbox.update(model.id) + id: pluginActions } - ProgressBar + Connections { - id: progressbar - anchors - { - left: updateButton.left - right: updateButton.right - top: updateButton.bottom - topMargin: Math.floor(UM.Theme.getSize("default_margin") / 4) - } - value: toolbox.isDownloading ? toolbox.downloadProgress : 0 - visible: toolbox.isDownloading - style: ProgressBarStyle - { - background: Rectangle - { - color: UM.Theme.getColor("lining") - implicitHeight: Math.floor(UM.Theme.getSize("toolbox_progress_bar").height) - } - progress: Rectangle - { - color: UM.Theme.getColor("primary") - } - } + target: toolbox + onEnabledChanged: isEnabled = toolbox.isEnabled(model.id) + onMetadataChanged: canUpdate = toolbox.canUpdate(model.id) } } - Connections - { - target: toolbox - onEnabledChanged: isEnabled = toolbox.isEnabled(model.id) - onMetadataChanged: canUpdate = toolbox.canUpdate(model.id) - } -} +} \ No newline at end of file diff --git a/plugins/Toolbox/resources/qml/ToolboxInstalledTileActions.qml b/plugins/Toolbox/resources/qml/ToolboxInstalledTileActions.qml new file mode 100644 index 0000000000..1921bcb58e --- /dev/null +++ b/plugins/Toolbox/resources/qml/ToolboxInstalledTileActions.qml @@ -0,0 +1,93 @@ +// Copyright (c) 2018 Ultimaker B.V. +// Toolbox is released under the terms of the LGPLv3 or higher. + +import QtQuick 2.7 +import QtQuick.Controls 1.4 +import QtQuick.Controls.Styles 1.4 +import UM 1.1 as UM + +Column +{ + width: UM.Theme.getSize("toolbox_action_button").width + spacing: UM.Theme.getSize("narrow_margin").height + + Item + { + width: parent.width + height: childrenRect.height + visible: canUpdate + Button + { + id: updateButton + text: catalog.i18nc("@action:button", "Update") + style: ButtonStyle + { + background: Rectangle + { + implicitWidth: UM.Theme.getSize("toolbox_action_button").width + implicitHeight: UM.Theme.getSize("toolbox_action_button").height + color: control.hovered ? UM.Theme.getColor("primary_hover") : UM.Theme.getColor("primary") + } + label: Label + { + text: control.text + color: control.hovered ? UM.Theme.getColor("button_text") : UM.Theme.getColor("button_text_hover") + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignHCenter + font: UM.Theme.getFont("default_bold") + } + } + onClicked: toolbox.update(model.id) + } + ProgressBar + { + id: progressbar + width: parent.width + value: toolbox.isDownloading ? toolbox.downloadProgress : 0 + visible: toolbox.isDownloading + style: ProgressBarStyle + { + background: Rectangle + { + color: "transparent" + implicitHeight: UM.Theme.getSize("toolbox_action_button").height + } + progress: Rectangle + { + // TODO Define a good color that fits the purpuse + color: "blue" + opacity: 0.5 + } + } + } + } + Button + { + id: removeButton + text: catalog.i18nc("@action:button", "Uninstall") + visible: !model.is_bundled + enabled: !toolbox.isDownloading + style: ButtonStyle + { + background: Rectangle + { + implicitWidth: UM.Theme.getSize("toolbox_action_button").width + implicitHeight: UM.Theme.getSize("toolbox_action_button").height + color: "transparent" + border + { + width: UM.Theme.getSize("default_lining").width + color: UM.Theme.getColor("lining") + } + } + label: Label + { + text: control.text + color: UM.Theme.getColor("text") + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignHCenter + } + } + onClicked: toolbox.uninstall(model.id) + } +} \ No newline at end of file diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index 1be61b523a..f2309fb4a9 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -69,8 +69,6 @@ "colors": { - - "sidebar": [255, 255, 255, 255], "lining": [192, 193, 194, 255], "viewport_overlay": [0, 0, 0, 192], @@ -458,7 +456,6 @@ "toolbox_property_label": [1.0, 2.0], "toolbox_heading_label": [1.0, 4.0], "toolbox_header": [1.0, 4.0], - "toolbox_action_button": [8.0, 2.5], "toolbox_progress_bar": [8.0, 0.5], "toolbox_chart_row": [1.0, 2.0], "toolbox_action_button": [8.0, 2.5] From 418bedc8f0ca44ee71940eaa79bb3b89a0492920 Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Fri, 11 May 2018 14:10:53 +0200 Subject: [PATCH 60/71] Small fixes and change the "plugins" text to "packages" --- plugins/Toolbox/resources/qml/Toolbox.qml | 2 +- plugins/Toolbox/resources/qml/ToolboxFooter.qml | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/plugins/Toolbox/resources/qml/Toolbox.qml b/plugins/Toolbox/resources/qml/Toolbox.qml index f7784ec7ce..01654b7d60 100644 --- a/plugins/Toolbox/resources/qml/Toolbox.qml +++ b/plugins/Toolbox/resources/qml/Toolbox.qml @@ -78,7 +78,7 @@ Window { id: footer visible: toolbox.restartRequired - height: toolbox.restartRequired ? UM.Theme.getSize("toolbox_footer").height : 0 + height: visible ? UM.Theme.getSize("toolbox_footer").height : 0 } // TODO: Clean this up: Connections diff --git a/plugins/Toolbox/resources/qml/ToolboxFooter.qml b/plugins/Toolbox/resources/qml/ToolboxFooter.qml index b83d14a08b..980ac5f8c9 100644 --- a/plugins/Toolbox/resources/qml/ToolboxFooter.qml +++ b/plugins/Toolbox/resources/qml/ToolboxFooter.qml @@ -14,8 +14,7 @@ Item height: visible ? Math.floor(UM.Theme.getSize("toolbox_footer").height) : 0 Label { - visible: toolbox.restartRequired - text: catalog.i18nc("@info", "You will need to restart Cura before changes in plugins have effect.") + text: catalog.i18nc("@info", "You will need to restart Cura before changes in packages have effect.") height: Math.floor(UM.Theme.getSize("toolbox_footer_button").height) verticalAlignment: Text.AlignVCenter anchors @@ -38,7 +37,6 @@ Item right: parent.right rightMargin: UM.Theme.getSize("wide_margin").width } - visible: toolbox.restartRequired iconName: "dialog-restart" onClicked: toolbox.restart() style: ButtonStyle @@ -61,7 +59,7 @@ Item } ToolboxShadow { - visible: toolbox.restartRequired + visible: footer.visible anchors.bottom: footer.top reversed: true } From 675b5b199791c6925750e97928384d6ba41abf2d Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Fri, 11 May 2018 14:47:56 +0200 Subject: [PATCH 61/71] Use the application language for the dates --- plugins/Toolbox/resources/qml/ToolboxDetailPage.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml b/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml index d57acac52d..120a422b53 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml @@ -115,7 +115,7 @@ Item text: { var date = new Date(details.last_updated) - return date.toLocaleString(Qt.locale()) + return date.toLocaleString(UM.Preferences.getValue("general/language")) } font: UM.Theme.getFont("very_small") color: UM.Theme.getColor("text") From fa97d5830b9ae89f8dcef47e4a4e76904e69f769 Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Fri, 11 May 2018 15:23:40 +0200 Subject: [PATCH 62/71] Fix some crashes and issues in the Toolbox when working with no internet connection. --- .../Toolbox/resources/qml/ToolboxHeader.qml | 6 +- .../resources/qml/ToolboxTabButton.qml | 2 +- plugins/Toolbox/src/Toolbox.py | 89 ++++++++++--------- 3 files changed, 52 insertions(+), 45 deletions(-) diff --git a/plugins/Toolbox/resources/qml/ToolboxHeader.qml b/plugins/Toolbox/resources/qml/ToolboxHeader.qml index 59dbe23ea4..88495e3f63 100644 --- a/plugins/Toolbox/resources/qml/ToolboxHeader.qml +++ b/plugins/Toolbox/resources/qml/ToolboxHeader.qml @@ -24,7 +24,8 @@ Item ToolboxTabButton { text: catalog.i18nc("@title:tab", "Plugins") - active: toolbox.viewCategory == "plugin" + active: toolbox.viewCategory == "plugin" && enabled + enabled: toolbox.viewPage != "loading" && toolbox.viewPage != "errored" onClicked: { toolbox.filterModelByProp("packages", "type", "plugin") @@ -35,7 +36,8 @@ Item ToolboxTabButton { text: catalog.i18nc("@title:tab", "Materials") - active: toolbox.viewCategory == "material" + active: toolbox.viewCategory == "material" && enabled + enabled: toolbox.viewPage != "loading" && toolbox.viewPage != "errored" onClicked: { toolbox.filterModelByProp("authors", "package_types", "material") diff --git a/plugins/Toolbox/resources/qml/ToolboxTabButton.qml b/plugins/Toolbox/resources/qml/ToolboxTabButton.qml index 0f759c75fb..22fb6d73ca 100644 --- a/plugins/Toolbox/resources/qml/ToolboxTabButton.qml +++ b/plugins/Toolbox/resources/qml/ToolboxTabButton.qml @@ -43,7 +43,7 @@ Button return UM.Theme.getColor("topbar_button_text_inactive"); } } - font: control.active ? UM.Theme.getFont("medium_bold") : UM.Theme.getFont("medium") + font: control.enabled ? (control.active ? UM.Theme.getFont("medium_bold") : UM.Theme.getFont("medium")) : UM.Theme.getFont("default_italic") verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignHCenter } diff --git a/plugins/Toolbox/src/Toolbox.py b/plugins/Toolbox/src/Toolbox.py index 492439f860..f64e1cd1b9 100644 --- a/plugins/Toolbox/src/Toolbox.py +++ b/plugins/Toolbox/src/Toolbox.py @@ -333,8 +333,8 @@ class Toolbox(QObject, Extension): # Handlers for Network Events # -------------------------------------------------------------------------- - def _onNetworkAccessibleChanged(self, accessible: int) -> None: - if accessible == 0: + def _onNetworkAccessibleChanged(self, network_accessibility: QNetworkAccessManager.NetworkAccessibility) -> None: + if network_accessibility == QNetworkAccessManager.NotAccessible: self.resetDownload() def _onRequestFinished(self, reply: QNetworkReply) -> None: @@ -354,50 +354,55 @@ class Toolbox(QObject, Extension): if reply.operation() == QNetworkAccessManager.GetOperation: for type, url in self._request_urls.items(): if reply.url() == url: - try: - json_data = json.loads(bytes(reply.readAll()).decode("utf-8")) + if reply.attribute(QNetworkRequest.HttpStatusCodeAttribute) == 200: + try: + json_data = json.loads(bytes(reply.readAll()).decode("utf-8")) + + # Check for errors: + if "errors" in json_data: + for error in json_data["errors"]: + Logger.log("e", "%s", error["title"]) + return + + # Create model and apply metadata: + if not self._models[type]: + Logger.log("e", "Could not find the %s model.", type) + break + + # HACK: Eventually get rid of the code from here... + if type is "plugins_showcase" or type is "materials_showcase": + self._metadata["plugins_showcase"] = json_data["data"]["plugin"]["packages"] + self._models["plugins_showcase"].setMetadata(self._metadata["plugins_showcase"]) + self._metadata["materials_showcase"] = json_data["data"]["material"]["authors"] + self._models["materials_showcase"].setMetadata(self._metadata["materials_showcase"]) + else: + # ...until here. + # This hack arises for multiple reasons but the main + # one is because there are not separate API calls + # for different kinds of showcases. + self._metadata[type] = json_data["data"] + self._models[type].setMetadata(self._metadata[type]) + + # Do some auto filtering + # TODO: Make multiple API calls in the future to handle this + if type is "packages": + self._models[type].setFilter({"type": "plugin"}) + if type is "authors": + self._models[type].setFilter({"package_types": "material"}) + + self.metadataChanged.emit() + + if self.loadingComplete() is True: + self.setViewPage("overview") - # Check for errors: - if "errors" in json_data: - for error in json_data["errors"]: - Logger.log("e", "%s", error["title"]) return - - # Create model and apply metadata: - if not self._models[type]: - Logger.log("e", "Could not find the %s model.", type) + except json.decoder.JSONDecodeError: + Logger.log("w", "Toolbox: Received invalid JSON for %s.", type) break - - # HACK: Eventually get rid of the code from here... - if type is "plugins_showcase" or type is "materials_showcase": - self._metadata["plugins_showcase"] = json_data["data"]["plugin"]["packages"] - self._models["plugins_showcase"].setMetadata(self._metadata["plugins_showcase"]) - self._metadata["materials_showcase"] = json_data["data"]["material"]["authors"] - self._models["materials_showcase"].setMetadata(self._metadata["materials_showcase"]) - else: - # ...until here. - # This hack arises for multiple reasons but the main - # one is because there are not separate API calls - # for different kinds of showcases. - self._metadata[type] = json_data["data"] - self._models[type].setMetadata(self._metadata[type]) - - # Do some auto filtering - # TODO: Make multiple API calls in the future to handle this - if type is "packages": - self._models[type].setFilter({"type": "plugin"}) - if type is "authors": - self._models[type].setFilter({"package_types": "material"}) - - self.metadataChanged.emit() - - if self.loadingComplete() is True: - self.setViewPage("overview") - + else: + self.setViewPage("errored") + self.resetDownload() return - except json.decoder.JSONDecodeError: - Logger.log("w", "Toolbox: Received invalid JSON for %s.", type) - break else: # Ignore any operation that is not a get operation From 527f269b5d61614212f803c0321e84a9d70cd8bc Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Fri, 11 May 2018 16:32:31 +0200 Subject: [PATCH 63/71] Fix an issue that kept the plugins in the "installed" list despite of already being removed from the data folder. --- cura/CuraPackageManager.py | 1 + plugins/Toolbox/src/Toolbox.py | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/CuraPackageManager.py b/cura/CuraPackageManager.py index 6b8391832d..c4ae67b228 100644 --- a/cura/CuraPackageManager.py +++ b/cura/CuraPackageManager.py @@ -97,6 +97,7 @@ class CuraPackageManager(QObject): def _removeAllScheduledPackages(self) -> None: for package_id in self._to_remove_package_set: self._purgePackage(package_id) + del self._installed_package_dict[package_id] self._to_remove_package_set.clear() self._saveManagementData() diff --git a/plugins/Toolbox/src/Toolbox.py b/plugins/Toolbox/src/Toolbox.py index f64e1cd1b9..cecfd1b637 100644 --- a/plugins/Toolbox/src/Toolbox.py +++ b/plugins/Toolbox/src/Toolbox.py @@ -251,7 +251,6 @@ class Toolbox(QObject, Extension): @pyqtSlot() def restart(self): - self._package_manager._removeAllScheduledPackages() CuraApplication.getInstance().windowClosed() # Checks From 0bb82f144b33542e1af969bad699638ed98b07dc Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Mon, 14 May 2018 10:16:18 +0200 Subject: [PATCH 64/71] Make the toolbox window not resizable. --- plugins/Toolbox/resources/qml/Toolbox.qml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/Toolbox/resources/qml/Toolbox.qml b/plugins/Toolbox/resources/qml/Toolbox.qml index 01654b7d60..2a56898503 100644 --- a/plugins/Toolbox/resources/qml/Toolbox.qml +++ b/plugins/Toolbox/resources/qml/Toolbox.qml @@ -16,9 +16,10 @@ Window width: 720 * screenScaleFactor height: 640 * screenScaleFactor - minimumWidth: 720 * screenScaleFactor - maximumWidth: 720 * screenScaleFactor - minimumHeight: 350 * screenScaleFactor + minimumWidth: width + maximumWidth: minimumWidth + minimumHeight: height + maximumHeight: minimumHeight color: UM.Theme.getColor("sidebar") UM.I18nCatalog { From 83482c0826bd3f2b7df9633036683122280841b4 Mon Sep 17 00:00:00 2001 From: Aleksei S Date: Mon, 14 May 2018 11:20:43 +0200 Subject: [PATCH 65/71] remove Malyan printer's quality files, they are duplicated CURA-5217 --- .../malyan_m200/malyan_m200_0.04375.inst.cfg | 22 ------------------ .../malyan_m200/malyan_m200_0.0875.inst.cfg | 22 ------------------ .../malyan_m200/malyan_m200_0.13125.inst.cfg | 22 ------------------ .../malyan_m200/malyan_m200_0.175.inst.cfg | 23 ------------------- .../malyan_m200/malyan_m200_0.21875.inst.cfg | 22 ------------------ .../malyan_m200/malyan_m200_0.2625.inst.cfg | 22 ------------------ .../malyan_m200/malyan_m200_0.30625.inst.cfg | 22 ------------------ .../malyan_m200/malyan_m200_0.35.inst.cfg | 23 ------------------- 8 files changed, 178 deletions(-) delete mode 100644 resources/quality/malyan_m200/malyan_m200_0.04375.inst.cfg delete mode 100644 resources/quality/malyan_m200/malyan_m200_0.0875.inst.cfg delete mode 100644 resources/quality/malyan_m200/malyan_m200_0.13125.inst.cfg delete mode 100644 resources/quality/malyan_m200/malyan_m200_0.175.inst.cfg delete mode 100644 resources/quality/malyan_m200/malyan_m200_0.21875.inst.cfg delete mode 100644 resources/quality/malyan_m200/malyan_m200_0.2625.inst.cfg delete mode 100644 resources/quality/malyan_m200/malyan_m200_0.30625.inst.cfg delete mode 100644 resources/quality/malyan_m200/malyan_m200_0.35.inst.cfg diff --git a/resources/quality/malyan_m200/malyan_m200_0.04375.inst.cfg b/resources/quality/malyan_m200/malyan_m200_0.04375.inst.cfg deleted file mode 100644 index 18625e80eb..0000000000 --- a/resources/quality/malyan_m200/malyan_m200_0.04375.inst.cfg +++ /dev/null @@ -1,22 +0,0 @@ -[general] -version = 4 -name = M1 Quality -definition = malyan_m200 - -[metadata] -setting_version = 4 -type = quality -quality_type = fine -weight = 2 - -[values] -layer_height = 0.04375 -layer_height_0 = 0.2625 -wall_thickness = 1.05 -top_bottom_thickness = 0.72 -infill_sparse_density = 22 -speed_print = 50 -speed_layer_0 = =round(speed_print * 30 / 50) -speed_topbottom = 20 -cool_min_layer_time = 5 -cool_min_speed = 10 diff --git a/resources/quality/malyan_m200/malyan_m200_0.0875.inst.cfg b/resources/quality/malyan_m200/malyan_m200_0.0875.inst.cfg deleted file mode 100644 index 311a797b27..0000000000 --- a/resources/quality/malyan_m200/malyan_m200_0.0875.inst.cfg +++ /dev/null @@ -1,22 +0,0 @@ -[general] -version = 4 -name = M2 Quality -definition = malyan_m200 - -[metadata] -setting_version = 4 -type = quality -quality_type = high -weight = 1 - -[values] -layer_height = 0.0875 -layer_height_0 = 0.2625 -wall_thickness = 1.05 -top_bottom_thickness = 0.72 -infill_sparse_density = 22 -speed_print = 50 -speed_layer_0 = =round(speed_print * 30 / 50) -speed_topbottom = 20 -cool_min_layer_time = 5 -cool_min_speed = 10 diff --git a/resources/quality/malyan_m200/malyan_m200_0.13125.inst.cfg b/resources/quality/malyan_m200/malyan_m200_0.13125.inst.cfg deleted file mode 100644 index 1fe974f6d2..0000000000 --- a/resources/quality/malyan_m200/malyan_m200_0.13125.inst.cfg +++ /dev/null @@ -1,22 +0,0 @@ -[general] -version = 4 -name = M3 Quality -definition = malyan_m200 - -[metadata] -setting_version = 4 -type = quality -quality_type = normal -weight = 0 - -[values] -layer_height = 0.13125 -layer_height_0 = 0.2625 -wall_thickness = 1.05 -top_bottom_thickness = 0.72 -infill_sparse_density = 22 -speed_print = 50 -speed_layer_0 = =round(speed_print * 30 / 50) -speed_topbottom = 20 -cool_min_layer_time = 5 -cool_min_speed = 10 diff --git a/resources/quality/malyan_m200/malyan_m200_0.175.inst.cfg b/resources/quality/malyan_m200/malyan_m200_0.175.inst.cfg deleted file mode 100644 index 091035d137..0000000000 --- a/resources/quality/malyan_m200/malyan_m200_0.175.inst.cfg +++ /dev/null @@ -1,23 +0,0 @@ -[general] -version = 4 -name = M4 Quality -definition = malyan_m200 - -[metadata] -setting_version = 4 -type = quality -quality_type = fast -weight = -1 -global_quality = true - -[values] -layer_height = 0.175 -layer_height_0 = 0.2625 -wall_thickness = 1.05 -top_bottom_thickness = 0.72 -infill_sparse_density = 22 -speed_print = 50 -speed_layer_0 = =round(speed_print * 30 / 50) -speed_topbottom = 20 -cool_min_layer_time = 5 -cool_min_speed = 10 diff --git a/resources/quality/malyan_m200/malyan_m200_0.21875.inst.cfg b/resources/quality/malyan_m200/malyan_m200_0.21875.inst.cfg deleted file mode 100644 index 1a22bbc236..0000000000 --- a/resources/quality/malyan_m200/malyan_m200_0.21875.inst.cfg +++ /dev/null @@ -1,22 +0,0 @@ -[general] -version = 4 -name = M5 Quality -definition = malyan_m200 - -[metadata] -setting_version = 4 -type = quality -quality_type = faster -weight = -2 - -[values] -layer_height = 0.21875 -layer_height_0 = 0.2625 -wall_thickness = 1.05 -top_bottom_thickness = 0.72 -infill_sparse_density = 22 -speed_print = 50 -speed_layer_0 = =round(speed_print * 30 / 50) -speed_topbottom = 20 -cool_min_layer_time = 5 -cool_min_speed = 10 diff --git a/resources/quality/malyan_m200/malyan_m200_0.2625.inst.cfg b/resources/quality/malyan_m200/malyan_m200_0.2625.inst.cfg deleted file mode 100644 index d89eb9e6d8..0000000000 --- a/resources/quality/malyan_m200/malyan_m200_0.2625.inst.cfg +++ /dev/null @@ -1,22 +0,0 @@ -[general] -version = 4 -name = M6 Quality -definition = malyan_m200 - -[metadata] -setting_version = 4 -type = quality -quality_type = draft -weight = -3 - -[values] -layer_height = 0.2625 -layer_height_0 = 0.2625 -wall_thickness = 1.05 -top_bottom_thickness = 0.72 -infill_sparse_density = 22 -speed_print = 50 -speed_layer_0 = =round(speed_print * 30 / 50) -speed_topbottom = 20 -cool_min_layer_time = 5 -cool_min_speed = 10 diff --git a/resources/quality/malyan_m200/malyan_m200_0.30625.inst.cfg b/resources/quality/malyan_m200/malyan_m200_0.30625.inst.cfg deleted file mode 100644 index 2e71c79b49..0000000000 --- a/resources/quality/malyan_m200/malyan_m200_0.30625.inst.cfg +++ /dev/null @@ -1,22 +0,0 @@ -[general] -version = 4 -name = M7 Quality -definition = malyan_m200 - -[metadata] -setting_version = 4 -type = quality -quality_type = turbo -weight = -4 - -[values] -layer_height = 0.30625 -layer_height_0 = 0.30625 -wall_thickness = 1.05 -top_bottom_thickness = 0.72 -infill_sparse_density = 22 -speed_print = 50 -speed_layer_0 = =round(speed_print * 30 / 50) -speed_topbottom = 20 -cool_min_layer_time = 5 -cool_min_speed = 10 diff --git a/resources/quality/malyan_m200/malyan_m200_0.35.inst.cfg b/resources/quality/malyan_m200/malyan_m200_0.35.inst.cfg deleted file mode 100644 index 362d4b9539..0000000000 --- a/resources/quality/malyan_m200/malyan_m200_0.35.inst.cfg +++ /dev/null @@ -1,23 +0,0 @@ -[general] -version = 4 -name = M8 Quality -definition = malyan_m200 - -[metadata] -setting_version = 4 -type = quality -quality_type = hyper -weight = -5 -global_quality = true - -[values] -layer_height = 0.35 -layer_height_0 = 0.35 -wall_thickness = 1.05 -top_bottom_thickness = 0.72 -infill_sparse_density = 22 -speed_print = 50 -speed_layer_0 = =round(speed_print * 30 / 50) -speed_topbottom = 20 -cool_min_layer_time = 5 -cool_min_speed = 10 From cf84adfb7318f3bdf1cf9a19ebbbe55c409fb27c Mon Sep 17 00:00:00 2001 From: Kristel88 Date: Mon, 14 May 2018 11:25:55 +0200 Subject: [PATCH 66/71] S5 dimensions were incorrect See Jira: CURA-5331 --- resources/definitions/ultimaker_s5.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/definitions/ultimaker_s5.def.json b/resources/definitions/ultimaker_s5.def.json index a69e10e343..2197ff2d91 100644 --- a/resources/definitions/ultimaker_s5.def.json +++ b/resources/definitions/ultimaker_s5.def.json @@ -37,7 +37,7 @@ "overrides": { "machine_name": { "default_value": "Ultimaker S5" }, "machine_width": { "default_value": 330 }, - "machine_depth": { "default_value": 245 }, + "machine_depth": { "default_value": 240 }, "machine_height": { "default_value": 300 }, "machine_heated_bed": { "default_value": true }, "machine_nozzle_heat_up_speed": { "default_value": 1.4 }, From 04534936c3ad492f85f7a6f03efa50bee86d96d5 Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Mon, 14 May 2018 11:36:19 +0200 Subject: [PATCH 67/71] CURA-5358 Change the name in the dict to search for the 'qualities' that are inside a curapackage. --- cura/CuraPackageManager.py | 2 +- plugins/Toolbox/src/Toolbox.py | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/cura/CuraPackageManager.py b/cura/CuraPackageManager.py index c4ae67b228..04175edeb6 100644 --- a/cura/CuraPackageManager.py +++ b/cura/CuraPackageManager.py @@ -294,7 +294,7 @@ class CuraPackageManager(QObject): from cura.CuraApplication import CuraApplication installation_dirs_dict = { "materials": Resources.getStoragePath(CuraApplication.ResourceTypes.MaterialInstanceContainer), - "quality": Resources.getStoragePath(CuraApplication.ResourceTypes.QualityInstanceContainer), + "qualities": Resources.getStoragePath(CuraApplication.ResourceTypes.QualityInstanceContainer), "plugins": os.path.abspath(Resources.getStoragePath(Resources.Plugins)), } diff --git a/plugins/Toolbox/src/Toolbox.py b/plugins/Toolbox/src/Toolbox.py index cecfd1b637..3ee6787cf4 100644 --- a/plugins/Toolbox/src/Toolbox.py +++ b/plugins/Toolbox/src/Toolbox.py @@ -13,7 +13,6 @@ from PyQt5.QtNetwork import QNetworkAccessManager, QNetworkRequest, QNetworkRepl from UM.Application import Application from UM.Logger import Logger from UM.PluginRegistry import PluginRegistry -from UM.Qt.Bindings.PluginsModel import PluginsModel from UM.Extension import Extension from UM.i18n import i18nCatalog from UM.Version import Version @@ -22,7 +21,6 @@ import cura from cura.CuraApplication import CuraApplication from .AuthorsModel import AuthorsModel from .PackagesModel import PackagesModel -from .ConfigsModel import ConfigsModel i18n_catalog = i18nCatalog("cura") From 1dadc7d1b291c43ebc316993fe76c82b306e729d Mon Sep 17 00:00:00 2001 From: Kristel88 Date: Mon, 14 May 2018 12:09:40 +0200 Subject: [PATCH 68/71] S5 global settings fixes Fixes as suggested by Diego --- .../quality/ultimaker_s5/um_s5_aa0.4_CPE_Draft_Print.inst.cfg | 1 - .../quality/ultimaker_s5/um_s5_aa0.4_CPE_Fast_Print.inst.cfg | 1 - .../quality/ultimaker_s5/um_s5_aa0.4_CPE_High_Quality.inst.cfg | 1 - .../ultimaker_s5/um_s5_aa0.4_CPE_Normal_Quality.inst.cfg | 1 - .../quality/ultimaker_s5/um_s5_aa0.4_TPU_Draft_Print.inst.cfg | 1 - .../quality/ultimaker_s5/um_s5_aa0.4_TPU_Fast_Print.inst.cfg | 1 - .../ultimaker_s5/um_s5_aa0.4_TPU_Normal_Quality.inst.cfg | 1 - .../quality/ultimaker_s5/um_s5_aa0.8_PLA_Draft_Print.inst.cfg | 2 -- .../ultimaker_s5/um_s5_aa0.8_PLA_Superdraft_Print.inst.cfg | 3 --- .../ultimaker_s5/um_s5_aa0.8_PLA_Verydraft_Print.inst.cfg | 3 --- 10 files changed, 15 deletions(-) diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_Draft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_Draft_Print.inst.cfg index 16cc836dc4..1604bc2bc9 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_Draft_Print.inst.cfg @@ -15,7 +15,6 @@ variant = AA 0.4 material_print_temperature = =default_material_print_temperature + 10 material_initial_print_temperature = =material_print_temperature - 5 material_final_print_temperature = =material_print_temperature - 10 -material_standby_temperature = 100 skin_overlap = 20 speed_print = 60 speed_layer_0 = 20 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_Fast_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_Fast_Print.inst.cfg index c7aa532422..7a138ce2d7 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_Fast_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_Fast_Print.inst.cfg @@ -16,7 +16,6 @@ cool_min_speed = 7 material_print_temperature = =default_material_print_temperature + 5 material_initial_print_temperature = =material_print_temperature - 5 material_final_print_temperature = =material_print_temperature - 10 -material_standby_temperature = 100 speed_print = 60 speed_layer_0 = 20 speed_topbottom = =math.ceil(speed_print * 30 / 60) diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_High_Quality.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_High_Quality.inst.cfg index 05323e1ec1..fa0438d951 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_High_Quality.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_High_Quality.inst.cfg @@ -18,7 +18,6 @@ machine_nozzle_heat_up_speed = 1.5 material_print_temperature = =default_material_print_temperature - 5 material_initial_print_temperature = =material_print_temperature - 5 material_final_print_temperature = =material_print_temperature - 10 -material_standby_temperature = 100 speed_print = 50 speed_layer_0 = 20 speed_topbottom = =math.ceil(speed_print * 30 / 50) diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_Normal_Quality.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_Normal_Quality.inst.cfg index acd8ed5bf4..42fac1ea25 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_Normal_Quality.inst.cfg @@ -16,7 +16,6 @@ machine_nozzle_cool_down_speed = 0.85 machine_nozzle_heat_up_speed = 1.5 material_initial_print_temperature = =material_print_temperature - 5 material_final_print_temperature = =material_print_temperature - 10 -material_standby_temperature = 100 speed_print = 55 speed_layer_0 = 20 speed_topbottom = =math.ceil(speed_print * 30 / 55) diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_TPU_Draft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_TPU_Draft_Print.inst.cfg index b53cdd4249..35840f2e04 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_TPU_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_TPU_Draft_Print.inst.cfg @@ -41,7 +41,6 @@ prime_tower_wipe_enabled = True retraction_count_max = 12 retraction_extra_prime_amount = 0.8 retraction_extrusion_window = 1 -retraction_hop = 1.5 retraction_hop_only_when_collides = True retraction_min_travel = =line_width * 2 retraction_prime_speed = 15 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_TPU_Fast_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_TPU_Fast_Print.inst.cfg index e5e3b44e91..d6217ad73c 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_TPU_Fast_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_TPU_Fast_Print.inst.cfg @@ -41,7 +41,6 @@ prime_tower_wipe_enabled = True retraction_count_max = 12 retraction_extra_prime_amount = 0.8 retraction_extrusion_window = 1 -retraction_hop = 1.5 retraction_hop_only_when_collides = True retraction_min_travel = =line_width * 2 retraction_prime_speed = 15 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_TPU_Normal_Quality.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_TPU_Normal_Quality.inst.cfg index 263de9078a..2b75d59259 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_TPU_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_TPU_Normal_Quality.inst.cfg @@ -40,7 +40,6 @@ prime_tower_wipe_enabled = True retraction_count_max = 12 retraction_extra_prime_amount = 0.8 retraction_extrusion_window = 1 -retraction_hop = 1.5 retraction_hop_only_when_collides = True retraction_min_travel = =line_width * 2 retraction_prime_speed = 15 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.8_PLA_Draft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.8_PLA_Draft_Print.inst.cfg index 13294045fe..d0fa29b61d 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.8_PLA_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.8_PLA_Draft_Print.inst.cfg @@ -17,14 +17,12 @@ cool_fan_speed_max = =100 cool_min_speed = 2 gradual_infill_step_height = =3 * layer_height infill_line_width = =round(line_width * 0.65 / 0.75, 2) -infill_pattern = triangles line_width = =machine_nozzle_size * 0.9375 machine_nozzle_cool_down_speed = 0.75 machine_nozzle_heat_up_speed = 1.6 material_final_print_temperature = =max(-273.15, material_print_temperature - 15) material_initial_print_temperature = =max(-273.15, material_print_temperature - 10) material_print_temperature = =default_material_print_temperature + 10 -material_standby_temperature = 100 prime_tower_enable = True support_angle = 70 support_line_width = =line_width * 0.75 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.8_PLA_Superdraft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.8_PLA_Superdraft_Print.inst.cfg index 5a7ad493d6..79585fa096 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.8_PLA_Superdraft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.8_PLA_Superdraft_Print.inst.cfg @@ -17,15 +17,12 @@ cool_fan_speed_max = =100 cool_min_speed = 2 gradual_infill_step_height = =3 * layer_height infill_line_width = =round(line_width * 0.65 / 0.75, 2) -infill_pattern = triangles -layer_height = 0.4 line_width = =machine_nozzle_size * 0.9375 machine_nozzle_cool_down_speed = 0.75 machine_nozzle_heat_up_speed = 1.6 material_final_print_temperature = =max(-273.15, material_print_temperature - 15) material_initial_print_temperature = =max(-273.15, material_print_temperature - 10) material_print_temperature = =default_material_print_temperature + 15 -material_standby_temperature = 100 prime_tower_enable = True raft_margin = 10 support_angle = 70 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.8_PLA_Verydraft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.8_PLA_Verydraft_Print.inst.cfg index c06478acfc..dc09e5d5f5 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.8_PLA_Verydraft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.8_PLA_Verydraft_Print.inst.cfg @@ -17,15 +17,12 @@ cool_fan_speed_max = =100 cool_min_speed = 2 gradual_infill_step_height = =3 * layer_height infill_line_width = =round(line_width * 0.65 / 0.75, 2) -infill_pattern = triangles -layer_height = 0.3 line_width = =machine_nozzle_size * 0.9375 machine_nozzle_cool_down_speed = 0.75 machine_nozzle_heat_up_speed = 1.6 material_final_print_temperature = =max(-273.15, material_print_temperature - 15) material_initial_print_temperature = =max(-273.15, material_print_temperature - 10) material_print_temperature = =default_material_print_temperature + 10 -material_standby_temperature = 100 prime_tower_enable = True support_angle = 70 support_line_width = =line_width * 0.75 From 757824ae93f200c1075db2e6865cf3528cfad1c3 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 14 May 2018 12:54:26 +0200 Subject: [PATCH 69/71] Move deleteAll to Uranium Because it's used by WorkspaceFileHandler. Contributes to issue CURA-5330. --- cura/CuraApplication.py | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index c8adfbc93b..6b2664debb 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -1153,39 +1153,6 @@ class CuraApplication(QtApplication): Selection.add(node) - ## Delete all nodes containing mesh data in the scene. - # \param only_selectable. Set this to False to delete objects from all build plates - @pyqtSlot() - def deleteAll(self, only_selectable = True): - Logger.log("i", "Clearing scene") - if not self.getController().getToolsEnabled(): - return - - nodes = [] - for node in DepthFirstIterator(self.getController().getScene().getRoot()): - if not isinstance(node, SceneNode): - continue - if (not node.getMeshData() and not node.callDecoration("getLayerData")) and not node.callDecoration("isGroup"): - continue # Node that doesnt have a mesh and is not a group. - if only_selectable and not node.isSelectable(): - continue - if not node.callDecoration("isSliceable") and not node.callDecoration("getLayerData") and not node.callDecoration("isGroup"): - continue # Only remove nodes that are selectable. - if node.getParent() and node.getParent().callDecoration("isGroup"): - continue # Grouped nodes don't need resetting as their parent (the group) is resetted) - nodes.append(node) - if nodes: - op = GroupedOperation() - - for node in nodes: - op.addOperation(RemoveSceneNodeOperation(node)) - - # Reset the print information - self.getController().getScene().sceneChanged.emit(node) - - op.push() - Selection.clear() - ## Reset all translation on nodes with mesh data. @pyqtSlot() def resetAllTranslation(self): From dd14a8e685997b98394d09ff48bff8591ab4a477 Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Mon, 14 May 2018 14:44:40 +0200 Subject: [PATCH 70/71] CURA-5296 Better finding for packages.json --- cura/CuraApplication.py | 4 +++- cura/CuraPackageManager.py | 4 +--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 6b2664debb..4888837fdf 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -151,7 +151,9 @@ class CuraApplication(QtApplication): Resources.addSearchPath(os.path.join(QtApplication.getInstallPrefix(), "share", "cura", "resources")) if not hasattr(sys, "frozen"): - Resources.addSearchPath(os.path.join(os.path.abspath(os.path.dirname(__file__)), "..", "resources")) + resource_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), "..", "resources") + Resources.addSearchPath(resource_path) + Resources.setBundledResourcesPath(resource_path) self._use_gui = True self._open_file_queue = [] # Files to open when plug-ins are loaded. diff --git a/cura/CuraPackageManager.py b/cura/CuraPackageManager.py index 04175edeb6..2b91081e4d 100644 --- a/cura/CuraPackageManager.py +++ b/cura/CuraPackageManager.py @@ -30,9 +30,7 @@ class CuraPackageManager(QObject): # JSON file that keeps track of all installed packages. self._bundled_package_management_file_path = os.path.join( - os.path.dirname(os.path.abspath(__file__)), - "..", - "resources", + os.path.abspath(Resources.getBundledResourcesPath()), "packages.json" ) self._user_package_management_file_path = os.path.join( From d946733357f0ed5151ab857f283f51c075b32985 Mon Sep 17 00:00:00 2001 From: Aleksei S Date: Mon, 14 May 2018 15:04:01 +0200 Subject: [PATCH 71/71] Project update after undo click CURA-5323 --- cura/CuraApplication.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index c8adfbc93b..bb20ef7ac8 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -1018,6 +1018,8 @@ class CuraApplication(QtApplication): scene_bounding_box = None is_block_slicing_node = False active_build_plate = self.getMultiBuildPlateModel().activeBuildPlate + + print_information = self.getPrintInformation() for node in DepthFirstIterator(self.getController().getScene().getRoot()): if ( not issubclass(type(node), CuraSceneNode) or @@ -1029,6 +1031,11 @@ class CuraApplication(QtApplication): is_block_slicing_node = True count += 1 + + # After clicking the Undo button, if the build plate empty the project name needs to be set + if print_information.baseName == '': + print_information.setBaseName(node.getName()) + if not scene_bounding_box: scene_bounding_box = node.getBoundingBox() else: @@ -1036,7 +1043,7 @@ class CuraApplication(QtApplication): if other_bb is not None: scene_bounding_box = scene_bounding_box + node.getBoundingBox() - print_information = self.getPrintInformation() + if print_information: print_information.setPreSliced(is_block_slicing_node)