From 9941c2d8f41fe6496fd74c52b8f68eac7852b145 Mon Sep 17 00:00:00 2001 From: Mark Burton Date: Sun, 22 Apr 2018 10:13:51 +0100 Subject: [PATCH 001/174] Added support_fan_enable and support_supported_skin_fan_speed settings. These let you override the fan speed when printing the skin regions immediately above support. --- resources/definitions/fdmprinter.def.json | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 1ec210b99e..d1f50af134 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -4164,6 +4164,27 @@ } } }, + "support_fan_enable": + { + "label": "Fan Speed Override", + "description": "When enabled, the print cooling fan speed is altered for the skin regions immediately above the support.", + "type": "bool", + "default_value": false, + "enabled": "support_enable", + "settable_per_mesh": false + }, + "support_supported_skin_fan_speed": + { + "label": "Supported Skin Fan Speed", + "description": "Percentage fan speed to use when printing the skin regions immediately above the support. Using a high fan speed can make the support easier to remove.", + "unit": "%", + "minimum_value": "0", + "maximum_value": "100", + "default_value": 100, + "type": "float", + "enabled": "support_enable and support_fan_enable", + "settable_per_mesh": false + }, "support_use_towers": { "label": "Use Towers", From dc9813b916c198dbce477f1a7799233eba0e9f01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20Garc=C3=ADa?= Date: Sat, 26 May 2018 01:56:57 +0200 Subject: [PATCH 002/174] Fix for detecting Malyan M200 and Monoprice Mini --- plugins/USBPrinting/AutoDetectBaudJob.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/USBPrinting/AutoDetectBaudJob.py b/plugins/USBPrinting/AutoDetectBaudJob.py index 50bb831ba8..6d30615eb4 100644 --- a/plugins/USBPrinting/AutoDetectBaudJob.py +++ b/plugins/USBPrinting/AutoDetectBaudJob.py @@ -58,7 +58,7 @@ class AutoDetectBaudJob(Job): while timeout_time > time(): line = serial.readline() - if b"ok T:" in line: + if b"ok " in line and b"T:" in line: successful_responses += 1 if successful_responses >= 3: self.setResult(baud_rate) From 4bd87e2164489209e242c127e68f446dcbe10589 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20Garc=C3=ADa?= Date: Sat, 26 May 2018 13:15:36 +0200 Subject: [PATCH 003/174] Fix for showing temperatures for Malyan M200 and Monoprice Mini --- plugins/USBPrinting/USBPrinterOutputDevice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/USBPrinting/USBPrinterOutputDevice.py b/plugins/USBPrinting/USBPrinterOutputDevice.py index 00eb2f0b25..fe6a12623b 100644 --- a/plugins/USBPrinting/USBPrinterOutputDevice.py +++ b/plugins/USBPrinting/USBPrinterOutputDevice.py @@ -305,7 +305,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice): if self._firmware_name is None: self.sendCommand("M115") - if b"ok T:" in line or line.startswith(b"T:") or b"ok B:" in line or line.startswith(b"B:"): # Temperature message. 'T:' for extruder and 'B:' for bed + if (b"ok " in line and b"T:" in line) or b"ok T:" in line or line.startswith(b"T:") or b"ok B:" in line or line.startswith(b"B:"): # Temperature message. 'T:' for extruder and 'B:' for bed extruder_temperature_matches = re.findall(b"T(\d*): ?([\d\.]+) ?\/?([\d\.]+)?", line) # Update all temperature values matched_extruder_nrs = [] From 23d6f7ba0b7f101a9d27df1cb57956ad6b90a88e Mon Sep 17 00:00:00 2001 From: Orel Date: Tue, 5 Jun 2018 17:36:44 +0200 Subject: [PATCH 004/174] Enhance Dagoma printers profiles and add printer-specific quality profiles. --- .../definitions/dagoma_discoeasy200.def.json | 25 ++++-- resources/definitions/dagoma_neva.def.json | 26 ++++-- .../definitions/dagoma_neva_magis.def.json | 81 +++++++++++++++++++ .../dagoma_discoeasy200_pla_fast.inst.cfg | 17 ++++ .../dagoma_discoeasy200_pla_fine.inst.cfg | 14 ++++ .../dagoma_discoeasy200_pla_standard.inst.cfg | 17 ++++ .../dagoma_neva_magis_pla_fast.inst.cfg | 17 ++++ .../dagoma_neva_magis_pla_fine.inst.cfg | 14 ++++ .../dagoma_neva_magis_pla_standard.inst.cfg | 17 ++++ .../dagoma/dagoma_neva_pla_fast.inst.cfg | 17 ++++ .../dagoma/dagoma_neva_pla_fine.inst.cfg | 14 ++++ .../dagoma/dagoma_neva_pla_standard.inst.cfg | 17 ++++ 12 files changed, 263 insertions(+), 13 deletions(-) create mode 100644 resources/definitions/dagoma_neva_magis.def.json create mode 100644 resources/quality/dagoma/dagoma_discoeasy200_pla_fast.inst.cfg create mode 100644 resources/quality/dagoma/dagoma_discoeasy200_pla_fine.inst.cfg create mode 100644 resources/quality/dagoma/dagoma_discoeasy200_pla_standard.inst.cfg create mode 100644 resources/quality/dagoma/dagoma_neva_magis_pla_fast.inst.cfg create mode 100644 resources/quality/dagoma/dagoma_neva_magis_pla_fine.inst.cfg create mode 100644 resources/quality/dagoma/dagoma_neva_magis_pla_standard.inst.cfg create mode 100644 resources/quality/dagoma/dagoma_neva_pla_fast.inst.cfg create mode 100644 resources/quality/dagoma/dagoma_neva_pla_fine.inst.cfg create mode 100644 resources/quality/dagoma/dagoma_neva_pla_standard.inst.cfg diff --git a/resources/definitions/dagoma_discoeasy200.def.json b/resources/definitions/dagoma_discoeasy200.def.json index 4f0fddc41d..9df8829ec5 100644 --- a/resources/definitions/dagoma_discoeasy200.def.json +++ b/resources/definitions/dagoma_discoeasy200.def.json @@ -1,4 +1,5 @@ { + "id": "dagoma_discoeasy200", "name": "Dagoma DiscoEasy200", "version": 2, "inherits": "fdmprinter", @@ -28,17 +29,17 @@ }, "machine_head_with_fans_polygon": { "default_value": [ - [17, 70], - [17, -40], - [-17, -40], - [17, 70] + [-17, -70], + [-17, 40], + [17, 40], + [17, -70] ] }, "gantry_height": { "default_value": 10 }, "machine_start_gcode": { - "default_value": ";Gcode by Cura\nG90\nM106 S250\nG28 X Y\nG1 X50\nM109 S180\nG28\nM104 S{material_print_temperature_layer_0}\nG29\nM107\nG1 X100 Y20 F3000\nG1 Z0.5\nM109 S{material_print_temperature_layer_0}\nM82\nG92 E0\nG1 F200 E10\nG92 E0\nG1 Z3\nG1 F6000\n" + "default_value": ";Gcode by Cura\nG90\nM106 S255\nG28 X Y\nG1 X50\nM109 R90\nG28\nM104 S{material_print_temperature_layer_0}\nG29\nM107\nG1 X100 Y20 F3000\nG1 Z0.5\nM109 S{material_print_temperature_layer_0}\nM82\nG92 E0\nG1 F200 E10\nG92 E0\nG1 Z3\nG1 F6000\n" }, "machine_end_gcode": { "default_value": "\nM104 S0\nM106 S255\nM140 S0\nG91\nG1 E-1 F300\nG1 Z+3 F3000\nG90\nG28 X Y\nM107\nM84\n" @@ -46,17 +47,29 @@ "material_diameter": { "default_value": 1.75 }, + "default_material_print_temperature": { + "default_value": 205 + }, "speed_print": { "default_value": 60 }, "speed_travel": { - "value": "100" + "default_value": 100 }, "retraction_amount": { "default_value": 3.5 }, "retraction_speed": { "default_value": 50 + }, + "adhesion_type": { + "default_value": "skirt" + }, + "skirt_line_count": { + "default_value": 2 + }, + "layer_height_0": { + "default_value": 0.26 } } } diff --git a/resources/definitions/dagoma_neva.def.json b/resources/definitions/dagoma_neva.def.json index 21a557ac22..d133ec820c 100644 --- a/resources/definitions/dagoma_neva.def.json +++ b/resources/definitions/dagoma_neva.def.json @@ -1,5 +1,5 @@ { - "id": "Dagoma_neva", + "id": "dagoma_neva", "name": "Dagoma NEVA", "version": 2, "inherits": "fdmprinter", @@ -29,10 +29,10 @@ }, "machine_head_with_fans_polygon": { "default_value": [ - [17, 40], - [17, -70], - [-17, -70], - [17, 40] + [-36, -42], + [-36, 42], + [36, 42], + [36, -42] ] }, "gantry_height": { @@ -42,10 +42,10 @@ "default_value": "elliptic" }, "machine_gcode_flavor": { - "default_value": "RepRap (RepRap)" + "default_value": "RepRap" }, "machine_start_gcode": { - "default_value": ";Gcode by Cura\nG90\nG28\nM109 S100\nG29\nM104 S{material_print_temperature_layer_0}\nG0 X0 Y-85\nG0 Z0.26\nM109 S{material_print_temperature_layer_0}\nM82\nG92 E0\nG1 F200 E6\nG92 E0\nG1 F200 E-3.5\nG0 Z0.15\nG0 X10\nG0 Z3\nG1 F6000\n" + "default_value": ";Gcode by Cura\nG90\nG28\nM107\nM109 R100\nG29\nM109 S{material_print_temperature_layer_0} U-55 X55 V-85 Y-85 W0.26 Z0.26\nM82\nG92 E0\nG1 F200 E6\nG92 E0\nG1 F200 E-3.5\nG0 Z0.15\nG0 X10\nG0 Z3\nG1 F6000\n" }, "machine_end_gcode": { "default_value": "\nM104 S0\nM106 S255\nM140 S0\nG91\nG1 E-1 F300\nG1 Z+3 E-2 F9000\nG90\nG28\n" @@ -53,6 +53,9 @@ "material_diameter": { "default_value": 1.75 }, + "default_material_print_temperature": { + "default_value": 205 + }, "speed_print": { "default_value": 40 }, @@ -64,6 +67,15 @@ }, "retraction_speed": { "default_value": 60 + }, + "adhesion_type": { + "default_value": "skirt" + }, + "skirt_line_count": { + "default_value": 2 + }, + "layer_height_0": { + "default_value": 0.26 } } } diff --git a/resources/definitions/dagoma_neva_magis.def.json b/resources/definitions/dagoma_neva_magis.def.json new file mode 100644 index 0000000000..9f599cf85d --- /dev/null +++ b/resources/definitions/dagoma_neva_magis.def.json @@ -0,0 +1,81 @@ +{ + "id": "dagoma_neva_magis", + "name": "Dagoma NEVA", + "version": 2, + "inherits": "fdmprinter", + "metadata": { + "visible": true, + "author": "Dagoma", + "manufacturer": "Dagoma", + "file_formats": "text/x-gcode", + "platform": "neva.stl", + "platform_offset": [ 0, 0, 0] + }, + "overrides": { + "machine_width": { + "default_value": 195.55 + }, + "machine_height": { + "default_value": 205 + }, + "machine_depth": { + "default_value": 195.55 + }, + "machine_center_is_zero": { + "default_value": true + }, + "machine_nozzle_size": { + "default_value": 0.4 + }, + "machine_head_with_fans_polygon": { + "default_value": [ + [-36, -42], + [-36, 42], + [36, 42], + [36, -42] + ] + }, + "gantry_height": { + "default_value": 0 + }, + "machine_shape": { + "default_value": "elliptic" + }, + "machine_gcode_flavor": { + "default_value": "RepRap" + }, + "machine_start_gcode": { + "default_value": ";Gcode by Cura\nG90\nG28\nM107\nM109 R100\nG29\nM109 S{material_print_temperature_layer_0} U-55 X55 V-85 Y-85 W0.26 Z0.26\nM82\nG92 E0\nG1 F200 E6\nG92 E0\nG1 F200 E-3.5\nG0 Z0.15\nG0 X10\nG0 Z3\nG1 F6000\n" + }, + "machine_end_gcode": { + "default_value": "\nM104 S0\nM106 S255\nM140 S0\nG91\nG1 E-1 F300\nG1 Z+3 E-2 F9000\nG90\nG28\n" + }, + "material_diameter": { + "default_value": 1.75 + }, + "default_material_print_temperature": { + "default_value": 205 + }, + "speed_print": { + "default_value": 40 + }, + "speed_travel": { + "default_value": 120 + }, + "retraction_amount": { + "default_value": 3.8 + }, + "retraction_speed": { + "default_value": 60 + }, + "adhesion_type": { + "default_value": "skirt" + }, + "skirt_line_count": { + "default_value": 2 + }, + "layer_height_0": { + "default_value": 0.26 + } + } +} diff --git a/resources/quality/dagoma/dagoma_discoeasy200_pla_fast.inst.cfg b/resources/quality/dagoma/dagoma_discoeasy200_pla_fast.inst.cfg new file mode 100644 index 0000000000..6cd88f819c --- /dev/null +++ b/resources/quality/dagoma/dagoma_discoeasy200_pla_fast.inst.cfg @@ -0,0 +1,17 @@ +[general] +version = 3 +name = Fast +definition = dagoma_discoeasy200 + +[metadata] +setting_version = 4 +type = quality +quality_type = draft +weight = -2 +material = generic_pla + +[values] +layer_height = 0.2 + +material_print_temperature = =default_material_print_temperature + 10 +material_bed_temperature_layer_0 = =default_material_print_temperature + 10 diff --git a/resources/quality/dagoma/dagoma_discoeasy200_pla_fine.inst.cfg b/resources/quality/dagoma/dagoma_discoeasy200_pla_fine.inst.cfg new file mode 100644 index 0000000000..0f59401dd5 --- /dev/null +++ b/resources/quality/dagoma/dagoma_discoeasy200_pla_fine.inst.cfg @@ -0,0 +1,14 @@ +[general] +version = 3 +name = Fine +definition = dagoma_discoeasy200 + +[metadata] +setting_version = 4 +type = quality +quality_type = high +weight = 0 +material = generic_pla + +[values] +layer_height = 0.1 diff --git a/resources/quality/dagoma/dagoma_discoeasy200_pla_standard.inst.cfg b/resources/quality/dagoma/dagoma_discoeasy200_pla_standard.inst.cfg new file mode 100644 index 0000000000..9c1cc19f9e --- /dev/null +++ b/resources/quality/dagoma/dagoma_discoeasy200_pla_standard.inst.cfg @@ -0,0 +1,17 @@ +[general] +version = 3 +name = Standard +definition = dagoma_discoeasy200 + +[metadata] +setting_version = 4 +type = quality +quality_type = normal +weight = -1 +material = generic_pla + +[values] +layer_height = 0.15 + +material_print_temperature = =default_material_print_temperature + 5 +material_bed_temperature_layer_0 = =default_material_print_temperature + 5 diff --git a/resources/quality/dagoma/dagoma_neva_magis_pla_fast.inst.cfg b/resources/quality/dagoma/dagoma_neva_magis_pla_fast.inst.cfg new file mode 100644 index 0000000000..f0f5810e82 --- /dev/null +++ b/resources/quality/dagoma/dagoma_neva_magis_pla_fast.inst.cfg @@ -0,0 +1,17 @@ +[general] +version = 3 +name = Fast +definition = dagoma_neva + +[metadata] +setting_version = 4 +type = quality +quality_type = draft +weight = -2 +material = generic_pla + +[values] +layer_height = 0.2 + +material_print_temperature = =default_material_print_temperature + 10 +material_bed_temperature_layer_0 = =default_material_print_temperature + 10 diff --git a/resources/quality/dagoma/dagoma_neva_magis_pla_fine.inst.cfg b/resources/quality/dagoma/dagoma_neva_magis_pla_fine.inst.cfg new file mode 100644 index 0000000000..3dc4ce5627 --- /dev/null +++ b/resources/quality/dagoma/dagoma_neva_magis_pla_fine.inst.cfg @@ -0,0 +1,14 @@ +[general] +version = 3 +name = Fine +definition = dagoma_neva + +[metadata] +setting_version = 4 +type = quality +quality_type = high +weight = 0 +material = generic_pla + +[values] +layer_height = 0.1 diff --git a/resources/quality/dagoma/dagoma_neva_magis_pla_standard.inst.cfg b/resources/quality/dagoma/dagoma_neva_magis_pla_standard.inst.cfg new file mode 100644 index 0000000000..ce2157c90b --- /dev/null +++ b/resources/quality/dagoma/dagoma_neva_magis_pla_standard.inst.cfg @@ -0,0 +1,17 @@ +[general] +version = 3 +name = Standard +definition = dagoma_neva + +[metadata] +setting_version = 4 +type = quality +quality_type = normal +weight = -1 +material = generic_pla + +[values] +layer_height = 0.15 + +material_print_temperature = =default_material_print_temperature + 5 +material_bed_temperature_layer_0 = =default_material_print_temperature + 5 diff --git a/resources/quality/dagoma/dagoma_neva_pla_fast.inst.cfg b/resources/quality/dagoma/dagoma_neva_pla_fast.inst.cfg new file mode 100644 index 0000000000..f0f5810e82 --- /dev/null +++ b/resources/quality/dagoma/dagoma_neva_pla_fast.inst.cfg @@ -0,0 +1,17 @@ +[general] +version = 3 +name = Fast +definition = dagoma_neva + +[metadata] +setting_version = 4 +type = quality +quality_type = draft +weight = -2 +material = generic_pla + +[values] +layer_height = 0.2 + +material_print_temperature = =default_material_print_temperature + 10 +material_bed_temperature_layer_0 = =default_material_print_temperature + 10 diff --git a/resources/quality/dagoma/dagoma_neva_pla_fine.inst.cfg b/resources/quality/dagoma/dagoma_neva_pla_fine.inst.cfg new file mode 100644 index 0000000000..3dc4ce5627 --- /dev/null +++ b/resources/quality/dagoma/dagoma_neva_pla_fine.inst.cfg @@ -0,0 +1,14 @@ +[general] +version = 3 +name = Fine +definition = dagoma_neva + +[metadata] +setting_version = 4 +type = quality +quality_type = high +weight = 0 +material = generic_pla + +[values] +layer_height = 0.1 diff --git a/resources/quality/dagoma/dagoma_neva_pla_standard.inst.cfg b/resources/quality/dagoma/dagoma_neva_pla_standard.inst.cfg new file mode 100644 index 0000000000..ce2157c90b --- /dev/null +++ b/resources/quality/dagoma/dagoma_neva_pla_standard.inst.cfg @@ -0,0 +1,17 @@ +[general] +version = 3 +name = Standard +definition = dagoma_neva + +[metadata] +setting_version = 4 +type = quality +quality_type = normal +weight = -1 +material = generic_pla + +[values] +layer_height = 0.15 + +material_print_temperature = =default_material_print_temperature + 5 +material_bed_temperature_layer_0 = =default_material_print_temperature + 5 From ac49e3cf391b03e1cad370e37f82e728ab661c92 Mon Sep 17 00:00:00 2001 From: twosilly Date: Mon, 25 Jun 2018 09:15:00 +0800 Subject: [PATCH 005/174] Update Chinese translation --- resources/i18n/zh_CN/cura.po | 160 ++++++++++++-------- resources/i18n/zh_CN/fdmprinter.def.json.po | 74 +++++---- 2 files changed, 140 insertions(+), 94 deletions(-) diff --git a/resources/i18n/zh_CN/cura.po b/resources/i18n/zh_CN/cura.po index 0d6443021c..3cc29bd7b7 100644 --- a/resources/i18n/zh_CN/cura.po +++ b/resources/i18n/zh_CN/cura.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Cura 3.4\n" "Report-Msgid-Bugs-To: r.dulek@ultimaker.com\n" "POT-Creation-Date: 2018-06-06 16:13+0200\n" -"PO-Revision-Date: 2018-04-11 14:40+0100\n" +"PO-Revision-Date: 2018-06-22 11:32+0800\n" "Last-Translator: Bothof \n" "Language-Team: PCDotFan , Bothof \n" "Language: zh_CN\n" @@ -16,7 +16,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Poedit 1.7.3\n" +"X-Generator: Poedit 1.8.13\n" #: /home/ruben/Projects/Cura/plugins/MachineSettingsAction/MachineSettingsAction.py:22 msgctxt "@action" @@ -43,7 +43,7 @@ msgstr "GCode 文件" #: /home/ruben/Projects/Cura/plugins/ModelChecker/ModelChecker.py:30 msgctxt "@info:title" msgid "3D Model Assistant" -msgstr "3D 模型助手" +msgstr "三维模型的助理" #: /home/ruben/Projects/Cura/plugins/ModelChecker/ModelChecker.py:80 #, python-brace-format @@ -53,7 +53,11 @@ msgid "" "

{model_names}

\n" "

Find out how to ensure the best possible print quality and reliability.

\n" "

View print quality guide

" -msgstr "

由于模型大小及材料配置原因,一个或多个 3D 模型打印时可能会质量不佳:

\n

{model_names}

\n

了解如何保证最佳打印质量及可靠性。

\n

查看打印质量指导手册

" +msgstr "" +"

由于模型的大小和材质的配置,一个或多个3D模型可能无法最优地打印:

\n" +"

{model_names}

\n" +"

找出如何确保最好的打印质量和可靠性.

\n" +"

查看打印质量指南

" #: /home/ruben/Projects/Cura/plugins/Doodle3D-cura-plugin/Doodle3D/D3DCloudPrintOutputDevicePlugin.py:65 msgctxt "@action:button" @@ -109,7 +113,7 @@ msgstr "已发送至 Doodle3D Connect 的文件" #: /home/ruben/Projects/Cura/plugins/Doodle3D-cura-plugin/Doodle3D/D3DCloudPrintOutputDevicePlugin.py:214 msgctxt "@action:button" msgid "Open Connect..." -msgstr "打开 Connect..." +msgstr "打开 链接..." #: /home/ruben/Projects/Cura/plugins/Doodle3D-cura-plugin/Doodle3D/D3DCloudPrintOutputDevicePlugin.py:214 msgctxt "@info:tooltip" @@ -160,7 +164,7 @@ msgstr "X3G 文件" #: /home/ruben/Projects/Cura/plugins/X3GWriter/build/GPX-prefix/src/GPX/slicerplugins/cura15.06/X3gWriter/__init__.py:16 msgctxt "X3g Writer Plugin Description" msgid "Writes X3g to files" -msgstr "将 X3g 写入文件" +msgstr "写入 X3g 到文件" #: /home/ruben/Projects/Cura/plugins/X3GWriter/build/GPX-prefix/src/GPX/slicerplugins/cura15.06/X3gWriter/__init__.py:21 msgctxt "X3g Writer File Description" @@ -216,7 +220,7 @@ msgstr "正在保存" #, python-brace-format msgctxt "@info:status Don't translate the XML tags or !" msgid "Could not save to {0}: {1}" -msgstr "无法保存到 {0}{1}" +msgstr "无法保存到 {0}{1}" #: /home/ruben/Projects/Cura/plugins/RemovableDriveOutputDevice/RemovableDriveOutputDevice.py:123 #, python-brace-format @@ -570,12 +574,12 @@ msgstr "正在收集数据" #: /home/ruben/Projects/Cura/plugins/SliceInfoPlugin/SliceInfo.py:49 msgctxt "@action:button" msgid "More info" -msgstr "更多信息" +msgstr "详细信息" #: /home/ruben/Projects/Cura/plugins/SliceInfoPlugin/SliceInfo.py:50 msgctxt "@action:tooltip" msgid "See more information on what data Cura sends." -msgstr "了解更多有关 Cura 所发送数据的信息。" +msgstr "请参阅更多关于Cura发送的数据的信息。" #: /home/ruben/Projects/Cura/plugins/SliceInfoPlugin/SliceInfo.py:52 msgctxt "@action:button" @@ -602,7 +606,9 @@ msgctxt "@info:status" msgid "" "Could not export using \"{}\" quality!\n" "Felt back to \"{}\"." -msgstr "无法使用 \"{}\" 导出质量!\n返回 \"{}\"。" +msgstr "" +"无法使用 \"{}\" 导出质量!\n" +"返回 \"{}\"。" #: /home/ruben/Projects/Cura/plugins/ImageReader/__init__.py:14 msgctxt "@item:inlistbox" @@ -850,7 +856,7 @@ msgstr "文件已存在" #, python-brace-format msgctxt "@label Don't translate the XML tag !" msgid "The file {0} already exists. Are you sure you want to overwrite it?" -msgstr "文件 {0} 已存在。 您确定要覆盖它吗?" +msgstr "文件 {0} 已存在。您确定要覆盖它吗?" #: /home/ruben/Projects/Cura/cura/Settings/ExtrudersModel.py:212 msgctxt "@menuitem" @@ -1012,7 +1018,7 @@ msgstr "成形空间体积" #: /home/ruben/Projects/Cura/cura/Backups/Backup.py:99 msgctxt "@info:backup_failed" msgid "Could not create archive from user data directory: {}" -msgstr "不能从用户数据目录创建存档:{}" +msgstr "不能从用户数据目录创建存档: {}" #: /home/ruben/Projects/Cura/cura/Backups/Backup.py:104 msgctxt "@info:title" @@ -1022,12 +1028,12 @@ msgstr "备份" #: /home/ruben/Projects/Cura/cura/Backups/Backup.py:116 msgctxt "@info:backup_failed" msgid "Tried to restore a Cura backup without having proper data or meta data." -msgstr "在没有合适数据或元数据时尝试恢复 Cura 备份。" +msgstr "试图在没有适当数据或元数据的情况下恢复Cura备份。" #: /home/ruben/Projects/Cura/cura/Backups/Backup.py:126 msgctxt "@info:backup_failed" msgid "Tried to restore a Cura backup that does not match your current version." -msgstr "尝试恢复的 Cura 备份与当前版本不匹配。" +msgstr "试图恢复与您当前版本不匹配的Cura备份。" #: /home/ruben/Projects/Cura/cura/MultiplyObjectsJob.py:27 msgctxt "@info:status" @@ -1078,7 +1084,12 @@ msgid "" "

Backups can be found in the configuration folder.

\n" "

Please send us this Crash Report to fix the problem.

\n" " " -msgstr "

糟糕,Ultimaker Cura 似乎遇到了问题。

\n

在启动时发生了不可修复的错误。这可能是因某些配置文件出错导致的。建议您备份并重置配置。

\n

您可在配置文件夹中找到备份。

\n

请向我们发送此错误报告,以便解决问题。

\n " +msgstr "" +"

糟糕,Ultimaker Cura 似乎遇到了问题。

\n" +"

在启动时发生了不可修复的错误。这可能是因某些配置文件出错导致的。建议您备份并重置配置。

\n" +"

您可在配置文件夹中找到备份。

\n" +"

请向我们发送此错误报告,以便解决问题。

\n" +" " #: /home/ruben/Projects/Cura/cura/CrashHandler.py:102 msgctxt "@action:button" @@ -1111,7 +1122,10 @@ msgid "" "

A fatal error has occurred in Cura. Please send us this Crash Report to fix the problem

\n" "

Please use the \"Send report\" button to post a bug report automatically to our servers

\n" " " -msgstr "

Cura 发生了严重错误。请将这份错误报告发送给我们以便修复问题

\n

请使用“发送报告”按钮将错误报告自动发布到我们的服务器

\n " +msgstr "" +"

Cura 发生了严重错误。请将这份错误报告发送给我们以便修复问题

\n" +"

请使用“发送报告”按钮将错误报告自动发布到我们的服务器

\n" +" " #: /home/ruben/Projects/Cura/cura/CrashHandler.py:177 msgctxt "@title:groupbox" @@ -1425,7 +1439,7 @@ msgstr "已安装" #: /home/ruben/Projects/Cura/plugins/Toolbox/resources/qml/ToolboxErrorPage.qml:16 msgctxt "@info" msgid "Could not connect to the Cura Package database. Please check your connection." -msgstr "连接不上 Cura Package 数据库。请检查您的连接。" +msgstr "无法连接到Cura包数据库。请检查您的连接。" #: /home/ruben/Projects/Cura/plugins/Toolbox/resources/qml/ToolboxInstalledPage.qml:35 #: /home/ruben/Projects/Cura/plugins/Toolbox/resources/qml/ToolboxHeader.qml:26 @@ -1441,7 +1455,7 @@ msgstr "版本" #: /home/ruben/Projects/Cura/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml:85 msgctxt "@label" msgid "Last updated" -msgstr "最后更新" +msgstr "更新日期" #: /home/ruben/Projects/Cura/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml:91 msgctxt "@label" @@ -1464,13 +1478,13 @@ msgstr "更新" #: /home/ruben/Projects/Cura/plugins/Toolbox/resources/qml/ToolboxInstalledTileActions.qml:31 msgctxt "@action:button" msgid "Updating" -msgstr "更新中" +msgstr "更新" #: /home/ruben/Projects/Cura/plugins/Toolbox/resources/qml/ToolboxDetailTileActions.qml:46 #: /home/ruben/Projects/Cura/plugins/Toolbox/resources/qml/ToolboxInstalledTileActions.qml:32 msgctxt "@action:button" msgid "Updated" -msgstr "已更新" +msgstr "更新" #: /home/ruben/Projects/Cura/plugins/Toolbox/resources/qml/Toolbox.qml:13 msgctxt "@title" @@ -1480,12 +1494,12 @@ msgstr "工具箱" #: /home/ruben/Projects/Cura/plugins/Toolbox/resources/qml/ToolboxBackColumn.qml:25 msgctxt "@action:button" msgid "Back" -msgstr "返回" +msgstr "背部" #: /home/ruben/Projects/Cura/plugins/Toolbox/resources/qml/ToolboxFooter.qml:17 msgctxt "@info" msgid "You will need to restart Cura before changes in packages have effect." -msgstr "您需要重新启动 Cura 才能使程序包变更生效。" +msgstr "在包装更改生效之前,您需要重新启动Cura。" #: /home/ruben/Projects/Cura/plugins/Toolbox/resources/qml/ToolboxFooter.qml:32 msgctxt "@info:button" @@ -1495,12 +1509,12 @@ msgstr "退出 Cura" #: /home/ruben/Projects/Cura/plugins/Toolbox/resources/qml/ToolboxHeader.qml:54 msgctxt "@title:tab" msgid "Installed" -msgstr "已安装" +msgstr "安装" #: /home/ruben/Projects/Cura/plugins/Toolbox/resources/qml/ToolboxInstalledTileActions.qml:19 msgctxt "@label" msgid "Will install upon restarting" -msgstr "将在重新启动时进行安装" +msgstr "将安装后重新启动" #: /home/ruben/Projects/Cura/plugins/Toolbox/resources/qml/ToolboxInstalledTileActions.qml:51 msgctxt "@action:button" @@ -1523,7 +1537,10 @@ msgid "" "This plugin contains a license.\n" "You need to accept this license to install this plugin.\n" "Do you agree with the terms below?" -msgstr "该插件包含一个许可。\n您需要接受此许可才能安装此插件。\n是否同意下列条款?" +msgstr "" +"该插件包含一个许可。\n" +"您需要接受此许可才能安装此插件。\n" +"是否同意下列条款?" #: /home/ruben/Projects/Cura/plugins/Toolbox/resources/qml/ToolboxLicenseDialog.qml:54 msgctxt "@action:button" @@ -1538,7 +1555,7 @@ msgstr "拒绝" #: /home/ruben/Projects/Cura/plugins/Toolbox/resources/qml/ToolboxDownloadsShowcase.qml:17 msgctxt "@label" msgid "Featured" -msgstr "特点" +msgstr "精选" #: /home/ruben/Projects/Cura/plugins/Toolbox/resources/qml/ToolboxCompatibilityChart.qml:20 msgctxt "@label" @@ -1548,7 +1565,7 @@ msgstr "兼容性" #: /home/ruben/Projects/Cura/plugins/Toolbox/resources/qml/ToolboxLoadingPage.qml:16 msgctxt "@info" msgid "Fetching packages..." -msgstr "正在读取程序包…" +msgstr "获取包……" #: /home/ruben/Projects/Cura/plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml:87 msgctxt "@label" @@ -1638,7 +1655,10 @@ msgid "" "To print directly to your printer over the network, please make sure your printer is connected to the network using a network cable or by connecting your printer to your WIFI network. If you don't connect Cura with your printer, you can still use a USB drive to transfer g-code files to your printer.\n" "\n" "Select your printer from the list below:" -msgstr "要通过网络向打印机发送打印请求,请确保您的打印机已通过网线或 WIFI 连接到网络。若您不能连接 Cura 与打印机,您仍然可以使用 USB 设备将 G-code 文件传输到打印机。\n\n从以下列表中选择您的打印机:" +msgstr "" +"要通过网络向打印机发送打印请求,请确保您的打印机已通过网线或 WIFI 连接到网络。若您不能连接 Cura 与打印机,您仍然可以使用 USB 设备将 G-code 文件传输到打印机。\n" +"\n" +"从以下列表中选择您的打印机:" #: /home/ruben/Projects/Cura/plugins/UM3NetworkPrinting/DiscoverUM3Action.qml:96 #: /home/ruben/Projects/Cura/resources/qml/Preferences/MachinesPage.qml:42 @@ -1808,7 +1828,7 @@ msgstr "已完成" #: /home/ruben/Projects/Cura/plugins/UM3NetworkPrinting/PrinterInfoBlock.qml:392 msgctxt "@label" msgid "Preparing to print" -msgstr "准备打印" +msgstr "正在准备打印" #: /home/ruben/Projects/Cura/plugins/UM3NetworkPrinting/PrinterInfoBlock.qml:273 msgctxt "@label:status" @@ -1999,12 +2019,12 @@ msgstr "更改目前启用的后期处理脚本" #: /home/ruben/Projects/Cura/plugins/SliceInfoPlugin/MoreInfoWindow.qml:16 msgctxt "@title:window" msgid "More information on anonymous data collection" -msgstr "有关匿名数据收集的更多信息" +msgstr "更多关于匿名数据收集的信息" #: /home/ruben/Projects/Cura/plugins/SliceInfoPlugin/MoreInfoWindow.qml:66 msgctxt "@text:window" msgid "Cura sends anonymous data to Ultimaker in order to improve the print quality and user experience. Below is an example of all the data that is sent." -msgstr "Cura 向 Ultimaker 发送匿名数据以改善打印质量与用户体验。以下是所发送数据的示例。" +msgstr "Cura向最终用户发送匿名数据,以提高打印质量和用户体验。下面是发送的所有数据的一个示例。" #: /home/ruben/Projects/Cura/plugins/SliceInfoPlugin/MoreInfoWindow.qml:101 msgctxt "@text:window" @@ -2014,7 +2034,7 @@ msgstr "我不想发送这些数据" #: /home/ruben/Projects/Cura/plugins/SliceInfoPlugin/MoreInfoWindow.qml:111 msgctxt "@text:window" msgid "Allow sending these data to Ultimaker and help us improve Cura" -msgstr "允许向 Ultimaker 发送这些数据并帮助我们改善 Cura" +msgstr "允许将这些数据发送到最后一个,帮助我们改进Cura" #: /home/ruben/Projects/Cura/plugins/ImageReader/ConfigUI.qml:19 msgctxt "@title:window" @@ -2526,7 +2546,9 @@ msgctxt "@text:window" msgid "" "You have customized some profile settings.\n" "Would you like to keep or discard those settings?" -msgstr "您已自定义某些配置文件设置。\n您想保留或舍弃这些设置吗?" +msgstr "" +"您已自定义某些配置文件设置。\n" +"您想保留或舍弃这些设置吗?" #: /home/ruben/Projects/Cura/resources/qml/DiscardOrKeepProfileChangesDialog.qml:110 msgctxt "@title:column" @@ -2589,7 +2611,7 @@ msgstr "确认直径更改" #: /home/ruben/Projects/Cura/resources/qml/Preferences/MaterialView.qml:95 msgctxt "@label (%1 is a number)" msgid "The new filament diameter is set to %1 mm, which is not compatible with the current extruder. Do you wish to continue?" -msgstr "新的耗材直径设置为 %1 mm,与当前挤出机不兼容。是否要继续?" +msgstr "新的灯丝直径被设置为%1毫米,这与当前的挤出机不兼容。你想继续吗?" #: /home/ruben/Projects/Cura/resources/qml/Preferences/MaterialView.qml:128 msgctxt "@label" @@ -2860,12 +2882,12 @@ msgstr "放大过小模型" #: /home/ruben/Projects/Cura/resources/qml/Preferences/GeneralPage.qml:507 msgctxt "@info:tooltip" msgid "Should models be selected after they are loaded?" -msgstr "是否在加载后选择模型?" +msgstr "模型是否应该在加载后被选中?" #: /home/ruben/Projects/Cura/resources/qml/Preferences/GeneralPage.qml:512 msgctxt "@option:check" msgid "Select models when loaded" -msgstr "加载后选择模型" +msgstr "选择模型时加载" #: /home/ruben/Projects/Cura/resources/qml/Preferences/GeneralPage.qml:522 msgctxt "@info:tooltip" @@ -2950,7 +2972,7 @@ msgstr "(匿名)发送打印信息" #: /home/ruben/Projects/Cura/resources/qml/Preferences/GeneralPage.qml:708 msgctxt "@action:button" msgid "More information" -msgstr "更多信息" +msgstr "详细信息" #: /home/ruben/Projects/Cura/resources/qml/Preferences/GeneralPage.qml:726 msgctxt "@label" @@ -3226,7 +3248,9 @@ msgctxt "@info:credit" msgid "" "Cura is developed by Ultimaker B.V. in cooperation with the community.\n" "Cura proudly uses the following open source projects:" -msgstr "Cura 由 Ultimaker B.V. 与社区合作开发。\nCura 使用以下开源项目:" +msgstr "" +"Cura 由 Ultimaker B.V. 与社区合作开发。\n" +"Cura 使用以下开源项目:" #: /home/ruben/Projects/Cura/resources/qml/AboutDialog.qml:118 msgctxt "@label" @@ -3339,7 +3363,10 @@ msgid "" "Some setting/override values are different from the values stored in the profile.\n" "\n" "Click to open the profile manager." -msgstr "某些设置/重写值与存储在配置文件中的值不同。\n\n点击打开配置文件管理器。" +msgstr "" +"某些设置/重写值与存储在配置文件中的值不同。\n" +"\n" +"点击打开配置文件管理器。" #: /home/ruben/Projects/Cura/resources/qml/Settings/SettingView.qml:199 msgctxt "@label:textbox" @@ -3393,7 +3420,10 @@ msgid "" "Some hidden settings use values different from their normal calculated value.\n" "\n" "Click to make these settings visible." -msgstr "一些隐藏设置正在使用有别于一般设置的计算值。\n\n单击以使这些设置可见。" +msgstr "" +"一些隐藏设置正在使用有别于一般设置的计算值。\n" +"\n" +"单击以使这些设置可见。" #: /home/ruben/Projects/Cura/resources/qml/Settings/SettingItem.qml:61 msgctxt "@label Header for list of settings." @@ -3421,7 +3451,10 @@ msgid "" "This setting has a value that is different from the profile.\n" "\n" "Click to restore the value of the profile." -msgstr "此设置的值与配置文件不同。\n\n单击以恢复配置文件的值。" +msgstr "" +"此设置的值与配置文件不同。\n" +"\n" +"单击以恢复配置文件的值。" #: /home/ruben/Projects/Cura/resources/qml/Settings/SettingItem.qml:286 msgctxt "@label" @@ -3429,7 +3462,10 @@ msgid "" "This setting is normally calculated, but it currently has an absolute value set.\n" "\n" "Click to restore the calculated value." -msgstr "此设置通常可被自动计算,但其当前已被绝对定义。\n\n单击以恢复自动计算的值。" +msgstr "" +"此设置通常可被自动计算,但其当前已被绝对定义。\n" +"\n" +"单击以恢复自动计算的值。" #: /home/ruben/Projects/Cura/resources/qml/PrinterOutput/ManualPrinterControl.qml:129 msgctxt "@label" @@ -3573,7 +3609,7 @@ msgstr "打印平台(&B)" #: /home/ruben/Projects/Cura/resources/qml/Menus/SettingVisibilityPresetsMenu.qml:13 msgctxt "@action:inmenu" msgid "Visible Settings" -msgstr "可见设置" +msgstr "可见设置:" #: /home/ruben/Projects/Cura/resources/qml/Menus/SettingVisibilityPresetsMenu.qml:43 msgctxt "@action:inmenu" @@ -3620,7 +3656,7 @@ msgstr "是" #: /home/ruben/Projects/Cura/resources/qml/Menus/ConfigurationMenu/SyncButton.qml:16 msgctxt "@label:extruder label" msgid "No" -msgstr "否" +msgstr "不是" #: /home/ruben/Projects/Cura/resources/qml/Menus/RecentFilesMenu.qml:13 msgctxt "@title:menu menubar:file" @@ -3637,7 +3673,9 @@ msgctxt "@label:listbox" msgid "" "Print Setup disabled\n" "G-code files cannot be modified" -msgstr "打印设置已禁用\nG-code 文件无法被修改" +msgstr "" +"打印设置已禁用\n" +"G-code 文件无法被修改" #: /home/ruben/Projects/Cura/resources/qml/PrepareSidebar.qml:341 msgctxt "@label Hours and minutes" @@ -3679,7 +3717,7 @@ msgstr "推荐的打印设置

使用针对所选打印机、 #: /home/ruben/Projects/Cura/resources/qml/PrepareSidebar.qml:582 msgctxt "@tooltip" msgid "Custom Print Setup

Print with finegrained control over every last bit of the slicing process." -msgstr "自定义打印设置
对切片过程中的每一个细节进行精细控制。" +msgstr "自定义打印设置

对切片过程中的每一个细节进行精细控制。" #: /home/ruben/Projects/Cura/resources/qml/PrintMonitor.qml:107 msgctxt "@label" @@ -3913,7 +3951,7 @@ msgstr "显示配置文件夹" #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:433 msgctxt "@action:menu" msgid "Browse packages..." -msgstr "浏览程序包..." +msgstr "浏览包……" #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:440 msgctxt "@action:inmenu menubar:view" @@ -4071,7 +4109,7 @@ msgstr "扩展(&X)" #: /home/ruben/Projects/Cura/resources/qml/Cura.qml:274 msgctxt "@title:menu menubar:toplevel" msgid "&Toolbox" -msgstr "工具箱(&T)" +msgstr "&工具箱" #: /home/ruben/Projects/Cura/resources/qml/Cura.qml:281 msgctxt "@title:menu menubar:toplevel" @@ -4086,7 +4124,7 @@ msgstr "帮助(&H)" #: /home/ruben/Projects/Cura/resources/qml/Cura.qml:335 msgctxt "@label" msgid "This package will be installed after restarting." -msgstr "此程序包将在重新启动后安装。" +msgstr "这个包将在重新启动后安装。" #: /home/ruben/Projects/Cura/resources/qml/Cura.qml:364 msgctxt "@action:button" @@ -4111,7 +4149,7 @@ msgstr "你确定要开始一个新项目吗?这将清除打印平台及任何 #: /home/ruben/Projects/Cura/resources/qml/Cura.qml:814 msgctxt "@window:title" msgid "Install Package" -msgstr "安装程序包" +msgstr "安装包" #: /home/ruben/Projects/Cura/resources/qml/Cura.qml:821 msgctxt "@title:window" @@ -4236,7 +4274,7 @@ msgstr "允许打印 Brim 或 Raft。这将在您的对象周围或下方添加 #: /home/ruben/Projects/Cura/resources/qml/SidebarSimple.qml:1043 msgctxt "@label" msgid "Need help improving your prints?
Read the Ultimaker Troubleshooting Guides" -msgstr "需要帮助改善您的打印?阅读 Ultimaker 故障排除指南" +msgstr "需要帮助改善您的打印?
阅读 Ultimaker 故障排除指南" #: /home/ruben/Projects/Cura/resources/qml/ExtruderButton.qml:16 msgctxt "@label %1 is filled in with the name of an extruder" @@ -4277,7 +4315,7 @@ msgstr "引擎日志" #: /home/ruben/Projects/Cura/resources/qml/SidebarHeader.qml:70 msgctxt "@label" msgid "Printer type" -msgstr "打印机类型" +msgstr "打印机类型:" #: /home/ruben/Projects/Cura/resources/qml/SidebarHeader.qml:372 msgctxt "@label" @@ -4317,7 +4355,7 @@ msgstr "编位当前打印平台" #: MachineSettingsAction/plugin.json msgctxt "description" msgid "Provides a way to change machine settings (such as build volume, nozzle size, etc.)." -msgstr "提供更改打印机设置(如成形空间体积、喷嘴口径等)的方法" +msgstr "提供一种改变机器设置的方法(如构建体积、喷嘴大小等)。" #: MachineSettingsAction/plugin.json msgctxt "name" @@ -4327,7 +4365,7 @@ msgstr "打印机设置操作" #: Toolbox/plugin.json msgctxt "description" msgid "Find, manage and install new Cura packages." -msgstr "查找、管理和安装新的 Cura 程序包。" +msgstr "查找、管理和安装新的Cura包。" #: Toolbox/plugin.json msgctxt "name" @@ -4427,7 +4465,7 @@ msgstr "USB 联机打印" #: UserAgreement/plugin.json msgctxt "description" msgid "Ask the user once if he/she agrees with our license." -msgstr "询问用户一次是否同意我们的许可" +msgstr "询问用户是否同意我们的许可证。" #: UserAgreement/plugin.json msgctxt "name" @@ -4437,12 +4475,12 @@ msgstr "用户协议" #: X3GWriter/plugin.json msgctxt "description" msgid "Allows saving the resulting slice as an X3G file, to support printers that read this format (Malyan, Makerbot and other Sailfish-based printers)." -msgstr "允许将切片结果保存为 X3G 文件,以支持能够读取这些格式的打印机(Malyan、Makerbot 以及其他基于 Sailfish 的打印机)。" +msgstr "允许将产生的切片保存为X3G文件,以支持读取此格式的打印机(Malyan、Makerbot和其他基于sailfish打印机的打印机)。" #: X3GWriter/plugin.json msgctxt "name" msgid "X3GWriter" -msgstr "X3GWriter" +msgstr "X3G写" #: GCodeGzWriter/plugin.json msgctxt "description" @@ -4497,7 +4535,7 @@ msgstr "可移动磁盘输出设备插件" #: UM3NetworkPrinting/plugin.json msgctxt "description" msgid "Manages network connections to Ultimaker 3 printers." -msgstr "管理与 Ultimaker 3 打印机的网络连接" +msgstr "管理与最后的3个打印机的网络连接。" #: UM3NetworkPrinting/plugin.json msgctxt "name" @@ -4627,12 +4665,12 @@ msgstr "版本自 3.2 升级到 3.3" #: VersionUpgrade/VersionUpgrade33to34/plugin.json msgctxt "description" msgid "Upgrades configurations from Cura 3.3 to Cura 3.4." -msgstr "将配置从 Cura 3.3 版本升级至 3.4 版本。" +msgstr "从Cura 3.3升级到Cura 3.4。" #: VersionUpgrade/VersionUpgrade33to34/plugin.json msgctxt "name" msgid "Version Upgrade 3.3 to 3.4" -msgstr "版本自 3.3 升级到 3.4" +msgstr "版本升级3.3到3.4" #: VersionUpgrade/VersionUpgrade25to26/plugin.json msgctxt "description" @@ -4777,7 +4815,7 @@ msgstr "3MF 写入器" #: UltimakerMachineActions/plugin.json msgctxt "description" msgid "Provides machine actions for Ultimaker machines (such as bed leveling wizard, selecting upgrades, etc.)." -msgstr "为 Ultimaker 打印机提供操作选项(如平台调平向导、选择升级等)" +msgstr "为最后的机器提供机器操作(例如,热床调平向导,选择升级等)。" #: UltimakerMachineActions/plugin.json msgctxt "name" diff --git a/resources/i18n/zh_CN/fdmprinter.def.json.po b/resources/i18n/zh_CN/fdmprinter.def.json.po index 66b848d98b..b73600c3ef 100644 --- a/resources/i18n/zh_CN/fdmprinter.def.json.po +++ b/resources/i18n/zh_CN/fdmprinter.def.json.po @@ -8,14 +8,14 @@ msgstr "" "Project-Id-Version: Cura 3.4\n" "Report-Msgid-Bugs-To: r.dulek@ultimaker.com\n" "POT-Creation-Date: 2018-03-29 08:36+0200\n" -"PO-Revision-Date: 2018-04-11 14:40+0100\n" +"PO-Revision-Date: 2018-06-22 11:44+0800\n" "Last-Translator: Bothof \n" "Language-Team: PCDotFan , Bothof \n" "Language: zh_CN\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.7.3\n" +"X-Generator: Poedit 1.8.13\n" "Plural-Forms: nplurals=1; plural=0;\n" #: fdmprinter.def.json @@ -58,7 +58,9 @@ msgctxt "machine_start_gcode description" msgid "" "G-code commands to be executed at the very start - separated by \n" "." -msgstr "在开始时执行的 G-code 命令 - 以 \n 分行。" +msgstr "" +"在开始时执行的 G-code 命令 - 以 \n" +" 分行。" #: fdmprinter.def.json msgctxt "machine_end_gcode label" @@ -70,7 +72,9 @@ msgctxt "machine_end_gcode description" msgid "" "G-code commands to be executed at the very end - separated by \n" "." -msgstr "在结束前执行的 G-code 命令 - 以 \n 分行。" +msgstr "" +"在结束前执行的 G-code 命令 - 以 \n" +" 分行。" #: fdmprinter.def.json msgctxt "material_guid label" @@ -1030,7 +1034,7 @@ msgstr "同心圆" #: fdmprinter.def.json msgctxt "top_bottom_pattern option zigzag" msgid "Zig Zag" -msgstr "Zig Zag" +msgstr "锯齿状" #: fdmprinter.def.json msgctxt "top_bottom_pattern_0 label" @@ -1055,7 +1059,7 @@ msgstr "同心圆" #: fdmprinter.def.json msgctxt "top_bottom_pattern_0 option zigzag" msgid "Zig Zag" -msgstr "Zig Zag" +msgstr "锯齿状" #: fdmprinter.def.json msgctxt "skin_angles label" @@ -1085,7 +1089,7 @@ msgstr "优化壁打印顺序" #: fdmprinter.def.json msgctxt "optimize_wall_printing_order description" msgid "Optimize the order in which walls are printed so as to reduce the number of retractions and the distance travelled. Most parts will benefit from this being enabled but some may actually take longer so please compare the print time estimates with and without optimization. First layer is not optimized when choosing brim as build plate adhesion type." -msgstr "优化打印各个壁的顺序,以减少回抽次数和空驶距离。启用此设置将对大部分零件有益,但有的则会耗费更长时间,因此请将优化和不优化的打印时间估计值进行对比。当选择 brim 作为打印平台的粘着类型时,第一层不会优化。" +msgstr "优化墙壁印刷的顺序,以减少回撤的数量和旅行的距离。大多数部件会从启用这个功能中受益,但有些可能会花费更长的时间,所以请将打印时间估算与不优化进行比较。第一层在选择边缘作为构建板附着力类型时没有进行优化。" #: fdmprinter.def.json msgctxt "outer_inset_first label" @@ -1675,22 +1679,22 @@ msgstr "不要生成小于此面积的填充区域(使用皮肤取代)。" #: fdmprinter.def.json msgctxt "infill_support_enabled label" msgid "Infill Support" -msgstr "填充支撑物" +msgstr "填充支撑" #: fdmprinter.def.json msgctxt "infill_support_enabled description" msgid "Print infill structures only where tops of the model should be supported. Enabling this reduces print time and material usage, but leads to ununiform object strength." -msgstr "只打印需要支撑模型顶部的填充结构。应用此项可减少打印时间与材料消耗,但会导致模型的强度不均衡。" +msgstr "只在模型的顶部支持打印填充结构。这样可以减少打印时间和材料的使用,但是会导致不一致的对象强度。" #: fdmprinter.def.json msgctxt "infill_support_angle label" msgid "Infill Overhang Angle" -msgstr "填充悬垂角度" +msgstr "填充悬垂角" #: fdmprinter.def.json msgctxt "infill_support_angle description" msgid "The minimum angle of internal overhangs for which infill is added. At a value of 0° objects are totally filled with infill, 90° will not provide any infill." -msgstr "加入填充的内部悬垂最小角度。角度为 0° 时,模型会进行完全填充;角度为 90° 时不会进行任何填充。" +msgstr "添加内填充的内部覆盖的最小角度。在一个0的值中,完全填满了填充,90将不提供任何填充。" #: fdmprinter.def.json msgctxt "skin_preshrink label" @@ -2035,12 +2039,12 @@ msgstr "执行最大回抽计数的范围。 该值应与回抽距离大致相 #: fdmprinter.def.json msgctxt "limit_support_retractions label" msgid "Limit Support Retractions" -msgstr "限制支撑回抽" +msgstr "支撑限制被撤销" #: fdmprinter.def.json msgctxt "limit_support_retractions description" msgid "Omit retraction when moving from support to support in a straight line. Enabling this setting saves print time, but can lead to excesive stringing within the support structure." -msgstr "从一个支撑直线移至另一支撑时忽略回抽。此设置能节省打印时间,但会导致支撑结构内出现过度串接。" +msgstr "当从支撑移动到支撑直线时,省略撤回。启用这个设置可以节省打印时间,但是可以在支撑结构中产生出色的字符串。" #: fdmprinter.def.json msgctxt "material_standby_temperature label" @@ -2735,17 +2739,17 @@ msgstr "所有" #: fdmprinter.def.json msgctxt "retraction_combing option noskin" msgid "Not in Skin" -msgstr "不在皮肤区域" +msgstr "除了皮肤" #: fdmprinter.def.json msgctxt "retraction_combing_max_distance label" msgid "Max Comb Distance With No Retract" -msgstr "不进行回抽的最大梳理距离" +msgstr "最大梳距,无收缩" #: fdmprinter.def.json msgctxt "retraction_combing_max_distance description" msgid "When non-zero, combing travel moves that are longer than this distance will use retraction." -msgstr "当梳理空驶移动距离非零时,超过此最大距离将使用回抽。" +msgstr "当非零的时候,梳理比这段距离更长的旅行移动将会使用撤回。" #: fdmprinter.def.json msgctxt "travel_retract_before_outer_wall label" @@ -2770,12 +2774,12 @@ msgstr "喷嘴会在空驶时避开已打印的部分。 此选项仅在启用 #: fdmprinter.def.json msgctxt "travel_avoid_supports label" msgid "Avoid Supports When Traveling" -msgstr "空驶时避开支撑物" +msgstr "避免移动时支撑" #: fdmprinter.def.json msgctxt "travel_avoid_supports description" msgid "The nozzle avoids already printed supports when traveling. This option is only available when combing is enabled." -msgstr "喷嘴会在空驶时避开已打印的支撑物。此选项仅在启用梳理功能时可用。" +msgstr "在空走时,喷嘴避免了已打印的支撑。只有在启用了梳理时才可以使用此选项。" #: fdmprinter.def.json msgctxt "travel_avoid_distance label" @@ -3135,12 +3139,12 @@ msgstr "交叉" #: fdmprinter.def.json msgctxt "support_wall_count label" msgid "Support Wall Line Count" -msgstr "支撑壁走线次数" +msgstr "支撑墙行数" #: fdmprinter.def.json msgctxt "support_wall_count description" msgid "The number of walls with which to surround support infill. Adding a wall can make support print more reliably and can support overhangs better, but increases print time and material used." -msgstr "环绕支撑物填充的壁的数量。增加一个壁可使支撑打印得更为牢固、更好地支撑悬垂部分,但会增加打印时间与材料消耗。" +msgstr "包围支撑的墙的数量。添加一堵墙可以使支持打印更加可靠,并且可以更好地支持挂起,但增加了打印时间和使用的材料。" #: fdmprinter.def.json msgctxt "zig_zaggify_support label" @@ -3712,7 +3716,9 @@ msgctxt "skirt_gap description" msgid "" "The horizontal distance between the skirt and the first layer of the print.\n" "This is the minimum distance. Multiple skirt lines will extend outwards from this distance." -msgstr "skirt 和打印第一层之间的水平距离。\n这是最小距离。多个 skirt 走线将从此距离向外延伸。" +msgstr "" +"skirt 和打印第一层之间的水平距离。\n" +"这是最小距离。多个 skirt 走线将从此距离向外延伸。" #: fdmprinter.def.json msgctxt "skirt_brim_minimal_length label" @@ -4672,12 +4678,12 @@ msgstr "走线部分在切片后的最小尺寸。如果提高此值,网格的 #: fdmprinter.def.json msgctxt "meshfix_maximum_travel_resolution label" msgid "Maximum Travel Resolution" -msgstr "最大空驶分辨率" +msgstr "空走的最大分辨率" #: fdmprinter.def.json msgctxt "meshfix_maximum_travel_resolution description" msgid "The minimum size of a travel line segment after slicing. If you increase this, the travel moves will have less smooth corners. This may allow the printer to keep up with the speed it has to process g-code, but it may cause model avoidance to become less accurate." -msgstr "空驶走线部分在切片后的最小尺寸。如果增加此值,将影响空驶移动时的平稳角度。这可让打印机保持处理 g-code 所需的速度,但可能致使模型回避精确度减少。" +msgstr "切片后的旅行线路段的最小尺寸。如果你增加了这个,旅行的移动就会变得不那么平滑了。这可能使打印机能够跟上它处理g代码的速度,但是它可能导致模型的避免变得不那么准确。" #: fdmprinter.def.json msgctxt "support_skip_some_zags label" @@ -4842,22 +4848,22 @@ msgstr "交叉 3D 图案的四向交叉处的气槽大小,高度为图案与 #: fdmprinter.def.json msgctxt "cross_infill_density_image label" msgid "Cross Infill Density Image" -msgstr "交叉填充密度图像" +msgstr "交叉加密图像密度" #: fdmprinter.def.json msgctxt "cross_infill_density_image description" msgid "The file location of an image of which the brightness values determine the minimal density at the corresponding location in the infill of the print." -msgstr "图像的文件位置,该图像的亮度值决定打印填充物相应位置的最小密度。" +msgstr "在打印的填充中,亮度值决定了相应位置的最小密度的图像的文件位置。" #: fdmprinter.def.json msgctxt "cross_support_density_image label" msgid "Cross Fill Density Image for Support" -msgstr "支撑物交叉填充密度图像" +msgstr "交叉填充密度图象" #: fdmprinter.def.json msgctxt "cross_support_density_image description" msgid "The file location of an image of which the brightness values determine the minimal density at the corresponding location in the support." -msgstr "图像的文件位置,该图像的亮度值决定支撑物相应位置的最小密度。" +msgstr "一个图像的文件位置,在这个图像中,亮度值决定了在支持中相应位置的最小密度。" #: fdmprinter.def.json msgctxt "spaghetti_infill_enabled label" @@ -5169,7 +5175,9 @@ msgctxt "wireframe_up_half_speed description" msgid "" "Distance of an upward move which is extruded with half speed.\n" "This can cause better adhesion to previous layers, while not heating the material in those layers too much. Only applies to Wire Printing." -msgstr "以半速挤出的上行移动的距离。\n这会与之前的层产生更好的附着,而不会将这些层中的材料过度加热。 仅应用于单线打印。" +msgstr "" +"以半速挤出的上行移动的距离。\n" +"这会与之前的层产生更好的附着,而不会将这些层中的材料过度加热。 仅应用于单线打印。" #: fdmprinter.def.json msgctxt "wireframe_top_jump label" @@ -5294,7 +5302,7 @@ msgstr "自适应图层最大变化" #: fdmprinter.def.json msgctxt "adaptive_layer_height_variation description" msgid "The maximum allowed height different from the base layer height." -msgstr "相比底层高度所允许的最大高度。" +msgstr "最大允许高度与基层高度不同。" #: fdmprinter.def.json msgctxt "adaptive_layer_height_variation_step label" @@ -5529,7 +5537,7 @@ msgstr "未从 Cura 前端调用 CuraEngine 时使用的设置。" #: fdmprinter.def.json msgctxt "center_object label" msgid "Center Object" -msgstr "中心模型" +msgstr "中心点" #: fdmprinter.def.json msgctxt "center_object description" @@ -5539,7 +5547,7 @@ msgstr "是否将模型放置在打印平台中心 (0,0),而不是使用模型 #: fdmprinter.def.json msgctxt "mesh_position_x label" msgid "Mesh Position X" -msgstr "网格位置 X" +msgstr "网格X位置" #: fdmprinter.def.json msgctxt "mesh_position_x description" @@ -5549,7 +5557,7 @@ msgstr "应用在模型 x 方向上的偏移量。" #: fdmprinter.def.json msgctxt "mesh_position_y label" msgid "Mesh Position Y" -msgstr "网格位置 Y" +msgstr "网格Y位置" #: fdmprinter.def.json msgctxt "mesh_position_y description" @@ -5559,7 +5567,7 @@ msgstr "应用在模型 y 方向上的偏移量。" #: fdmprinter.def.json msgctxt "mesh_position_z label" msgid "Mesh Position Z" -msgstr "网格位置 Z" +msgstr "网格Z位置" #: fdmprinter.def.json msgctxt "mesh_position_z description" From c2600786315a148490876c5998c8325fff03699d Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Tue, 3 Jul 2018 09:40:42 +0200 Subject: [PATCH 006/174] Remove temperature commands for pause at height for UM3. CURA-5491 --- .../PostProcessingPlugin/scripts/PauseAtHeight.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py index ad83aa2a24..313dff251c 100644 --- a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py +++ b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py @@ -137,6 +137,8 @@ class PauseAtHeight(Script): redo_layers = self.getSettingValueByKey("redo_layers") standby_temperature = self.getSettingValueByKey("standby_temperature") + is_griffin = False + # T = ExtruderManager.getInstance().getActiveExtruderStack().getProperty("material_print_temperature", "value") # use offset to calculate the current height: = - @@ -153,6 +155,8 @@ class PauseAtHeight(Script): # Scroll each line of instruction for each layer in the G-code for line in lines: + if ";FLAVOR:Griffin" in line: + is_griffin = True # Fist positive layer reached if ";LAYER:0" in line: layers_started = True @@ -266,14 +270,16 @@ class PauseAtHeight(Script): if current_z < 15: prepend_gcode += self.putValue(G=1, Z=15, F=300) + "\n" - # Set extruder standby temperature - prepend_gcode += self.putValue(M=104, S=standby_temperature) + "; standby temperature\n" + if not is_griffin: + # Set extruder standby temperature + prepend_gcode += self.putValue(M=104, S=standby_temperature) + "; standby temperature\n" # Wait till the user continues printing prepend_gcode += self.putValue(M=0) + ";Do the actual pause\n" - # Set extruder resume temperature - prepend_gcode += self.putValue(M = 109, S = int(target_temperature.get(current_t, 0))) + "; resume temperature\n" + if not is_griffin: + # Set extruder resume temperature + prepend_gcode += self.putValue(M = 109, S = int(target_temperature.get(current_t, 0))) + "; resume temperature\n" # Push the filament back, if retraction_amount != 0: From e61ad750b7111d1c38e84e01b531aa87529f78c7 Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Tue, 3 Jul 2018 13:13:33 +0200 Subject: [PATCH 007/174] Fixed UM3 Griffin and UM2 UltiGCode for Pause At Height. CURA-5491 --- .../scripts/PauseAtHeight.py | 82 +++++++++++-------- 1 file changed, 47 insertions(+), 35 deletions(-) diff --git a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py index 313dff251c..751336878d 100644 --- a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py +++ b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py @@ -138,6 +138,7 @@ class PauseAtHeight(Script): standby_temperature = self.getSettingValueByKey("standby_temperature") is_griffin = False + is_ultigcode = False # T = ExtruderManager.getInstance().getActiveExtruderStack().getProperty("material_print_temperature", "value") @@ -157,6 +158,8 @@ class PauseAtHeight(Script): for line in lines: if ";FLAVOR:Griffin" in line: is_griffin = True + if ";FLAVOR:UltiGCode" in line: + is_ultigcode = True # Fist positive layer reached if ";LAYER:0" in line: layers_started = True @@ -256,54 +259,63 @@ class PauseAtHeight(Script): else: prepend_gcode += ";current layer: {layer}\n".format(layer=current_layer) - # Retraction - prepend_gcode += self.putValue(M=83) + "\n" - if retraction_amount != 0: - prepend_gcode += self.putValue(G=1, E=-retraction_amount, F=retraction_speed * 60) + "\n" + if not is_griffin: # Griffin does all these movements and retraction in the M0, no need to do it double + prepend_gcode += self.putValue(M=83) + "\n" - # Move the head away - prepend_gcode += self.putValue(G=1, Z=current_z + 1, F=300) + "\n" + # Retraction + if retraction_amount != 0: + if is_ultigcode: + prepend_gcode += self.putValue(G=10) + "; retract for ultigcode\n" + else: + prepend_gcode += self.putValue(G=1, E=-retraction_amount, F=retraction_speed * 60) + "\n" - # This line should be ok - prepend_gcode += self.putValue(G=1, X=park_x, Y=park_y, F=9000) + "\n" + # Move the head away + prepend_gcode += self.putValue(G=1, Z=current_z + 1, F=300) + "\n" - if current_z < 15: - prepend_gcode += self.putValue(G=1, Z=15, F=300) + "\n" + # This line should be ok + prepend_gcode += self.putValue(G=1, X=park_x, Y=park_y, F=9000) + "\n" - if not is_griffin: - # Set extruder standby temperature - prepend_gcode += self.putValue(M=104, S=standby_temperature) + "; standby temperature\n" + if current_z < 15: + prepend_gcode += self.putValue(G=1, Z=15, F=300) + "\n" + + if not is_ultigcode: # We don't know about what temperatures are used in ultigcode, so do not touch + # Set extruder standby temperature + prepend_gcode += self.putValue(M=104, S=standby_temperature) + "; standby temperature\n" # Wait till the user continues printing - prepend_gcode += self.putValue(M=0) + ";Do the actual pause\n" + prepend_gcode += self.putValue(M=0) + "; do the actual pause\n" if not is_griffin: - # Set extruder resume temperature - prepend_gcode += self.putValue(M = 109, S = int(target_temperature.get(current_t, 0))) + "; resume temperature\n" + if not is_ultigcode: # will be 0 for ultigcode + # Set extruder resume temperature + prepend_gcode += self.putValue(M = 109, S = int(target_temperature.get(current_t, 0))) + "; resume temperature\n" - # Push the filament back, - if retraction_amount != 0: - prepend_gcode += self.putValue(G=1, E=retraction_amount, F=retraction_speed * 60) + "\n" + # Push the filament back, + if retraction_amount != 0: + if is_ultigcode: + prepend_gcode += self.putValue(G=11) + "; unretract for ultigcode\n" + else: + prepend_gcode += self.putValue(G=1, E=retraction_amount, F=retraction_speed * 60) + "\n" - # Optionally extrude material - if extrude_amount != 0: - prepend_gcode += self.putValue(G=1, E=extrude_amount, F=extrude_speed * 60) + "\n" + # Optionally extrude material + if extrude_amount != 0: + prepend_gcode += self.putValue(G=1, E=extrude_amount, F=extrude_speed * 60) + "\n" - # and retract again, the properly primes the nozzle - # when changing filament. - if retraction_amount != 0: - prepend_gcode += self.putValue(G=1, E=-retraction_amount, F=retraction_speed * 60) + "\n" + # and retract again, the properly primes the nozzle + # when changing filament. + if retraction_amount != 0: + prepend_gcode += self.putValue(G=1, E=-retraction_amount, F=retraction_speed * 60) + "\n" - # Move the head back - prepend_gcode += self.putValue(G=1, Z=current_z + 1, F=300) + "\n" - prepend_gcode += self.putValue(G=1, X=x, Y=y, F=9000) + "\n" - if retraction_amount != 0: - prepend_gcode += self.putValue(G=1, E=retraction_amount, F=retraction_speed * 60) + "\n" - prepend_gcode += self.putValue(G=1, F=9000) + "\n" - prepend_gcode += self.putValue(M=82) + "\n" + # Move the head back + prepend_gcode += self.putValue(G=1, Z=current_z + 1, F=300) + "\n" + prepend_gcode += self.putValue(G=1, X=x, Y=y, F=9000) + "\n" + if retraction_amount != 0: + prepend_gcode += self.putValue(G=1, E=retraction_amount, F=retraction_speed * 60) + "\n" + prepend_gcode += self.putValue(G=1, F=9000) + "\n" + prepend_gcode += self.putValue(M=82) + "\n" - # reset extrude value to pre pause value - prepend_gcode += self.putValue(G=92, E=current_e) + "\n" + # reset extrude value to pre pause value + prepend_gcode += self.putValue(G=92, E=current_e) + "\n" layer = prepend_gcode + layer From b77220b260a9e122ff099c5b814bdf0b57f2f31c Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Tue, 3 Jul 2018 13:41:14 +0200 Subject: [PATCH 008/174] Add more ultigcode retract and unretract. CURA-5491 --- .../PostProcessingPlugin/scripts/PauseAtHeight.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py index 751336878d..a8ade23c67 100644 --- a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py +++ b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py @@ -304,14 +304,22 @@ class PauseAtHeight(Script): # and retract again, the properly primes the nozzle # when changing filament. if retraction_amount != 0: - prepend_gcode += self.putValue(G=1, E=-retraction_amount, F=retraction_speed * 60) + "\n" + if is_ultigcode: + prepend_gcode += self.putValue(G=10) + "; retract for ultigcode\n" + else: + prepend_gcode += self.putValue(G=1, E=-retraction_amount, F=retraction_speed * 60) + "\n" # Move the head back prepend_gcode += self.putValue(G=1, Z=current_z + 1, F=300) + "\n" prepend_gcode += self.putValue(G=1, X=x, Y=y, F=9000) + "\n" if retraction_amount != 0: - prepend_gcode += self.putValue(G=1, E=retraction_amount, F=retraction_speed * 60) + "\n" + if is_ultigcode: + prepend_gcode += self.putValue(G=11) + "; unretract for ultigcode\n" + else: + prepend_gcode += self.putValue(G=1, E=retraction_amount, F=retraction_speed * 60) + "\n" prepend_gcode += self.putValue(G=1, F=9000) + "\n" + + prepend_gcode += self.putValue(M=82) + "\n" # reset extrude value to pre pause value From 5b251fc6dc57f68bf0ad439955d7589852b30cf2 Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Wed, 4 Jul 2018 12:00:38 +0200 Subject: [PATCH 009/174] CURA-5334 Remove machine nozzle size from machine definitions and move it to extruder definitions. --- resources/definitions/101Hero.def.json | 1 - resources/definitions/3dator.def.json | 1 - resources/definitions/alya3dp.def.json | 3 --- resources/definitions/anycubic_i3_mega.def.json | 4 ---- resources/definitions/bfb.def.json | 1 - resources/definitions/creality_cr10.def.json | 3 --- resources/definitions/dagoma_discoeasy200.def.json | 3 --- resources/definitions/dagoma_neva.def.json | 3 --- resources/definitions/deltabot.def.json | 1 - resources/definitions/deltacomb.def.json | 1 - resources/definitions/easyarts_ares.def.json | 3 --- resources/definitions/fabtotum.def.json | 1 - resources/definitions/felixtec4dual.def.json | 1 - resources/definitions/gmax15plus.def.json | 1 - resources/definitions/gmax15plus_dual.def.json | 1 - resources/definitions/grr_neo.def.json | 3 --- resources/definitions/imade3d_jellybox.def.json | 1 - resources/definitions/innovo_inventor.def.json | 3 --- resources/definitions/kemiq_q2_beta.def.json | 3 --- resources/definitions/kemiq_q2_gama.def.json | 3 --- resources/definitions/kossel_mini.def.json | 3 --- resources/definitions/kossel_pro.def.json | 3 --- resources/definitions/makeR_pegasus.def.json | 3 --- resources/definitions/makeR_prusa_tairona_i3.def.json | 3 --- resources/definitions/makeit_pro_l.def.json | 3 --- resources/definitions/makeit_pro_m.def.json | 3 --- resources/definitions/maker_starter.def.json | 3 --- resources/definitions/malyan_m180.def.json | 3 --- resources/definitions/malyan_m200.def.json | 4 ---- resources/definitions/mankati_fullscale_xt_plus.def.json | 1 - resources/definitions/mendel90.def.json | 3 --- resources/definitions/ord.def.json | 1 - resources/definitions/peopoly_moai.def.json | 3 --- resources/definitions/printrbot_play.def.json | 1 - resources/definitions/printrbot_simple.def.json | 1 - resources/definitions/printrbot_simple_extended.def.json | 1 - resources/definitions/printrbot_simple_makers_kit.def.json | 1 - resources/definitions/prusa_i3.def.json | 3 --- resources/definitions/prusa_i3_mk2.def.json | 1 - resources/definitions/prusa_i3_xl.def.json | 3 --- resources/definitions/raise3D_N2_dual.def.json | 3 --- resources/definitions/raise3D_N2_plus_dual.def.json | 3 --- resources/definitions/raise3D_N2_plus_single.def.json | 3 --- resources/definitions/raise3D_N2_single.def.json | 3 --- resources/definitions/rigid3d_mucit.def.json | 3 --- resources/definitions/rigid3d_zero2.def.json | 3 --- resources/definitions/rigidbot_big.def.json | 3 --- resources/definitions/seemecnc_artemis.def.json | 1 - resources/definitions/seemecnc_v32.def.json | 1 - resources/definitions/tevo_blackwidow.def.json | 4 ---- resources/definitions/tevo_tarantula.def.json | 1 - resources/definitions/ubuild-3d_mr_bot_280.def.json | 1 - resources/definitions/ultimaker2.def.json | 4 ---- resources/definitions/ultimaker_original.def.json | 3 --- resources/definitions/ultimaker_original_dual.def.json | 3 --- resources/definitions/uniqbot_one.def.json | 3 --- resources/definitions/vertex_delta_k8800.def.json | 3 --- resources/definitions/vertex_k8400.def.json | 3 --- resources/definitions/vertex_k8400_dual.def.json | 3 --- resources/extruders/felixtec4_dual_extruder_0.def.json | 1 + resources/extruders/felixtec4_dual_extruder_1.def.json | 1 + resources/extruders/makeit_dual_1st.def.json | 1 + resources/extruders/makeit_dual_2nd.def.json | 1 + resources/extruders/makeit_l_dual_1st.def.json | 1 + resources/extruders/makeit_l_dual_2nd.def.json | 1 + resources/extruders/ord_extruder_0.def.json | 1 + resources/extruders/ord_extruder_1.def.json | 1 + resources/extruders/ord_extruder_2.def.json | 1 + resources/extruders/ord_extruder_3.def.json | 1 + resources/extruders/ord_extruder_4.def.json | 1 + resources/extruders/raise3D_N2_dual_extruder_0.def.json | 1 + resources/extruders/raise3D_N2_dual_extruder_1.def.json | 1 + resources/extruders/raise3D_N2_plus_dual_extruder_0.def.json | 1 + resources/extruders/raise3D_N2_plus_dual_extruder_1.def.json | 1 + resources/extruders/ultimaker_original_dual_1st.def.json | 1 + resources/extruders/ultimaker_original_dual_2nd.def.json | 1 + resources/extruders/vertex_k8400_dual_1st.def.json | 1 + resources/extruders/vertex_k8400_dual_2nd.def.json | 1 + 78 files changed, 19 insertions(+), 139 deletions(-) diff --git a/resources/definitions/101Hero.def.json b/resources/definitions/101Hero.def.json index a3ce3354af..d77f01fd82 100644 --- a/resources/definitions/101Hero.def.json +++ b/resources/definitions/101Hero.def.json @@ -24,7 +24,6 @@ "machine_depth": { "default_value": 149.86 }, "machine_height": { "default_value": 99.822 }, "machine_center_is_zero": { "default_value": true }, - "machine_nozzle_size": { "default_value": 0.4 }, "machine_head_with_fans_polygon": { "default_value": [ [ 0, 0 ], diff --git a/resources/definitions/3dator.def.json b/resources/definitions/3dator.def.json index 91d058cd4e..91f261906b 100644 --- a/resources/definitions/3dator.def.json +++ b/resources/definitions/3dator.def.json @@ -18,7 +18,6 @@ "overrides": { "machine_name": { "default_value": "3Dator" }, - "machine_nozzle_size": { "default_value": 0.5 }, "speed_travel": { "default_value": 120 }, "prime_tower_size": { "default_value": 8.660254037844387 }, "infill_sparse_density": { "default_value": 20 }, diff --git a/resources/definitions/alya3dp.def.json b/resources/definitions/alya3dp.def.json index f51edfe06d..e918649097 100644 --- a/resources/definitions/alya3dp.def.json +++ b/resources/definitions/alya3dp.def.json @@ -26,9 +26,6 @@ "machine_center_is_zero": { "default_value": false }, - "machine_nozzle_size": { - "default_value": 0.4 - }, "machine_head_polygon": { "default_value": [ [75, 18], diff --git a/resources/definitions/anycubic_i3_mega.def.json b/resources/definitions/anycubic_i3_mega.def.json index f20fb68da2..a6c1567dc4 100644 --- a/resources/definitions/anycubic_i3_mega.def.json +++ b/resources/definitions/anycubic_i3_mega.def.json @@ -45,10 +45,6 @@ { "default_value": false }, - "machine_nozzle_size": - { - "default_value": 0.4 - }, "gantry_height": { "default_value": 0 diff --git a/resources/definitions/bfb.def.json b/resources/definitions/bfb.def.json index aa183f9c0a..d1dfa9ef1b 100644 --- a/resources/definitions/bfb.def.json +++ b/resources/definitions/bfb.def.json @@ -21,7 +21,6 @@ "prime_tower_size": { "default_value": 7.745966692414834 }, "machine_name": { "default_value": "BFB_Test" }, "machine_heated_bed": { "default_value": false }, - "machine_nozzle_size": { "default_value": 0.5 }, "speed_layer_0": { "default_value": 25 }, "machine_width": { "default_value": 275 }, "machine_gcode_flavor": { "default_value": "BFB" }, diff --git a/resources/definitions/creality_cr10.def.json b/resources/definitions/creality_cr10.def.json index 9fbceec9aa..b727834db3 100644 --- a/resources/definitions/creality_cr10.def.json +++ b/resources/definitions/creality_cr10.def.json @@ -31,9 +31,6 @@ [30, 34] ] }, - "machine_nozzle_size": { - "default_value": 0.4 - }, "layer_height_0": { "default_value": 0.2 }, diff --git a/resources/definitions/dagoma_discoeasy200.def.json b/resources/definitions/dagoma_discoeasy200.def.json index 9ee4707ff1..bf1e43ccea 100644 --- a/resources/definitions/dagoma_discoeasy200.def.json +++ b/resources/definitions/dagoma_discoeasy200.def.json @@ -27,9 +27,6 @@ "machine_center_is_zero": { "default_value": false }, - "machine_nozzle_size": { - "default_value": 0.4 - }, "machine_head_with_fans_polygon": { "default_value": [ [17, 70], diff --git a/resources/definitions/dagoma_neva.def.json b/resources/definitions/dagoma_neva.def.json index c95b2c3103..fd747dce1c 100644 --- a/resources/definitions/dagoma_neva.def.json +++ b/resources/definitions/dagoma_neva.def.json @@ -28,9 +28,6 @@ "machine_center_is_zero": { "default_value": true }, - "machine_nozzle_size": { - "default_value": 0.4 - }, "machine_head_with_fans_polygon": { "default_value": [ [17, 40], diff --git a/resources/definitions/deltabot.def.json b/resources/definitions/deltabot.def.json index 1746eef920..95435f659d 100644 --- a/resources/definitions/deltabot.def.json +++ b/resources/definitions/deltabot.def.json @@ -22,7 +22,6 @@ "speed_wall_0": { "default_value": 30 }, "speed_topbottom": { "default_value": 30 }, "layer_height": { "default_value": 0.2 }, - "machine_nozzle_size": { "default_value": 0.5 }, "speed_print": { "default_value": 30 }, "speed_infill": { "default_value": 30 }, "machine_extruder_count": { "default_value": 1 }, diff --git a/resources/definitions/deltacomb.def.json b/resources/definitions/deltacomb.def.json index c678571c57..f1114583c0 100644 --- a/resources/definitions/deltacomb.def.json +++ b/resources/definitions/deltacomb.def.json @@ -23,7 +23,6 @@ "machine_height": { "default_value": 250 }, "machine_depth": { "default_value": 190 }, "machine_center_is_zero": { "default_value": true }, - "machine_nozzle_size": { "default_value": 0.4 }, "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 ;Home all axes (max endstops)\nG1 Z15.0 F9000 ;move the platform down 15mm\nG92 E0 ;zero the extruded length\nG1 F200 E3 ;extrude 3mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F9000\n;Put printing message on LCD screen\nM117 Printing..."}, "machine_end_gcode": { "default_value": "M104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG28 ;Home all axes (max endstops)\nM84 ;steppers off\nG90 ;absolute positioning" }, diff --git a/resources/definitions/easyarts_ares.def.json b/resources/definitions/easyarts_ares.def.json index 4f1d63b346..5655d0a795 100644 --- a/resources/definitions/easyarts_ares.def.json +++ b/resources/definitions/easyarts_ares.def.json @@ -52,9 +52,6 @@ "bottom_thickness": { "default_value": 1 }, - "machine_nozzle_size": { - "default_value": 0.4 - }, "speed_print": { "default_value": 75 }, diff --git a/resources/definitions/fabtotum.def.json b/resources/definitions/fabtotum.def.json index 0b9b768866..1908e42913 100644 --- a/resources/definitions/fabtotum.def.json +++ b/resources/definitions/fabtotum.def.json @@ -35,7 +35,6 @@ "machine_depth": { "default_value": 234 }, "machine_center_is_zero": { "default_value": false }, "machine_heated_bed": { "default_value": true }, - "machine_nozzle_size": { "default_value": 0.4 }, "machine_head_with_fans_polygon": { "default_value": [[-75, 35], [-75, -18], [18, 35], [18, -18]] }, "machine_gcode_flavor": { "default_value": "RepRap (Marlin/Sprinter)" }, "machine_max_feedrate_x": { "default_value": 250 }, diff --git a/resources/definitions/felixtec4dual.def.json b/resources/definitions/felixtec4dual.def.json index b56601a531..ba612d4e3c 100644 --- a/resources/definitions/felixtec4dual.def.json +++ b/resources/definitions/felixtec4dual.def.json @@ -44,7 +44,6 @@ "retraction_amount": { "default_value": 1 }, "retraction_speed": { "default_value": 50}, "material_flow": { "default_value": 87 }, - "machine_nozzle_size": { "default_value": 0.35 }, "adhesion_type": { "default_value": "skirt" }, "skirt_brim_minimal_length": { "default_value": 130}, diff --git a/resources/definitions/gmax15plus.def.json b/resources/definitions/gmax15plus.def.json index d112c62fe8..16695714f4 100644 --- a/resources/definitions/gmax15plus.def.json +++ b/resources/definitions/gmax15plus.def.json @@ -27,7 +27,6 @@ "machine_depth": { "default_value": 406 }, "machine_height": { "default_value": 533 }, "machine_center_is_zero": { "default_value": false }, - "machine_nozzle_size": { "default_value": 0.5 }, "layer_height": { "default_value": 0.2 }, "layer_height_0": { "default_value": 0.3 }, "retraction_amount": { "default_value": 1 }, diff --git a/resources/definitions/gmax15plus_dual.def.json b/resources/definitions/gmax15plus_dual.def.json index 6b70dd2eb1..5972061933 100644 --- a/resources/definitions/gmax15plus_dual.def.json +++ b/resources/definitions/gmax15plus_dual.def.json @@ -28,7 +28,6 @@ "machine_depth": { "default_value": 406 }, "machine_height": { "default_value": 533 }, "machine_center_is_zero": { "default_value": false }, - "machine_nozzle_size": { "default_value": 0.5 }, "layer_height": { "default_value": 0.2 }, "layer_height_0": { "default_value": 0.3 }, "retraction_amount": { "default_value": 1 }, diff --git a/resources/definitions/grr_neo.def.json b/resources/definitions/grr_neo.def.json index 374fae2202..0153fc4c01 100644 --- a/resources/definitions/grr_neo.def.json +++ b/resources/definitions/grr_neo.def.json @@ -29,9 +29,6 @@ "machine_center_is_zero": { "default_value": false }, - "machine_nozzle_size": { - "default_value": 0.5 - }, "machine_head_polygon": { "default_value": [ [-75, -18], diff --git a/resources/definitions/imade3d_jellybox.def.json b/resources/definitions/imade3d_jellybox.def.json index 1fcea7620a..ae9ca176f5 100644 --- a/resources/definitions/imade3d_jellybox.def.json +++ b/resources/definitions/imade3d_jellybox.def.json @@ -26,7 +26,6 @@ "machine_width": { "default_value": 170 }, "machine_height": { "default_value": 145 }, "machine_depth": { "default_value": 160 }, - "machine_nozzle_size": { "default_value": 0.4 }, "machine_heated_bed": { "default_value": true }, "machine_center_is_zero": { "default_value": false }, "machine_gcode_flavor": { "default_value": "RepRap (Marlin/Sprinter)" }, diff --git a/resources/definitions/innovo_inventor.def.json b/resources/definitions/innovo_inventor.def.json index 8b14e9a73f..91a6d8365b 100644 --- a/resources/definitions/innovo_inventor.def.json +++ b/resources/definitions/innovo_inventor.def.json @@ -32,9 +32,6 @@ "machine_center_is_zero": { "default_value": true }, - "machine_nozzle_size": { - "default_value": 0.4 - }, "machine_head_polygon": { "default_value": [ [-43.7, -19.2], diff --git a/resources/definitions/kemiq_q2_beta.def.json b/resources/definitions/kemiq_q2_beta.def.json index 1a4bac233b..387818565e 100644 --- a/resources/definitions/kemiq_q2_beta.def.json +++ b/resources/definitions/kemiq_q2_beta.def.json @@ -34,9 +34,6 @@ "machine_center_is_zero": { "default_value": false }, - "machine_nozzle_size": { - "default_value": 0.4 - }, "machine_nozzle_heat_up_speed": { "default_value": 2 }, diff --git a/resources/definitions/kemiq_q2_gama.def.json b/resources/definitions/kemiq_q2_gama.def.json index 341efaa7c5..fd6f2d54aa 100644 --- a/resources/definitions/kemiq_q2_gama.def.json +++ b/resources/definitions/kemiq_q2_gama.def.json @@ -35,9 +35,6 @@ "machine_center_is_zero": { "default_value": false }, - "machine_nozzle_size": { - "default_value": 0.4 - }, "machine_nozzle_heat_up_speed": { "default_value": 2 }, diff --git a/resources/definitions/kossel_mini.def.json b/resources/definitions/kossel_mini.def.json index b4b2e5b78f..76fe72dac1 100644 --- a/resources/definitions/kossel_mini.def.json +++ b/resources/definitions/kossel_mini.def.json @@ -32,9 +32,6 @@ "machine_center_is_zero": { "default_value": true }, - "machine_nozzle_size": { - "default_value": 0.4 - }, "machine_gcode_flavor": { "default_value": "RepRap (Marlin/Sprinter)" }, diff --git a/resources/definitions/kossel_pro.def.json b/resources/definitions/kossel_pro.def.json index c966a9ff65..9fadd0db91 100644 --- a/resources/definitions/kossel_pro.def.json +++ b/resources/definitions/kossel_pro.def.json @@ -31,9 +31,6 @@ "machine_center_is_zero": { "default_value": true }, - "machine_nozzle_size": { - "default_value": 0.35 - }, "machine_gcode_flavor": { "default_value": "RepRap (Marlin/Sprinter)" }, diff --git a/resources/definitions/makeR_pegasus.def.json b/resources/definitions/makeR_pegasus.def.json index 68cad7f7b9..9bd4547c9b 100644 --- a/resources/definitions/makeR_pegasus.def.json +++ b/resources/definitions/makeR_pegasus.def.json @@ -33,9 +33,6 @@ "machine_center_is_zero": { "default_value": false }, - "machine_nozzle_size": { - "default_value": 0.4 - }, "machine_head_polygon": { "default_value": [ [-75, -18], diff --git a/resources/definitions/makeR_prusa_tairona_i3.def.json b/resources/definitions/makeR_prusa_tairona_i3.def.json index 6cf0e40619..d22af5c516 100644 --- a/resources/definitions/makeR_prusa_tairona_i3.def.json +++ b/resources/definitions/makeR_prusa_tairona_i3.def.json @@ -33,9 +33,6 @@ "machine_center_is_zero": { "default_value": false }, - "machine_nozzle_size": { - "default_value": 0.4 - }, "machine_head_polygon": { "default_value": [ [-75, -18], diff --git a/resources/definitions/makeit_pro_l.def.json b/resources/definitions/makeit_pro_l.def.json index 41b351b47a..2f9173c90e 100644 --- a/resources/definitions/makeit_pro_l.def.json +++ b/resources/definitions/makeit_pro_l.def.json @@ -30,9 +30,6 @@ "machine_center_is_zero": { "default_value": false }, - "machine_nozzle_size": { - "default_value": 0.4 - }, "machine_head_with_fans_polygon": { "default_value": [ diff --git a/resources/definitions/makeit_pro_m.def.json b/resources/definitions/makeit_pro_m.def.json index 798bb03318..0cd7b42df3 100644 --- a/resources/definitions/makeit_pro_m.def.json +++ b/resources/definitions/makeit_pro_m.def.json @@ -30,9 +30,6 @@ "machine_center_is_zero": { "default_value": false }, - "machine_nozzle_size": { - "default_value": 0.4 - }, "machine_head_with_fans_polygon": { "default_value": [ diff --git a/resources/definitions/maker_starter.def.json b/resources/definitions/maker_starter.def.json index 333dd6c8bf..8fb67623ed 100644 --- a/resources/definitions/maker_starter.def.json +++ b/resources/definitions/maker_starter.def.json @@ -33,9 +33,6 @@ "machine_center_is_zero": { "default_value": false }, - "machine_nozzle_size": { - "default_value": 0.4 - }, "gantry_height": { "default_value": 55 }, diff --git a/resources/definitions/malyan_m180.def.json b/resources/definitions/malyan_m180.def.json index 65e573cdb3..53864dabae 100644 --- a/resources/definitions/malyan_m180.def.json +++ b/resources/definitions/malyan_m180.def.json @@ -29,9 +29,6 @@ "machine_center_is_zero": { "default_value": true }, - "machine_nozzle_size": { - "default_value": 0.4 - }, "machine_head_with_fans_polygon": { "default_value": [ [ -75, 35 ], diff --git a/resources/definitions/malyan_m200.def.json b/resources/definitions/malyan_m200.def.json index df852273f6..b3b0651e1a 100644 --- a/resources/definitions/malyan_m200.def.json +++ b/resources/definitions/malyan_m200.def.json @@ -60,10 +60,6 @@ "machine_height": { "default_value": 120 }, "machine_heated_bed": { "default_value": true }, "machine_center_is_zero": { "default_value": false }, - "machine_nozzle_size": { - "default_value": 0.4, - "minimum_value": 0.15 - }, "machine_max_feedrate_x": { "default_value": 150 }, "machine_max_feedrate_y": { "default_value": 150 }, "machine_max_feedrate_z": { "default_value": 1.5 }, diff --git a/resources/definitions/mankati_fullscale_xt_plus.def.json b/resources/definitions/mankati_fullscale_xt_plus.def.json index bf21eb17ca..507e5209b2 100644 --- a/resources/definitions/mankati_fullscale_xt_plus.def.json +++ b/resources/definitions/mankati_fullscale_xt_plus.def.json @@ -20,7 +20,6 @@ "machine_height": { "default_value": 300 }, "machine_heated_bed": { "default_value": true }, - "machine_nozzle_size": { "default_value": 0.4 }, "machine_head_with_fans_polygon": { "default_value": [ [ -3, 3 ], diff --git a/resources/definitions/mendel90.def.json b/resources/definitions/mendel90.def.json index 6974ae5bf7..104ca7f42f 100644 --- a/resources/definitions/mendel90.def.json +++ b/resources/definitions/mendel90.def.json @@ -70,9 +70,6 @@ "gantry_height": { "default_value": 55 }, - "machine_nozzle_size": { - "default_value": 0.4 - }, "machine_head_with_fans_polygon": { "default_value": [ diff --git a/resources/definitions/ord.def.json b/resources/definitions/ord.def.json index c589114fb6..de410b0d58 100644 --- a/resources/definitions/ord.def.json +++ b/resources/definitions/ord.def.json @@ -24,7 +24,6 @@ "infill_sparse_density": { "default_value": 15 }, "speed_travel": { "default_value": 150 }, "layer_height": { "default_value": 0.3 }, - "machine_nozzle_size": { "default_value": 0.35 }, "material_print_temperature": { "default_value": 240 }, "machine_extruder_count": { "default_value": 5 }, "machine_heated_bed": { "default_value": true }, diff --git a/resources/definitions/peopoly_moai.def.json b/resources/definitions/peopoly_moai.def.json index 1a31257523..5c03444d49 100644 --- a/resources/definitions/peopoly_moai.def.json +++ b/resources/definitions/peopoly_moai.def.json @@ -28,9 +28,6 @@ "machine_depth": { "default_value": 130 }, - "machine_nozzle_size": { - "default_value": 0.067 - }, "machine_head_with_fans_polygon": { "default_value": [ diff --git a/resources/definitions/printrbot_play.def.json b/resources/definitions/printrbot_play.def.json index 990f5b9080..e3a18a4eee 100644 --- a/resources/definitions/printrbot_play.def.json +++ b/resources/definitions/printrbot_play.def.json @@ -21,7 +21,6 @@ "machine_depth": { "default_value": 100 }, "machine_height": { "default_value": 130 }, "machine_center_is_zero": { "default_value": false }, - "machine_nozzle_size": { "default_value": 0.4 }, "layer_height": { "default_value": 0.2 }, "layer_height_0": { "default_value": 0.3 }, "retraction_amount": { "default_value": 0.7 }, diff --git a/resources/definitions/printrbot_simple.def.json b/resources/definitions/printrbot_simple.def.json index b20168deff..fb65b77fa5 100644 --- a/resources/definitions/printrbot_simple.def.json +++ b/resources/definitions/printrbot_simple.def.json @@ -22,7 +22,6 @@ "machine_height": { "default_value": 150 }, "machine_depth": { "default_value": 140 }, "machine_center_is_zero": { "default_value": false }, - "machine_nozzle_size": { "default_value": 0.4 }, "machine_head_with_fans_polygon": { "default_value": [ [-49, 20], diff --git a/resources/definitions/printrbot_simple_extended.def.json b/resources/definitions/printrbot_simple_extended.def.json index 02c58171c1..1e004a8ca3 100644 --- a/resources/definitions/printrbot_simple_extended.def.json +++ b/resources/definitions/printrbot_simple_extended.def.json @@ -22,7 +22,6 @@ "machine_height": { "default_value": 235 }, "machine_depth": { "default_value": 150 }, "machine_center_is_zero": { "default_value": false }, - "machine_nozzle_size": { "default_value": 0.4 }, "machine_head_with_fans_polygon": { "default_value": [ [ 55, -20 ], diff --git a/resources/definitions/printrbot_simple_makers_kit.def.json b/resources/definitions/printrbot_simple_makers_kit.def.json index 001ee887f3..ad6ecee21e 100644 --- a/resources/definitions/printrbot_simple_makers_kit.def.json +++ b/resources/definitions/printrbot_simple_makers_kit.def.json @@ -19,7 +19,6 @@ "machine_width": { "default_value": 100 }, "machine_depth": { "default_value": 100 }, "machine_height": { "default_value": 115 }, - "machine_nozzle_size": { "default_value": 0.4 }, "machine_head_with_fans_polygon": { "default_value": [ [-40, 1000], diff --git a/resources/definitions/prusa_i3.def.json b/resources/definitions/prusa_i3.def.json index 603b2822f0..a3759eb6c0 100644 --- a/resources/definitions/prusa_i3.def.json +++ b/resources/definitions/prusa_i3.def.json @@ -32,9 +32,6 @@ "machine_center_is_zero": { "default_value": false }, - "machine_nozzle_size": { - "default_value": 0.4 - }, "machine_head_polygon": { "default_value": [ [-75, -18], diff --git a/resources/definitions/prusa_i3_mk2.def.json b/resources/definitions/prusa_i3_mk2.def.json index 033fbc6a48..169eb6ffc2 100644 --- a/resources/definitions/prusa_i3_mk2.def.json +++ b/resources/definitions/prusa_i3_mk2.def.json @@ -24,7 +24,6 @@ "machine_depth": { "default_value": 210 }, "machine_center_is_zero": { "default_value": false }, "material_bed_temperature": { "default_value": 55 }, - "machine_nozzle_size": { "default_value": 0.4 }, "layer_height": { "default_value": 0.1 }, "layer_height_0": { "default_value": 0.15 }, "retraction_amount": { "default_value": 0.8 }, diff --git a/resources/definitions/prusa_i3_xl.def.json b/resources/definitions/prusa_i3_xl.def.json index b1233f6df7..eafed22df1 100644 --- a/resources/definitions/prusa_i3_xl.def.json +++ b/resources/definitions/prusa_i3_xl.def.json @@ -32,9 +32,6 @@ "machine_center_is_zero": { "default_value": false }, - "machine_nozzle_size": { - "default_value": 0.4 - }, "machine_head_polygon": { "default_value": [ [-75, -18], diff --git a/resources/definitions/raise3D_N2_dual.def.json b/resources/definitions/raise3D_N2_dual.def.json index ea5a998a5a..eff5884da8 100644 --- a/resources/definitions/raise3D_N2_dual.def.json +++ b/resources/definitions/raise3D_N2_dual.def.json @@ -33,9 +33,6 @@ "machine_heated_bed": { "default_value": true }, - "machine_nozzle_size": { - "default_value": 0.4 - }, "machine_nozzle_heat_up_speed": { "default_value": 6 }, diff --git a/resources/definitions/raise3D_N2_plus_dual.def.json b/resources/definitions/raise3D_N2_plus_dual.def.json index 78a91d0f96..06de52321a 100644 --- a/resources/definitions/raise3D_N2_plus_dual.def.json +++ b/resources/definitions/raise3D_N2_plus_dual.def.json @@ -33,9 +33,6 @@ "machine_heated_bed": { "default_value": true }, - "machine_nozzle_size": { - "default_value": 0.4 - }, "machine_nozzle_heat_up_speed": { "default_value": 6 }, diff --git a/resources/definitions/raise3D_N2_plus_single.def.json b/resources/definitions/raise3D_N2_plus_single.def.json index 25a263ab5f..55b8c9c8c5 100644 --- a/resources/definitions/raise3D_N2_plus_single.def.json +++ b/resources/definitions/raise3D_N2_plus_single.def.json @@ -32,9 +32,6 @@ "machine_heated_bed": { "default_value": true }, - "machine_nozzle_size": { - "default_value": 0.4 - }, "machine_nozzle_heat_up_speed": { "default_value": 6 }, diff --git a/resources/definitions/raise3D_N2_single.def.json b/resources/definitions/raise3D_N2_single.def.json index 62b756b7da..899da5188f 100644 --- a/resources/definitions/raise3D_N2_single.def.json +++ b/resources/definitions/raise3D_N2_single.def.json @@ -32,9 +32,6 @@ "machine_heated_bed": { "default_value": true }, - "machine_nozzle_size": { - "default_value": 0.4 - }, "machine_nozzle_heat_up_speed": { "default_value": 6 }, diff --git a/resources/definitions/rigid3d_mucit.def.json b/resources/definitions/rigid3d_mucit.def.json index 9f1ac294e5..42cd99a3bd 100644 --- a/resources/definitions/rigid3d_mucit.def.json +++ b/resources/definitions/rigid3d_mucit.def.json @@ -69,9 +69,6 @@ "machine_depth": { "default_value": 150 }, - "machine_nozzle_size": { - "default_value": 0.4 - }, "machine_gcode_flavor": { "default_value": "RepRap" }, diff --git a/resources/definitions/rigid3d_zero2.def.json b/resources/definitions/rigid3d_zero2.def.json index 7d49ccc72f..09390ed8b5 100644 --- a/resources/definitions/rigid3d_zero2.def.json +++ b/resources/definitions/rigid3d_zero2.def.json @@ -80,9 +80,6 @@ "machine_center_is_zero": { "default_value": false }, - "machine_nozzle_size": { - "default_value": 0.4 - }, "gantry_height": { "default_value": 25 }, diff --git a/resources/definitions/rigidbot_big.def.json b/resources/definitions/rigidbot_big.def.json index 5128408b15..581b6144a0 100644 --- a/resources/definitions/rigidbot_big.def.json +++ b/resources/definitions/rigidbot_big.def.json @@ -28,9 +28,6 @@ "machine_heated_bed": { "default_value": true }, - "machine_nozzle_size": { - "default_value": 0.4 - }, "gantry_height": { "default_value": 0 }, diff --git a/resources/definitions/seemecnc_artemis.def.json b/resources/definitions/seemecnc_artemis.def.json index 731fec5975..aa788865df 100644 --- a/resources/definitions/seemecnc_artemis.def.json +++ b/resources/definitions/seemecnc_artemis.def.json @@ -26,7 +26,6 @@ "machine_height": { "default_value": 530 }, "machine_max_feedrate_z": { "default_value": 400 }, "machine_name": { "default_value": "Artemis" }, - "machine_nozzle_size": { "default_value": 0.5 }, "machine_shape": { "default_value": "elliptic" }, "machine_width": { "default_value": 290 }, "relative_extrusion": { "default_value": false }, diff --git a/resources/definitions/seemecnc_v32.def.json b/resources/definitions/seemecnc_v32.def.json index 6580ee0172..5a855f67fc 100644 --- a/resources/definitions/seemecnc_v32.def.json +++ b/resources/definitions/seemecnc_v32.def.json @@ -26,7 +26,6 @@ "machine_height": { "default_value": 395 }, "machine_max_feedrate_z": { "default_value": 300 }, "machine_name": { "default_value": "Rostock Max V3.2" }, - "machine_nozzle_size": { "default_value": 0.5 }, "machine_shape": { "default_value": "elliptic" }, "machine_width": { "default_value": 265 }, "relative_extrusion": { "default_value": false }, diff --git a/resources/definitions/tevo_blackwidow.def.json b/resources/definitions/tevo_blackwidow.def.json index dc4feae6f9..b193023867 100644 --- a/resources/definitions/tevo_blackwidow.def.json +++ b/resources/definitions/tevo_blackwidow.def.json @@ -43,10 +43,6 @@ { "default_value": false }, - "machine_nozzle_size": - { - "default_value": 0.4 - }, "gantry_height": { "default_value": 0 diff --git a/resources/definitions/tevo_tarantula.def.json b/resources/definitions/tevo_tarantula.def.json index 6953dab63a..40d579552e 100644 --- a/resources/definitions/tevo_tarantula.def.json +++ b/resources/definitions/tevo_tarantula.def.json @@ -24,7 +24,6 @@ "machine_height": { "default_value": 200 }, "machine_depth": { "default_value": 200 }, "machine_center_is_zero": { "default_value": false }, - "machine_nozzle_size": { "default_value": 0.4 }, "machine_head_polygon": { "default_value": diff --git a/resources/definitions/ubuild-3d_mr_bot_280.def.json b/resources/definitions/ubuild-3d_mr_bot_280.def.json index 768c261785..1b5cb1456c 100644 --- a/resources/definitions/ubuild-3d_mr_bot_280.def.json +++ b/resources/definitions/ubuild-3d_mr_bot_280.def.json @@ -27,7 +27,6 @@ "machine_depth": { "default_value": 275 }, "machine_center_is_zero": { "default_value": false }, "material_bed_temperature": { "default_value": 70 }, - "machine_nozzle_size": { "default_value": 0.4 }, "layer_height_0": { "default_value": 0.1 }, "retraction_amount": { "default_value": 2 }, "retraction_speed": { "default_value": 50 }, diff --git a/resources/definitions/ultimaker2.def.json b/resources/definitions/ultimaker2.def.json index 9de5d9aab9..aa684946c2 100644 --- a/resources/definitions/ultimaker2.def.json +++ b/resources/definitions/ultimaker2.def.json @@ -54,10 +54,6 @@ "machine_center_is_zero": { "default_value": false }, - "machine_nozzle_size": { - "default_value": 0.4, - "minimum_value": "0.001" - }, "gantry_height": { "default_value": 48 }, diff --git a/resources/definitions/ultimaker_original.def.json b/resources/definitions/ultimaker_original.def.json index d2418df6b9..c961423504 100644 --- a/resources/definitions/ultimaker_original.def.json +++ b/resources/definitions/ultimaker_original.def.json @@ -35,9 +35,6 @@ "machine_center_is_zero": { "default_value": false }, - "machine_nozzle_size": { - "default_value": 0.4 - }, "machine_head_with_fans_polygon": { "default_value": [ diff --git a/resources/definitions/ultimaker_original_dual.def.json b/resources/definitions/ultimaker_original_dual.def.json index 1ce15f7dc6..55eddba85f 100644 --- a/resources/definitions/ultimaker_original_dual.def.json +++ b/resources/definitions/ultimaker_original_dual.def.json @@ -37,9 +37,6 @@ "machine_center_is_zero": { "default_value": false }, - "machine_nozzle_size": { - "default_value": 0.4 - }, "machine_head_with_fans_polygon": { "default_value": [ diff --git a/resources/definitions/uniqbot_one.def.json b/resources/definitions/uniqbot_one.def.json index b277e78925..396e9687b8 100644 --- a/resources/definitions/uniqbot_one.def.json +++ b/resources/definitions/uniqbot_one.def.json @@ -30,9 +30,6 @@ "machine_center_is_zero": { "default_value": false }, - "machine_nozzle_size": { - "default_value": 0.5 - }, "gantry_height": { "default_value": 55 }, diff --git a/resources/definitions/vertex_delta_k8800.def.json b/resources/definitions/vertex_delta_k8800.def.json index 9add22b902..7059c2e7f0 100644 --- a/resources/definitions/vertex_delta_k8800.def.json +++ b/resources/definitions/vertex_delta_k8800.def.json @@ -30,9 +30,6 @@ "machine_shape": { "default_value": "elliptic" }, - "machine_nozzle_size": { - "default_value": 0.35 - }, "machine_head_shape_min_x": { "default_value": 0 }, diff --git a/resources/definitions/vertex_k8400.def.json b/resources/definitions/vertex_k8400.def.json index 42d94e7723..0166729951 100644 --- a/resources/definitions/vertex_k8400.def.json +++ b/resources/definitions/vertex_k8400.def.json @@ -42,9 +42,6 @@ "machine_center_is_zero": { "default_value": false }, - "machine_nozzle_size": { - "default_value": 0.35 - }, "machine_head_polygon": { "default_value": [ [-60, -18], diff --git a/resources/definitions/vertex_k8400_dual.def.json b/resources/definitions/vertex_k8400_dual.def.json index f5c5668390..b22dabaa94 100644 --- a/resources/definitions/vertex_k8400_dual.def.json +++ b/resources/definitions/vertex_k8400_dual.def.json @@ -43,9 +43,6 @@ "machine_use_extruder_offset_to_offset_coords": { "default_value": true }, - "machine_nozzle_size": { - "default_value": 0.35 - }, "machine_head_polygon": { "default_value": [ [-60, -18], diff --git a/resources/extruders/felixtec4_dual_extruder_0.def.json b/resources/extruders/felixtec4_dual_extruder_0.def.json index fee4cbb995..2a2d0468e1 100644 --- a/resources/extruders/felixtec4_dual_extruder_0.def.json +++ b/resources/extruders/felixtec4_dual_extruder_0.def.json @@ -15,6 +15,7 @@ }, "machine_nozzle_offset_x": { "default_value": 0 }, "machine_nozzle_offset_y": { "default_value": 0 }, + "machine_nozzle_size": { "default_value": 0.35 }, "material_diameter": { "default_value": 1.75 }, "machine_extruder_start_pos_abs": { "default_value": true }, diff --git a/resources/extruders/felixtec4_dual_extruder_1.def.json b/resources/extruders/felixtec4_dual_extruder_1.def.json index 2c44b41186..5d7e9c74a3 100644 --- a/resources/extruders/felixtec4_dual_extruder_1.def.json +++ b/resources/extruders/felixtec4_dual_extruder_1.def.json @@ -15,6 +15,7 @@ }, "machine_nozzle_offset_x": { "default_value": 13 }, "machine_nozzle_offset_y": { "default_value": 0 }, + "machine_nozzle_size": { "default_value": 0.35 }, "material_diameter": { "default_value": 1.75 }, "machine_extruder_start_pos_abs": { "default_value": true }, diff --git a/resources/extruders/makeit_dual_1st.def.json b/resources/extruders/makeit_dual_1st.def.json index 2882054cca..0f5a716e16 100644 --- a/resources/extruders/makeit_dual_1st.def.json +++ b/resources/extruders/makeit_dual_1st.def.json @@ -15,6 +15,7 @@ }, "machine_nozzle_offset_x": { "default_value": 0.0 }, "machine_nozzle_offset_y": { "default_value": 0.0 }, + "machine_nozzle_size": { "default_value": 0.4 }, "material_diameter": { "default_value": 1.75 }, "machine_extruder_start_pos_abs": { "default_value": true }, diff --git a/resources/extruders/makeit_dual_2nd.def.json b/resources/extruders/makeit_dual_2nd.def.json index 24e9be3a4a..f93d670c85 100644 --- a/resources/extruders/makeit_dual_2nd.def.json +++ b/resources/extruders/makeit_dual_2nd.def.json @@ -15,6 +15,7 @@ }, "machine_nozzle_offset_x": { "default_value": 0.0 }, "machine_nozzle_offset_y": { "default_value": 0.0 }, + "machine_nozzle_size": { "default_value": 0.4 }, "material_diameter": { "default_value": 1.75 }, "machine_extruder_start_pos_abs": { "default_value": true }, diff --git a/resources/extruders/makeit_l_dual_1st.def.json b/resources/extruders/makeit_l_dual_1st.def.json index bf3f99bfa7..6a9e8e3fc1 100644 --- a/resources/extruders/makeit_l_dual_1st.def.json +++ b/resources/extruders/makeit_l_dual_1st.def.json @@ -15,6 +15,7 @@ }, "machine_nozzle_offset_x": { "default_value": 0.0 }, "machine_nozzle_offset_y": { "default_value": 0.0 }, + "machine_nozzle_size": { "default_value": 0.4 }, "material_diameter": { "default_value": 1.75 }, "machine_extruder_start_pos_abs": { "default_value": true }, diff --git a/resources/extruders/makeit_l_dual_2nd.def.json b/resources/extruders/makeit_l_dual_2nd.def.json index 3964ef6779..72b86b22e4 100644 --- a/resources/extruders/makeit_l_dual_2nd.def.json +++ b/resources/extruders/makeit_l_dual_2nd.def.json @@ -15,6 +15,7 @@ }, "machine_nozzle_offset_x": { "default_value": 0.0 }, "machine_nozzle_offset_y": { "default_value": 0.0 }, + "machine_nozzle_size": { "default_value": 0.4 }, "material_diameter": { "default_value": 1.75 }, "machine_extruder_start_pos_abs": { "default_value": true }, diff --git a/resources/extruders/ord_extruder_0.def.json b/resources/extruders/ord_extruder_0.def.json index f98666716d..317ad70a3c 100644 --- a/resources/extruders/ord_extruder_0.def.json +++ b/resources/extruders/ord_extruder_0.def.json @@ -15,6 +15,7 @@ }, "machine_nozzle_offset_x": { "default_value": 0.0 }, "machine_nozzle_offset_y": { "default_value": 0.0 }, + "machine_nozzle_size": { "default_value": 0.35 }, "material_diameter": { "default_value": 1.75 } } } diff --git a/resources/extruders/ord_extruder_1.def.json b/resources/extruders/ord_extruder_1.def.json index 9ea08cf626..6e29ad2f2b 100644 --- a/resources/extruders/ord_extruder_1.def.json +++ b/resources/extruders/ord_extruder_1.def.json @@ -15,6 +15,7 @@ }, "machine_nozzle_offset_x": { "default_value": 62.95 }, "machine_nozzle_offset_y": { "default_value": 2.05 }, + "machine_nozzle_size": { "default_value": 0.35 }, "material_diameter": { "default_value": 1.75 } } } diff --git a/resources/extruders/ord_extruder_2.def.json b/resources/extruders/ord_extruder_2.def.json index 1b521c7507..849930c988 100644 --- a/resources/extruders/ord_extruder_2.def.json +++ b/resources/extruders/ord_extruder_2.def.json @@ -15,6 +15,7 @@ }, "machine_nozzle_offset_x": { "default_value": 0.0 }, "machine_nozzle_offset_y": { "default_value": 27.7 }, + "machine_nozzle_size": { "default_value": 0.35 }, "material_diameter": { "default_value": 1.75 } } } diff --git a/resources/extruders/ord_extruder_3.def.json b/resources/extruders/ord_extruder_3.def.json index bd4d0e2a61..eb3676c14f 100644 --- a/resources/extruders/ord_extruder_3.def.json +++ b/resources/extruders/ord_extruder_3.def.json @@ -15,6 +15,7 @@ }, "machine_nozzle_offset_x": { "default_value": 63.18 }, "machine_nozzle_offset_y": { "default_value": 28.65 }, + "machine_nozzle_size": { "default_value": 0.35 }, "material_diameter": { "default_value": 1.75 } } } diff --git a/resources/extruders/ord_extruder_4.def.json b/resources/extruders/ord_extruder_4.def.json index 00635e9059..291e9e5501 100644 --- a/resources/extruders/ord_extruder_4.def.json +++ b/resources/extruders/ord_extruder_4.def.json @@ -15,6 +15,7 @@ }, "machine_nozzle_offset_x": { "default_value": 31.6 }, "machine_nozzle_offset_y": { "default_value": 28.2 }, + "machine_nozzle_size": { "default_value": 0.35 }, "material_diameter": { "default_value": 1.75 } } } diff --git a/resources/extruders/raise3D_N2_dual_extruder_0.def.json b/resources/extruders/raise3D_N2_dual_extruder_0.def.json index b97ee19d24..48746969d3 100644 --- a/resources/extruders/raise3D_N2_dual_extruder_0.def.json +++ b/resources/extruders/raise3D_N2_dual_extruder_0.def.json @@ -15,6 +15,7 @@ }, "machine_nozzle_offset_x": { "default_value": 0 }, "machine_nozzle_offset_y": { "default_value": 0 }, + "machine_nozzle_size": { "default_value": 0.4 }, "material_diameter": { "default_value": 1.75 }, "machine_extruder_start_pos_abs": { "default_value": true }, diff --git a/resources/extruders/raise3D_N2_dual_extruder_1.def.json b/resources/extruders/raise3D_N2_dual_extruder_1.def.json index 28c030b28e..8ea6f95b16 100644 --- a/resources/extruders/raise3D_N2_dual_extruder_1.def.json +++ b/resources/extruders/raise3D_N2_dual_extruder_1.def.json @@ -15,6 +15,7 @@ }, "machine_nozzle_offset_x": { "default_value": 24.8 }, "machine_nozzle_offset_y": { "default_value": 0.6 }, + "machine_nozzle_size": { "default_value": 0.4 }, "material_diameter": { "default_value": 1.75 }, "machine_extruder_start_pos_abs": { "default_value": true }, diff --git a/resources/extruders/raise3D_N2_plus_dual_extruder_0.def.json b/resources/extruders/raise3D_N2_plus_dual_extruder_0.def.json index 3905e074ae..fc7531cf1b 100644 --- a/resources/extruders/raise3D_N2_plus_dual_extruder_0.def.json +++ b/resources/extruders/raise3D_N2_plus_dual_extruder_0.def.json @@ -15,6 +15,7 @@ }, "machine_nozzle_offset_x": { "default_value": 0 }, "machine_nozzle_offset_y": { "default_value": 0 }, + "machine_nozzle_size": { "default_value": 0.4 }, "material_diameter": { "default_value": 1.75 }, "machine_extruder_start_pos_abs": { "default_value": true }, diff --git a/resources/extruders/raise3D_N2_plus_dual_extruder_1.def.json b/resources/extruders/raise3D_N2_plus_dual_extruder_1.def.json index 65c9fb7274..83f949bb22 100644 --- a/resources/extruders/raise3D_N2_plus_dual_extruder_1.def.json +++ b/resources/extruders/raise3D_N2_plus_dual_extruder_1.def.json @@ -15,6 +15,7 @@ }, "machine_nozzle_offset_x": { "default_value": 24.8 }, "machine_nozzle_offset_y": { "default_value": 0.6 }, + "machine_nozzle_size": { "default_value": 0.4 }, "material_diameter": { "default_value": 1.75 }, "machine_extruder_start_pos_abs": { "default_value": true }, diff --git a/resources/extruders/ultimaker_original_dual_1st.def.json b/resources/extruders/ultimaker_original_dual_1st.def.json index 62ec8479c9..3d837fc989 100644 --- a/resources/extruders/ultimaker_original_dual_1st.def.json +++ b/resources/extruders/ultimaker_original_dual_1st.def.json @@ -15,6 +15,7 @@ }, "machine_nozzle_offset_x": { "default_value": 0.0 }, "machine_nozzle_offset_y": { "default_value": 0.0 }, + "machine_nozzle_size": { "default_value": 0.4 }, "machine_extruder_start_pos_abs": { "default_value": true }, "machine_extruder_start_pos_x": { "value": "prime_tower_position_x" }, diff --git a/resources/extruders/ultimaker_original_dual_2nd.def.json b/resources/extruders/ultimaker_original_dual_2nd.def.json index 42a4da524b..80cc17c58d 100644 --- a/resources/extruders/ultimaker_original_dual_2nd.def.json +++ b/resources/extruders/ultimaker_original_dual_2nd.def.json @@ -15,6 +15,7 @@ }, "machine_nozzle_offset_x": { "default_value": 0.0 }, "machine_nozzle_offset_y": { "default_value": 21.6 }, + "machine_nozzle_size": { "default_value": 0.4 }, "machine_extruder_start_pos_abs": { "default_value": true }, "machine_extruder_start_pos_x": { "value": "prime_tower_position_x" }, diff --git a/resources/extruders/vertex_k8400_dual_1st.def.json b/resources/extruders/vertex_k8400_dual_1st.def.json index 2694323f7d..86fb2266ba 100644 --- a/resources/extruders/vertex_k8400_dual_1st.def.json +++ b/resources/extruders/vertex_k8400_dual_1st.def.json @@ -15,6 +15,7 @@ }, "machine_nozzle_offset_x": { "default_value": 23.7 }, "machine_nozzle_offset_y": { "default_value": 0.0 }, + "machine_nozzle_size": { "default_value": 0.35 }, "material_diameter": { "default_value": 1.75 }, "machine_extruder_start_pos_abs": { "default_value": true }, diff --git a/resources/extruders/vertex_k8400_dual_2nd.def.json b/resources/extruders/vertex_k8400_dual_2nd.def.json index 044f7000af..306b2dcb7a 100644 --- a/resources/extruders/vertex_k8400_dual_2nd.def.json +++ b/resources/extruders/vertex_k8400_dual_2nd.def.json @@ -15,6 +15,7 @@ }, "machine_nozzle_offset_x": { "default_value": 0.0 }, "machine_nozzle_offset_y": { "default_value": 0.0 }, + "machine_nozzle_size": { "default_value": 0.35 }, "material_diameter": { "default_value": 1.75 }, "machine_extruder_start_pos_abs": { "default_value": true }, From d4aaec73550148ee8ea749b6697b74d81a49dcb2 Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Wed, 4 Jul 2018 12:51:01 +0200 Subject: [PATCH 010/174] CURA-5537 Style improvements --- plugins/Toolbox/resources/qml/ToolboxDetailPage.qml | 2 ++ plugins/Toolbox/resources/qml/ToolboxDownloadsGrid.qml | 2 +- plugins/Toolbox/resources/qml/ToolboxFooter.qml | 1 + resources/themes/cura-light/theme.json | 2 +- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml b/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml index 4c6c8c6ba4..cf4bfcd545 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml @@ -74,6 +74,7 @@ Item } spacing: Math.floor(UM.Theme.getSize("narrow_margin").height) width: childrenRect.width + height: childrenRect.height Label { text: catalog.i18nc("@label", "Version") + ":" @@ -110,6 +111,7 @@ Item topMargin: UM.Theme.getSize("default_margin").height } spacing: Math.floor(UM.Theme.getSize("narrow_margin").height) + height: childrenRect.height Label { text: details.version || catalog.i18nc("@label", "Unknown") diff --git a/plugins/Toolbox/resources/qml/ToolboxDownloadsGrid.qml b/plugins/Toolbox/resources/qml/ToolboxDownloadsGrid.qml index 06a6ba30fb..823a85cf09 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDownloadsGrid.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDownloadsGrid.qml @@ -25,7 +25,7 @@ Column { id: grid property var model: toolbox.viewCategory == "material" ? toolbox.authorsModel : toolbox.packagesModel - width: parent.width + width: parent.width - 2 * parent.padding columns: 2 columnSpacing: UM.Theme.getSize("default_margin").height rowSpacing: UM.Theme.getSize("default_margin").width diff --git a/plugins/Toolbox/resources/qml/ToolboxFooter.qml b/plugins/Toolbox/resources/qml/ToolboxFooter.qml index 980ac5f8c9..976ff46da6 100644 --- a/plugins/Toolbox/resources/qml/ToolboxFooter.qml +++ b/plugins/Toolbox/resources/qml/ToolboxFooter.qml @@ -25,6 +25,7 @@ Item right: restartButton.right rightMargin: UM.Theme.getSize("default_margin").width } + color: UM.Theme.getColor("text") } Button { diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index a087a489eb..7bcdafce98 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -448,7 +448,7 @@ "toolbox_footer_button": [8.0, 2.5], "toolbox_showcase_spacing": [1.0, 1.0], "toolbox_header_tab": [8.0, 4.0], - "toolbox_detail_header": [1.0, 12.0], + "toolbox_detail_header": [1.0, 14.0], "toolbox_detail_tile": [1.0, 8.0], "toolbox_back_column": [6.0, 1.0], "toolbox_back_button": [4.0, 2.0], From 7b2a5c9160b93ad8f31661f64e9fc49e00c574ce Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 4 Jul 2018 13:45:44 +0200 Subject: [PATCH 011/174] Remove prime_tower_wall_thickness setting The wall thickness now depends on the order in which the prime towers are folded, which is really hard to obtain within an inheritance formula. So we forego one of the settings and compute the required thickness to obtain the desired volume in the engine where the shell order is known. Contributes to issue CURA-5457. --- .../VersionUpgrade34to40.py | 4 ++++ resources/definitions/fdmprinter.def.json | 21 +------------------ 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/plugins/VersionUpgrade/VersionUpgrade34to40/VersionUpgrade34to40.py b/plugins/VersionUpgrade/VersionUpgrade34to40/VersionUpgrade34to40.py index 593655a046..aacae2cfcf 100644 --- a/plugins/VersionUpgrade/VersionUpgrade34to40/VersionUpgrade34to40.py +++ b/plugins/VersionUpgrade/VersionUpgrade34to40/VersionUpgrade34to40.py @@ -6,6 +6,7 @@ import io from UM.VersionUpgrade import VersionUpgrade +deleted_settings = {"prime_tower_wall_thickness"} ## Upgrades configurations from the state they were in at version 3.4 to the # state they should be in at version 4.0. @@ -68,6 +69,9 @@ class VersionUpgrade34to40(VersionUpgrade): parser["metadata"]["setting_version"] = "5" self._resetConcentric3DInfillPattern(parser) + if "values" in parser: + for deleted_setting in deleted_settings: + del parser["values"][deleted_setting] result = io.StringIO() parser.write(result) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index b458316686..710dcbb87f 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -4998,26 +4998,7 @@ "maximum_value_warning": "round((resolveOrValue('prime_tower_size') * 0.5) ** 2 * 3.14159 * resolveOrValue('layer_height'), 2) if prime_tower_circular else resolveOrValue('prime_tower_size') ** 2 * resolveOrValue('layer_height')", "enabled": "resolveOrValue('prime_tower_enable')", "settable_per_mesh": false, - "settable_per_extruder": true, - "children": - { - "prime_tower_wall_thickness": - { - "label": "Prime Tower Thickness", - "description": "The thickness of the hollow prime tower. A thickness larger than half the Prime Tower Minimum Volume will result in a dense prime tower.", - "unit": "mm", - "type": "float", - "default_value": 2, - "value": "round(max(2 * prime_tower_line_width, (0.5 * (prime_tower_size - math.sqrt(max(0, prime_tower_size ** 2 - 4 * prime_tower_min_volume / (3.14159 * layer_height))))) if prime_tower_circular else (0.5 * (prime_tower_size - math.sqrt(max(0, prime_tower_size ** 2 - prime_tower_min_volume / layer_height))))), 3)", - "resolve": "max(extruderValues('prime_tower_wall_thickness'))", - "minimum_value": "0.001", - "minimum_value_warning": "2 * min(extruderValues('prime_tower_line_width')) - 0.0001", - "maximum_value_warning": "prime_tower_size / 2", - "enabled": "prime_tower_enable", - "settable_per_mesh": false, - "settable_per_extruder": false - } - } + "settable_per_extruder": true }, "prime_tower_position_x": { From 8ff4327c41f62ab9d0503e02be86751f94690f48 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 4 Jul 2018 14:17:57 +0200 Subject: [PATCH 012/174] Remove Wipe Nozzle After Switch and Purge Volume settings The entire purging algorithm is gone now since it purges by printing the prime tower. The prime tower should be sufficiently strong now to not need this. Contributes to issue CURA-5457. --- .../VersionUpgrade34to40.py | 2 +- resources/definitions/fdmprinter.def.json | 23 ------------------- 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/plugins/VersionUpgrade/VersionUpgrade34to40/VersionUpgrade34to40.py b/plugins/VersionUpgrade/VersionUpgrade34to40/VersionUpgrade34to40.py index aacae2cfcf..2877985921 100644 --- a/plugins/VersionUpgrade/VersionUpgrade34to40/VersionUpgrade34to40.py +++ b/plugins/VersionUpgrade/VersionUpgrade34to40/VersionUpgrade34to40.py @@ -6,7 +6,7 @@ import io from UM.VersionUpgrade import VersionUpgrade -deleted_settings = {"prime_tower_wall_thickness"} +deleted_settings = {"prime_tower_wall_thickness", "dual_pre_wipe", "prime_tower_purge_volume"} ## Upgrades configurations from the state they were in at version 3.4 to the # state they should be in at version 4.0. diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 710dcbb87f..8bd49daebe 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -5053,29 +5053,6 @@ "settable_per_mesh": false, "settable_per_extruder": true }, - "dual_pre_wipe": - { - "label": "Wipe Nozzle After Switch", - "description": "After switching extruder, wipe the oozed material off of the nozzle on the first thing printed. This performs a safe slow wipe move at a place where the oozed material causes least harm to the surface quality of your print.", - "type": "bool", - "enabled": "resolveOrValue('prime_tower_enable')", - "default_value": true, - "settable_per_mesh": false, - "settable_per_extruder": true - }, - "prime_tower_purge_volume": - { - "label": "Prime Tower Purge Volume", - "description": "Amount of filament to be purged when wiping on the prime tower. Purging is useful for compensating the filament lost by oozing during inactivity of the nozzle.", - "type": "float", - "enabled": "resolveOrValue('prime_tower_enable') and dual_pre_wipe", - "unit": "mm³", - "default_value": 0, - "minimum_value": "0", - "maximum_value_warning": "2.5", - "settable_per_mesh": false, - "settable_per_extruder": true - }, "ooze_shield_enabled": { "label": "Enable Ooze Shield", From 4722b5387b29cd8316cdb93b141b1a2ba1dcd3ad Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Wed, 4 Jul 2018 14:22:22 +0200 Subject: [PATCH 013/174] CURA-5334 Add extruder definition for Wanhao printers, Uni Print 3d and Tevo Tornado. Those definitions were added without extruder definitions. --- resources/definitions/tevo_tornado.def.json | 11 ++++------- resources/definitions/uni_print_3d.def.json | 7 ++++--- resources/definitions/wanhao_d4s.def.json | 9 +++------ resources/definitions/wanhao_d6.def.json | 9 +++------ resources/definitions/wanhao_d6_plus.def.json | 9 +++------ .../definitions/wanhao_duplicator5S.def.json | 9 +++------ .../definitions/wanhao_duplicator5Smini.def.json | 9 +++------ resources/definitions/wanhao_i3.def.json | 9 +++------ resources/definitions/wanhao_i3mini.def.json | 9 +++------ resources/definitions/wanhao_i3plus.def.json | 9 +++------ .../extruders/tevo_tornado_extruder_0.def.json | 16 ++++++++++++++++ .../extruders/uni_print_3d_extruder_0.def.json | 16 ++++++++++++++++ .../extruders/wanhao_d4s_extruder_0.def.json | 16 ++++++++++++++++ .../extruders/wanhao_d6_extruder_0.def.json | 16 ++++++++++++++++ .../extruders/wanhao_d6_plus_extruder_0.def.json | 16 ++++++++++++++++ .../wanhao_duplicator5S_extruder_0.def.json | 16 ++++++++++++++++ .../wanhao_duplicator5Smini_extruder_0.def.json | 16 ++++++++++++++++ .../extruders/wanhao_i3_extruder_0.def.json | 16 ++++++++++++++++ .../extruders/wanhao_i3mini_extruder_0.def.json | 16 ++++++++++++++++ .../extruders/wanhao_i3plus_extruder_0.def.json | 16 ++++++++++++++++ 20 files changed, 192 insertions(+), 58 deletions(-) create mode 100644 resources/extruders/tevo_tornado_extruder_0.def.json create mode 100644 resources/extruders/uni_print_3d_extruder_0.def.json create mode 100644 resources/extruders/wanhao_d4s_extruder_0.def.json create mode 100644 resources/extruders/wanhao_d6_extruder_0.def.json create mode 100644 resources/extruders/wanhao_d6_plus_extruder_0.def.json create mode 100644 resources/extruders/wanhao_duplicator5S_extruder_0.def.json create mode 100644 resources/extruders/wanhao_duplicator5Smini_extruder_0.def.json create mode 100644 resources/extruders/wanhao_i3_extruder_0.def.json create mode 100644 resources/extruders/wanhao_i3mini_extruder_0.def.json create mode 100644 resources/extruders/wanhao_i3plus_extruder_0.def.json diff --git a/resources/definitions/tevo_tornado.def.json b/resources/definitions/tevo_tornado.def.json index 7ec4f1177f..e121c8e097 100644 --- a/resources/definitions/tevo_tornado.def.json +++ b/resources/definitions/tevo_tornado.def.json @@ -8,7 +8,10 @@ "manufacturer": "Tevo", "file_formats": "text/x-gcode", "icon": "icon_ultimaker2.png", - "has_materials": true + "has_materials": true, + "machine_extruder_trains": { + "0": "tevo_tornado_extruder_0" + } }, "overrides": { "machine_name": { @@ -34,12 +37,6 @@ [30, 34] ] }, - "material_diameter": { - "default_value": 1.75 - }, - "machine_nozzle_size": { - "default_value": 0.4 - }, "top_bottom_thickness": { "default_value": 1.2 }, diff --git a/resources/definitions/uni_print_3d.def.json b/resources/definitions/uni_print_3d.def.json index 1241e2b601..1612c1bf80 100644 --- a/resources/definitions/uni_print_3d.def.json +++ b/resources/definitions/uni_print_3d.def.json @@ -11,7 +11,10 @@ "manufacturer": "TheCoolTool", "file_formats": "text/x-ngc;text/x-gcode", "platform": "uni_print_3d_platform.stl", - "platform_offset": [0, 0, 0] + "platform_offset": [0, 0, 0], + "machine_extruder_trains": { + "0": "uni_print_3d_extruder_0" + } }, "overrides": { @@ -21,8 +24,6 @@ "machine_height": { "default_value": 230 }, "machine_depth": { "default_value": 220 }, "machine_center_is_zero": { "default_value": true }, - "machine_nozzle_size": { "default_value": 0.4 }, - "material_diameter": { "default_value": 1.75 }, "machine_nozzle_heat_up_speed": { "default_value": 2.0 }, "machine_nozzle_cool_down_speed": { "default_value": 2.0 }, "machine_head_shape_min_x": { "default_value": 75 }, diff --git a/resources/definitions/wanhao_d4s.def.json b/resources/definitions/wanhao_d4s.def.json index b7cd52a500..1ae16a9d56 100644 --- a/resources/definitions/wanhao_d4s.def.json +++ b/resources/definitions/wanhao_d4s.def.json @@ -11,6 +11,9 @@ "has_materials": true, "platform": "wanhao_225_145_platform.obj", "platform_texture": "Wanhaobackplate.png", + "machine_extruder_trains": { + "0": "wanhao_d4s_extruder_0" + }, "platform_offset": [ 0, -28, @@ -33,9 +36,6 @@ "machine_heated_bed": { "default_value": true }, - "machine_nozzle_size": { - "default_value": 0.4 - }, "machine_gcode_flavor": { "default_value": "RepRap (Marlin/Sprinter)" }, @@ -44,9 +44,6 @@ }, "machine_end_gcode": { "default_value": "M104 S0 ;extruder heater off \n G91 ;relative positioning\n G1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\n G1 Z+0.5 E-5 X-20 Y-20 F{travel_speed} ;move Z up a bit and retract filament even more\n G28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\n M84 ;steppers off\n G90 ;absolute positioning" - }, - "material_diameter": { - "default_value": 1.75 } } } diff --git a/resources/definitions/wanhao_d6.def.json b/resources/definitions/wanhao_d6.def.json index 23ea069c7a..6164f4d016 100644 --- a/resources/definitions/wanhao_d6.def.json +++ b/resources/definitions/wanhao_d6.def.json @@ -11,6 +11,9 @@ "has_materials": true, "platform": "wanhao_200_200_platform.obj", "platform_texture": "Wanhaobackplate.png", + "machine_extruder_trains": { + "0": "wanhao_d6_extruder_0" + }, "platform_offset": [ 0, -28, @@ -33,9 +36,6 @@ "machine_depth": { "default_value": 200 }, - "machine_nozzle_size": { - "default_value": 0.4 - }, "machine_heated_bed": { "default_value": true }, @@ -50,9 +50,6 @@ }, "machine_end_gcode": { "default_value": "M104 S0 ;extruder heater off \n G91 ;relative positioning\n G1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\n G1 Z+0.5 E-5 X-20 Y-20 F{travel_speed} ;move Z up a bit and retract filament even more\n G28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\n M84 ;steppers off\n G90 ;absolute positioning" - }, - "material_diameter": { - "default_value": 1.75 } } } diff --git a/resources/definitions/wanhao_d6_plus.def.json b/resources/definitions/wanhao_d6_plus.def.json index 9fd03561e1..04cb6fae9f 100644 --- a/resources/definitions/wanhao_d6_plus.def.json +++ b/resources/definitions/wanhao_d6_plus.def.json @@ -11,6 +11,9 @@ "has_materials": true, "platform": "wanhao_200_200_platform.obj", "platform_texture": "Wanhaobackplate.png", + "machine_extruder_trains": { + "0": "wanhao_d6_plus_extruder_0" + }, "platform_offset": [ 0, -28, @@ -30,9 +33,6 @@ "machine_depth": { "default_value": 200 }, - "machine_nozzle_size": { - "default_value": 0.4 - }, "machine_heated_bed": { "default_value": true }, @@ -44,9 +44,6 @@ }, "machine_end_gcode": { "default_value": "M104 S0 ;extruder heater off \n G91 ;relative positioning\n G1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\n G1 Z+0.5 E-5 X-20 Y-20 F{travel_speed} ;move Z up a bit and retract filament even more\n G28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\n M84 ;steppers off\n G90 ;absolute positioning" - }, - "material_diameter": { - "default_value": 1.75 } } } diff --git a/resources/definitions/wanhao_duplicator5S.def.json b/resources/definitions/wanhao_duplicator5S.def.json index 7ded5b0fdb..1ccc867876 100644 --- a/resources/definitions/wanhao_duplicator5S.def.json +++ b/resources/definitions/wanhao_duplicator5S.def.json @@ -11,6 +11,9 @@ "has_materials": true, "platform": "wanhao_300_200_platform.obj", "platform_texture": "Wanhaobackplate.png", + "machine_extruder_trains": { + "0": "wanhao_duplicator5S_extruder_0" + }, "platform_offset": [ 0, -28, @@ -36,9 +39,6 @@ "machine_heated_bed": { "default_value": false }, - "machine_nozzle_size": { - "default_value": 0.4 - }, "machine_gcode_flavor": { "default_value": "RepRap (Marlin/Sprinter)" }, @@ -47,9 +47,6 @@ }, "machine_end_gcode": { "default_value": "M104 S0 ;extruder heater off \n G91 ;relative positioning\n G1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\n G1 Z+0.5 E-5 X-20 Y-20 F{travel_speed} ;move Z up a bit and retract filament even more\n G28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\n M84 ;steppers off\n G90 ;absolute positioning" - }, - "material_diameter": { - "default_value": 3 } } } diff --git a/resources/definitions/wanhao_duplicator5Smini.def.json b/resources/definitions/wanhao_duplicator5Smini.def.json index 2ab2119961..774360f41e 100644 --- a/resources/definitions/wanhao_duplicator5Smini.def.json +++ b/resources/definitions/wanhao_duplicator5Smini.def.json @@ -11,6 +11,9 @@ "has_materials": true, "platform": "wanhao_300_200_platform.obj", "platform_texture": "Wanhaobackplate.png", + "machine_extruder_trains": { + "0": "wanhao_duplicator5Smini_extruder_0" + }, "platform_offset": [ 0, -28, @@ -33,9 +36,6 @@ "machine_heated_bed": { "default_value": false }, - "machine_nozzle_size": { - "default_value": 0.4 - }, "machine_gcode_flavor": { "default_value": "RepRap (Marlin/Sprinter)" }, @@ -44,9 +44,6 @@ }, "machine_end_gcode": { "default_value": "M104 S0 ;extruder heater off \n G91 ;relative positioning\n G1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\n G1 Z+0.5 E-5 X-20 Y-20 F{travel_speed} ;move Z up a bit and retract filament even more\n G28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\n M84 ;steppers off\n G90 ;absolute positioning" - }, - "material_diameter": { - "default_value": 3 } } } diff --git a/resources/definitions/wanhao_i3.def.json b/resources/definitions/wanhao_i3.def.json index 2171d887ef..c349259cad 100644 --- a/resources/definitions/wanhao_i3.def.json +++ b/resources/definitions/wanhao_i3.def.json @@ -11,6 +11,9 @@ "has_materials": true, "platform": "wanhao_200_200_platform.obj", "platform_texture": "Wanhaobackplate.png", + "machine_extruder_trains": { + "0": "wanhao_i3_extruder_0" + }, "platform_offset": [ 0, -28, @@ -33,9 +36,6 @@ "machine_heated_bed": { "default_value": true }, - "machine_nozzle_size": { - "default_value": 0.4 - }, "machine_gcode_flavor": { "default_value": "RepRap (Marlin/Sprinter)" }, @@ -44,9 +44,6 @@ }, "machine_end_gcode": { "default_value": "M104 S0 ;extruder heater off \n G91 ;relative positioning\n G1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\n G1 Z+0.5 E-5 X-20 Y-20 F{travel_speed} ;move Z up a bit and retract filament even more\n G28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\n M84 ;steppers off\n G90 ;absolute positioning" - }, - "material_diameter": { - "default_value": 1.75 } } } diff --git a/resources/definitions/wanhao_i3mini.def.json b/resources/definitions/wanhao_i3mini.def.json index 0145221229..4531483459 100644 --- a/resources/definitions/wanhao_i3mini.def.json +++ b/resources/definitions/wanhao_i3mini.def.json @@ -11,6 +11,9 @@ "has_materials": true, "platform": "wanhao_110_110_platform.obj", "platform_texture": "Wanhaobackplate.png", + "machine_extruder_trains": { + "0": "wanhao_i3mini_extruder_0" + }, "platform_offset": [ 0, -15, @@ -33,9 +36,6 @@ "machine_heated_bed": { "default_value": false }, - "machine_nozzle_size": { - "default_value": 0.4 - }, "machine_gcode_flavor": { "default_value": "RepRap (Marlin/Sprinter)" }, @@ -44,9 +44,6 @@ }, "machine_end_gcode": { "default_value": "M104 S0 ;extruder heater off \n G91 ;relative positioning\n G1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\n G1 Z+0.5 E-5 X-20 Y-20 F{travel_speed} ;move Z up a bit and retract filament even more\n G28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\n M84 ;steppers off\n G90 ;absolute positioning" - }, - "material_diameter": { - "default_value": 1.75 } } } diff --git a/resources/definitions/wanhao_i3plus.def.json b/resources/definitions/wanhao_i3plus.def.json index 83f1cf5f4e..5338fbeea2 100644 --- a/resources/definitions/wanhao_i3plus.def.json +++ b/resources/definitions/wanhao_i3plus.def.json @@ -11,6 +11,9 @@ "has_materials": true, "platform": "wanhao_200_200_platform.obj", "platform_texture": "Wanhaobackplate.png", + "machine_extruder_trains": { + "0": "wanhao_i3plus_extruder_0" + }, "platform_offset": [ 0, -28, @@ -33,9 +36,6 @@ "machine_heated_bed": { "default_value": true }, - "machine_nozzle_size": { - "default_value": 0.4 - }, "machine_gcode_flavor": { "default_value": "RepRap (Marlin/Sprinter)" }, @@ -44,9 +44,6 @@ }, "machine_end_gcode": { "default_value": "M104 S0 ;extruder heater off \n G91 ;relative positioning\n G1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\n G1 Z+0.5 E-5 X-20 Y-20 F{travel_speed} ;move Z up a bit and retract filament even more\n G28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\n M84 ;steppers off\n G90 ;absolute positioning" - }, - "material_diameter": { - "default_value": 1.75 } } } diff --git a/resources/extruders/tevo_tornado_extruder_0.def.json b/resources/extruders/tevo_tornado_extruder_0.def.json new file mode 100644 index 0000000000..b47a757113 --- /dev/null +++ b/resources/extruders/tevo_tornado_extruder_0.def.json @@ -0,0 +1,16 @@ +{ + "id": "tevo_tornado_extruder_0", + "version": 2, + "name": "Extruder 1", + "inherits": "fdmextruder", + "metadata": { + "machine": "tevo_tornado", + "position": "0" + }, + + "overrides": { + "extruder_nr": { "default_value": 0 }, + "machine_nozzle_size": { "default_value": 0.4 }, + "material_diameter": { "default_value": 1.75 } + } +} diff --git a/resources/extruders/uni_print_3d_extruder_0.def.json b/resources/extruders/uni_print_3d_extruder_0.def.json new file mode 100644 index 0000000000..d0711fd458 --- /dev/null +++ b/resources/extruders/uni_print_3d_extruder_0.def.json @@ -0,0 +1,16 @@ +{ + "id": "uni_print_3d_extruder_0", + "version": 2, + "name": "Extruder 1", + "inherits": "fdmextruder", + "metadata": { + "machine": "uni_print_3d", + "position": "0" + }, + + "overrides": { + "extruder_nr": { "default_value": 0 }, + "machine_nozzle_size": { "default_value": 0.4 }, + "material_diameter": { "default_value": 1.75 } + } +} diff --git a/resources/extruders/wanhao_d4s_extruder_0.def.json b/resources/extruders/wanhao_d4s_extruder_0.def.json new file mode 100644 index 0000000000..9a750e072c --- /dev/null +++ b/resources/extruders/wanhao_d4s_extruder_0.def.json @@ -0,0 +1,16 @@ +{ + "id": "wanhao_d4s_extruder_0", + "version": 2, + "name": "Extruder 1", + "inherits": "fdmextruder", + "metadata": { + "machine": "wanhao_d4s", + "position": "0" + }, + + "overrides": { + "extruder_nr": { "default_value": 0 }, + "machine_nozzle_size": { "default_value": 0.4 }, + "material_diameter": { "default_value": 1.75 } + } +} diff --git a/resources/extruders/wanhao_d6_extruder_0.def.json b/resources/extruders/wanhao_d6_extruder_0.def.json new file mode 100644 index 0000000000..a8a3bf15d3 --- /dev/null +++ b/resources/extruders/wanhao_d6_extruder_0.def.json @@ -0,0 +1,16 @@ +{ + "id": "wanhao_d6_extruder_0", + "version": 2, + "name": "Extruder 1", + "inherits": "fdmextruder", + "metadata": { + "machine": "wanhao_d6", + "position": "0" + }, + + "overrides": { + "extruder_nr": { "default_value": 0 }, + "machine_nozzle_size": { "default_value": 0.4 }, + "material_diameter": { "default_value": 1.75 } + } +} diff --git a/resources/extruders/wanhao_d6_plus_extruder_0.def.json b/resources/extruders/wanhao_d6_plus_extruder_0.def.json new file mode 100644 index 0000000000..b2b1e6ab05 --- /dev/null +++ b/resources/extruders/wanhao_d6_plus_extruder_0.def.json @@ -0,0 +1,16 @@ +{ + "id": "wanhao_d6_plus_extruder_0", + "version": 2, + "name": "Extruder 1", + "inherits": "fdmextruder", + "metadata": { + "machine": "wanhao_d6_plus", + "position": "0" + }, + + "overrides": { + "extruder_nr": { "default_value": 0 }, + "machine_nozzle_size": { "default_value": 0.4 }, + "material_diameter": { "default_value": 1.75 } + } +} diff --git a/resources/extruders/wanhao_duplicator5S_extruder_0.def.json b/resources/extruders/wanhao_duplicator5S_extruder_0.def.json new file mode 100644 index 0000000000..74f47158a3 --- /dev/null +++ b/resources/extruders/wanhao_duplicator5S_extruder_0.def.json @@ -0,0 +1,16 @@ +{ + "id": "wanhao_duplicator5S_extruder_0", + "version": 2, + "name": "Extruder 1", + "inherits": "fdmextruder", + "metadata": { + "machine": "wanhao_duplicator5S", + "position": "0" + }, + + "overrides": { + "extruder_nr": { "default_value": 0 }, + "machine_nozzle_size": { "default_value": 0.4 }, + "material_diameter": { "default_value": 3 } + } +} diff --git a/resources/extruders/wanhao_duplicator5Smini_extruder_0.def.json b/resources/extruders/wanhao_duplicator5Smini_extruder_0.def.json new file mode 100644 index 0000000000..8c91de4685 --- /dev/null +++ b/resources/extruders/wanhao_duplicator5Smini_extruder_0.def.json @@ -0,0 +1,16 @@ +{ + "id": "wanhao_duplicator5Smini_extruder_0", + "version": 2, + "name": "Extruder 1", + "inherits": "fdmextruder", + "metadata": { + "machine": "wanhao_duplicator5Smini", + "position": "0" + }, + + "overrides": { + "extruder_nr": { "default_value": 0 }, + "machine_nozzle_size": { "default_value": 0.4 }, + "material_diameter": { "default_value": 3 } + } +} diff --git a/resources/extruders/wanhao_i3_extruder_0.def.json b/resources/extruders/wanhao_i3_extruder_0.def.json new file mode 100644 index 0000000000..7d881079c4 --- /dev/null +++ b/resources/extruders/wanhao_i3_extruder_0.def.json @@ -0,0 +1,16 @@ +{ + "id": "wanhao_i3_extruder_0", + "version": 2, + "name": "Extruder 1", + "inherits": "fdmextruder", + "metadata": { + "machine": "wanhao_i3", + "position": "0" + }, + + "overrides": { + "extruder_nr": { "default_value": 0 }, + "machine_nozzle_size": { "default_value": 0.4 }, + "material_diameter": { "default_value": 1.75 } + } +} diff --git a/resources/extruders/wanhao_i3mini_extruder_0.def.json b/resources/extruders/wanhao_i3mini_extruder_0.def.json new file mode 100644 index 0000000000..c5abbd175e --- /dev/null +++ b/resources/extruders/wanhao_i3mini_extruder_0.def.json @@ -0,0 +1,16 @@ +{ + "id": "wanhao_i3mini_extruder_0", + "version": 2, + "name": "Extruder 1", + "inherits": "fdmextruder", + "metadata": { + "machine": "wanhao_i3mini", + "position": "0" + }, + + "overrides": { + "extruder_nr": { "default_value": 0 }, + "machine_nozzle_size": { "default_value": 0.4 }, + "material_diameter": { "default_value": 1.75 } + } +} diff --git a/resources/extruders/wanhao_i3plus_extruder_0.def.json b/resources/extruders/wanhao_i3plus_extruder_0.def.json new file mode 100644 index 0000000000..0dae64ce63 --- /dev/null +++ b/resources/extruders/wanhao_i3plus_extruder_0.def.json @@ -0,0 +1,16 @@ +{ + "id": "wanhao_i3plus_extruder_0", + "version": 2, + "name": "Extruder 1", + "inherits": "fdmextruder", + "metadata": { + "machine": "wanhao_i3plus", + "position": "0" + }, + + "overrides": { + "extruder_nr": { "default_value": 0 }, + "machine_nozzle_size": { "default_value": 0.4 }, + "material_diameter": { "default_value": 1.75 } + } +} From 4fd404370632d33d16f9c3d701f244680811126d Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Wed, 4 Jul 2018 14:39:01 +0200 Subject: [PATCH 014/174] CURA-5528 Make the variable remove_failures a set. --- cura/CuraPackageManager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cura/CuraPackageManager.py b/cura/CuraPackageManager.py index d4ea445a4c..659ac71dc7 100644 --- a/cura/CuraPackageManager.py +++ b/cura/CuraPackageManager.py @@ -94,13 +94,13 @@ class CuraPackageManager(QObject): # (for initialize) Removes all packages that have been scheduled to be removed. def _removeAllScheduledPackages(self) -> None: - remove_failures = [] + remove_failures = set() for package_id in self._to_remove_package_set: try: self._purgePackage(package_id) del self._installed_package_dict[package_id] except: - remove_failures.append(package_id) + remove_failures.add(package_id) Logger.log("e", "There was an error uninstalling the package {package}".format(package = package_id)) self._to_remove_package_set = remove_failures self._saveManagementData() From 2b5700e4e11753023d40fb6c5902d05b3e332fb3 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Wed, 4 Jul 2018 14:50:30 +0200 Subject: [PATCH 015/174] Check the package file before installing it Make sure that the package file is there before we remove the existing installed files. --- cura/CuraPackageManager.py | 60 ++++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 28 deletions(-) diff --git a/cura/CuraPackageManager.py b/cura/CuraPackageManager.py index d4ea445a4c..58a08ef733 100644 --- a/cura/CuraPackageManager.py +++ b/cura/CuraPackageManager.py @@ -308,43 +308,47 @@ class CuraPackageManager(QObject): package_id = package_info["package_id"] Logger.log("i", "Installing package [%s] from file [%s]", package_id, filename) - # remove it first and then install + # Load the cached package file and extract all contents to a temporary directory + if not os.path.exists(filename): + Logger.log("w", "Package [%s] file '%s' is missing, cannot install this package", package_id, filename) + return + try: + with zipfile.ZipFile(filename, "r") as archive: + temp_dir = tempfile.TemporaryDirectory() + archive.extractall(temp_dir.name) + except Exception: + Logger.logException("e", "Failed to install package from file [%s]", filename) + return + + from cura.CuraApplication import CuraApplication + installation_dirs_dict = { + "materials": Resources.getStoragePath(CuraApplication.ResourceTypes.MaterialInstanceContainer), + "qualities": Resources.getStoragePath(CuraApplication.ResourceTypes.QualityInstanceContainer), + "plugins": os.path.abspath(Resources.getStoragePath(Resources.Plugins)), + } + + # Remove it first and then install try: self._purgePackage(package_id) except: Logger.log("e", "There was an error deleting the package {package} during updating.".format(package = package_id)) return - if not os.path.exists(filename): - Logger.log("w", "Package [%s] file '%s' is missing, cannot install this package", package_id, filename) - return + # Copy the folders there + for sub_dir_name, installation_root_dir in installation_dirs_dict.items(): + src_dir_path = os.path.join(temp_dir.name, "files", sub_dir_name) + dst_dir_path = os.path.join(installation_root_dir, package_id) - # Install the package - with zipfile.ZipFile(filename, "r") as archive: + if not os.path.exists(src_dir_path): + continue + self.__installPackageFiles(package_id, src_dir_path, dst_dir_path) - temp_dir = tempfile.TemporaryDirectory() - archive.extractall(temp_dir.name) + # Remove the file + try: + os.remove(filename) + except Exception: + Logger.log("w", "Tried to delete file [%s], but it failed", filename) - from cura.CuraApplication import CuraApplication - installation_dirs_dict = { - "materials": Resources.getStoragePath(CuraApplication.ResourceTypes.MaterialInstanceContainer), - "qualities": Resources.getStoragePath(CuraApplication.ResourceTypes.QualityInstanceContainer), - "plugins": os.path.abspath(Resources.getStoragePath(Resources.Plugins)), - } - - for sub_dir_name, installation_root_dir in installation_dirs_dict.items(): - src_dir_path = os.path.join(temp_dir.name, "files", sub_dir_name) - dst_dir_path = os.path.join(installation_root_dir, package_id) - - if not os.path.exists(src_dir_path): - continue - self.__installPackageFiles(package_id, src_dir_path, dst_dir_path) - - # Remove the file - try: - os.remove(filename) - except Exception: - Logger.log("w", "Tried to delete file [%s], but it failed", filename) # Move the info to the installed list of packages only when it succeeds self._installed_package_dict[package_id] = self._to_install_package_dict[package_id] From b149ef57fdecf53bddd2613829ab0acb124f2deb Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 4 Jul 2018 17:18:01 +0200 Subject: [PATCH 016/174] Add test for the version number being incremented --- .../tests/TestVersionUpgrade34to40.py | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 plugins/VersionUpgrade/VersionUpgrade34to40/tests/TestVersionUpgrade34to40.py diff --git a/plugins/VersionUpgrade/VersionUpgrade34to40/tests/TestVersionUpgrade34to40.py b/plugins/VersionUpgrade/VersionUpgrade34to40/tests/TestVersionUpgrade34to40.py new file mode 100644 index 0000000000..a6a3a1febf --- /dev/null +++ b/plugins/VersionUpgrade/VersionUpgrade34to40/tests/TestVersionUpgrade34to40.py @@ -0,0 +1,34 @@ +# Copyright (c) 2018 Ultimaker B.V. +# Cura is released under the terms of the LGPLv3 or higher. + +import configparser #To parse the resulting config files. +import pytest #To register tests with. + +import VersionUpgrade34to40 #The module we're testing. + +## Creates an instance of the upgrader to test with. +@pytest.fixture +def upgrader(): + return VersionUpgrade34to40.VersionUpgrade34to40() + +test_upgrade_version_nr_data = [ + ("Empty config file", + """[general] + version = 5 + [metadata] + setting_version = 4 +""" + ) +] + +## Tests whether the version numbers are updated. +def test_upgradeVersionNr(test_name, file_data, upgrader): + #Perform the upgrade. + _, upgraded_instances = upgrader.upgradePreferences(file_data, "") + upgraded_instance = upgraded_instances[0] + parser = configparser.ConfigParser(interpolation = None) + parser.read_string(upgraded_instance) + + #Check the new version. + assert parser["general"]["version"] == "6" + assert parser["metadata"]["setting_version"] == "5" \ No newline at end of file From c9480f2f2bd406e25ab073d14311719c2363cfe4 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 4 Jul 2018 17:30:01 +0200 Subject: [PATCH 017/174] Add types for backup metadata --- cura/Backups/Backup.py | 7 ++++--- cura/Backups/BackupsManager.py | 13 +++++++------ 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/cura/Backups/Backup.py b/cura/Backups/Backup.py index f935aa6af5..cc47df770e 100644 --- a/cura/Backups/Backup.py +++ b/cura/Backups/Backup.py @@ -1,12 +1,13 @@ # Copyright (c) 2018 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. + import io import os import re import shutil -from typing import Optional +from typing import Dict, Optional from zipfile import ZipFile, ZIP_DEFLATED, BadZipfile from UM import i18nCatalog @@ -28,9 +29,9 @@ class Backup: # Re-use translation catalog. catalog = i18nCatalog("cura") - def __init__(self, zip_file: bytes = None, meta_data: dict = None) -> None: + def __init__(self, zip_file: bytes = None, meta_data: Dict[str, str] = None) -> None: self.zip_file = zip_file # type: Optional[bytes] - self.meta_data = meta_data # type: Optional[dict] + self.meta_data = meta_data # type: Optional[Dict[str, str]] ## Create a back-up from the current user config folder. def makeFromCurrent(self) -> None: diff --git a/cura/Backups/BackupsManager.py b/cura/Backups/BackupsManager.py index bc560a8dd9..67e2a222f1 100644 --- a/cura/Backups/BackupsManager.py +++ b/cura/Backups/BackupsManager.py @@ -1,6 +1,7 @@ # Copyright (c) 2018 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. -from typing import Optional, Tuple + +from typing import Dict, Optional, Tuple from UM.Logger import Logger from cura.Backups.Backup import Backup @@ -18,7 +19,7 @@ class BackupsManager: ## Get a back-up of the current configuration. # \return A tuple containing a ZipFile (the actual back-up) and a dict # containing some metadata (like version). - def createBackup(self) -> Tuple[Optional[bytes], Optional[dict]]: + def createBackup(self) -> Tuple[Optional[bytes], Optional[Dict[str, str]]]: self._disableAutoSave() backup = Backup() backup.makeFromCurrent() @@ -30,7 +31,7 @@ class BackupsManager: # \param zip_file A bytes object containing the actual back-up. # \param meta_data A dict containing some metadata that is needed to # restore the back-up correctly. - def restoreBackup(self, zip_file: bytes, meta_data: dict) -> None: + def restoreBackup(self, zip_file: bytes, meta_data: Dict[str, str]) -> None: if not meta_data.get("cura_release", None): # If there is no "cura_release" specified in the meta data, we don't execute a backup restore. Logger.log("w", "Tried to restore a backup without specifying a Cura version number.") @@ -43,13 +44,13 @@ class BackupsManager: if restored: # At this point, Cura will need to restart for the changes to take effect. # We don't want to store the data at this point as that would override the just-restored backup. - self._application.windowClosed(save_data=False) + self._application.windowClosed(save_data = False) ## Here we try to disable the auto-save plug-in as it might interfere with # restoring a back-up. - def _disableAutoSave(self): + def _disableAutoSave(self) -> None: self._application.setSaveDataEnabled(False) ## Re-enable auto-save after we're done. - def _enableAutoSave(self): + def _enableAutoSave(self) -> None: self._application.setSaveDataEnabled(True) From 71ca5f39f2740793a2f93f1fab8066e4de57c589 Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Wed, 4 Jul 2018 17:30:29 +0200 Subject: [PATCH 018/174] Fix indentation to move the remove function outside of the loop because it only needs to be done once. --- cura/CuraPackageManager.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cura/CuraPackageManager.py b/cura/CuraPackageManager.py index 1ce3226a50..f51d0622c4 100644 --- a/cura/CuraPackageManager.py +++ b/cura/CuraPackageManager.py @@ -343,11 +343,11 @@ class CuraPackageManager(QObject): continue self.__installPackageFiles(package_id, src_dir_path, dst_dir_path) - # Remove the file - try: - os.remove(filename) - except Exception: - Logger.log("w", "Tried to delete file [%s], but it failed", filename) + # Remove the file + try: + os.remove(filename) + except Exception: + Logger.log("w", "Tried to delete file [%s], but it failed", filename) # Move the info to the installed list of packages only when it succeeds self._installed_package_dict[package_id] = self._to_install_package_dict[package_id] From 9e18bb8b4cec211b33be3684ee7efa42d45d82c9 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 4 Jul 2018 17:31:58 +0200 Subject: [PATCH 019/174] Remove ID from Raise3D definition These IDs are not used and should never be added again. --- resources/extruders/raise3D_N2_plus_single_extruder_0.def.json | 1 - 1 file changed, 1 deletion(-) diff --git a/resources/extruders/raise3D_N2_plus_single_extruder_0.def.json b/resources/extruders/raise3D_N2_plus_single_extruder_0.def.json index bb6e631864..efb071cb8c 100644 --- a/resources/extruders/raise3D_N2_plus_single_extruder_0.def.json +++ b/resources/extruders/raise3D_N2_plus_single_extruder_0.def.json @@ -1,5 +1,4 @@ { - "id": "raise3D_N2_plus_single_extruder_0", "version": 2, "name": "Extruder 1", "inherits": "fdmextruder", From b812989f1cbc8f9fe342e56ada7849545bf738f3 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 4 Jul 2018 17:34:26 +0200 Subject: [PATCH 020/174] Add types for width, height, depth and shape --- cura/BuildVolume.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/cura/BuildVolume.py b/cura/BuildVolume.py index d0563a5352..de4a33b630 100755 --- a/cura/BuildVolume.py +++ b/cura/BuildVolume.py @@ -47,10 +47,10 @@ class BuildVolume(SceneNode): self._disallowed_area_color = None self._error_area_color = None - self._width = 0 - self._height = 0 - self._depth = 0 - self._shape = "" + self._width = 0 #type: float + self._height = 0 #type: float + self._depth = 0 #type: float + self._shape = "" #type: str self._shader = None @@ -154,19 +154,19 @@ class BuildVolume(SceneNode): if active_extruder_changed is not None: active_extruder_changed.connect(self._updateDisallowedAreasAndRebuild) - def setWidth(self, width): + def setWidth(self, width: float) -> None: if width is not None: self._width = width - def setHeight(self, height): + def setHeight(self, height: float) -> None: if height is not None: self._height = height - def setDepth(self, depth): + def setDepth(self, depth: float) -> None: if depth is not None: self._depth = depth - def setShape(self, shape: str): + def setShape(self, shape: str) -> None: if shape: self._shape = shape From 2023973e98ee3576c92037c5c24c85d633d36c86 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 4 Jul 2018 17:39:24 +0200 Subject: [PATCH 021/174] Use _engine_ready to detect if there is a QML engine We already have this variable. Let's not use a private variable from another class. --- cura/BuildVolume.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/BuildVolume.py b/cura/BuildVolume.py index d0563a5352..885143ac69 100755 --- a/cura/BuildVolume.py +++ b/cura/BuildVolume.py @@ -294,7 +294,7 @@ class BuildVolume(SceneNode): if not self._width or not self._height or not self._depth: return - if not self._application._qml_engine: + if not self._engine_ready: return if not self._volume_outline_color: From 7d7a51d77241026ef665300b944b64dd69dbddcc Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Thu, 5 Jul 2018 08:04:19 +0200 Subject: [PATCH 022/174] Fix code-style in CuraEngineBackend --- .../CuraEngineBackend/CuraEngineBackend.py | 49 ++++++++++++------- plugins/CuraEngineBackend/StartSliceJob.py | 30 ++++++------ 2 files changed, 46 insertions(+), 33 deletions(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index e7dca2ae3e..1df694aa86 100755 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -3,6 +3,8 @@ from collections import defaultdict import os +from typing import Union + from PyQt5.QtCore import QObject, QTimer, pyqtSlot import sys from time import time @@ -60,17 +62,16 @@ class CuraEngineBackend(QObject, Backend): if hasattr(sys, "frozen"): default_engine_location = os.path.join(os.path.dirname(os.path.abspath(sys.executable)), executable_name) if Platform.isLinux() and not default_engine_location: - if not os.getenv("PATH"): + env_path = os.getenv("PATH") + if not env_path: raise OSError("There is something wrong with your Linux installation.") - for pathdir in os.getenv("PATH").split(os.pathsep): + for pathdir in env_path.split(os.pathsep): execpath = os.path.join(pathdir, executable_name) if os.path.exists(execpath): default_engine_location = execpath break self._application = CuraApplication.getInstance() #type: CuraApplication - self._multi_build_plate_model = None #type: MultiBuildPlateModel - self._machine_error_checker = None #type: MachineErrorChecker if not default_engine_location: raise EnvironmentError("Could not find CuraEngine") @@ -120,11 +121,11 @@ class CuraEngineBackend(QObject, Backend): self._engine_is_fresh = True #type: bool # Is the newly started engine used before or not? self._backend_log_max_lines = 20000 #type: int # Maximum number of lines to buffer - self._error_message = None #type: Message # Pop-up message that shows errors. + self._error_message = None #type: Optional[Message] # Pop-up message that shows errors. self._last_num_objects = defaultdict(int) #type: Dict[int, int] # Count number of objects to see if there is something changed self._postponed_scene_change_sources = [] #type: List[SceneNode] # scene change is postponed (by a tool) - self._slice_start_time = None #type: Optional[float] + self._slice_start_time = time() #type: float self._is_disabled = False #type: bool self._application.getPreferences().addPreference("general/auto_slice", False) @@ -142,8 +143,7 @@ class CuraEngineBackend(QObject, Backend): self._application.initializationFinished.connect(self.initialize) def initialize(self) -> None: - self._multi_build_plate_model = self._application.getMultiBuildPlateModel() - + self._multi_build_plate_model = self._application.getMultiBuildPlateModel() #type: MultiBuildPlateModel self._application.getController().activeViewChanged.connect(self._onActiveViewChanged) self._multi_build_plate_model.activeBuildPlateChanged.connect(self._onActiveViewChanged) @@ -160,7 +160,7 @@ class CuraEngineBackend(QObject, Backend): self._application.getController().toolOperationStarted.connect(self._onToolOperationStarted) self._application.getController().toolOperationStopped.connect(self._onToolOperationStopped) - self._machine_error_checker = self._application.getMachineErrorChecker() + self._machine_error_checker = self._application.getMachineErrorChecker() #type: MachineErrorChecker self._machine_error_checker.errorCheckFinished.connect(self._onStackErrorCheckFinished) ## Terminate the engine process. @@ -310,6 +310,11 @@ class CuraEngineBackend(QObject, Backend): if self._start_slice_job is job: self._start_slice_job = None + if not self._global_container_stack: + self.backendStateChange.emit(BackendState.Error) + self.backendError.emit(job) + return + if job.isCancelled() or job.getError() or job.getResult() == StartJobResult.Error: self.backendStateChange.emit(BackendState.Error) self.backendError.emit(job) @@ -447,7 +452,8 @@ class CuraEngineBackend(QObject, Backend): # Only count sliceable objects if node.callDecoration("isSliceable"): build_plate_number = node.callDecoration("getBuildPlateNumber") - num_objects[build_plate_number] += 1 + if build_plate_number is not None: + num_objects[build_plate_number] += 1 return num_objects ## Listener for when the scene has changed. @@ -464,7 +470,7 @@ class CuraEngineBackend(QObject, Backend): if source.callDecoration("isBlockSlicing") and source.callDecoration("getLayerData"): self._stored_optimized_layer_data = {} - build_plate_changed = set() + build_plate_changed = set() # type: Set[int] source_build_plate_number = source.callDecoration("getBuildPlateNumber") if source == self._scene.getRoot(): # we got the root node @@ -476,14 +482,15 @@ class CuraEngineBackend(QObject, Backend): else: # we got a single scenenode if not source.callDecoration("isGroup"): - if source.getMeshData() is None: + mesh_data = source.getMeshData() + if mesh_data is None: return - if source.getMeshData().getVertices() is None: + elif mesh_data.getVertices() is None: return - build_plate_changed.add(source_build_plate_number) + if source_build_plate_number is not None: + build_plate_changed.add(source_build_plate_number) - build_plate_changed.discard(None) build_plate_changed.discard(-1) # object not on build plate if not build_plate_changed: return @@ -577,9 +584,10 @@ class CuraEngineBackend(QObject, Backend): # # \param message The protobuf message containing sliced layer data. def _onOptimizedLayerMessage(self, message: Arcus.PythonMessage) -> None: - if self._start_slice_job_build_plate not in self._stored_optimized_layer_data: - self._stored_optimized_layer_data[self._start_slice_job_build_plate] = [] - self._stored_optimized_layer_data[self._start_slice_job_build_plate].append(message) + if self._start_slice_job_build_plate is not None: + if self._start_slice_job_build_plate not in self._stored_optimized_layer_data: + self._stored_optimized_layer_data[self._start_slice_job_build_plate] = [] + self._stored_optimized_layer_data[self._start_slice_job_build_plate].append(message) ## Called when a progress message is received from the engine. # @@ -658,7 +666,10 @@ class CuraEngineBackend(QObject, Backend): ## Creates a new socket connection. def _createSocket(self, protocol_file: str = None) -> None: if not protocol_file: - protocol_file = os.path.abspath(os.path.join(PluginRegistry.getInstance().getPluginPath(self.getPluginId()), "Cura.proto")) + plugin_path = PluginRegistry.getInstance().getPluginPath(self.getPluginId()) + if not plugin_path: + return + protocol_file = os.path.abspath(os.path.join(plugin_path, "Cura.proto")) super()._createSocket(protocol_file) self._engine_is_fresh = True diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py index 78dd4eafd2..8e429da14d 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.py @@ -114,13 +114,14 @@ class StartSliceJob(Job): self.setResult(StartJobResult.Error) return - stack = CuraApplication.getInstance().getGlobalContainerStack() - if not stack: + global_stack = CuraApplication.getInstance().getGlobalContainerStack() + machine_manager = CuraApplication.getInstance().getMachineManager() + if not global_stack: self.setResult(StartJobResult.Error) return # Don't slice if there is a setting with an error value. - if CuraApplication.getInstance().getMachineManager().stacksHaveErrors: + if machine_manager.stacksHaveErrors: self.setResult(StartJobResult.SettingError) return @@ -129,12 +130,12 @@ class StartSliceJob(Job): return # Don't slice if the buildplate or the nozzle type is incompatible with the materials - if not CuraApplication.getInstance().getMachineManager().variantBuildplateCompatible and \ - not CuraApplication.getInstance().getMachineManager().variantBuildplateUsable: + if not machine_manager.variantBuildplateCompatible and \ + not machine_manager.variantBuildplateUsable: self.setResult(StartJobResult.MaterialIncompatible) return - for position, extruder_stack in stack.extruders.items(): + for position, extruder_stack in global_stack.extruders.items(): material = extruder_stack.findContainer({"type": "material"}) if not extruder_stack.isEnabled: continue @@ -162,7 +163,7 @@ class StartSliceJob(Job): # Get the objects in their groups to print. object_groups = [] - if stack.getProperty("print_sequence", "value") == "one_at_a_time": + if global_stack.getProperty("print_sequence", "value") == "one_at_a_time": for node in OneAtATimeIterator(self._scene.getRoot()): #type: ignore #Ignore type error because iter() should get called automatically by Python syntax. temp_list = [] @@ -216,12 +217,11 @@ class StartSliceJob(Job): if temp_list: object_groups.append(temp_list) - extruders_enabled = {position: stack.isEnabled for position, stack in CuraApplication.getInstance().getGlobalContainerStack().extruders.items()} + extruders_enabled = {position: stack.isEnabled for position, stack in global_stack.extruders.items()} filtered_object_groups = [] has_model_with_disabled_extruders = False - associated_disabled_extruders = set() + associated_disabled_extruders = set() # type: Set[str] for group in object_groups: - stack = CuraApplication.getInstance().getGlobalContainerStack() skip_group = False for node in group: extruder_position = node.callDecoration("getActiveExtruderPosition") @@ -234,7 +234,7 @@ class StartSliceJob(Job): if has_model_with_disabled_extruders: self.setResult(StartJobResult.ObjectsWithDisabledExtruder) - associated_disabled_extruders = [str(c) for c in sorted([int(p) + 1 for p in associated_disabled_extruders])] + associated_disabled_extruders = set([str(c) for c in sorted([int(p) + 1 for p in associated_disabled_extruders])]) self.setMessage(", ".join(associated_disabled_extruders)) return @@ -245,11 +245,11 @@ class StartSliceJob(Job): self.setResult(StartJobResult.NothingToSlice) return - self._buildGlobalSettingsMessage(stack) - self._buildGlobalInheritsStackMessage(stack) + self._buildGlobalSettingsMessage(global_stack) + self._buildGlobalInheritsStackMessage(global_stack) # Build messages for extruder stacks - for extruder_stack in ExtruderManager.getInstance().getMachineExtruders(stack.getId()): + for extruder_stack in ExtruderManager.getInstance().getMachineExtruders(global_stack.getId()): self._buildExtruderMessage(extruder_stack) for group in filtered_object_groups: @@ -326,6 +326,8 @@ class StartSliceJob(Job): def _expandGcodeTokens(self, value: str, default_extruder_nr: int = -1) -> str: if not self._all_extruders_settings: global_stack = CuraApplication.getInstance().getGlobalContainerStack() + if not global_stack: + return str(value) # NB: keys must be strings for the string formatter self._all_extruders_settings = { From 4f1b2d51cca017ec5ea93d39a1f3db9e54625c36 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 5 Jul 2018 09:44:32 +0200 Subject: [PATCH 023/174] Remove old commented code This is not valid any more by a long shot. --- cura/CuraApplication.py | 37 ------------------------------------- 1 file changed, 37 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 845ed0325f..bf26e72685 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -407,43 +407,6 @@ class CuraApplication(QtApplication): } ) - """ - self._currently_loading_files = [] - self._non_sliceable_extensions = [] - - self._machine_action_manager = MachineActionManager.MachineActionManager() - self._machine_manager = None # This is initialized on demand. - self._extruder_manager = None - self._material_manager = None - self._quality_manager = None - self._object_manager = None - self._build_plate_model = None - self._multi_build_plate_model = None - self._setting_visibility_presets_model = None - self._setting_inheritance_manager = None - self._simple_mode_settings_manager = None - self._cura_scene_controller = None - self._machine_error_checker = None - self._auto_save = None - self._save_data_enabled = True - - self._additional_components = {} # Components to add to certain areas in the interface - - super().__init__(name = "cura", - version = CuraVersion, - buildtype = CuraBuildType, - is_debug_mode = CuraDebugMode, - tray_icon_name = "cura-icon-32.png", - **kwargs) - - # FOR TESTING ONLY - if kwargs["parsed_command_line"].get("trigger_early_crash", False): - assert not "This crash is triggered by the trigger_early_crash command line argument." - - self._variant_manager = None - - self.default_theme = "cura-light" - """ # Runs preparations that needs to be done before the starting process. def startSplashWindowPhase(self): super().startSplashWindowPhase() From 192a581d6db91b71dd61c0333e413c1069ad42b1 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 5 Jul 2018 09:50:05 +0200 Subject: [PATCH 024/174] Don't round the warning threshold The threshold is not visible. It's not necessary to round. Contributes to issue CURA-5457. --- resources/definitions/fdmprinter.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 8bd49daebe..8760d2e9d7 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -4995,7 +4995,7 @@ "default_value": 10, "value": "8.48 if prime_tower_circular else 10", "minimum_value": "0", - "maximum_value_warning": "round((resolveOrValue('prime_tower_size') * 0.5) ** 2 * 3.14159 * resolveOrValue('layer_height'), 2) if prime_tower_circular else resolveOrValue('prime_tower_size') ** 2 * resolveOrValue('layer_height')", + "maximum_value_warning": "(resolveOrValue('prime_tower_size') * 0.5) ** 2 * 3.14159 * resolveOrValue('layer_height') if prime_tower_circular else resolveOrValue('prime_tower_size') ** 2 * resolveOrValue('layer_height')", "enabled": "resolveOrValue('prime_tower_enable')", "settable_per_mesh": false, "settable_per_extruder": true From e87f3d7ca9cf135142bee488f188b9639c8b38fd Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Thu, 5 Jul 2018 10:23:18 +0200 Subject: [PATCH 025/174] Fix plugins import in CuraApplication CURA-5543 Only import types for type checking when TYPE_CHECKING is true. --- cura/CuraApplication.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index bf26e72685..e5c0c5688c 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -84,7 +84,6 @@ from cura.Settings.SettingInheritanceManager import SettingInheritanceManager from cura.Settings.SimpleModeSettingsManager import SimpleModeSettingsManager from cura.Machines.VariantManager import VariantManager -from plugins.SliceInfoPlugin.SliceInfo import SliceInfo from .SingleInstance import SingleInstance from .AutoSave import AutoSave @@ -110,6 +109,10 @@ from cura.ObjectsModel import ObjectsModel from UM.FlameProfiler import pyqtSlot +if TYPE_CHECKING: + from plugins.SliceInfoPlugin.SliceInfo import SliceInfo + + numpy.seterr(all = "ignore") try: From 807e8410c081d9091aea822cb0c9f7c764d907b9 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 5 Jul 2018 10:31:23 +0200 Subject: [PATCH 026/174] Give warning when sum of volumes exceeds volume of prime tower It could happen that the desired volume is not entirely reached in the inner shells because of rounding the volume up to the nearest perimeter on the outer shells. Contributes to issue CURA-5457. --- resources/definitions/fdmprinter.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 8760d2e9d7..0df057453f 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -4995,7 +4995,7 @@ "default_value": 10, "value": "8.48 if prime_tower_circular else 10", "minimum_value": "0", - "maximum_value_warning": "(resolveOrValue('prime_tower_size') * 0.5) ** 2 * 3.14159 * resolveOrValue('layer_height') if prime_tower_circular else resolveOrValue('prime_tower_size') ** 2 * resolveOrValue('layer_height')", + "maximum_value_warning": "((resolveOrValue('prime_tower_size') * 0.5) ** 2 * 3.14159 * resolveOrValue('layer_height') if prime_tower_circular else resolveOrValue('prime_tower_size') ** 2 * resolveOrValue('layer_height')) - sum(extruderValues('prime_tower_min_volume')) + prime_tower_min_volume", "enabled": "resolveOrValue('prime_tower_enable')", "settable_per_mesh": false, "settable_per_extruder": true From e1bc5d0f74ac31361ba07ea78cc351222177d363 Mon Sep 17 00:00:00 2001 From: Mark Date: Thu, 5 Jul 2018 11:25:22 +0200 Subject: [PATCH 027/174] fix typing --- plugins/CuraEngineBackend/StartSliceJob.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py index 78dd4eafd2..237c1f2dda 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.py @@ -234,8 +234,8 @@ class StartSliceJob(Job): if has_model_with_disabled_extruders: self.setResult(StartJobResult.ObjectsWithDisabledExtruder) - associated_disabled_extruders = [str(c) for c in sorted([int(p) + 1 for p in associated_disabled_extruders])] - self.setMessage(", ".join(associated_disabled_extruders)) + associated_disabled_extruders_message = [str(c) for c in sorted([int(p) + 1 for p in associated_disabled_extruders])] + self.setMessage(", ".join(associated_disabled_extruders_message)) return # There are cases when there is nothing to slice. This can happen due to one at a time slicing not being From 50da6d517634a875ec47d0162a15594e47342ffb Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Thu, 5 Jul 2018 11:36:36 +0200 Subject: [PATCH 028/174] Fix some code-style --- plugins/CuraEngineBackend/CuraEngineBackend.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index e7dca2ae3e..c6784d87bc 100755 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -69,8 +69,8 @@ class CuraEngineBackend(QObject, Backend): break self._application = CuraApplication.getInstance() #type: CuraApplication - self._multi_build_plate_model = None #type: MultiBuildPlateModel - self._machine_error_checker = None #type: MachineErrorChecker + self._multi_build_plate_model = None #type: Optional[MultiBuildPlateModel] + self._machine_error_checker = None #type: Optional[MachineErrorChecker] if not default_engine_location: raise EnvironmentError("Could not find CuraEngine") @@ -328,6 +328,9 @@ class CuraEngineBackend(QObject, Backend): if job.getResult() == StartJobResult.SettingError: if self._application.platformActivity: + if not self._global_container_stack: + Logger.log("w", "Global container stack not assigned to CuraEngineBackend!") + return extruders = list(ExtruderManager.getInstance().getMachineExtruders(self._global_container_stack.getId())) error_keys = [] #type: List[str] for extruder in extruders: From 1aac301f75ceb51bcb480d8721651a070eda11b9 Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Thu, 5 Jul 2018 11:46:21 +0200 Subject: [PATCH 029/174] additional code style fixes --- plugins/CuraEngineBackend/CuraEngineBackend.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index c6784d87bc..d3c9077d9b 100755 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -120,7 +120,7 @@ class CuraEngineBackend(QObject, Backend): self._engine_is_fresh = True #type: bool # Is the newly started engine used before or not? self._backend_log_max_lines = 20000 #type: int # Maximum number of lines to buffer - self._error_message = None #type: Message # Pop-up message that shows errors. + self._error_message = None #type: Optional[Message] # Pop-up message that shows errors. self._last_num_objects = defaultdict(int) #type: Dict[int, int] # Count number of objects to see if there is something changed self._postponed_scene_change_sources = [] #type: List[SceneNode] # scene change is postponed (by a tool) @@ -145,7 +145,9 @@ class CuraEngineBackend(QObject, Backend): self._multi_build_plate_model = self._application.getMultiBuildPlateModel() self._application.getController().activeViewChanged.connect(self._onActiveViewChanged) - self._multi_build_plate_model.activeBuildPlateChanged.connect(self._onActiveViewChanged) + + if self._multi_build_plate_model: + self._multi_build_plate_model.activeBuildPlateChanged.connect(self._onActiveViewChanged) self._application.globalContainerStackChanged.connect(self._onGlobalStackChanged) self._onGlobalStackChanged() @@ -412,7 +414,8 @@ class CuraEngineBackend(QObject, Backend): # Notify the user that it's now up to the backend to do it's job self.backendStateChange.emit(BackendState.Processing) - Logger.log("d", "Sending slice message took %s seconds", time() - self._slice_start_time ) + if self._slice_start_time: + Logger.log("d", "Sending slice message took %s seconds", time() - self._slice_start_time ) ## Determine enable or disable auto slicing. Return True for enable timer and False otherwise. # It disables when @@ -622,7 +625,8 @@ class CuraEngineBackend(QObject, Backend): gcode_list[index] = replaced self._slicing = False - Logger.log("d", "Slicing took %s seconds", time() - self._slice_start_time ) + if self._slice_start_time: + Logger.log("d", "Slicing took %s seconds", time() - self._slice_start_time ) Logger.log("d", "Number of models per buildplate: %s", dict(self._numObjectsPerBuildPlate())) # See if we need to process the sliced layers job. @@ -834,6 +838,9 @@ class CuraEngineBackend(QObject, Backend): self._change_timer.start() def _extruderChanged(self) -> None: + if not self._multi_build_plate_model: + Logger.log("w", "CuraEngineBackend does not have multi_build_plate_model assigned!") + return for build_plate_number in range(self._multi_build_plate_model.maxBuildPlate + 1): if build_plate_number not in self._build_plates_to_be_sliced: self._build_plates_to_be_sliced.append(build_plate_number) From 675c5064ed965f1f90d8b20f24737a1c186d3296 Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Thu, 5 Jul 2018 11:47:06 +0200 Subject: [PATCH 030/174] Added checkPackageUsageAndUninstall and the package usage check. No confirmation dialog yet --- cura/CuraPackageManager.py | 23 +++++++++++++++++++ cura/Machines/QualityManager.py | 7 ++++++ cura/Settings/MachineManager.py | 15 ++++++++++-- .../qml/ToolboxInstalledTileActions.qml | 2 +- plugins/Toolbox/src/Toolbox.py | 23 +++++++++++++++++++ 5 files changed, 67 insertions(+), 3 deletions(-) diff --git a/cura/CuraPackageManager.py b/cura/CuraPackageManager.py index f65633ed66..0dfac6b84f 100644 --- a/cura/CuraPackageManager.py +++ b/cura/CuraPackageManager.py @@ -2,8 +2,12 @@ # Cura is released under the terms of the LGPLv3 or higher. from cura.CuraApplication import CuraApplication #To find some resource types. +from cura.Settings.GlobalStack import GlobalStack + +from UM.Logger import Logger from UM.PackageManager import PackageManager #The class we're extending. from UM.Resources import Resources #To find storage paths for some resource types. +from UM.Settings.ContainerRegistry import ContainerRegistry class CuraPackageManager(PackageManager): @@ -15,3 +19,22 @@ class CuraPackageManager(PackageManager): self._installation_dirs_dict["qualities"] = Resources.getStoragePath(CuraApplication.ResourceTypes.QualityInstanceContainer) super().initialize() + + ## Returns a list of where the package is used + # empty if it is never used. + # It loops through all the package contents and see if some of the ids are used. + def packageUsed(self, package_id: str): + ids = self.packageContainerIds(package_id) + container_stacks = ContainerRegistry.getInstance().findContainerStacks() + global_stacks = [container_stack for container_stack in container_stacks if isinstance(container_stack, GlobalStack)] + machine_with_materials = [] + machine_with_qualities = [] + for container_id in ids: + for global_stack in global_stacks: + for extruder_nr, extruder_stack in global_stack.extruders.items(): + if container_id == extruder_stack.material.getId() or container_id == extruder_stack.material.getMetaData().get("base_file"): + machine_with_materials.append((global_stack, extruder_nr)) + if container_id == extruder_stack.quality.getId(): + machine_with_qualities.append((global_stack, extruder_nr)) + + return machine_with_materials, machine_with_qualities diff --git a/cura/Machines/QualityManager.py b/cura/Machines/QualityManager.py index 8033057f77..d5d9c0e727 100644 --- a/cura/Machines/QualityManager.py +++ b/cura/Machines/QualityManager.py @@ -340,6 +340,13 @@ class QualityManager(QObject): return quality_group_dict + def getDefaultQualityType(self, machine: "GlobalStack") -> QualityGroup: + preferred_quality_type = machine.definition.getMetaDataEntry("preferred_quality_type") + quality_group_dict = self.getQualityGroups(machine) + quality_group = quality_group_dict.get(preferred_quality_type) + return quality_group + + # # Methods for GUI # diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index 065dc84df1..10d32b0a70 100755 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -1392,8 +1392,13 @@ class MachineManager(QObject): material_node = self._material_manager.getMaterialNode(machine_definition_id, variant_name, material_diameter, root_material_id) self.setMaterial(position, material_node) + ## global_stack: if you want to provide your own global_stack instead of the current active one + # if you update an active machine, special measures have to be taken. @pyqtSlot(str, "QVariant") - def setMaterial(self, position: str, container_node) -> None: + def setMaterial(self, position: str, container_node, global_stack: Optional["GlobalStack"] = None) -> None: + if global_stack is not None and global_stack != self._global_container_stack: + global_stack.extruders[position].material = container_node.getContainer() + return position = str(position) self.blurSettings.emit() with postponeSignals(*self._getContainerChangedSignals(), compress = CompressTechnique.CompressPerParameterValue): @@ -1434,8 +1439,14 @@ class MachineManager(QObject): quality_group = quality_group_dict[quality_type] self.setQualityGroup(quality_group) + ## Optionally provide global_stack if you want to use your own + # The active global_stack is treated differently. @pyqtSlot(QObject) - def setQualityGroup(self, quality_group: QualityGroup, no_dialog: bool = False) -> None: + def setQualityGroup(self, quality_group: QualityGroup, no_dialog: bool = False, global_stack: Optional["GlobalStack"] = None) -> None: + if global_stack is not None and global_stack != self._global_container_stack: + global_stack.quality = quality_group.node_for_global.getContainer() + return + self.blurSettings.emit() with postponeSignals(*self._getContainerChangedSignals(), compress = CompressTechnique.CompressPerParameterValue): self._setQualityGroup(quality_group) diff --git a/plugins/Toolbox/resources/qml/ToolboxInstalledTileActions.qml b/plugins/Toolbox/resources/qml/ToolboxInstalledTileActions.qml index b0aecfc9a2..8fd88b1cfd 100644 --- a/plugins/Toolbox/resources/qml/ToolboxInstalledTileActions.qml +++ b/plugins/Toolbox/resources/qml/ToolboxInstalledTileActions.qml @@ -83,7 +83,7 @@ Column font: UM.Theme.getFont("default") } } - onClicked: toolbox.uninstall(model.id) + onClicked: toolbox.checkPackageUsageAndUninstall(model.id) Connections { target: toolbox diff --git a/plugins/Toolbox/src/Toolbox.py b/plugins/Toolbox/src/Toolbox.py index 0d0060e48c..3e0749d612 100644 --- a/plugins/Toolbox/src/Toolbox.py +++ b/plugins/Toolbox/src/Toolbox.py @@ -294,6 +294,29 @@ class Toolbox(QObject, Extension): self._restart_required = True self.restartRequiredChanged.emit() + ## Check package usage and uninstall + # If the package is in use, you'll get a confirmation dialog to set everything to default + @pyqtSlot(str) + def checkPackageUsageAndUninstall(self, plugin_id: str) -> None: + print("checkPackageUsageAndUninstall...") + package_used_materials, package_used_qualities = self._package_manager.packageUsed(plugin_id) + if package_used_materials or package_used_qualities: + # Ask change to default material / profile + # Cancel: just return + # Confirm: change to default material / profile + material_manager = CuraApplication.getInstance().getMaterialManager() + quality_manager = CuraApplication.getInstance().getQualityManager() + machine_manager = CuraApplication.getInstance().getMachineManager() + for global_stack, extruder_nr in package_used_materials: + default_material_node = material_manager.getDefaultMaterial(global_stack, extruder_nr, global_stack.extruders[extruder_nr].variant.getName()) + machine_manager.setMaterial(extruder_nr, default_material_node, global_stack = global_stack) + for global_stack, extruder_nr in package_used_qualities: + default_quality_group = quality_manager.getDefaultQualityType(global_stack) + machine_manager.setQualityGroup(default_quality_group, global_stack = global_stack) + # Change to default material / profile + self.uninstall(plugin_id) + return + @pyqtSlot(str) def uninstall(self, plugin_id: str) -> None: self._package_manager.removePackage(plugin_id, force_add = True) From 6f20b9219d76648903aa8028c4e2ae85d346ebfb Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Thu, 5 Jul 2018 11:57:13 +0200 Subject: [PATCH 031/174] code style fixes --- plugins/CuraEngineBackend/CuraEngineBackend.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index d3c9077d9b..4fc1381d2a 100755 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -366,6 +366,9 @@ class CuraEngineBackend(QObject, Backend): if not stack: continue for key in stack.getErrorKeys(): + if not self._global_container_stack: + Logger.log("e", "CuraEngineBackend does not have global_container_stack assigned.") + continue definition = cast(DefinitionContainerInterface, self._global_container_stack.getBottom()).findDefinitions(key = key) if not definition: Logger.log("e", "When checking settings for errors, unable to find definition for key {key} in per-object stack.".format(key = key)) @@ -489,7 +492,8 @@ class CuraEngineBackend(QObject, Backend): build_plate_changed.add(source_build_plate_number) - build_plate_changed.discard(None) + # TODO: Commented out for code tests, discard() only takes 'int', and no explanation exists for this line + # build_plate_changed.discard(None) build_plate_changed.discard(-1) # object not on build plate if not build_plate_changed: return @@ -583,9 +587,10 @@ class CuraEngineBackend(QObject, Backend): # # \param message The protobuf message containing sliced layer data. def _onOptimizedLayerMessage(self, message: Arcus.PythonMessage) -> None: - if self._start_slice_job_build_plate not in self._stored_optimized_layer_data: - self._stored_optimized_layer_data[self._start_slice_job_build_plate] = [] - self._stored_optimized_layer_data[self._start_slice_job_build_plate].append(message) + if self._start_slice_job_build_plate: + if self._start_slice_job_build_plate not in self._stored_optimized_layer_data: + self._stored_optimized_layer_data[self._start_slice_job_build_plate] = [] + self._stored_optimized_layer_data[self._start_slice_job_build_plate].append(message) ## Called when a progress message is received from the engine. # From ef2250b88934fde2f9450ed0c984e23cc131b229 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 5 Jul 2018 12:31:42 +0200 Subject: [PATCH 032/174] Don't check if keys are str Our type checking should take care of that. --- plugins/CuraEngineBackend/StartSliceJob.py | 46 ++++++++++------------ 1 file changed, 21 insertions(+), 25 deletions(-) diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py index 78dd4eafd2..12d95b94bc 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.py @@ -45,35 +45,31 @@ class GcodeStartEndFormatter(Formatter): # The kwargs dictionary contains a dictionary for each stack (with a string of the extruder_nr as their key), # and a default_extruder_nr to use when no extruder_nr is specified - if isinstance(key, str): + try: + extruder_nr = int(kwargs["default_extruder_nr"]) + except ValueError: + extruder_nr = -1 + + key_fragments = [fragment.strip() for fragment in key.split(",")] + if len(key_fragments) == 2: try: - extruder_nr = int(kwargs["default_extruder_nr"]) + extruder_nr = int(key_fragments[1]) except ValueError: - extruder_nr = -1 - - key_fragments = [fragment.strip() for fragment in key.split(",")] - if len(key_fragments) == 2: try: - extruder_nr = int(key_fragments[1]) - except ValueError: - try: - extruder_nr = int(kwargs["-1"][key_fragments[1]]) # get extruder_nr values from the global stack - except (KeyError, ValueError): - # either the key does not exist, or the value is not an int - Logger.log("w", "Unable to determine stack nr '%s' for key '%s' in start/end g-code, using global stack", key_fragments[1], key_fragments[0]) - elif len(key_fragments) != 1: - Logger.log("w", "Incorrectly formatted placeholder '%s' in start/end g-code", key) - return "{" + str(key) + "}" - - key = key_fragments[0] - try: - return kwargs[str(extruder_nr)][key] - except KeyError: - Logger.log("w", "Unable to replace '%s' placeholder in start/end g-code", key) - return "{" + key + "}" - else: + extruder_nr = int(kwargs["-1"][key_fragments[1]]) # get extruder_nr values from the global stack + except (KeyError, ValueError): + # either the key does not exist, or the value is not an int + Logger.log("w", "Unable to determine stack nr '%s' for key '%s' in start/end g-code, using global stack", key_fragments[1], key_fragments[0]) + elif len(key_fragments) != 1: Logger.log("w", "Incorrectly formatted placeholder '%s' in start/end g-code", key) - return "{" + str(key) + "}" + return "{" + key + "}" + + key = key_fragments[0] + try: + return kwargs[str(extruder_nr)][key] + except KeyError: + Logger.log("w", "Unable to replace '%s' placeholder in start/end g-code", key) + return "{" + key + "}" ## Job class that builds up the message of scene data to send to CuraEngine. From 87fd4c9e70d4695de04c9076833afc3212c8cbda Mon Sep 17 00:00:00 2001 From: Andreea Scorojitu Date: Thu, 5 Jul 2018 12:44:11 +0200 Subject: [PATCH 033/174] Add color to text in toolboxFooter, CURA-5544 "You will need to restart Cura before changes in packages have effect." wasn't visible in Ultimaker darktheme, color has been added to the label, CURA-5544. --- plugins/Toolbox/resources/qml/ToolboxFooter.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/Toolbox/resources/qml/ToolboxFooter.qml b/plugins/Toolbox/resources/qml/ToolboxFooter.qml index 976ff46da6..5c2a6577ad 100644 --- a/plugins/Toolbox/resources/qml/ToolboxFooter.qml +++ b/plugins/Toolbox/resources/qml/ToolboxFooter.qml @@ -15,6 +15,7 @@ Item Label { text: catalog.i18nc("@info", "You will need to restart Cura before changes in packages have effect.") + color: UM.Theme.getColor("text") height: Math.floor(UM.Theme.getSize("toolbox_footer_button").height) verticalAlignment: Text.AlignVCenter anchors @@ -25,7 +26,7 @@ Item right: restartButton.right rightMargin: UM.Theme.getSize("default_margin").width } - color: UM.Theme.getColor("text") + } Button { From 8f8c5154388bb249f1651df800bc1a3520f14cfa Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 5 Jul 2018 12:51:27 +0200 Subject: [PATCH 034/174] Fix bug when default_extruder_nr is not provided Then this would not slice because of a KeyError that is not caught. Contributes to issue CURA-5457. --- plugins/CuraEngineBackend/StartSliceJob.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py index 12d95b94bc..20c426209f 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.py @@ -41,14 +41,11 @@ class StartJobResult(IntEnum): ## Formatter class that handles token expansion in start/end gcode class GcodeStartEndFormatter(Formatter): - def get_value(self, key: str, *args: str, **kwargs) -> str: #type: ignore # [CodeStyle: get_value is an overridden function from the Formatter class] + def get_value(self, key: str, *args: str, default_extruder_nr: str = "-1", **kwargs) -> str: #type: ignore # [CodeStyle: get_value is an overridden function from the Formatter class] # The kwargs dictionary contains a dictionary for each stack (with a string of the extruder_nr as their key), # and a default_extruder_nr to use when no extruder_nr is specified - try: - extruder_nr = int(kwargs["default_extruder_nr"]) - except ValueError: - extruder_nr = -1 + extruder_nr = int(default_extruder_nr) key_fragments = [fragment.strip() for fragment in key.split(",")] if len(key_fragments) == 2: @@ -56,7 +53,7 @@ class GcodeStartEndFormatter(Formatter): extruder_nr = int(key_fragments[1]) except ValueError: try: - extruder_nr = int(kwargs["-1"][key_fragments[1]]) # get extruder_nr values from the global stack + extruder_nr = int(kwargs["-1"][key_fragments[1]]) # get extruder_nr values from the global stack #TODO: How can you ever provide the '-1' kwarg? except (KeyError, ValueError): # either the key does not exist, or the value is not an int Logger.log("w", "Unable to determine stack nr '%s' for key '%s' in start/end g-code, using global stack", key_fragments[1], key_fragments[0]) From ec00e5b721d45be891e89afe2e603d0b4653c85d Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 5 Jul 2018 13:22:17 +0200 Subject: [PATCH 035/174] Remove references to deleted settings Also convert the values for prime_tower_min_volume to make it behave similar to what the minimum volume used to be. This feature fixed a bug with the computation from volume to thickness. Now it's correct but we have to correct the old values to be still the same (approximately) as what used to be the end result. Contributes to issue CURA-5457. --- resources/definitions/builder_premium_large.def.json | 1 - resources/definitions/builder_premium_medium.def.json | 1 - resources/definitions/builder_premium_small.def.json | 1 - resources/definitions/cartesio.def.json | 2 +- resources/definitions/fdmprinter.def.json | 3 +-- .../quality/gmax15plus/gmax15plus_pla_dual_normal.inst.cfg | 2 +- .../quality/gmax15plus/gmax15plus_pla_dual_thick.inst.cfg | 2 +- .../quality/gmax15plus/gmax15plus_pla_dual_thin.inst.cfg | 2 +- .../gmax15plus/gmax15plus_pla_dual_very_thick.inst.cfg | 2 +- .../ultimaker3/um3_aa0.25_ABS_Normal_Quality.inst.cfg | 3 +-- .../ultimaker3/um3_aa0.25_CPE_Normal_Quality.inst.cfg | 3 +-- .../quality/ultimaker3/um3_aa0.4_CPE_Draft_Print.inst.cfg | 1 - .../quality/ultimaker3/um3_aa0.4_CPE_Fast_Print.inst.cfg | 1 - .../quality/ultimaker3/um3_aa0.4_CPE_High_Quality.inst.cfg | 1 - .../quality/ultimaker3/um3_aa0.4_CPE_Normal_Quality.inst.cfg | 1 - .../quality/ultimaker3/um3_aa0.8_CPE_Draft_Print.inst.cfg | 1 - .../ultimaker3/um3_aa0.8_CPE_Superdraft_Print.inst.cfg | 1 - .../ultimaker3/um3_aa0.8_CPE_Verydraft_Print.inst.cfg | 1 - .../quality/ultimaker3/um3_aa0.8_PP_Draft_Print.inst.cfg | 2 +- .../ultimaker3/um3_aa0.8_PP_Superdraft_Print.inst.cfg | 2 +- .../quality/ultimaker3/um3_aa0.8_PP_Verydraft_Print.inst.cfg | 2 +- .../quality/ultimaker3/um3_aa0.8_TPU_Draft_Print.inst.cfg | 2 +- .../ultimaker3/um3_aa0.8_TPU_Superdraft_Print.inst.cfg | 2 +- .../ultimaker3/um3_aa0.8_TPU_Verydraft_Print.inst.cfg | 2 +- .../ultimaker_s5/um_s5_aa0.25_ABS_Normal_Quality.inst.cfg | 3 +-- .../ultimaker_s5/um_s5_aa0.25_CPE_Normal_Quality.inst.cfg | 5 ++--- .../ultimaker_s5/um_s5_aa0.4_CPE_Draft_Print.inst.cfg | 1 - .../quality/ultimaker_s5/um_s5_aa0.4_CPE_Fast_Print.inst.cfg | 3 +-- .../ultimaker_s5/um_s5_aa0.4_CPE_High_Quality.inst.cfg | 3 +-- .../ultimaker_s5/um_s5_aa0.4_CPE_Normal_Quality.inst.cfg | 3 +-- .../ultimaker_s5/um_s5_aa0.8_CPE_Draft_Print.inst.cfg | 3 +-- .../ultimaker_s5/um_s5_aa0.8_CPE_Superdraft_Print.inst.cfg | 3 +-- .../ultimaker_s5/um_s5_aa0.8_CPE_Verydraft_Print.inst.cfg | 1 - .../quality/ultimaker_s5/um_s5_aa0.8_PP_Draft_Print.inst.cfg | 2 +- .../ultimaker_s5/um_s5_aa0.8_PP_Superdraft_Print.inst.cfg | 2 +- .../ultimaker_s5/um_s5_aa0.8_PP_Verydraft_Print.inst.cfg | 2 +- .../ultimaker_s5/um_s5_aa0.8_TPU_Draft_Print.inst.cfg | 2 +- .../ultimaker_s5/um_s5_aa0.8_TPU_Superdraft_Print.inst.cfg | 2 +- .../ultimaker_s5/um_s5_aa0.8_TPU_Verydraft_Print.inst.cfg | 2 +- resources/setting_visibility/advanced.cfg | 1 - resources/setting_visibility/expert.cfg | 3 --- resources/variants/ultimaker3_bb0.8.inst.cfg | 3 +-- resources/variants/ultimaker3_bb04.inst.cfg | 3 +-- resources/variants/ultimaker3_extended_bb0.8.inst.cfg | 3 +-- resources/variants/ultimaker3_extended_bb04.inst.cfg | 3 +-- resources/variants/ultimaker_s5_bb0.8.inst.cfg | 3 +-- resources/variants/ultimaker_s5_bb04.inst.cfg | 3 +-- 47 files changed, 34 insertions(+), 66 deletions(-) diff --git a/resources/definitions/builder_premium_large.def.json b/resources/definitions/builder_premium_large.def.json index 155ce8e962..2e0cd4f839 100644 --- a/resources/definitions/builder_premium_large.def.json +++ b/resources/definitions/builder_premium_large.def.json @@ -54,7 +54,6 @@ "prime_tower_position_y": { "default_value": 178 }, "prime_tower_wipe_enabled": { "default_value": false }, "prime_tower_min_volume": { "default_value": 50 }, - "dual_pre_wipe": { "default_value": false }, "prime_blob_enable": { "enabled": true }, diff --git a/resources/definitions/builder_premium_medium.def.json b/resources/definitions/builder_premium_medium.def.json index c390c3719b..58e7c18ed8 100644 --- a/resources/definitions/builder_premium_medium.def.json +++ b/resources/definitions/builder_premium_medium.def.json @@ -54,7 +54,6 @@ "prime_tower_position_y": { "default_value": 178 }, "prime_tower_wipe_enabled": { "default_value": false }, "prime_tower_min_volume": { "default_value": 50 }, - "dual_pre_wipe": { "default_value": false }, "prime_blob_enable": { "enabled": true }, diff --git a/resources/definitions/builder_premium_small.def.json b/resources/definitions/builder_premium_small.def.json index ec7bf0a345..89e172592c 100644 --- a/resources/definitions/builder_premium_small.def.json +++ b/resources/definitions/builder_premium_small.def.json @@ -53,7 +53,6 @@ "prime_tower_position_y": { "default_value": 178 }, "prime_tower_wipe_enabled": { "default_value": false }, "prime_tower_min_volume": { "default_value": 50 }, - "dual_pre_wipe": { "default_value": false }, "prime_blob_enable": { "enabled": true }, diff --git a/resources/definitions/cartesio.def.json b/resources/definitions/cartesio.def.json index d2b7242d8c..04279ce392 100644 --- a/resources/definitions/cartesio.def.json +++ b/resources/definitions/cartesio.def.json @@ -44,7 +44,7 @@ "material_print_temp_wait": { "default_value": false }, "material_bed_temp_wait": { "default_value": false }, "prime_tower_enable": { "default_value": false }, - "prime_tower_wall_thickness": { "resolve": 0.7 }, + "prime_tower_min_volume": { "value": "0.7" }, "prime_tower_size": { "value": 24.0 }, "prime_tower_position_x": { "value": 125 }, "prime_tower_position_y": { "value": 70 }, diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 0df057453f..d96aeaa52a 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -4992,8 +4992,7 @@ "description": "The minimum volume for each layer of the prime tower in order to purge enough material.", "unit": "mm³", "type": "float", - "default_value": 10, - "value": "8.48 if prime_tower_circular else 10", + "default_value": 5, "minimum_value": "0", "maximum_value_warning": "((resolveOrValue('prime_tower_size') * 0.5) ** 2 * 3.14159 * resolveOrValue('layer_height') if prime_tower_circular else resolveOrValue('prime_tower_size') ** 2 * resolveOrValue('layer_height')) - sum(extruderValues('prime_tower_min_volume')) + prime_tower_min_volume", "enabled": "resolveOrValue('prime_tower_enable')", diff --git a/resources/quality/gmax15plus/gmax15plus_pla_dual_normal.inst.cfg b/resources/quality/gmax15plus/gmax15plus_pla_dual_normal.inst.cfg index 90a17d5efd..7fd2ab2296 100644 --- a/resources/quality/gmax15plus/gmax15plus_pla_dual_normal.inst.cfg +++ b/resources/quality/gmax15plus/gmax15plus_pla_dual_normal.inst.cfg @@ -64,7 +64,7 @@ ooze_shield_enabled = True prime_tower_enable = False prime_tower_position_x = 350 prime_tower_position_y = 350 -prime_tower_wall_thickness = 2 +prime_tower_min_volume = 18 switch_extruder_retraction_amount = 6 switch_extruder_retraction_speeds = 60 diff --git a/resources/quality/gmax15plus/gmax15plus_pla_dual_thick.inst.cfg b/resources/quality/gmax15plus/gmax15plus_pla_dual_thick.inst.cfg index a4860def71..30a99ef243 100644 --- a/resources/quality/gmax15plus/gmax15plus_pla_dual_thick.inst.cfg +++ b/resources/quality/gmax15plus/gmax15plus_pla_dual_thick.inst.cfg @@ -64,7 +64,7 @@ ooze_shield_enabled = True prime_tower_enable = False prime_tower_position_x = 350 prime_tower_position_y = 350 -prime_tower_wall_thickness = 2 +prime_tower_min_volume = 18 switch_extruder_retraction_amount = 6 switch_extruder_retraction_speeds = 60 diff --git a/resources/quality/gmax15plus/gmax15plus_pla_dual_thin.inst.cfg b/resources/quality/gmax15plus/gmax15plus_pla_dual_thin.inst.cfg index 8fe0b07c76..decafac241 100644 --- a/resources/quality/gmax15plus/gmax15plus_pla_dual_thin.inst.cfg +++ b/resources/quality/gmax15plus/gmax15plus_pla_dual_thin.inst.cfg @@ -64,7 +64,7 @@ ooze_shield_enabled = True prime_tower_enable = False prime_tower_position_x = 350 prime_tower_position_y = 350 -prime_tower_wall_thickness = 2 +prime_tower_min_volume = 18 switch_extruder_retraction_amount = 6 switch_extruder_retraction_speeds = 60 diff --git a/resources/quality/gmax15plus/gmax15plus_pla_dual_very_thick.inst.cfg b/resources/quality/gmax15plus/gmax15plus_pla_dual_very_thick.inst.cfg index bfa45804d0..a74bdfdd78 100644 --- a/resources/quality/gmax15plus/gmax15plus_pla_dual_very_thick.inst.cfg +++ b/resources/quality/gmax15plus/gmax15plus_pla_dual_very_thick.inst.cfg @@ -63,7 +63,7 @@ ooze_shield_enabled = True prime_tower_enable = False prime_tower_position_x = 350 prime_tower_position_y = 350 -prime_tower_wall_thickness = 2 +prime_tower_min_volume = 18 switch_extruder_retraction_amount = 6 switch_extruder_retraction_speeds = 60 diff --git a/resources/quality/ultimaker3/um3_aa0.25_ABS_Normal_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.25_ABS_Normal_Quality.inst.cfg index be67da4c12..428f5c1101 100644 --- a/resources/quality/ultimaker3/um3_aa0.25_ABS_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.25_ABS_Normal_Quality.inst.cfg @@ -15,9 +15,8 @@ variant = AA 0.25 cool_fan_speed = 40 infill_overlap = 15 material_final_print_temperature = =material_print_temperature - 5 -prime_tower_purge_volume = 0.6 prime_tower_size = 12 -prime_tower_wall_thickness = 0.9 +prime_tower_min_volume = 2 retraction_prime_speed = 25 speed_topbottom = =math.ceil(speed_print * 30 / 55) wall_thickness = 0.92 diff --git a/resources/quality/ultimaker3/um3_aa0.25_CPE_Normal_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.25_CPE_Normal_Quality.inst.cfg index 6ca8bff496..127032e118 100644 --- a/resources/quality/ultimaker3/um3_aa0.25_CPE_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.25_CPE_Normal_Quality.inst.cfg @@ -12,9 +12,8 @@ material = generic_cpe variant = AA 0.25 [values] -prime_tower_purge_volume = 1 prime_tower_size = 12 -prime_tower_wall_thickness = 0.9 +prime_tower_min_volume = 2 retraction_extrusion_window = 0.5 speed_infill = =math.ceil(speed_print * 40 / 55) speed_topbottom = =math.ceil(speed_print * 30 / 55) diff --git a/resources/quality/ultimaker3/um3_aa0.4_CPE_Draft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_CPE_Draft_Print.inst.cfg index ed8055bd18..1891a274c8 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_CPE_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_CPE_Draft_Print.inst.cfg @@ -16,7 +16,6 @@ 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 -prime_tower_purge_volume = 1 skin_overlap = 20 speed_print = 60 speed_layer_0 = =math.ceil(speed_print * 20 / 60) diff --git a/resources/quality/ultimaker3/um3_aa0.4_CPE_Fast_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_CPE_Fast_Print.inst.cfg index 70b679888f..e4cfdb67fc 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_CPE_Fast_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_CPE_Fast_Print.inst.cfg @@ -17,7 +17,6 @@ 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 -prime_tower_purge_volume = 1 speed_print = 60 speed_layer_0 = =math.ceil(speed_print * 20 / 60) speed_topbottom = =math.ceil(speed_print * 30 / 60) diff --git a/resources/quality/ultimaker3/um3_aa0.4_CPE_High_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_CPE_High_Quality.inst.cfg index 2555193a9e..cec4b950cf 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_CPE_High_Quality.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_CPE_High_Quality.inst.cfg @@ -19,7 +19,6 @@ 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 -prime_tower_purge_volume = 1 speed_print = 50 speed_layer_0 = =math.ceil(speed_print * 20 / 50) speed_topbottom = =math.ceil(speed_print * 30 / 50) diff --git a/resources/quality/ultimaker3/um3_aa0.4_CPE_Normal_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_CPE_Normal_Quality.inst.cfg index 775cac95cf..892083b264 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_CPE_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_CPE_Normal_Quality.inst.cfg @@ -17,7 +17,6 @@ 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 -prime_tower_purge_volume = 1 speed_print = 55 speed_layer_0 = =math.ceil(speed_print * 20 / 55) speed_topbottom = =math.ceil(speed_print * 30 / 55) diff --git a/resources/quality/ultimaker3/um3_aa0.8_CPE_Draft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.8_CPE_Draft_Print.inst.cfg index 25e74e0687..170643275c 100644 --- a/resources/quality/ultimaker3/um3_aa0.8_CPE_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.8_CPE_Draft_Print.inst.cfg @@ -17,7 +17,6 @@ line_width = =machine_nozzle_size * 0.875 material_print_temperature = =default_material_print_temperature + 15 material_standby_temperature = 100 prime_tower_enable = True -prime_tower_purge_volume = 1 speed_print = 40 speed_topbottom = =math.ceil(speed_print * 25 / 40) speed_wall = =math.ceil(speed_print * 30 / 40) diff --git a/resources/quality/ultimaker3/um3_aa0.8_CPE_Superdraft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.8_CPE_Superdraft_Print.inst.cfg index 5d08b6f430..5b3cb52f18 100644 --- a/resources/quality/ultimaker3/um3_aa0.8_CPE_Superdraft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.8_CPE_Superdraft_Print.inst.cfg @@ -18,7 +18,6 @@ line_width = =machine_nozzle_size * 0.875 material_print_temperature = =default_material_print_temperature + 20 material_standby_temperature = 100 prime_tower_enable = True -prime_tower_purge_volume = 1 speed_print = 45 speed_topbottom = =math.ceil(speed_print * 30 / 45) speed_wall = =math.ceil(speed_print * 40 / 45) diff --git a/resources/quality/ultimaker3/um3_aa0.8_CPE_Verydraft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.8_CPE_Verydraft_Print.inst.cfg index 3dafde24c1..fff96ba9fc 100644 --- a/resources/quality/ultimaker3/um3_aa0.8_CPE_Verydraft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.8_CPE_Verydraft_Print.inst.cfg @@ -18,7 +18,6 @@ line_width = =machine_nozzle_size * 0.875 material_print_temperature = =default_material_print_temperature + 17 material_standby_temperature = 100 prime_tower_enable = True -prime_tower_purge_volume = 1 speed_print = 40 speed_topbottom = =math.ceil(speed_print * 25 / 40) speed_wall = =math.ceil(speed_print * 30 / 40) diff --git a/resources/quality/ultimaker3/um3_aa0.8_PP_Draft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.8_PP_Draft_Print.inst.cfg index c2bfc84ea8..19496565bc 100644 --- a/resources/quality/ultimaker3/um3_aa0.8_PP_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.8_PP_Draft_Print.inst.cfg @@ -29,7 +29,7 @@ material_standby_temperature = 100 multiple_mesh_overlap = 0.2 prime_tower_enable = True prime_tower_flow = 100 -prime_tower_wall_thickness = =prime_tower_line_width * 2 +prime_tower_min_volume = 10 retract_at_layer_change = False retraction_count_max = 12 retraction_extra_prime_amount = 0.5 diff --git a/resources/quality/ultimaker3/um3_aa0.8_PP_Superdraft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.8_PP_Superdraft_Print.inst.cfg index 7ff5ab264e..aeee3b4e09 100644 --- a/resources/quality/ultimaker3/um3_aa0.8_PP_Superdraft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.8_PP_Superdraft_Print.inst.cfg @@ -29,7 +29,7 @@ material_standby_temperature = 100 multiple_mesh_overlap = 0.2 prime_tower_enable = True prime_tower_flow = 100 -prime_tower_wall_thickness = =prime_tower_line_width * 2 +prime_tower_min_volume = 20 retract_at_layer_change = False retraction_count_max = 12 retraction_extra_prime_amount = 0.5 diff --git a/resources/quality/ultimaker3/um3_aa0.8_PP_Verydraft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.8_PP_Verydraft_Print.inst.cfg index c38980a198..fcd4fcd999 100644 --- a/resources/quality/ultimaker3/um3_aa0.8_PP_Verydraft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.8_PP_Verydraft_Print.inst.cfg @@ -29,7 +29,7 @@ material_standby_temperature = 100 multiple_mesh_overlap = 0.2 prime_tower_enable = True prime_tower_flow = 100 -prime_tower_wall_thickness = =prime_tower_line_width * 2 +prime_tower_min_volume = 15 retract_at_layer_change = False retraction_count_max = 12 retraction_extra_prime_amount = 0.5 diff --git a/resources/quality/ultimaker3/um3_aa0.8_TPU_Draft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.8_TPU_Draft_Print.inst.cfg index 79d388d4c3..52fe1cb01d 100644 --- a/resources/quality/ultimaker3/um3_aa0.8_TPU_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.8_TPU_Draft_Print.inst.cfg @@ -35,7 +35,7 @@ material_standby_temperature = 100 multiple_mesh_overlap = 0.2 prime_tower_enable = True prime_tower_flow = 100 -prime_tower_wall_thickness = =prime_tower_line_width * 2 +prime_tower_min_volume = 10 retract_at_layer_change = False retraction_count_max = 12 retraction_extra_prime_amount = 0.5 diff --git a/resources/quality/ultimaker3/um3_aa0.8_TPU_Superdraft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.8_TPU_Superdraft_Print.inst.cfg index a19bc9be91..857ea39491 100644 --- a/resources/quality/ultimaker3/um3_aa0.8_TPU_Superdraft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.8_TPU_Superdraft_Print.inst.cfg @@ -36,7 +36,7 @@ material_standby_temperature = 100 multiple_mesh_overlap = 0.2 prime_tower_enable = True prime_tower_flow = 100 -prime_tower_wall_thickness = =prime_tower_line_width * 2 +prime_tower_min_volume = 15 retract_at_layer_change = False retraction_count_max = 12 retraction_extra_prime_amount = 0.5 diff --git a/resources/quality/ultimaker3/um3_aa0.8_TPU_Verydraft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.8_TPU_Verydraft_Print.inst.cfg index dd28610db5..10673c133a 100644 --- a/resources/quality/ultimaker3/um3_aa0.8_TPU_Verydraft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.8_TPU_Verydraft_Print.inst.cfg @@ -35,7 +35,7 @@ material_standby_temperature = 100 multiple_mesh_overlap = 0.2 prime_tower_enable = True prime_tower_flow = 100 -prime_tower_wall_thickness = =prime_tower_line_width * 2 +prime_tower_min_volume = 20 retract_at_layer_change = False retraction_count_max = 12 retraction_extra_prime_amount = 0.5 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.25_ABS_Normal_Quality.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.25_ABS_Normal_Quality.inst.cfg index 8a2b6e75a5..e58a1bd87d 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.25_ABS_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.25_ABS_Normal_Quality.inst.cfg @@ -15,9 +15,8 @@ variant = AA 0.25 cool_fan_speed = 40 infill_overlap = 15 material_final_print_temperature = =material_print_temperature - 5 -prime_tower_purge_volume = 0.6 prime_tower_size = 12 -prime_tower_wall_thickness = 0.9 +prime_tower_min_volume = 2 retraction_prime_speed = 25 speed_topbottom = =math.ceil(speed_print * 30 / 55) wall_thickness = 0.92 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.25_CPE_Normal_Quality.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.25_CPE_Normal_Quality.inst.cfg index 91258147fd..1c1833a385 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.25_CPE_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.25_CPE_Normal_Quality.inst.cfg @@ -13,10 +13,9 @@ variant = AA 0.25 [values] prime_tower_size = 12 -prime_tower_wall_thickness = 0.9 +prime_tower_min_volume = 2 retraction_extrusion_window = 0.5 speed_infill = =math.ceil(speed_print * 40 / 55) speed_topbottom = =math.ceil(speed_print * 30 / 55) top_bottom_thickness = 0.8 -wall_thickness = 0.92 -prime_tower_purge_volume = 1 +wall_thickness = 0.92 \ No newline at end of file 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 2bd217676b..c51e5652e1 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 @@ -26,4 +26,3 @@ wall_thickness = 1 infill_pattern = zigzag 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 53f7a4b9f4..b80d3ccf22 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 @@ -23,5 +23,4 @@ speed_wall = =math.ceil(speed_print * 40 / 60) speed_wall_0 = =math.ceil(speed_wall * 30 / 40) infill_pattern = zigzag -speed_infill = =math.ceil(speed_print * 50 / 60) -prime_tower_purge_volume = 1 +speed_infill = =math.ceil(speed_print * 50 / 60) \ No newline at end of file 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 807718c7e8..c90eedaec3 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,5 +24,4 @@ speed_topbottom = =math.ceil(speed_print * 30 / 50) speed_wall = =math.ceil(speed_print * 30 / 50) infill_pattern = zigzag -speed_infill = =math.ceil(speed_print * 40 / 50) -prime_tower_purge_volume = 1 +speed_infill = =math.ceil(speed_print * 40 / 50) \ No newline at end of file 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 3e7db52e6a..e098b0ffb4 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 @@ -22,5 +22,4 @@ speed_topbottom = =math.ceil(speed_print * 30 / 55) speed_wall = =math.ceil(speed_print * 30 / 55) infill_pattern = zigzag -speed_infill = =math.ceil(speed_print * 45 / 55) -prime_tower_purge_volume = 1 +speed_infill = =math.ceil(speed_print * 45 / 55) \ No newline at end of file diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.8_CPE_Draft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.8_CPE_Draft_Print.inst.cfg index b11ecfcad9..532aacabf7 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.8_CPE_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.8_CPE_Draft_Print.inst.cfg @@ -21,5 +21,4 @@ speed_print = 40 speed_topbottom = =math.ceil(speed_print * 25 / 40) speed_wall = =math.ceil(speed_print * 30 / 40) -jerk_travel = 50 -prime_tower_purge_volume = 1 +jerk_travel = 50 \ No newline at end of file diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.8_CPE_Superdraft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.8_CPE_Superdraft_Print.inst.cfg index 4cd0fb22d7..55b9ae8315 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.8_CPE_Superdraft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.8_CPE_Superdraft_Print.inst.cfg @@ -22,5 +22,4 @@ speed_topbottom = =math.ceil(speed_print * 30 / 45) speed_wall = =math.ceil(speed_print * 40 / 45) speed_wall_0 = =math.ceil(speed_wall * 30 / 40) -jerk_travel = 50 -prime_tower_purge_volume = 1 +jerk_travel = 50 \ No newline at end of file diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.8_CPE_Verydraft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.8_CPE_Verydraft_Print.inst.cfg index ce851fb467..01761062a4 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.8_CPE_Verydraft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.8_CPE_Verydraft_Print.inst.cfg @@ -22,4 +22,3 @@ speed_topbottom = =math.ceil(speed_print * 25 / 40) speed_wall = =math.ceil(speed_print * 30 / 40) jerk_travel = 50 -prime_tower_purge_volume = 1 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.8_PP_Draft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.8_PP_Draft_Print.inst.cfg index 7b99a4d6bd..fee58b367d 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.8_PP_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.8_PP_Draft_Print.inst.cfg @@ -29,7 +29,7 @@ material_standby_temperature = 100 multiple_mesh_overlap = 0.2 prime_tower_enable = True prime_tower_flow = 100 -prime_tower_wall_thickness = =prime_tower_line_width * 2 +prime_tower_min_volume = 10 retract_at_layer_change = False retraction_count_max = 12 retraction_extra_prime_amount = 0.5 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.8_PP_Superdraft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.8_PP_Superdraft_Print.inst.cfg index 4a7ec288f5..aaa810e864 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.8_PP_Superdraft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.8_PP_Superdraft_Print.inst.cfg @@ -29,7 +29,7 @@ material_standby_temperature = 100 multiple_mesh_overlap = 0.2 prime_tower_enable = True prime_tower_flow = 100 -prime_tower_wall_thickness = =prime_tower_line_width * 2 +prime_tower_min_volume = 20 retract_at_layer_change = False retraction_count_max = 12 retraction_extra_prime_amount = 0.5 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.8_PP_Verydraft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.8_PP_Verydraft_Print.inst.cfg index e72e87da92..5b8aa6d2e1 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.8_PP_Verydraft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.8_PP_Verydraft_Print.inst.cfg @@ -28,7 +28,7 @@ material_standby_temperature = 100 multiple_mesh_overlap = 0.2 prime_tower_enable = True prime_tower_flow = 100 -prime_tower_wall_thickness = =prime_tower_line_width * 2 +prime_tower_min_volume = 15 retract_at_layer_change = False retraction_count_max = 12 retraction_extra_prime_amount = 0.5 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.8_TPU_Draft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.8_TPU_Draft_Print.inst.cfg index d097b34a61..889ffaf567 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.8_TPU_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.8_TPU_Draft_Print.inst.cfg @@ -33,7 +33,7 @@ material_standby_temperature = 100 multiple_mesh_overlap = 0.2 prime_tower_enable = True prime_tower_flow = 100 -prime_tower_wall_thickness = =prime_tower_line_width * 2 +prime_tower_min_volume = 10 retract_at_layer_change = False retraction_count_max = 12 retraction_extra_prime_amount = 0.5 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.8_TPU_Superdraft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.8_TPU_Superdraft_Print.inst.cfg index 4fc67e68b2..fca907e8fd 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.8_TPU_Superdraft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.8_TPU_Superdraft_Print.inst.cfg @@ -34,7 +34,7 @@ material_standby_temperature = 100 multiple_mesh_overlap = 0.2 prime_tower_enable = True prime_tower_flow = 100 -prime_tower_wall_thickness = =prime_tower_line_width * 2 +prime_tower_min_volume = 20 retract_at_layer_change = False retraction_count_max = 12 retraction_extra_prime_amount = 0.5 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.8_TPU_Verydraft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.8_TPU_Verydraft_Print.inst.cfg index d0ff5ebac5..673d64d432 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.8_TPU_Verydraft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.8_TPU_Verydraft_Print.inst.cfg @@ -33,7 +33,7 @@ material_standby_temperature = 100 multiple_mesh_overlap = 0.2 prime_tower_enable = True prime_tower_flow = 100 -prime_tower_wall_thickness = =prime_tower_line_width * 2 +prime_tower_min_volume = 15 retract_at_layer_change = False retraction_count_max = 12 retraction_extra_prime_amount = 0.5 diff --git a/resources/setting_visibility/advanced.cfg b/resources/setting_visibility/advanced.cfg index 4d4129f2cb..43edb13495 100644 --- a/resources/setting_visibility/advanced.cfg +++ b/resources/setting_visibility/advanced.cfg @@ -123,7 +123,6 @@ brim_outside_only prime_tower_enable prime_tower_position_x prime_tower_position_y -prime_tower_purge_volume [meshfix] diff --git a/resources/setting_visibility/expert.cfg b/resources/setting_visibility/expert.cfg index 5cb8c4fd2b..0f15247eb7 100644 --- a/resources/setting_visibility/expert.cfg +++ b/resources/setting_visibility/expert.cfg @@ -291,13 +291,10 @@ prime_tower_enable prime_tower_circular prime_tower_size prime_tower_min_volume -prime_tower_wall_thickness prime_tower_position_x prime_tower_position_y prime_tower_flow prime_tower_wipe_enabled -dual_pre_wipe -prime_tower_purge_volume ooze_shield_enabled ooze_shield_angle ooze_shield_dist diff --git a/resources/variants/ultimaker3_bb0.8.inst.cfg b/resources/variants/ultimaker3_bb0.8.inst.cfg index e49efa7144..9ad4284b40 100644 --- a/resources/variants/ultimaker3_bb0.8.inst.cfg +++ b/resources/variants/ultimaker3_bb0.8.inst.cfg @@ -40,8 +40,7 @@ material_print_temperature = =default_material_print_temperature + 10 material_standby_temperature = 100 multiple_mesh_overlap = 0 prime_tower_enable = False -prime_tower_purge_volume = 2 -prime_tower_wall_thickness = 2.2 +prime_tower_min_volume = 20 prime_tower_wipe_enabled = True raft_acceleration = =acceleration_layer_0 raft_airgap = 0 diff --git a/resources/variants/ultimaker3_bb04.inst.cfg b/resources/variants/ultimaker3_bb04.inst.cfg index 9741ff6aff..f07a4a55f9 100644 --- a/resources/variants/ultimaker3_bb04.inst.cfg +++ b/resources/variants/ultimaker3_bb04.inst.cfg @@ -22,8 +22,7 @@ jerk_support_bottom = =math.ceil(jerk_support_interface * 1 / 10) machine_nozzle_heat_up_speed = 1.5 machine_nozzle_id = BB 0.4 machine_nozzle_tip_outer_diameter = 1.0 -prime_tower_purge_volume = 2 -prime_tower_wall_thickness = 1.5 +prime_tower_min_volume = 15 raft_base_speed = 20 raft_interface_speed = 20 raft_speed = 25 diff --git a/resources/variants/ultimaker3_extended_bb0.8.inst.cfg b/resources/variants/ultimaker3_extended_bb0.8.inst.cfg index a2aa7cd843..d7a76d538a 100644 --- a/resources/variants/ultimaker3_extended_bb0.8.inst.cfg +++ b/resources/variants/ultimaker3_extended_bb0.8.inst.cfg @@ -40,8 +40,7 @@ material_print_temperature = =default_material_print_temperature + 10 material_standby_temperature = 100 multiple_mesh_overlap = 0 prime_tower_enable = False -prime_tower_purge_volume = 2 -prime_tower_wall_thickness = 2.2 +prime_tower_min_volume = 20 prime_tower_wipe_enabled = True raft_acceleration = =acceleration_layer_0 raft_airgap = 0 diff --git a/resources/variants/ultimaker3_extended_bb04.inst.cfg b/resources/variants/ultimaker3_extended_bb04.inst.cfg index 89bfdf69b9..6e882cfa04 100644 --- a/resources/variants/ultimaker3_extended_bb04.inst.cfg +++ b/resources/variants/ultimaker3_extended_bb04.inst.cfg @@ -22,8 +22,7 @@ jerk_support_bottom = =math.ceil(jerk_support_interface * 1 / 10) machine_nozzle_heat_up_speed = 1.5 machine_nozzle_id = BB 0.4 machine_nozzle_tip_outer_diameter = 1.0 -prime_tower_purge_volume = 2 -prime_tower_wall_thickness = 1.5 +prime_tower_min_volume = 15 raft_base_speed = 20 raft_interface_speed = 20 raft_speed = 25 diff --git a/resources/variants/ultimaker_s5_bb0.8.inst.cfg b/resources/variants/ultimaker_s5_bb0.8.inst.cfg index 16ab998dc3..6b954041ab 100644 --- a/resources/variants/ultimaker_s5_bb0.8.inst.cfg +++ b/resources/variants/ultimaker_s5_bb0.8.inst.cfg @@ -40,8 +40,7 @@ material_print_temperature = =default_material_print_temperature + 10 material_standby_temperature = 100 multiple_mesh_overlap = 0 prime_tower_enable = False -prime_tower_purge_volume = 2 -prime_tower_wall_thickness = 2.2 +prime_tower_min_volume = 20 prime_tower_wipe_enabled = True raft_acceleration = =acceleration_layer_0 raft_airgap = 0 diff --git a/resources/variants/ultimaker_s5_bb04.inst.cfg b/resources/variants/ultimaker_s5_bb04.inst.cfg index 473baf2a5c..634920ca65 100644 --- a/resources/variants/ultimaker_s5_bb04.inst.cfg +++ b/resources/variants/ultimaker_s5_bb04.inst.cfg @@ -22,8 +22,7 @@ jerk_support_bottom = =math.ceil(jerk_support_interface * 1 / 10) machine_nozzle_heat_up_speed = 1.5 machine_nozzle_id = BB 0.4 machine_nozzle_tip_outer_diameter = 1.0 -prime_tower_purge_volume = 2 -prime_tower_wall_thickness = 1.5 +prime_tower_min_volume = 20 raft_base_speed = 20 raft_interface_speed = 20 raft_speed = 25 From c738f306fb25ff8cbef1d817ca46c9e544c122f2 Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Thu, 5 Jul 2018 14:35:12 +0200 Subject: [PATCH 036/174] Fix style in some components --- plugins/GCodeReader/FlavorParser.py | 3 +++ plugins/Toolbox/src/Toolbox.py | 10 +++++++++- .../UM3NetworkPrinting/ClusterUM3OutputDevice.py | 15 +++++++++++++-- plugins/UM3NetworkPrinting/DiscoverUM3Action.py | 5 ++++- plugins/UM3NetworkPrinting/SendMaterialJob.py | 2 +- 5 files changed, 30 insertions(+), 5 deletions(-) diff --git a/plugins/GCodeReader/FlavorParser.py b/plugins/GCodeReader/FlavorParser.py index 05f40b41e7..990bd98fb5 100644 --- a/plugins/GCodeReader/FlavorParser.py +++ b/plugins/GCodeReader/FlavorParser.py @@ -286,6 +286,9 @@ class FlavorParser: self._cancelled = False # We obtain the filament diameter from the selected extruder to calculate line widths global_stack = CuraApplication.getInstance().getGlobalContainerStack() + if not global_stack: + return None + self._filament_diameter = global_stack.extruders[str(self._extruder_number)].getProperty("material_diameter", "value") scene_node = CuraSceneNode() diff --git a/plugins/Toolbox/src/Toolbox.py b/plugins/Toolbox/src/Toolbox.py index 0d0060e48c..c3e0a5916a 100644 --- a/plugins/Toolbox/src/Toolbox.py +++ b/plugins/Toolbox/src/Toolbox.py @@ -224,6 +224,11 @@ class Toolbox(QObject, Extension): if not self._dialog: self._dialog = self._createDialog("Toolbox.qml") + + if not self._dialog: + Logger.log("e", "Unexpected error trying to create the 'Toolbox' dialog.") + return + self._dialog.show() # Apply enabled/disabled state to installed plugins @@ -231,7 +236,10 @@ class Toolbox(QObject, Extension): def _createDialog(self, qml_name: str) -> Optional[QObject]: Logger.log("d", "Toolbox: Creating dialog [%s].", qml_name) - path = os.path.join(PluginRegistry.getInstance().getPluginPath(self.getPluginId()), "resources", "qml", qml_name) + plugin_path = PluginRegistry.getInstance().getPluginPath(self.getPluginId()) + if not plugin_path: + return None + path = os.path.join(plugin_path, "resources", "qml", qml_name) dialog = self._application.createQmlComponent(path, {"toolbox": self}) return dialog diff --git a/plugins/UM3NetworkPrinting/ClusterUM3OutputDevice.py b/plugins/UM3NetworkPrinting/ClusterUM3OutputDevice.py index 8b3ceb7809..757ed4ef66 100644 --- a/plugins/UM3NetworkPrinting/ClusterUM3OutputDevice.py +++ b/plugins/UM3NetworkPrinting/ClusterUM3OutputDevice.py @@ -103,8 +103,12 @@ class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice): else: file_formats = CuraApplication.getInstance().getMeshFileHandler().getSupportedFileTypesWrite() + global_stack = CuraApplication.getInstance().getGlobalContainerStack() + if not global_stack: + return + #Create a list from the supported file formats string. - machine_file_formats = CuraApplication.getInstance().getGlobalContainerStack().getMetaDataEntry("file_formats").split(";") + machine_file_formats = global_stack.getMetaDataEntry("file_formats").split(";") machine_file_formats = [file_type.strip() for file_type in machine_file_formats] #Exception for UM3 firmware version >=4.4: UFP is now supported and should be the preferred file format. if "application/x-ufp" not in machine_file_formats and self.printerType == "ultimaker3" and Version(self.firmwareVersion) >= Version("4.4"): @@ -125,6 +129,10 @@ class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice): else: writer = CuraApplication.getInstance().getMeshFileHandler().getWriterByMimeType(cast(str, preferred_format["mime_type"])) + if not writer: + Logger.log("e", "Unexpected error when trying to get the FileWriter") + return + #This function pauses with the yield, waiting on instructions on which printer it needs to print with. self._sending_job = self._sendPrintJob(writer, preferred_format, nodes) self._sending_job.send(None) #Start the generator. @@ -205,6 +213,8 @@ class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice): yield #To prevent having to catch the StopIteration exception. def _sendPrintJobWaitOnWriteJobFinished(self, job: WriteFileJob) -> None: + # This is the callback when the job finishes, where the message is created + assert(self._write_job_progress_message is not None) self._write_job_progress_message.hide() self._progress_message = Message(i18n_catalog.i18nc("@info:status", "Sending data to printer"), lifetime = 0, dismissable = False, progress = -1, @@ -249,7 +259,8 @@ class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice): self.activePrinterChanged.emit() def _onPostPrintJobFinished(self, reply: QNetworkReply) -> None: - self._progress_message.hide() + if self._progress_message is not None: + self._progress_message.hide() self._compressing_gcode = False self._sending_gcode = False diff --git a/plugins/UM3NetworkPrinting/DiscoverUM3Action.py b/plugins/UM3NetworkPrinting/DiscoverUM3Action.py index c51092ed98..3752cc0c25 100644 --- a/plugins/UM3NetworkPrinting/DiscoverUM3Action.py +++ b/plugins/UM3NetworkPrinting/DiscoverUM3Action.py @@ -170,7 +170,10 @@ class DiscoverUM3Action(MachineAction): Logger.log("d", "Creating additional ui components for UM3.") # Create networking dialog - path = os.path.join(PluginRegistry.getInstance().getPluginPath("UM3NetworkPrinting"), "UM3InfoComponents.qml") + plugin_path = PluginRegistry.getInstance().getPluginPath("UM3NetworkPrinting") + if not plugin_path: + return + path = os.path.join(plugin_path, "UM3InfoComponents.qml") self.__additional_components_view = CuraApplication.getInstance().createQmlComponent(path, {"manager": self}) if not self.__additional_components_view: Logger.log("w", "Could not create ui components for UM3.") diff --git a/plugins/UM3NetworkPrinting/SendMaterialJob.py b/plugins/UM3NetworkPrinting/SendMaterialJob.py index 02b5b68393..0ac38843a1 100644 --- a/plugins/UM3NetworkPrinting/SendMaterialJob.py +++ b/plugins/UM3NetworkPrinting/SendMaterialJob.py @@ -23,7 +23,7 @@ if TYPE_CHECKING: # # This way it won't freeze up the interface while sending those materials. class SendMaterialJob(Job): - def __init__(self, device: "ClusterUM3OutputDevice"): + def __init__(self, device: "ClusterUM3OutputDevice") -> None: super().__init__() self.device = device #type: ClusterUM3OutputDevice From b0f1a6d85907bbd4030d2c703f3e358566275723 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Thu, 5 Jul 2018 14:36:19 +0200 Subject: [PATCH 037/174] Use Label delegate to avoid overlapping texts CURA-5544 --- .../resources/qml/ToolboxCompatibilityChart.qml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/plugins/Toolbox/resources/qml/ToolboxCompatibilityChart.qml b/plugins/Toolbox/resources/qml/ToolboxCompatibilityChart.qml index b4219d53bf..4978af6168 100644 --- a/plugins/Toolbox/resources/qml/ToolboxCompatibilityChart.qml +++ b/plugins/Toolbox/resources/qml/ToolboxCompatibilityChart.qml @@ -76,11 +76,26 @@ Item } } + Component + { + id: columnTextDelegate + Label + { + anchors.fill: parent + verticalAlignment: Text.AlignVCenter + text: styleData.value || "" + elide: Text.ElideRight + color: UM.Theme.getColor("text_medium") + font: UM.Theme.getFont("default") + } + } + TableViewColumn { role: "machine" title: "Machine" width: Math.floor(table.width * 0.25) + delegate: columnTextDelegate } TableViewColumn { From 8afc49e902511b5c5c80cac1f2248fbd967e3fb5 Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Thu, 5 Jul 2018 14:41:17 +0200 Subject: [PATCH 038/174] Add style to a variable in X3Reader --- plugins/X3DReader/X3DReader.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/X3DReader/X3DReader.py b/plugins/X3DReader/X3DReader.py index 44a2f1443a..da0502a7ec 100644 --- a/plugins/X3DReader/X3DReader.py +++ b/plugins/X3DReader/X3DReader.py @@ -2,6 +2,7 @@ # Cura is released under the terms of the LGPLv3 or higher. from math import pi, sin, cos, sqrt +from typing import Dict import numpy @@ -42,7 +43,7 @@ class X3DReader(MeshReader): def __init__(self) -> None: super().__init__() self._supported_extensions = [".x3d"] - self._namespaces = {} + self._namespaces = {} # type: Dict[str, str] # Main entry point # Reads the file, returns a SceneNode (possibly with nested ones), or None From 07e92ead0b6100a4fd518fd4008536f0774ebb0a Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Thu, 5 Jul 2018 15:20:38 +0200 Subject: [PATCH 039/174] last fixes for CuraEngineBackend --- plugins/CuraEngineBackend/CuraEngineBackend.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index 4fc1381d2a..26a2399567 100755 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -21,6 +21,7 @@ from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator from UM.Settings.Interfaces import DefinitionContainerInterface from UM.Settings.SettingInstance import SettingInstance #For typing. from UM.Tool import Tool #For typing. +from UM.Mesh.MeshData import MeshData #For typing. from cura.CuraApplication import CuraApplication from cura.Settings.ExtruderManager import ExtruderManager @@ -62,7 +63,7 @@ class CuraEngineBackend(QObject, Backend): if Platform.isLinux() and not default_engine_location: if not os.getenv("PATH"): raise OSError("There is something wrong with your Linux installation.") - for pathdir in os.getenv("PATH").split(os.pathsep): + for pathdir in cast(str, os.getenv("PATH")).split(os.pathsep): execpath = os.path.join(pathdir, executable_name) if os.path.exists(execpath): default_engine_location = execpath @@ -485,9 +486,8 @@ class CuraEngineBackend(QObject, Backend): else: # we got a single scenenode if not source.callDecoration("isGroup"): - if source.getMeshData() is None: - return - if source.getMeshData().getVertices() is None: + meshData = source.getMeshData(); + if meshData and meshData.getVertices() is None: return build_plate_changed.add(source_build_plate_number) @@ -670,7 +670,7 @@ class CuraEngineBackend(QObject, Backend): ## Creates a new socket connection. def _createSocket(self, protocol_file: str = None) -> None: if not protocol_file: - protocol_file = os.path.abspath(os.path.join(PluginRegistry.getInstance().getPluginPath(self.getPluginId()), "Cura.proto")) + protocol_file = os.path.abspath(os.path.join(str(PluginRegistry.getInstance().getPluginPath(self.getPluginId())), "Cura.proto")) super()._createSocket(protocol_file) self._engine_is_fresh = True From 7b284355fb5939e40d0fdf3226a6a9b29390cee3 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 5 Jul 2018 15:24:55 +0200 Subject: [PATCH 040/174] Revert "Fix code-style in CuraEngineBackend" This reverts commit 7d7a51d77241026ef665300b944b64dd69dbddcc. That commit broke the start-up sequence. --- .../CuraEngineBackend/CuraEngineBackend.py | 49 +++++++------------ plugins/CuraEngineBackend/StartSliceJob.py | 30 ++++++------ 2 files changed, 33 insertions(+), 46 deletions(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index 1df694aa86..e7dca2ae3e 100755 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -3,8 +3,6 @@ from collections import defaultdict import os -from typing import Union - from PyQt5.QtCore import QObject, QTimer, pyqtSlot import sys from time import time @@ -62,16 +60,17 @@ class CuraEngineBackend(QObject, Backend): if hasattr(sys, "frozen"): default_engine_location = os.path.join(os.path.dirname(os.path.abspath(sys.executable)), executable_name) if Platform.isLinux() and not default_engine_location: - env_path = os.getenv("PATH") - if not env_path: + if not os.getenv("PATH"): raise OSError("There is something wrong with your Linux installation.") - for pathdir in env_path.split(os.pathsep): + for pathdir in os.getenv("PATH").split(os.pathsep): execpath = os.path.join(pathdir, executable_name) if os.path.exists(execpath): default_engine_location = execpath break self._application = CuraApplication.getInstance() #type: CuraApplication + self._multi_build_plate_model = None #type: MultiBuildPlateModel + self._machine_error_checker = None #type: MachineErrorChecker if not default_engine_location: raise EnvironmentError("Could not find CuraEngine") @@ -121,11 +120,11 @@ class CuraEngineBackend(QObject, Backend): self._engine_is_fresh = True #type: bool # Is the newly started engine used before or not? self._backend_log_max_lines = 20000 #type: int # Maximum number of lines to buffer - self._error_message = None #type: Optional[Message] # Pop-up message that shows errors. + self._error_message = None #type: Message # Pop-up message that shows errors. self._last_num_objects = defaultdict(int) #type: Dict[int, int] # Count number of objects to see if there is something changed self._postponed_scene_change_sources = [] #type: List[SceneNode] # scene change is postponed (by a tool) - self._slice_start_time = time() #type: float + self._slice_start_time = None #type: Optional[float] self._is_disabled = False #type: bool self._application.getPreferences().addPreference("general/auto_slice", False) @@ -143,7 +142,8 @@ class CuraEngineBackend(QObject, Backend): self._application.initializationFinished.connect(self.initialize) def initialize(self) -> None: - self._multi_build_plate_model = self._application.getMultiBuildPlateModel() #type: MultiBuildPlateModel + self._multi_build_plate_model = self._application.getMultiBuildPlateModel() + self._application.getController().activeViewChanged.connect(self._onActiveViewChanged) self._multi_build_plate_model.activeBuildPlateChanged.connect(self._onActiveViewChanged) @@ -160,7 +160,7 @@ class CuraEngineBackend(QObject, Backend): self._application.getController().toolOperationStarted.connect(self._onToolOperationStarted) self._application.getController().toolOperationStopped.connect(self._onToolOperationStopped) - self._machine_error_checker = self._application.getMachineErrorChecker() #type: MachineErrorChecker + self._machine_error_checker = self._application.getMachineErrorChecker() self._machine_error_checker.errorCheckFinished.connect(self._onStackErrorCheckFinished) ## Terminate the engine process. @@ -310,11 +310,6 @@ class CuraEngineBackend(QObject, Backend): if self._start_slice_job is job: self._start_slice_job = None - if not self._global_container_stack: - self.backendStateChange.emit(BackendState.Error) - self.backendError.emit(job) - return - if job.isCancelled() or job.getError() or job.getResult() == StartJobResult.Error: self.backendStateChange.emit(BackendState.Error) self.backendError.emit(job) @@ -452,8 +447,7 @@ class CuraEngineBackend(QObject, Backend): # Only count sliceable objects if node.callDecoration("isSliceable"): build_plate_number = node.callDecoration("getBuildPlateNumber") - if build_plate_number is not None: - num_objects[build_plate_number] += 1 + num_objects[build_plate_number] += 1 return num_objects ## Listener for when the scene has changed. @@ -470,7 +464,7 @@ class CuraEngineBackend(QObject, Backend): if source.callDecoration("isBlockSlicing") and source.callDecoration("getLayerData"): self._stored_optimized_layer_data = {} - build_plate_changed = set() # type: Set[int] + build_plate_changed = set() source_build_plate_number = source.callDecoration("getBuildPlateNumber") if source == self._scene.getRoot(): # we got the root node @@ -482,15 +476,14 @@ class CuraEngineBackend(QObject, Backend): else: # we got a single scenenode if not source.callDecoration("isGroup"): - mesh_data = source.getMeshData() - if mesh_data is None: + if source.getMeshData() is None: return - elif mesh_data.getVertices() is None: + if source.getMeshData().getVertices() is None: return - if source_build_plate_number is not None: - build_plate_changed.add(source_build_plate_number) + build_plate_changed.add(source_build_plate_number) + build_plate_changed.discard(None) build_plate_changed.discard(-1) # object not on build plate if not build_plate_changed: return @@ -584,10 +577,9 @@ class CuraEngineBackend(QObject, Backend): # # \param message The protobuf message containing sliced layer data. def _onOptimizedLayerMessage(self, message: Arcus.PythonMessage) -> None: - if self._start_slice_job_build_plate is not None: - if self._start_slice_job_build_plate not in self._stored_optimized_layer_data: - self._stored_optimized_layer_data[self._start_slice_job_build_plate] = [] - self._stored_optimized_layer_data[self._start_slice_job_build_plate].append(message) + if self._start_slice_job_build_plate not in self._stored_optimized_layer_data: + self._stored_optimized_layer_data[self._start_slice_job_build_plate] = [] + self._stored_optimized_layer_data[self._start_slice_job_build_plate].append(message) ## Called when a progress message is received from the engine. # @@ -666,10 +658,7 @@ class CuraEngineBackend(QObject, Backend): ## Creates a new socket connection. def _createSocket(self, protocol_file: str = None) -> None: if not protocol_file: - plugin_path = PluginRegistry.getInstance().getPluginPath(self.getPluginId()) - if not plugin_path: - return - protocol_file = os.path.abspath(os.path.join(plugin_path, "Cura.proto")) + protocol_file = os.path.abspath(os.path.join(PluginRegistry.getInstance().getPluginPath(self.getPluginId()), "Cura.proto")) super()._createSocket(protocol_file) self._engine_is_fresh = True diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py index 8e429da14d..78dd4eafd2 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.py @@ -114,14 +114,13 @@ class StartSliceJob(Job): self.setResult(StartJobResult.Error) return - global_stack = CuraApplication.getInstance().getGlobalContainerStack() - machine_manager = CuraApplication.getInstance().getMachineManager() - if not global_stack: + stack = CuraApplication.getInstance().getGlobalContainerStack() + if not stack: self.setResult(StartJobResult.Error) return # Don't slice if there is a setting with an error value. - if machine_manager.stacksHaveErrors: + if CuraApplication.getInstance().getMachineManager().stacksHaveErrors: self.setResult(StartJobResult.SettingError) return @@ -130,12 +129,12 @@ class StartSliceJob(Job): return # Don't slice if the buildplate or the nozzle type is incompatible with the materials - if not machine_manager.variantBuildplateCompatible and \ - not machine_manager.variantBuildplateUsable: + if not CuraApplication.getInstance().getMachineManager().variantBuildplateCompatible and \ + not CuraApplication.getInstance().getMachineManager().variantBuildplateUsable: self.setResult(StartJobResult.MaterialIncompatible) return - for position, extruder_stack in global_stack.extruders.items(): + for position, extruder_stack in stack.extruders.items(): material = extruder_stack.findContainer({"type": "material"}) if not extruder_stack.isEnabled: continue @@ -163,7 +162,7 @@ class StartSliceJob(Job): # Get the objects in their groups to print. object_groups = [] - if global_stack.getProperty("print_sequence", "value") == "one_at_a_time": + if stack.getProperty("print_sequence", "value") == "one_at_a_time": for node in OneAtATimeIterator(self._scene.getRoot()): #type: ignore #Ignore type error because iter() should get called automatically by Python syntax. temp_list = [] @@ -217,11 +216,12 @@ class StartSliceJob(Job): if temp_list: object_groups.append(temp_list) - extruders_enabled = {position: stack.isEnabled for position, stack in global_stack.extruders.items()} + extruders_enabled = {position: stack.isEnabled for position, stack in CuraApplication.getInstance().getGlobalContainerStack().extruders.items()} filtered_object_groups = [] has_model_with_disabled_extruders = False - associated_disabled_extruders = set() # type: Set[str] + associated_disabled_extruders = set() for group in object_groups: + stack = CuraApplication.getInstance().getGlobalContainerStack() skip_group = False for node in group: extruder_position = node.callDecoration("getActiveExtruderPosition") @@ -234,7 +234,7 @@ class StartSliceJob(Job): if has_model_with_disabled_extruders: self.setResult(StartJobResult.ObjectsWithDisabledExtruder) - associated_disabled_extruders = set([str(c) for c in sorted([int(p) + 1 for p in associated_disabled_extruders])]) + associated_disabled_extruders = [str(c) for c in sorted([int(p) + 1 for p in associated_disabled_extruders])] self.setMessage(", ".join(associated_disabled_extruders)) return @@ -245,11 +245,11 @@ class StartSliceJob(Job): self.setResult(StartJobResult.NothingToSlice) return - self._buildGlobalSettingsMessage(global_stack) - self._buildGlobalInheritsStackMessage(global_stack) + self._buildGlobalSettingsMessage(stack) + self._buildGlobalInheritsStackMessage(stack) # Build messages for extruder stacks - for extruder_stack in ExtruderManager.getInstance().getMachineExtruders(global_stack.getId()): + for extruder_stack in ExtruderManager.getInstance().getMachineExtruders(stack.getId()): self._buildExtruderMessage(extruder_stack) for group in filtered_object_groups: @@ -326,8 +326,6 @@ class StartSliceJob(Job): def _expandGcodeTokens(self, value: str, default_extruder_nr: int = -1) -> str: if not self._all_extruders_settings: global_stack = CuraApplication.getInstance().getGlobalContainerStack() - if not global_stack: - return str(value) # NB: keys must be strings for the string formatter self._all_extruders_settings = { From 9ec5770a1c2f64c50aee6a279645320e5bff8fe0 Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Thu, 5 Jul 2018 15:31:08 +0200 Subject: [PATCH 041/174] Fixes for StartSliceJob --- plugins/CuraEngineBackend/StartSliceJob.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py index 237c1f2dda..8f31e8cd0a 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.py @@ -5,7 +5,7 @@ import numpy from string import Formatter from enum import IntEnum import time -from typing import Any, Dict, List, Optional, Set +from typing import Any, cast, Dict, List, Optional, Set import re import Arcus #For typing. @@ -114,7 +114,7 @@ class StartSliceJob(Job): self.setResult(StartJobResult.Error) return - stack = CuraApplication.getInstance().getGlobalContainerStack() + stack = cast(ContainerStack, CuraApplication.getInstance().getGlobalContainerStack()) if not stack: self.setResult(StartJobResult.Error) return @@ -216,12 +216,11 @@ class StartSliceJob(Job): if temp_list: object_groups.append(temp_list) - extruders_enabled = {position: stack.isEnabled for position, stack in CuraApplication.getInstance().getGlobalContainerStack().extruders.items()} + extruders_enabled = {position: stack.isEnabled for position, extruder in stack.extruders.items()} filtered_object_groups = [] has_model_with_disabled_extruders = False associated_disabled_extruders = set() for group in object_groups: - stack = CuraApplication.getInstance().getGlobalContainerStack() skip_group = False for node in group: extruder_position = node.callDecoration("getActiveExtruderPosition") @@ -325,11 +324,11 @@ class StartSliceJob(Job): # \param default_extruder_nr Stack nr to use when no stack nr is specified, defaults to the global stack def _expandGcodeTokens(self, value: str, default_extruder_nr: int = -1) -> str: if not self._all_extruders_settings: - global_stack = CuraApplication.getInstance().getGlobalContainerStack() + global_stack = cast(ContainerStack, CuraApplication.getInstance().getGlobalContainerStack()) # NB: keys must be strings for the string formatter self._all_extruders_settings = { - "-1": self._buildReplacementTokens(global_stack) + "-1": self._buildReplacementTokens(cast(ContainerStack, global_stack)) } for extruder_stack in ExtruderManager.getInstance().getMachineExtruders(global_stack.getId()): From c0985bec2ae0c32f2c55e51e5ced6b28a0d2c060 Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Thu, 5 Jul 2018 15:32:43 +0200 Subject: [PATCH 042/174] Add the data to the tests. --- .../VersionUpgrade34to40/tests/TestVersionUpgrade34to40.py | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/VersionUpgrade/VersionUpgrade34to40/tests/TestVersionUpgrade34to40.py b/plugins/VersionUpgrade/VersionUpgrade34to40/tests/TestVersionUpgrade34to40.py index a6a3a1febf..22df0d6487 100644 --- a/plugins/VersionUpgrade/VersionUpgrade34to40/tests/TestVersionUpgrade34to40.py +++ b/plugins/VersionUpgrade/VersionUpgrade34to40/tests/TestVersionUpgrade34to40.py @@ -22,6 +22,7 @@ test_upgrade_version_nr_data = [ ] ## Tests whether the version numbers are updated. +@pytest.mark.parametrize("test_name, file_data", test_upgrade_version_nr_data) def test_upgradeVersionNr(test_name, file_data, upgrader): #Perform the upgrade. _, upgraded_instances = upgrader.upgradePreferences(file_data, "") From 2f8debc985d0425da4244f5bc2284f20b28bc6f2 Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Thu, 5 Jul 2018 15:45:48 +0200 Subject: [PATCH 043/174] Fixes for FlavorParser --- plugins/GCodeReader/FlavorParser.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/GCodeReader/FlavorParser.py b/plugins/GCodeReader/FlavorParser.py index 05f40b41e7..ead527a61f 100644 --- a/plugins/GCodeReader/FlavorParser.py +++ b/plugins/GCodeReader/FlavorParser.py @@ -286,7 +286,9 @@ class FlavorParser: self._cancelled = False # We obtain the filament diameter from the selected extruder to calculate line widths global_stack = CuraApplication.getInstance().getGlobalContainerStack() - self._filament_diameter = global_stack.extruders[str(self._extruder_number)].getProperty("material_diameter", "value") + + if global_stack: + self._filament_diameter = global_stack.extruders[str(self._extruder_number)].getProperty("material_diameter", "value") scene_node = CuraSceneNode() From d0c68f8e947da1858331a2094c361afa89fa8dc6 Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Thu, 5 Jul 2018 15:46:16 +0200 Subject: [PATCH 044/174] Fixes for WindowsRemovableDrivePlugin --- .../WindowsRemovableDrivePlugin.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/RemovableDriveOutputDevice/WindowsRemovableDrivePlugin.py b/plugins/RemovableDriveOutputDevice/WindowsRemovableDrivePlugin.py index 7a3e1ab5c1..51b6a70b7a 100644 --- a/plugins/RemovableDriveOutputDevice/WindowsRemovableDrivePlugin.py +++ b/plugins/RemovableDriveOutputDevice/WindowsRemovableDrivePlugin.py @@ -11,7 +11,7 @@ from UM.i18n import i18nCatalog catalog = i18nCatalog("cura") # Ignore windows error popups. Fixes the whole "Can't open drive X" when user has an SD card reader. -ctypes.windll.kernel32.SetErrorMode(1) +ctypes.windll.kernel32.SetErrorMode(1) #type: ignore # WinAPI Constants that we need # Hardcoded here due to stupid WinDLL stuff that does not give us access to these values. @@ -29,7 +29,7 @@ OPEN_EXISTING = 3 # [CodeStyle: Windows Enum value] # Setup the DeviceIoControl function arguments and return type. # See ctypes documentation for details on how to call C functions from python, and why this is important. -ctypes.windll.kernel32.DeviceIoControl.argtypes = [ +ctypes.windll.kernel32.DeviceIoControl.argtypes = [ #type: ignore wintypes.HANDLE, # _In_ HANDLE hDevice wintypes.DWORD, # _In_ DWORD dwIoControlCode wintypes.LPVOID, # _In_opt_ LPVOID lpInBuffer @@ -39,7 +39,7 @@ ctypes.windll.kernel32.DeviceIoControl.argtypes = [ ctypes.POINTER(wintypes.DWORD), # _Out_opt_ LPDWORD lpBytesReturned wintypes.LPVOID # _Inout_opt_ LPOVERLAPPED lpOverlapped ] -ctypes.windll.kernel32.DeviceIoControl.restype = wintypes.BOOL +ctypes.windll.kernel32.DeviceIoControl.restype = wintypes.BOOL #type: ignore ## Removable drive support for windows From cfae634061fbfedb6b75355fcf122e9c5ec04b25 Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Thu, 5 Jul 2018 15:54:21 +0200 Subject: [PATCH 045/174] Fixes for SliceInfo --- plugins/SliceInfoPlugin/SliceInfo.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/plugins/SliceInfoPlugin/SliceInfo.py b/plugins/SliceInfoPlugin/SliceInfo.py index fe17af89eb..aad1b5005d 100755 --- a/plugins/SliceInfoPlugin/SliceInfo.py +++ b/plugins/SliceInfoPlugin/SliceInfo.py @@ -16,7 +16,7 @@ from UM.i18n import i18nCatalog from UM.Logger import Logger from UM.PluginRegistry import PluginRegistry from UM.Qt.Duration import DurationFormat - +from typing import cast from .SliceInfoJob import SliceInfoJob @@ -81,9 +81,10 @@ class SliceInfo(QObject, Extension): @pyqtSlot(result = str) def getExampleData(self) -> str: if self._example_data_content is None: - file_path = os.path.join(PluginRegistry.getInstance().getPluginPath(self.getPluginId()), "example_data.json") - with open(file_path, "r", encoding = "utf-8") as f: - self._example_data_content = f.read() + file_path = os.path.join(cast(str, PluginRegistry.getInstance().getPluginPath(self.getPluginId())), "example_data.json") + if file_path: + with open(file_path, "r", encoding = "utf-8") as f: + self._example_data_content = f.read() return self._example_data_content @pyqtSlot(bool) From 85be9cea07ec564171f09ff30334d5fe723f06c2 Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Thu, 5 Jul 2018 16:06:37 +0200 Subject: [PATCH 046/174] Fixes for Toolbox --- plugins/Toolbox/src/Toolbox.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/plugins/Toolbox/src/Toolbox.py b/plugins/Toolbox/src/Toolbox.py index 0d0060e48c..d3b9b37bc6 100644 --- a/plugins/Toolbox/src/Toolbox.py +++ b/plugins/Toolbox/src/Toolbox.py @@ -6,7 +6,7 @@ import json import os import tempfile import platform -from typing import List +from typing import cast, List from PyQt5.QtCore import QUrl, QObject, pyqtProperty, pyqtSignal, pyqtSlot from PyQt5.QtNetwork import QNetworkAccessManager, QNetworkRequest, QNetworkReply @@ -229,10 +229,14 @@ class Toolbox(QObject, Extension): # Apply enabled/disabled state to installed plugins self.enabledChanged.emit() - def _createDialog(self, qml_name: str) -> Optional[QObject]: + def _createDialog(self, qml_name: str) -> QObject: Logger.log("d", "Toolbox: Creating dialog [%s].", qml_name) - path = os.path.join(PluginRegistry.getInstance().getPluginPath(self.getPluginId()), "resources", "qml", qml_name) + path = os.path.join(cast(str, PluginRegistry.getInstance().getPluginPath(self.getPluginId())), "resources", "qml", qml_name) + if not path: + raise Exception("Failed to create toolbox QML path") dialog = self._application.createQmlComponent(path, {"toolbox": self}) + if not dialog: + raise Exception("Failed to create toolbox dialog") return dialog From 96896088c365b3e97cffcb0e2bb5f563da7097c1 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 5 Jul 2018 16:27:30 +0200 Subject: [PATCH 047/174] Add spaces around equals operators As per our code style regulations. --- .../scripts/PauseAtHeight.py | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py index ad83aa2a24..c78351909d 100644 --- a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py +++ b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py @@ -247,57 +247,57 @@ class PauseAtHeight(Script): prepend_gcode += ";added code by post processing\n" prepend_gcode += ";script: PauseAtHeight.py\n" if pause_at == "height": - prepend_gcode += ";current z: {z}\n".format(z=current_z) - prepend_gcode += ";current height: {height}\n".format(height=current_height) + prepend_gcode += ";current z: {z}\n".format(z = current_z) + prepend_gcode += ";current height: {height}\n".format(height = current_height) else: - prepend_gcode += ";current layer: {layer}\n".format(layer=current_layer) + prepend_gcode += ";current layer: {layer}\n".format(layer = current_layer) # Retraction - prepend_gcode += self.putValue(M=83) + "\n" + prepend_gcode += self.putValue(M = 83) + "\n" if retraction_amount != 0: - prepend_gcode += self.putValue(G=1, E=-retraction_amount, F=retraction_speed * 60) + "\n" + prepend_gcode += self.putValue(G = 1, E = -retraction_amount, F = retraction_speed * 60) + "\n" # Move the head away - prepend_gcode += self.putValue(G=1, Z=current_z + 1, F=300) + "\n" + prepend_gcode += self.putValue(G = 1, Z = current_z + 1, F = 300) + "\n" # This line should be ok - prepend_gcode += self.putValue(G=1, X=park_x, Y=park_y, F=9000) + "\n" + prepend_gcode += self.putValue(G = 1, X = park_x, Y = park_y, F = 9000) + "\n" if current_z < 15: - prepend_gcode += self.putValue(G=1, Z=15, F=300) + "\n" + prepend_gcode += self.putValue(G = 1, Z = 15, F = 300) + "\n" # Set extruder standby temperature - prepend_gcode += self.putValue(M=104, S=standby_temperature) + "; standby temperature\n" + prepend_gcode += self.putValue(M = 104, S = standby_temperature) + "; standby temperature\n" # Wait till the user continues printing - prepend_gcode += self.putValue(M=0) + ";Do the actual pause\n" + prepend_gcode += self.putValue(M = 0) + ";Do the actual pause\n" # Set extruder resume temperature prepend_gcode += self.putValue(M = 109, S = int(target_temperature.get(current_t, 0))) + "; resume temperature\n" # Push the filament back, if retraction_amount != 0: - prepend_gcode += self.putValue(G=1, E=retraction_amount, F=retraction_speed * 60) + "\n" + prepend_gcode += self.putValue(G = 1, E = retraction_amount, F = retraction_speed * 60) + "\n" # Optionally extrude material if extrude_amount != 0: - prepend_gcode += self.putValue(G=1, E=extrude_amount, F=extrude_speed * 60) + "\n" + prepend_gcode += self.putValue(G = 1, E = extrude_amount, F = extrude_speed * 60) + "\n" # and retract again, the properly primes the nozzle # when changing filament. if retraction_amount != 0: - prepend_gcode += self.putValue(G=1, E=-retraction_amount, F=retraction_speed * 60) + "\n" + prepend_gcode += self.putValue(G = 1, E = -retraction_amount, F = retraction_speed * 60) + "\n" # Move the head back - prepend_gcode += self.putValue(G=1, Z=current_z + 1, F=300) + "\n" - prepend_gcode += self.putValue(G=1, X=x, Y=y, F=9000) + "\n" + prepend_gcode += self.putValue(G = 1, Z = current_z + 1, F = 300) + "\n" + prepend_gcode += self.putValue(G = 1, X = x, Y = y, F = 9000) + "\n" if retraction_amount != 0: - prepend_gcode += self.putValue(G=1, E=retraction_amount, F=retraction_speed * 60) + "\n" - prepend_gcode += self.putValue(G=1, F=9000) + "\n" - prepend_gcode += self.putValue(M=82) + "\n" + prepend_gcode += self.putValue(G = 1, E = retraction_amount, F = retraction_speed * 60) + "\n" + prepend_gcode += self.putValue(G = 1, F = 9000) + "\n" + prepend_gcode += self.putValue(M = 82) + "\n" # reset extrude value to pre pause value - prepend_gcode += self.putValue(G=92, E=current_e) + "\n" + prepend_gcode += self.putValue(G = 92, E = current_e) + "\n" layer = prepend_gcode + layer From 3321b23925c0cd756efbae343fc028f13b4d7e87 Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Thu, 5 Jul 2018 16:31:56 +0200 Subject: [PATCH 048/174] Fixes for UM3NetworkPrinting --- .../ClusterUM3OutputDevice.py | 19 +++++++++++++------ .../UM3NetworkPrinting/DiscoverUM3Action.py | 8 ++++++-- plugins/UM3NetworkPrinting/SendMaterialJob.py | 2 +- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/plugins/UM3NetworkPrinting/ClusterUM3OutputDevice.py b/plugins/UM3NetworkPrinting/ClusterUM3OutputDevice.py index 8b3ceb7809..6a5da04429 100644 --- a/plugins/UM3NetworkPrinting/ClusterUM3OutputDevice.py +++ b/plugins/UM3NetworkPrinting/ClusterUM3OutputDevice.py @@ -1,7 +1,7 @@ # Copyright (c) 2018 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. -from typing import Any, cast, Set, Tuple, Union +from typing import Any, cast, Optional, Set, Tuple, Union from UM.FileHandler.FileHandler import FileHandler from UM.FileHandler.FileWriter import FileWriter #To choose based on the output file mode (text vs. binary). @@ -9,6 +9,7 @@ from UM.FileHandler.WriteFileJob import WriteFileJob #To call the file writer as from UM.Logger import Logger from UM.Settings.ContainerRegistry import ContainerRegistry from UM.i18n import i18nCatalog +from UM.Mesh.MeshWriter import MeshWriter # For typing from UM.Message import Message from UM.Qt.Duration import Duration, DurationFormat from UM.OutputDevice import OutputDeviceError #To show that something went wrong when writing. @@ -103,8 +104,10 @@ class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice): else: file_formats = CuraApplication.getInstance().getMeshFileHandler().getSupportedFileTypesWrite() + global_stack = CuraApplication.getInstance().getGlobalContainerStack() #Create a list from the supported file formats string. - machine_file_formats = CuraApplication.getInstance().getGlobalContainerStack().getMetaDataEntry("file_formats").split(";") + if global_stack: + machine_file_formats = global_stack.getMetaDataEntry("file_formats").split(";") machine_file_formats = [file_type.strip() for file_type in machine_file_formats] #Exception for UM3 firmware version >=4.4: UFP is now supported and should be the preferred file format. if "application/x-ufp" not in machine_file_formats and self.printerType == "ultimaker3" and Version(self.firmwareVersion) >= Version("4.4"): @@ -126,6 +129,9 @@ class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice): writer = CuraApplication.getInstance().getMeshFileHandler().getWriterByMimeType(cast(str, preferred_format["mime_type"])) #This function pauses with the yield, waiting on instructions on which printer it needs to print with. + if not writer: + Logger.log("e", "Missing file or mesh writer!") + return self._sending_job = self._sendPrintJob(writer, preferred_format, nodes) self._sending_job.send(None) #Start the generator. @@ -168,7 +174,7 @@ class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice): # \param preferred_format A dictionary containing some information about # what format to write to. This is necessary to create the correct buffer # types and file extension and such. - def _sendPrintJob(self, writer: FileWriter, preferred_format: Dict, nodes: List[SceneNode]): + def _sendPrintJob(self, writer: MeshWriter, preferred_format: Dict, nodes: List[SceneNode]): Logger.log("i", "Sending print job to printer.") if self._sending_gcode: self._error_message = Message( @@ -205,14 +211,14 @@ class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice): yield #To prevent having to catch the StopIteration exception. def _sendPrintJobWaitOnWriteJobFinished(self, job: WriteFileJob) -> None: - self._write_job_progress_message.hide() + if self._write_job_progress_message: + self._write_job_progress_message.hide() self._progress_message = Message(i18n_catalog.i18nc("@info:status", "Sending data to printer"), lifetime = 0, dismissable = False, progress = -1, title = i18n_catalog.i18nc("@info:title", "Sending Data")) self._progress_message.addAction("Abort", i18n_catalog.i18nc("@action:button", "Cancel"), icon = None, description = "") self._progress_message.actionTriggered.connect(self._progressMessageActionTriggered) self._progress_message.show() - parts = [] target_printer, preferred_format, stream = self._dummy_lambdas @@ -249,7 +255,8 @@ class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice): self.activePrinterChanged.emit() def _onPostPrintJobFinished(self, reply: QNetworkReply) -> None: - self._progress_message.hide() + if self._progress_message: + self._progress_message.hide() self._compressing_gcode = False self._sending_gcode = False diff --git a/plugins/UM3NetworkPrinting/DiscoverUM3Action.py b/plugins/UM3NetworkPrinting/DiscoverUM3Action.py index c51092ed98..988559a3f5 100644 --- a/plugins/UM3NetworkPrinting/DiscoverUM3Action.py +++ b/plugins/UM3NetworkPrinting/DiscoverUM3Action.py @@ -3,7 +3,7 @@ import os.path import time -from typing import Optional +from typing import cast, Optional from PyQt5.QtCore import pyqtSignal, pyqtProperty, pyqtSlot, QObject @@ -170,7 +170,11 @@ class DiscoverUM3Action(MachineAction): Logger.log("d", "Creating additional ui components for UM3.") # Create networking dialog - path = os.path.join(PluginRegistry.getInstance().getPluginPath("UM3NetworkPrinting"), "UM3InfoComponents.qml") + path = os.path.join(cast(str, PluginRegistry.getInstance().getPluginPath("UM3NetworkPrinting")), "UM3InfoComponents.qml") + if not path: + Logger.log("w", "Could not get QML path for UM3 network printing UI.") + return + self.__additional_components_view = CuraApplication.getInstance().createQmlComponent(path, {"manager": self}) if not self.__additional_components_view: Logger.log("w", "Could not create ui components for UM3.") diff --git a/plugins/UM3NetworkPrinting/SendMaterialJob.py b/plugins/UM3NetworkPrinting/SendMaterialJob.py index 02b5b68393..0ac38843a1 100644 --- a/plugins/UM3NetworkPrinting/SendMaterialJob.py +++ b/plugins/UM3NetworkPrinting/SendMaterialJob.py @@ -23,7 +23,7 @@ if TYPE_CHECKING: # # This way it won't freeze up the interface while sending those materials. class SendMaterialJob(Job): - def __init__(self, device: "ClusterUM3OutputDevice"): + def __init__(self, device: "ClusterUM3OutputDevice") -> None: super().__init__() self.device = device #type: ClusterUM3OutputDevice From b6364b28044b5267c032eb5e4789752f2f75305f Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Thu, 5 Jul 2018 16:35:57 +0200 Subject: [PATCH 049/174] Fixes for X3DReader --- plugins/X3DReader/X3DReader.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/X3DReader/X3DReader.py b/plugins/X3DReader/X3DReader.py index 44a2f1443a..f529f76509 100644 --- a/plugins/X3DReader/X3DReader.py +++ b/plugins/X3DReader/X3DReader.py @@ -42,7 +42,8 @@ class X3DReader(MeshReader): def __init__(self) -> None: super().__init__() self._supported_extensions = [".x3d"] - self._namespaces = {} + # TODO: Remove after testing because it appears to be unused + # self._namespaces = {} # Main entry point # Reads the file, returns a SceneNode (possibly with nested ones), or None From afd3ce205a093ef3cecbf96edff70f2143ef0337 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 5 Jul 2018 20:19:40 +0200 Subject: [PATCH 050/174] Use double quotes As per our code style. --- cura_app.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cura_app.py b/cura_app.py index a7059a3940..c3c766fdb1 100755 --- a/cura_app.py +++ b/cura_app.py @@ -12,14 +12,14 @@ from UM.Platform import Platform parser = argparse.ArgumentParser(prog = "cura", add_help = False) -parser.add_argument('--debug', - action='store_true', +parser.add_argument("--debug", + action="store_true", default = False, help = "Turn on the debug mode by setting this option." ) -parser.add_argument('--trigger-early-crash', - dest = 'trigger_early_crash', - action = 'store_true', +parser.add_argument("--trigger-early-crash", + dest = "trigger_early_crash", + action = "store_true", default = False, help = "FOR TESTING ONLY. Trigger an early crash to show the crash dialog." ) From 2c291e02bed5d27cd64005b95e49a1fe387d3f95 Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Fri, 6 Jul 2018 10:54:24 +0200 Subject: [PATCH 051/174] Revert "Fixes for StartSliceJob" This reverts commit 9ec5770a1c2f64c50aee6a279645320e5bff8fe0. --- plugins/CuraEngineBackend/StartSliceJob.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py index 8f31e8cd0a..237c1f2dda 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.py @@ -5,7 +5,7 @@ import numpy from string import Formatter from enum import IntEnum import time -from typing import Any, cast, Dict, List, Optional, Set +from typing import Any, Dict, List, Optional, Set import re import Arcus #For typing. @@ -114,7 +114,7 @@ class StartSliceJob(Job): self.setResult(StartJobResult.Error) return - stack = cast(ContainerStack, CuraApplication.getInstance().getGlobalContainerStack()) + stack = CuraApplication.getInstance().getGlobalContainerStack() if not stack: self.setResult(StartJobResult.Error) return @@ -216,11 +216,12 @@ class StartSliceJob(Job): if temp_list: object_groups.append(temp_list) - extruders_enabled = {position: stack.isEnabled for position, extruder in stack.extruders.items()} + extruders_enabled = {position: stack.isEnabled for position, stack in CuraApplication.getInstance().getGlobalContainerStack().extruders.items()} filtered_object_groups = [] has_model_with_disabled_extruders = False associated_disabled_extruders = set() for group in object_groups: + stack = CuraApplication.getInstance().getGlobalContainerStack() skip_group = False for node in group: extruder_position = node.callDecoration("getActiveExtruderPosition") @@ -324,11 +325,11 @@ class StartSliceJob(Job): # \param default_extruder_nr Stack nr to use when no stack nr is specified, defaults to the global stack def _expandGcodeTokens(self, value: str, default_extruder_nr: int = -1) -> str: if not self._all_extruders_settings: - global_stack = cast(ContainerStack, CuraApplication.getInstance().getGlobalContainerStack()) + global_stack = CuraApplication.getInstance().getGlobalContainerStack() # NB: keys must be strings for the string formatter self._all_extruders_settings = { - "-1": self._buildReplacementTokens(cast(ContainerStack, global_stack)) + "-1": self._buildReplacementTokens(global_stack) } for extruder_stack in ExtruderManager.getInstance().getMachineExtruders(global_stack.getId()): From 8e7399c442278cdc118b1c98bfd86593171e2708 Mon Sep 17 00:00:00 2001 From: Mark Date: Fri, 6 Jul 2018 10:56:09 +0200 Subject: [PATCH 052/174] Add correct typing --- plugins/UM3NetworkPrinting/ClusterUM3OutputDevice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/UM3NetworkPrinting/ClusterUM3OutputDevice.py b/plugins/UM3NetworkPrinting/ClusterUM3OutputDevice.py index 185430f3f3..c6e384a987 100644 --- a/plugins/UM3NetworkPrinting/ClusterUM3OutputDevice.py +++ b/plugins/UM3NetworkPrinting/ClusterUM3OutputDevice.py @@ -178,7 +178,7 @@ class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice): # \param preferred_format A dictionary containing some information about # what format to write to. This is necessary to create the correct buffer # types and file extension and such. - def _sendPrintJob(self, writer: MeshWriter, preferred_format: Dict, nodes: List[SceneNode]): + def _sendPrintJob(self, writer: FileWriter, preferred_format: Dict, nodes: List[SceneNode]): Logger.log("i", "Sending print job to printer.") if self._sending_gcode: self._error_message = Message( From c6b290e1e5fa3d2b496a98b4916b6acc1a39464d Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Fri, 6 Jul 2018 11:03:32 +0200 Subject: [PATCH 053/174] Fix broken slicing --- plugins/CuraEngineBackend/StartSliceJob.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py index 237c1f2dda..afa26a444e 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.py @@ -5,7 +5,7 @@ import numpy from string import Formatter from enum import IntEnum import time -from typing import Any, Dict, List, Optional, Set +from typing import Any, cast, Dict, List, Optional, Set import re import Arcus #For typing. @@ -216,12 +216,15 @@ class StartSliceJob(Job): if temp_list: object_groups.append(temp_list) - extruders_enabled = {position: stack.isEnabled for position, stack in CuraApplication.getInstance().getGlobalContainerStack().extruders.items()} + global_stack = CuraApplication.getInstance().getGlobalContainerStack() + if not global_stack: + return + extruders_enabled = {position: stack.isEnabled for position, stack in global_stack.extruders.items()} filtered_object_groups = [] has_model_with_disabled_extruders = False associated_disabled_extruders = set() for group in object_groups: - stack = CuraApplication.getInstance().getGlobalContainerStack() + stack = global_stack skip_group = False for node in group: extruder_position = node.callDecoration("getActiveExtruderPosition") @@ -325,7 +328,7 @@ class StartSliceJob(Job): # \param default_extruder_nr Stack nr to use when no stack nr is specified, defaults to the global stack def _expandGcodeTokens(self, value: str, default_extruder_nr: int = -1) -> str: if not self._all_extruders_settings: - global_stack = CuraApplication.getInstance().getGlobalContainerStack() + global_stack = cast(ContainerStack, CuraApplication.getInstance().getGlobalContainerStack()) # NB: keys must be strings for the string formatter self._all_extruders_settings = { From 1483571fda2ad158633ab506e377c6f8cb6701bf Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Fri, 6 Jul 2018 11:14:10 +0200 Subject: [PATCH 054/174] Show verbose msg when cmake test fails on Jenkins --- Jenkinsfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 83104aea18..ff4558625a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,5 +1,10 @@ parallel_nodes(['linux && cura', 'windows && cura']) { timeout(time: 2, unit: "HOURS") { + + environment { + CTEST_OUTPUT_ON_FAILURE = '1' + } + // Prepare building stage('Prepare') { // Ensure we start with a clean build directory. From c7b7521a30e047175aa591733f8308869633d59b Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Fri, 6 Jul 2018 11:21:54 +0200 Subject: [PATCH 055/174] WIP: Use shell to run make test on Jenkins --- Jenkinsfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index ff4558625a..29b2bef670 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -33,7 +33,8 @@ parallel_nodes(['linux && cura', 'windows && cura']) { // Try and run the unit tests. If this stage fails, we consider the build to be "unstable". stage('Unit Test') { try { - make('test') + //make('test') + sh "CTEST_OUTPUT_ON_FAILURE=1 make test" } catch(e) { currentBuild.result = "UNSTABLE" } From c3cd6f8052d53e8f0ef6acf944784707633140e8 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Fri, 6 Jul 2018 11:24:54 +0200 Subject: [PATCH 056/174] Restore Jenkinsfile --- Jenkinsfile | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 29b2bef670..de62b7ed5a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,10 +1,6 @@ parallel_nodes(['linux && cura', 'windows && cura']) { timeout(time: 2, unit: "HOURS") { - environment { - CTEST_OUTPUT_ON_FAILURE = '1' - } - // Prepare building stage('Prepare') { // Ensure we start with a clean build directory. @@ -33,8 +29,7 @@ parallel_nodes(['linux && cura', 'windows && cura']) { // Try and run the unit tests. If this stage fails, we consider the build to be "unstable". stage('Unit Test') { try { - //make('test') - sh "CTEST_OUTPUT_ON_FAILURE=1 make test" + make('test') } catch(e) { currentBuild.result = "UNSTABLE" } From 9c40b1de921b335d20a98a4eb6a5077f0ba68b8f Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Fri, 6 Jul 2018 15:13:04 +0200 Subject: [PATCH 057/174] Remove code that is likely for debugging CURA-5545 --- plugins/3MFReader/ThreeMFReader.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/plugins/3MFReader/ThreeMFReader.py b/plugins/3MFReader/ThreeMFReader.py index 6bfe920863..0280600834 100755 --- a/plugins/3MFReader/ThreeMFReader.py +++ b/plugins/3MFReader/ThreeMFReader.py @@ -169,8 +169,6 @@ class ThreeMFReader(MeshReader): archive = zipfile.ZipFile(file_name, "r") self._base_name = os.path.basename(file_name) parser = Savitar.ThreeMFParser() - with open("/tmp/test.xml", "wb") as f: - f.write(archive.open("3D/3dmodel.model").read()) scene_3mf = parser.parse(archive.open("3D/3dmodel.model").read()) self._unit = scene_3mf.getUnit() for node in scene_3mf.getSceneNodes(): From 6977b8de6e39d8bd7feab8b10d23ffd755f4b76e Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 9 Jul 2018 09:01:52 +0200 Subject: [PATCH 058/174] Make getValue return an int if it's an integer number This is a more generic solution to what's done in 7058ddbb66084bee9cd507ed69f031ec1262163e. Contributes to issue CURA-5491. --- plugins/PostProcessingPlugin/Script.py | 9 ++++++--- plugins/PostProcessingPlugin/scripts/PauseAtHeight.py | 6 +++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/plugins/PostProcessingPlugin/Script.py b/plugins/PostProcessingPlugin/Script.py index d844705f1c..cc839ca485 100644 --- a/plugins/PostProcessingPlugin/Script.py +++ b/plugins/PostProcessingPlugin/Script.py @@ -105,9 +105,12 @@ class Script: if m is None: return default try: - return float(m.group(0)) - except: - return default + return int(m.group(0)) + except ValueError: #Not an integer. + try: + return float(m.group(0)) + except ValueError: #Not a number at all. + return default ## Convenience function to produce a line of g-code. # diff --git a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py index c78351909d..a70a54559c 100644 --- a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py +++ b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py @@ -162,12 +162,12 @@ class PauseAtHeight(Script): #Track the latest printing temperature in order to resume at the correct temperature. if line.startswith("T"): - current_t = int(self.getValue(line, "T")) + current_t = self.getValue(line, "T") m = self.getValue(line, "M") - if m is not None and (int(m) == 104 or int(m) == 109) and self.getValue(line, "S") is not None: + if m is not None and (m == 104 or m == 109) and self.getValue(line, "S") is not None: extruder = current_t if self.getValue(line, "T") is not None: - extruder = int(self.getValue(line, "T")) + extruder = self.getValue(line, "T") target_temperature[extruder] = self.getValue(line, "S") if not layers_started: From 41857338cbd13d337742b4e000048e7f85c3e779 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 9 Jul 2018 09:27:11 +0200 Subject: [PATCH 059/174] Use firmware retraction and temperature control settings Instead of deriving this from the g-code flavour, just use the actual settings that are made to control these two properties. Contributes to issue CURA-5491. --- .../scripts/PauseAtHeight.py | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py index 4d8bee76f3..545db24048 100644 --- a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py +++ b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py @@ -1,5 +1,9 @@ +# Copyright (c) 2018 Ultimaker B.V. +# Cura is released under the terms of the LGPLv3 or higher. + from ..Script import Script -# from cura.Settings.ExtruderManager import ExtruderManager + +from UM.Application import Application #To get the current printer's settings. class PauseAtHeight(Script): def __init__(self): @@ -136,9 +140,10 @@ class PauseAtHeight(Script): layers_started = False redo_layers = self.getSettingValueByKey("redo_layers") standby_temperature = self.getSettingValueByKey("standby_temperature") + firmware_retract = Application.getInstance().getGlobalContainerStack().getProperty("machine_firmware_retract", "value") + control_temperatures = Application.getInstance().getGlobalContainerStack().getProperty("machine_nozzle_temp_enabled", "value") is_griffin = False - is_ultigcode = False # T = ExtruderManager.getInstance().getActiveExtruderStack().getProperty("material_print_temperature", "value") @@ -158,8 +163,6 @@ class PauseAtHeight(Script): for line in lines: if ";FLAVOR:Griffin" in line: is_griffin = True - if ";FLAVOR:UltiGCode" in line: - is_ultigcode = True # Fist positive layer reached if ";LAYER:0" in line: layers_started = True @@ -263,8 +266,8 @@ class PauseAtHeight(Script): # Retraction prepend_gcode += self.putValue(M = 83) + "\n" if retraction_amount != 0: - if is_ultigcode: - prepend_gcode += self.putValue(G = 10) + "; retract for ultigcode\n" + if firmware_retract: + prepend_gcode += self.putValue(G = 10) else: prepend_gcode += self.putValue(G = 1, E = -retraction_amount, F = retraction_speed * 60) + "\n" @@ -277,7 +280,7 @@ class PauseAtHeight(Script): if current_z < 15: prepend_gcode += self.putValue(G = 1, Z = 15, F = 300) + "\n" - if not is_ultigcode: # We don't know about what temperatures are used in ultigcode, so do not touch + if control_temperatures: # Set extruder standby temperature prepend_gcode += self.putValue(M = 104, S = standby_temperature) + "; standby temperature\n" @@ -285,7 +288,7 @@ class PauseAtHeight(Script): prepend_gcode += self.putValue(M = 0) + ";Do the actual pause\n" if not is_griffin: - if not is_ultigcode: # will be 0 for ultigcode + if control_temperatures: # Set extruder resume temperature prepend_gcode += self.putValue(M = 109, S = int(target_temperature.get(current_t, 0))) + "; resume temperature\n" @@ -306,8 +309,8 @@ class PauseAtHeight(Script): prepend_gcode += self.putValue(G = 1, Z = current_z + 1, F = 300) + "\n" prepend_gcode += self.putValue(G = 1, X = x, Y = y, F = 9000) + "\n" if retraction_amount != 0: - if is_ultigcode: - prepend_gcode += self.putValue(G = 11) + "; unretract for ultigcode\n" + if firmware_retract: + prepend_gcode += self.putValue(G = 11) else: prepend_gcode += self.putValue(G = 1, E = retraction_amount, F = retraction_speed * 60) + "\n" prepend_gcode += self.putValue(G = 1, F = 9000) + "\n" From 5af5aa9e3550163937d56bc2b9d5f314b73097fe Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Mon, 9 Jul 2018 09:57:31 +0200 Subject: [PATCH 060/174] Added reset profiles/materials and uninstall functionality and dialog. CURA-5389 --- cura/CuraPackageManager.py | 5 +- cura/Settings/MachineManager.py | 2 + .../ToolboxConfirmUninstallResetDialog.qml | 91 +++++++++++++++++++ plugins/Toolbox/src/Toolbox.py | 74 +++++++++++---- 4 files changed, 154 insertions(+), 18 deletions(-) create mode 100644 plugins/Toolbox/resources/qml/ToolboxConfirmUninstallResetDialog.qml diff --git a/cura/CuraPackageManager.py b/cura/CuraPackageManager.py index 0dfac6b84f..2a4f62e5fe 100644 --- a/cura/CuraPackageManager.py +++ b/cura/CuraPackageManager.py @@ -23,6 +23,7 @@ class CuraPackageManager(PackageManager): ## Returns a list of where the package is used # empty if it is never used. # It loops through all the package contents and see if some of the ids are used. + # The list consists of 3-tuples: (global_stack, extruder_nr, container_id) def packageUsed(self, package_id: str): ids = self.packageContainerIds(package_id) container_stacks = ContainerRegistry.getInstance().findContainerStacks() @@ -33,8 +34,8 @@ class CuraPackageManager(PackageManager): for global_stack in global_stacks: for extruder_nr, extruder_stack in global_stack.extruders.items(): if container_id == extruder_stack.material.getId() or container_id == extruder_stack.material.getMetaData().get("base_file"): - machine_with_materials.append((global_stack, extruder_nr)) + machine_with_materials.append((global_stack, extruder_nr, container_id)) if container_id == extruder_stack.quality.getId(): - machine_with_qualities.append((global_stack, extruder_nr)) + machine_with_qualities.append((global_stack, extruder_nr, container_id)) return machine_with_materials, machine_with_qualities diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index 10d32b0a70..4f6c7c179e 100755 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -1445,6 +1445,8 @@ class MachineManager(QObject): def setQualityGroup(self, quality_group: QualityGroup, no_dialog: bool = False, global_stack: Optional["GlobalStack"] = None) -> None: if global_stack is not None and global_stack != self._global_container_stack: global_stack.quality = quality_group.node_for_global.getContainer() + for extruder_nr, extruder_stack in global_stack.extruders.items(): + extruder_stack.quality = quality_group.nodes_for_extruders[extruder_nr].getContainer() return self.blurSettings.emit() diff --git a/plugins/Toolbox/resources/qml/ToolboxConfirmUninstallResetDialog.qml b/plugins/Toolbox/resources/qml/ToolboxConfirmUninstallResetDialog.qml new file mode 100644 index 0000000000..487e2db894 --- /dev/null +++ b/plugins/Toolbox/resources/qml/ToolboxConfirmUninstallResetDialog.qml @@ -0,0 +1,91 @@ +// Copyright (c) 2018 Ultimaker B.V. +// Cura is released under the terms of the LGPLv3 or higher. + +import QtQuick 2.2 +import QtQuick.Controls 1.1 +import QtQuick.Controls.Styles 1.1 +import QtQuick.Layouts 1.1 +import QtQuick.Dialogs 1.1 +import QtQuick.Window 2.1 + +import UM 1.3 as UM +import Cura 1.0 as Cura + + +UM.Dialog +{ + // This dialog asks the user whether he/she wants to open a project file as a project or import models. + id: base + + title: catalog.i18nc("@title:window", "Confirm uninstall ") + toolbox.pluginToUninstall + width: 450 * screenScaleFactor + height: 250 * screenScaleFactor + + maximumHeight: height + maximumWidth: width + minimumHeight: maximumHeight + minimumWidth: maximumWidth + + modality: UM.Application.platform == "linux" ? Qt.NonModal : Qt.WindowModal + + Column + { + UM.I18nCatalog { id: catalog; name: "cura" } + + anchors.fill: parent + anchors.leftMargin: 20 * screenScaleFactor + anchors.rightMargin: 20 * screenScaleFactor + anchors.bottomMargin: 10 * screenScaleFactor + spacing: 10 * screenScaleFactor + + Label + { + id: dialogText + text: + { + var base_text = catalog.i18nc("@text:window", "You are uninstalling materials and/or profiles that are still in use. Confirming will reset the following materials/profiles to their defaults.") + var materials_text = catalog.i18nc("@text:window", "Materials") + var qualities_text = catalog.i18nc("@text:window", "Profiles") + var machines_with_materials = toolbox.uninstallUsedMaterials + var machines_with_qualities = toolbox.uninstallUsedQualities + if (machines_with_materials != "") + { + base_text += "\n\n" + materials_text +": \n" + machines_with_materials + } + if (machines_with_qualities != "") + { + base_text += "\n\n" + qualities_text + ": \n" + machines_with_qualities + } + return base_text + } + anchors.left: parent.left + anchors.right: parent.right + font: UM.Theme.getFont("default") + wrapMode: Text.WordWrap + } + + // Buttons + Item { + id: buttonBar + anchors.right: parent.right + anchors.left: parent.left + height: childrenRect.height + + Button { + id: cancelButton + text: catalog.i18nc("@action:button", "Cancel") + anchors.right: confirmButton.left + anchors.rightMargin: UM.Theme.getSize("default_margin").width + isDefault: true + onClicked: toolbox.closeConfirmResetDialog() + } + + Button { + id: confirmButton + text: catalog.i18nc("@action:button", "Confirm") + anchors.right: parent.right + onClicked: toolbox.resetMaterialsQualitiesAndUninstall() + } + } + } +} diff --git a/plugins/Toolbox/src/Toolbox.py b/plugins/Toolbox/src/Toolbox.py index 3e0749d612..ad9481f892 100644 --- a/plugins/Toolbox/src/Toolbox.py +++ b/plugins/Toolbox/src/Toolbox.py @@ -102,6 +102,9 @@ class Toolbox(QObject, Extension): self._active_package = None # type: Optional[Dict[str, Any]] self._dialog = None #type: Optional[QObject] + self._confirm_reset_dialog = None #type: Optional[QObject] + self._resetUninstallVariables() + self._restart_required = False #type: bool # variables for the license agreement dialog @@ -130,6 +133,13 @@ class Toolbox(QObject, Extension): filterChanged = pyqtSignal() metadataChanged = pyqtSignal() showLicenseDialog = pyqtSignal() + uninstallVariablesChanged = pyqtSignal() + + def _resetUninstallVariables(self): + self._package_id_to_uninstall = None + self._package_name_to_uninstall = "" + self._package_used_materials = [] + self._package_used_qualities = [] @pyqtSlot(result = str) def getLicenseDialogPluginName(self) -> str: @@ -235,7 +245,6 @@ class Toolbox(QObject, Extension): dialog = self._application.createQmlComponent(path, {"toolbox": self}) return dialog - def _convertPluginMetadata(self, plugin: Dict[str, Any]) -> Dict[str, Any]: formatted = { "package_id": plugin["id"], @@ -298,24 +307,57 @@ class Toolbox(QObject, Extension): # If the package is in use, you'll get a confirmation dialog to set everything to default @pyqtSlot(str) def checkPackageUsageAndUninstall(self, plugin_id: str) -> None: - print("checkPackageUsageAndUninstall...") package_used_materials, package_used_qualities = self._package_manager.packageUsed(plugin_id) if package_used_materials or package_used_qualities: + # Set up "uninstall variables" for resetMaterialsQualitiesAndUninstall + self._package_id_to_uninstall = plugin_id + package_info = self._package_manager.getInstalledPackageInfo(plugin_id) + self._package_name_to_uninstall = package_info.get("display_name", package_info.get("package_id")) + self._package_used_materials = package_used_materials + self._package_used_qualities = package_used_qualities # Ask change to default material / profile - # Cancel: just return - # Confirm: change to default material / profile - material_manager = CuraApplication.getInstance().getMaterialManager() - quality_manager = CuraApplication.getInstance().getQualityManager() - machine_manager = CuraApplication.getInstance().getMachineManager() - for global_stack, extruder_nr in package_used_materials: - default_material_node = material_manager.getDefaultMaterial(global_stack, extruder_nr, global_stack.extruders[extruder_nr].variant.getName()) - machine_manager.setMaterial(extruder_nr, default_material_node, global_stack = global_stack) - for global_stack, extruder_nr in package_used_qualities: - default_quality_group = quality_manager.getDefaultQualityType(global_stack) - machine_manager.setQualityGroup(default_quality_group, global_stack = global_stack) - # Change to default material / profile - self.uninstall(plugin_id) - return + if self._confirm_reset_dialog is None: + self._confirm_reset_dialog = self._createDialog("ToolboxConfirmUninstallResetDialog.qml") + self.uninstallVariablesChanged.emit() + self._confirm_reset_dialog.show() + else: + # Plain uninstall + self.uninstall(plugin_id) + + @pyqtProperty(str, notify = uninstallVariablesChanged) + def pluginToUninstall(self): + return self._package_name_to_uninstall + + @pyqtProperty(str, notify = uninstallVariablesChanged) + def uninstallUsedMaterials(self): + return "\n".join(["%s (%s)" % (str(global_stack.getName()), material) for global_stack, extruder_nr, material in self._package_used_materials]) + + @pyqtProperty(str, notify = uninstallVariablesChanged) + def uninstallUsedQualities(self): + return "\n".join(["%s (%s)" % (str(global_stack.getName()), quality) for global_stack, extruder_nr, quality in self._package_used_qualities]) + + @pyqtSlot() + def closeConfirmResetDialog(self): + if self._confirm_reset_dialog is not None: + self._confirm_reset_dialog.close() + + ## Uses "uninstall variables" to reset qualities and materials, then uninstall + # It's used as an action on Confirm reset on Uninstall + @pyqtSlot() + def resetMaterialsQualitiesAndUninstall(self): + application = CuraApplication.getInstance() + material_manager = application.getMaterialManager() + quality_manager = application.getQualityManager() + machine_manager = application.getMachineManager() + for global_stack, extruder_nr, _ in self._package_used_materials: + default_material_node = material_manager.getDefaultMaterial(global_stack, extruder_nr, global_stack.extruders[extruder_nr].variant.getName()) + machine_manager.setMaterial(extruder_nr, default_material_node, global_stack = global_stack) + for global_stack, extruder_nr, _ in self._package_used_qualities: + default_quality_group = quality_manager.getDefaultQualityType(global_stack) + machine_manager.setQualityGroup(default_quality_group, global_stack = global_stack) + self.uninstall(self._package_id_to_uninstall) + self._resetUninstallVariables() + self.closeConfirmResetDialog() @pyqtSlot(str) def uninstall(self, plugin_id: str) -> None: From 853266e8a81cf87370387cc32bdfcf5e4f19006c Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Mon, 9 Jul 2018 10:57:24 +0200 Subject: [PATCH 061/174] Fix upgrade from 3.4 to 4.0 --- .../VersionUpgrade/VersionUpgrade34to40/VersionUpgrade34to40.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/VersionUpgrade/VersionUpgrade34to40/VersionUpgrade34to40.py b/plugins/VersionUpgrade/VersionUpgrade34to40/VersionUpgrade34to40.py index 2877985921..0cf7ef0cc4 100644 --- a/plugins/VersionUpgrade/VersionUpgrade34to40/VersionUpgrade34to40.py +++ b/plugins/VersionUpgrade/VersionUpgrade34to40/VersionUpgrade34to40.py @@ -71,6 +71,8 @@ class VersionUpgrade34to40(VersionUpgrade): self._resetConcentric3DInfillPattern(parser) if "values" in parser: for deleted_setting in deleted_settings: + if deleted_setting not in parser["values"]: + continue del parser["values"][deleted_setting] result = io.StringIO() From 54b990c0bd32dc7d2ee231a3453e89cb8440e954 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 9 Jul 2018 11:21:16 +0200 Subject: [PATCH 062/174] Retract further if we can't set the temperature to stand-by temp Because we can't set the temperature and we don't know the correct temperature to set it back to, we will just retract further in order to prevent damage to the material. Contributes to issue CURA-5491. --- .../PostProcessingPlugin/scripts/PauseAtHeight.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py index 545db24048..6354dd4f04 100644 --- a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py +++ b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py @@ -266,8 +266,10 @@ class PauseAtHeight(Script): # Retraction prepend_gcode += self.putValue(M = 83) + "\n" if retraction_amount != 0: - if firmware_retract: - prepend_gcode += self.putValue(G = 10) + if firmware_retract: #Can't set the distance directly to what the user wants. We have to choose ourselves. + retraction_count = 1 if control_temperatures else 3 #Retract more if we don't control the temperature. + for i in range(retraction_count): + prepend_gcode += self.putValue(G = 10) + "\n" else: prepend_gcode += self.putValue(G = 1, E = -retraction_amount, F = retraction_speed * 60) + "\n" @@ -309,8 +311,10 @@ class PauseAtHeight(Script): prepend_gcode += self.putValue(G = 1, Z = current_z + 1, F = 300) + "\n" prepend_gcode += self.putValue(G = 1, X = x, Y = y, F = 9000) + "\n" if retraction_amount != 0: - if firmware_retract: - prepend_gcode += self.putValue(G = 11) + if firmware_retract: #Can't set the distance directly to what the user wants. We have to choose ourselves. + retraction_count = 1 if control_temperatures else 3 #Retract more if we don't control the temperature. + for i in range(retraction_count): + prepend_gcode += self.putValue(G = 11) + "\n" else: prepend_gcode += self.putValue(G = 1, E = retraction_amount, F = retraction_speed * 60) + "\n" prepend_gcode += self.putValue(G = 1, F = 9000) + "\n" From ac0192f01f72c859effe05ae7ce9dc7a536d9220 Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Mon, 9 Jul 2018 11:29:25 +0200 Subject: [PATCH 063/174] Improve fixes --- plugins/CuraEngineBackend/CuraEngineBackend.py | 10 +++++++--- plugins/SliceInfoPlugin/SliceInfo.py | 10 +++++++--- plugins/Toolbox/src/Toolbox.py | 2 +- plugins/UM3NetworkPrinting/ClusterUM3OutputDevice.py | 7 +++++-- 4 files changed, 20 insertions(+), 9 deletions(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index 26a2399567..60436a3ef2 100755 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -486,8 +486,8 @@ class CuraEngineBackend(QObject, Backend): else: # we got a single scenenode if not source.callDecoration("isGroup"): - meshData = source.getMeshData(); - if meshData and meshData.getVertices() is None: + mesh_data = source.getMeshData() + if mesh_data and mesh_data.getVertices() is None: return build_plate_changed.add(source_build_plate_number) @@ -670,7 +670,11 @@ class CuraEngineBackend(QObject, Backend): ## Creates a new socket connection. def _createSocket(self, protocol_file: str = None) -> None: if not protocol_file: - protocol_file = os.path.abspath(os.path.join(str(PluginRegistry.getInstance().getPluginPath(self.getPluginId())), "Cura.proto")) + plugin_path = PluginRegistry.getInstance().getPluginPath(self.getPluginId()) + if not plugin_path: + Logger.log("e", "Could not get plugin path!", self.getPluginId()) + return + protocol_file = os.path.abspath(os.path.join(plugin_path, "Cura.proto")) super()._createSocket(protocol_file) self._engine_is_fresh = True diff --git a/plugins/SliceInfoPlugin/SliceInfo.py b/plugins/SliceInfoPlugin/SliceInfo.py index aad1b5005d..2e9e557c4a 100755 --- a/plugins/SliceInfoPlugin/SliceInfo.py +++ b/plugins/SliceInfoPlugin/SliceInfo.py @@ -16,7 +16,7 @@ from UM.i18n import i18nCatalog from UM.Logger import Logger from UM.PluginRegistry import PluginRegistry from UM.Qt.Duration import DurationFormat -from typing import cast +from typing import cast, Optional from .SliceInfoJob import SliceInfoJob @@ -79,9 +79,13 @@ class SliceInfo(QObject, Extension): return dialog @pyqtSlot(result = str) - def getExampleData(self) -> str: + def getExampleData(self) -> Optional[str]: if self._example_data_content is None: - file_path = os.path.join(cast(str, PluginRegistry.getInstance().getPluginPath(self.getPluginId())), "example_data.json") + plugin_path = PluginRegistry.getInstance().getPluginPath(self.getPluginId()) + if not plugin_path: + Logger.log("e", "Could not get plugin path!", self.getPluginId()) + return None + file_path = os.path.join(plugin_path, "example_data.json") if file_path: with open(file_path, "r", encoding = "utf-8") as f: self._example_data_content = f.read() diff --git a/plugins/Toolbox/src/Toolbox.py b/plugins/Toolbox/src/Toolbox.py index 762e7027fb..7c2605e5e0 100644 --- a/plugins/Toolbox/src/Toolbox.py +++ b/plugins/Toolbox/src/Toolbox.py @@ -234,7 +234,7 @@ class Toolbox(QObject, Extension): # Apply enabled/disabled state to installed plugins self.enabledChanged.emit() - def _createDialog(self, qml_name: str) -> QObject: + def _createDialog(self, qml_name: str) -> Optional[QObject]: Logger.log("d", "Toolbox: Creating dialog [%s].", qml_name) plugin_path = PluginRegistry.getInstance().getPluginPath(self.getPluginId()) if not plugin_path: diff --git a/plugins/UM3NetworkPrinting/ClusterUM3OutputDevice.py b/plugins/UM3NetworkPrinting/ClusterUM3OutputDevice.py index c6e384a987..b58601db46 100644 --- a/plugins/UM3NetworkPrinting/ClusterUM3OutputDevice.py +++ b/plugins/UM3NetworkPrinting/ClusterUM3OutputDevice.py @@ -106,8 +106,11 @@ class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice): global_stack = CuraApplication.getInstance().getGlobalContainerStack() #Create a list from the supported file formats string. - if global_stack: - machine_file_formats = global_stack.getMetaDataEntry("file_formats").split(";") + if not global_stack: + Logger.log("e", "Missing global stack!") + return; + + machine_file_formats = global_stack.getMetaDataEntry("file_formats").split(";") machine_file_formats = [file_type.strip() for file_type in machine_file_formats] #Exception for UM3 firmware version >=4.4: UFP is now supported and should be the preferred file format. if "application/x-ufp" not in machine_file_formats and self.printerType == "ultimaker3" and Version(self.firmwareVersion) >= Version("4.4"): From dec9d7cac661bce69356399ad112854329d2f799 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 9 Jul 2018 11:32:53 +0200 Subject: [PATCH 064/174] Still store disabled extruders as a set They should be unique anyway. Contributes to issue CURA-5456. --- plugins/CuraEngineBackend/StartSliceJob.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py index 20c426209f..e208c9480b 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.py @@ -227,7 +227,7 @@ class StartSliceJob(Job): if has_model_with_disabled_extruders: self.setResult(StartJobResult.ObjectsWithDisabledExtruder) - associated_disabled_extruders = [str(c) for c in sorted([int(p) + 1 for p in associated_disabled_extruders])] + associated_disabled_extruders = {str(c) for c in sorted([int(p) + 1 for p in associated_disabled_extruders])} self.setMessage(", ".join(associated_disabled_extruders)) return From f59f23c027a4918be96552eba9e33c44d7beefef Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 9 Jul 2018 11:41:02 +0200 Subject: [PATCH 065/174] Fix sending print job name via USB --- plugins/USBPrinting/USBPrinterOutputDevice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/USBPrinting/USBPrinterOutputDevice.py b/plugins/USBPrinting/USBPrinterOutputDevice.py index 69a0ecb40c..f9c6011f7b 100644 --- a/plugins/USBPrinting/USBPrinterOutputDevice.py +++ b/plugins/USBPrinting/USBPrinterOutputDevice.py @@ -423,7 +423,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice): elapsed_time = int(time() - self._print_start_time) print_job = self._printers[0].activePrintJob if print_job is None: - print_job = PrintJobOutputModel(output_controller = GenericOutputController(self), name= Application.getInstance().getPrintInformation().jobName) + print_job = PrintJobOutputModel(output_controller = GenericOutputController(self), name= CuraApplication.getInstance().getPrintInformation().jobName) print_job.updateState("printing") self._printers[0].updateActivePrintJob(print_job) From 111a3556d2ee9ff7f347be70dc7bfff785b3f277 Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Mon, 9 Jul 2018 11:42:30 +0200 Subject: [PATCH 066/174] Fixed possible errors and typing error. CURA-5389 --- cura/Machines/QualityManager.py | 2 +- cura/Settings/MachineManager.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/cura/Machines/QualityManager.py b/cura/Machines/QualityManager.py index d5d9c0e727..5e78c04900 100644 --- a/cura/Machines/QualityManager.py +++ b/cura/Machines/QualityManager.py @@ -340,7 +340,7 @@ class QualityManager(QObject): return quality_group_dict - def getDefaultQualityType(self, machine: "GlobalStack") -> QualityGroup: + def getDefaultQualityType(self, machine: "GlobalStack") -> Optional[QualityGroup]: preferred_quality_type = machine.definition.getMetaDataEntry("preferred_quality_type") quality_group_dict = self.getQualityGroups(machine) quality_group = quality_group_dict.get(preferred_quality_type) diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index 4f6c7c179e..772c01191c 100755 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -1444,6 +1444,12 @@ class MachineManager(QObject): @pyqtSlot(QObject) def setQualityGroup(self, quality_group: QualityGroup, no_dialog: bool = False, global_stack: Optional["GlobalStack"] = None) -> None: if global_stack is not None and global_stack != self._global_container_stack: + if quality_group is None: + Logger.log("e", "Could not set quality group because quality group is None") + return + if quality_group.node_for_global is None: + Logger.log("e", "Could not set quality group [%s] because it has no node_for_global", str(quality_group)) + return global_stack.quality = quality_group.node_for_global.getContainer() for extruder_nr, extruder_stack in global_stack.extruders.items(): extruder_stack.quality = quality_group.nodes_for_extruders[extruder_nr].getContainer() From 413965a0ee549c1ff215141a34e123c07229a947 Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Mon, 9 Jul 2018 11:51:53 +0200 Subject: [PATCH 067/174] Fighting muscle memory --- plugins/UM3NetworkPrinting/ClusterUM3OutputDevice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/UM3NetworkPrinting/ClusterUM3OutputDevice.py b/plugins/UM3NetworkPrinting/ClusterUM3OutputDevice.py index b58601db46..84e0a66170 100644 --- a/plugins/UM3NetworkPrinting/ClusterUM3OutputDevice.py +++ b/plugins/UM3NetworkPrinting/ClusterUM3OutputDevice.py @@ -108,7 +108,7 @@ class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice): #Create a list from the supported file formats string. if not global_stack: Logger.log("e", "Missing global stack!") - return; + return machine_file_formats = global_stack.getMetaDataEntry("file_formats").split(";") machine_file_formats = [file_type.strip() for file_type in machine_file_formats] From aa0c7d5f0ae52828c7d1680b5d37a7a62a1cb064 Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Mon, 9 Jul 2018 13:26:11 +0200 Subject: [PATCH 068/174] Confirm uninstall reset dialog now has proper sizing. CURA-5389 --- .../ToolboxConfirmUninstallResetDialog.qml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/plugins/Toolbox/resources/qml/ToolboxConfirmUninstallResetDialog.qml b/plugins/Toolbox/resources/qml/ToolboxConfirmUninstallResetDialog.qml index 487e2db894..a9d10eca2e 100644 --- a/plugins/Toolbox/resources/qml/ToolboxConfirmUninstallResetDialog.qml +++ b/plugins/Toolbox/resources/qml/ToolboxConfirmUninstallResetDialog.qml @@ -19,12 +19,12 @@ UM.Dialog title: catalog.i18nc("@title:window", "Confirm uninstall ") + toolbox.pluginToUninstall width: 450 * screenScaleFactor - height: 250 * screenScaleFactor + height: (30 + dialogText.height) * screenScaleFactor - maximumHeight: height - maximumWidth: width - minimumHeight: maximumHeight - minimumWidth: maximumWidth + maximumWidth: 450 * screenScaleFactor + maximumHeight: 450 * screenScaleFactor + minimumWidth: 450 * screenScaleFactor + minimumHeight: 150 * screenScaleFactor modality: UM.Application.platform == "linux" ? Qt.NonModal : Qt.WindowModal @@ -33,10 +33,11 @@ UM.Dialog UM.I18nCatalog { id: catalog; name: "cura" } anchors.fill: parent - anchors.leftMargin: 20 * screenScaleFactor - anchors.rightMargin: 20 * screenScaleFactor - anchors.bottomMargin: 10 * screenScaleFactor - spacing: 10 * screenScaleFactor + anchors.leftMargin: Math.round(20 * screenScaleFactor) + anchors.rightMargin: Math.round(20 * screenScaleFactor) + anchors.topMargin: Math.round(10 * screenScaleFactor) + anchors.bottomMargin: Math.round(10 * screenScaleFactor) + spacing: Math.round(15 * screenScaleFactor) Label { From 881449d380e0a2839f0130ee5c0b2e4b2bd79a80 Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Mon, 9 Jul 2018 14:12:54 +0200 Subject: [PATCH 069/174] Do not sync only with read_only material groups Fixes CURA-5548. --- cura/Machines/MaterialManager.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cura/Machines/MaterialManager.py b/cura/Machines/MaterialManager.py index 8b9fb2391c..5d691fcef4 100644 --- a/cura/Machines/MaterialManager.py +++ b/cura/Machines/MaterialManager.py @@ -378,9 +378,8 @@ class MaterialManager(QObject): # Look at the guid to material dictionary root_material_id = None for material_group in self._guid_material_groups_map[material_guid]: - if material_group.is_read_only: - root_material_id = material_group.root_material_node.metadata["id"] - break + root_material_id = material_group.root_material_node.metadata["id"] + break if not root_material_id: Logger.log("i", "Cannot find materials with guid [%s] ", material_guid) From 77bd6cf749e479d51570bbe5892593916edd72a0 Mon Sep 17 00:00:00 2001 From: Aleksei S Date: Mon, 9 Jul 2018 14:20:51 +0200 Subject: [PATCH 070/174] Read material weight from container CURA-5408 --- cura/Settings/ContainerManager.py | 11 ++++++++--- resources/qml/Preferences/MaterialView.qml | 6 ++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/cura/Settings/ContainerManager.py b/cura/Settings/ContainerManager.py index 657329aad4..859c0282ba 100644 --- a/cura/Settings/ContainerManager.py +++ b/cura/Settings/ContainerManager.py @@ -5,7 +5,7 @@ import os import urllib.parse import uuid from typing import Any -from typing import Dict, Union +from typing import Dict, Union, Optional from PyQt5.QtCore import QObject, QUrl, QVariant from PyQt5.QtWidgets import QMessageBox @@ -46,13 +46,18 @@ class ContainerManager(QObject): self._quality_manager = self._application.getQualityManager() self._container_name_filters = {} # type: Dict[str, Dict[str, Any]] - @pyqtSlot(str, str, result=str) - def getContainerMetaDataEntry(self, container_id, entry_name): + @pyqtSlot(str, str, str, result=str) + def getContainerMetaDataEntry(self, container_id, entry_name, sub_entry: Optional = None): metadatas = self._container_registry.findContainersMetadata(id = container_id) if not metadatas: Logger.log("w", "Could not get metadata of container %s because it was not found.", container_id) return "" + if sub_entry != "": + sub_data = metadatas[0].get(entry_name, "") + if sub_data: + return str(sub_data.get(sub_entry, "")) + return str(metadatas[0].get(entry_name, "")) ## Set a metadata entry of the specified container. diff --git a/resources/qml/Preferences/MaterialView.qml b/resources/qml/Preferences/MaterialView.qml index ad91f2ee9a..a7017d7f62 100644 --- a/resources/qml/Preferences/MaterialView.qml +++ b/resources/qml/Preferences/MaterialView.qml @@ -529,6 +529,12 @@ TabView { return materialPreferenceValues[material_guid][entry_name]; } + + var material_weight = Cura.ContainerManager.getContainerMetaDataEntry(base.containerId, "properties", "weight"); + if(material_weight != undefined && material_weight != "") + { + return material_weight + } return 0; } From 513bd4f84ae7620bcb521c47f84be64d59c5c8a5 Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Mon, 9 Jul 2018 14:36:38 +0200 Subject: [PATCH 071/174] Renamed packageContainerIds to getPackageContainerIds. CURA-5389 --- cura/CuraPackageManager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/CuraPackageManager.py b/cura/CuraPackageManager.py index 2a4f62e5fe..ff93c2b010 100644 --- a/cura/CuraPackageManager.py +++ b/cura/CuraPackageManager.py @@ -25,7 +25,7 @@ class CuraPackageManager(PackageManager): # It loops through all the package contents and see if some of the ids are used. # The list consists of 3-tuples: (global_stack, extruder_nr, container_id) def packageUsed(self, package_id: str): - ids = self.packageContainerIds(package_id) + ids = self.getPackageContainerIds(package_id) container_stacks = ContainerRegistry.getInstance().findContainerStacks() global_stacks = [container_stack for container_stack in container_stacks if isinstance(container_stack, GlobalStack)] machine_with_materials = [] From a596c5a034ae28aa3110a7e8b6baf279440b20da Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Mon, 9 Jul 2018 14:39:13 +0200 Subject: [PATCH 072/174] Code-style fixes Contributes to CURA-5408 --- resources/qml/Preferences/MaterialView.qml | 31 +++++++++++----------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/resources/qml/Preferences/MaterialView.qml b/resources/qml/Preferences/MaterialView.qml index a7017d7f62..bab0b703d2 100644 --- a/resources/qml/Preferences/MaterialView.qml +++ b/resources/qml/Preferences/MaterialView.qml @@ -515,7 +515,7 @@ TabView if(entry_name in materialPreferenceValues[material_guid] && materialPreferenceValues[material_guid][entry_name] == new_value) { // value has not changed - return + return; } materialPreferenceValues[material_guid][entry_name] = new_value; @@ -531,34 +531,33 @@ TabView } var material_weight = Cura.ContainerManager.getContainerMetaDataEntry(base.containerId, "properties", "weight"); - if(material_weight != undefined && material_weight != "") - { - return material_weight - } - return 0; + return material_weight || 0; } // update the display name of the material - function updateMaterialDisplayName (old_name, new_name) { + function updateMaterialDisplayName (old_name, new_name) + { // don't change when new name is the same if (old_name == new_name) { - return + return; } // update the values - base.materialManager.setMaterialName(base.currentMaterialNode, new_name) - materialProperties.name = new_name + base.materialManager.setMaterialName(base.currentMaterialNode, new_name); + materialProperties.name = new_name; } // update the type of the material - function updateMaterialType (old_type, new_type) { - base.setMetaDataEntry("material", old_type, new_type) - materialProperties.material= new_type + function updateMaterialType (old_type, new_type) + { + base.setMetaDataEntry("material", old_type, new_type); + materialProperties.material= new_type; } // update the brand of the material - function updateMaterialBrand (old_brand, new_brand) { - base.setMetaDataEntry("brand", old_brand, new_brand) - materialProperties.brand = new_brand + function updateMaterialBrand (old_brand, new_brand) + { + base.setMetaDataEntry("brand", old_brand, new_brand); + materialProperties.brand = new_brand; } } From e5a11c1f7b65f80a855451c7216e7eb5367e10a8 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Mon, 9 Jul 2018 15:12:41 +0200 Subject: [PATCH 073/174] Fix getContainerMetaDataEntry() CURA-5408 --- cura/Settings/ContainerManager.py | 12 ++++++------ resources/qml/SidebarHeader.qml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cura/Settings/ContainerManager.py b/cura/Settings/ContainerManager.py index 859c0282ba..216637db21 100644 --- a/cura/Settings/ContainerManager.py +++ b/cura/Settings/ContainerManager.py @@ -47,18 +47,18 @@ class ContainerManager(QObject): self._container_name_filters = {} # type: Dict[str, Dict[str, Any]] @pyqtSlot(str, str, str, result=str) - def getContainerMetaDataEntry(self, container_id, entry_name, sub_entry: Optional = None): + def getContainerMetaDataEntry(self, container_id, entry_name, sub_entry: Optional[str] = None): metadatas = self._container_registry.findContainersMetadata(id = container_id) if not metadatas: Logger.log("w", "Could not get metadata of container %s because it was not found.", container_id) return "" - if sub_entry != "": - sub_data = metadatas[0].get(entry_name, "") - if sub_data: - return str(sub_data.get(sub_entry, "")) + sub_data = metadatas[0].get(entry_name, "") + result = str(sub_data) + if sub_entry: + result = str(sub_data.get(sub_entry, "")) - return str(metadatas[0].get(entry_name, "")) + return result ## Set a metadata entry of the specified container. # diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index cf199fd12b..0e5ac852e8 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -408,7 +408,7 @@ Column { return false; } - return Cura.ContainerManager.getContainerMetaDataEntry(activeExtruder.material.id, "compatible") == "True" + return Cura.ContainerManager.getContainerMetaDataEntry(activeExtruder.material.id, "compatible", "") == "True" } } } From 8dab2a6696431aa6fd70644e3490e1bc79e3f23c Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Mon, 9 Jul 2018 15:33:41 +0200 Subject: [PATCH 074/174] Do not attempt to discard changed build plates --- plugins/CuraEngineBackend/CuraEngineBackend.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index 60436a3ef2..b893640939 100755 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -492,9 +492,6 @@ class CuraEngineBackend(QObject, Backend): build_plate_changed.add(source_build_plate_number) - # TODO: Commented out for code tests, discard() only takes 'int', and no explanation exists for this line - # build_plate_changed.discard(None) - build_plate_changed.discard(-1) # object not on build plate if not build_plate_changed: return From 5e30fdf0fe140f599fb19534d2373d25c2756fe7 Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Mon, 9 Jul 2018 15:54:54 +0200 Subject: [PATCH 075/174] Make sure searchPath is always a string --- run_mypy.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/run_mypy.py b/run_mypy.py index 2a2c72dbbe..43196fa7f1 100644 --- a/run_mypy.py +++ b/run_mypy.py @@ -5,6 +5,8 @@ import subprocess # A quick Python implementation of unix 'where' command. def where(exeName, searchPath=os.getenv("PATH")): + if searchPath is None: + searchPath = "" paths = searchPath.split(";" if sys.platform == "win32" else ":") for path in paths: candidatePath = os.path.join(path, exeName) From 1a32e90cd0276fadd29574c1412a0de3c5fbca5e Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Mon, 9 Jul 2018 16:13:40 +0200 Subject: [PATCH 076/174] WIP: Fix run_mypy.py for Windows --- run_mypy.py | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/run_mypy.py b/run_mypy.py index 43196fa7f1..66118b36fd 100644 --- a/run_mypy.py +++ b/run_mypy.py @@ -1,18 +1,20 @@ -#!env python +#!/usr/bin/env python import os import sys import subprocess + # A quick Python implementation of unix 'where' command. -def where(exeName, searchPath=os.getenv("PATH")): - if searchPath is None: - searchPath = "" - paths = searchPath.split(";" if sys.platform == "win32" else ":") +def where(exe_name: str, search_path: str = os.getenv("PATH")) -> str: + if search_path is None: + search_path = "" + paths = search_path.split(";" if sys.platform == "win32" else ":") for path in paths: - candidatePath = os.path.join(path, exeName) - if os.path.exists(candidatePath): - return candidatePath - return None + candidate_path = os.path.join(path, exe_name) + if os.path.exists(candidate_path): + return candidate_path + return "" + def findModules(path): result = [] @@ -21,6 +23,7 @@ def findModules(path): result.append(entry.name) return result + def main(): # Find Uranium via the PYTHONPATH var uraniumUMPath = where("UM", os.getenv("PYTHONPATH")) @@ -28,16 +31,16 @@ def main(): uraniumUMPath = os.path.join("..", "Uranium") uraniumPath = os.path.dirname(uraniumUMPath) - mypyPathParts = [".", os.path.join(".", "plugins"), os.path.join(".", "plugins", "VersionUpgrade"), - uraniumPath, os.path.join(uraniumPath, "stubs")] + mypy_path_parts = [".", os.path.join(".", "plugins"), os.path.join(".", "plugins", "VersionUpgrade"), + uraniumPath, os.path.join(uraniumPath, "stubs")] if sys.platform == "win32": - os.putenv("MYPYPATH", ";".join(mypyPathParts)) + os.putenv("MYPYPATH", ";".join(mypy_path_parts)) else: - os.putenv("MYPYPATH", ":".join(mypyPathParts)) + os.putenv("MYPYPATH", ":".join(mypy_path_parts)) # Mypy really needs to be run via its Python script otherwise it can't find its data files. - mypyExe = where("mypy.bat" if sys.platform == "win32" else "mypy") - mypyModule = os.path.join(os.path.dirname(mypyExe), "mypy") + mypy_exe = where("mypy.exe" if sys.platform == "win32" else "mypy") + mypy_module = os.path.join(os.path.dirname(mypy_exe), "mypy") plugins = findModules("plugins") plugins.sort() @@ -46,11 +49,14 @@ def main(): for mod in mods: print("------------- Checking module {mod}".format(**locals())) - result = subprocess.run([sys.executable, mypyModule, "-p", mod, "--ignore-missing-imports"]) + result = subprocess.run([sys.executable, mypy_module, "-p", mod, "--ignore-missing-imports"]) if result.returncode != 0: print("\nModule {mod} failed checking. :(".format(**locals())) return 1 else: print("\n\nDone checking. All is good.") return 0 -sys.exit(main()) + + +if __name__ == "__main__": + sys.exit(main()) From 08249a8b0648cad518c93b7ebbe7973d15aea487 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Mon, 9 Jul 2018 16:18:43 +0200 Subject: [PATCH 077/174] WIP: Fix run_mypy.py for Windows --- run_mypy.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/run_mypy.py b/run_mypy.py index 66118b36fd..3b75ecd2eb 100644 --- a/run_mypy.py +++ b/run_mypy.py @@ -39,8 +39,9 @@ def main(): os.putenv("MYPYPATH", ":".join(mypy_path_parts)) # Mypy really needs to be run via its Python script otherwise it can't find its data files. - mypy_exe = where("mypy.exe" if sys.platform == "win32" else "mypy") - mypy_module = os.path.join(os.path.dirname(mypy_exe), "mypy") + mypy_exe_name = "mypy.exe" if sys.platform == "win32" else "mypy" + mypy_exe_dir = where(mypy_exe_name) + mypy_module = os.path.join(os.path.dirname(mypy_exe_dir), mypy_exe_name) plugins = findModules("plugins") plugins.sort() @@ -49,7 +50,10 @@ def main(): for mod in mods: print("------------- Checking module {mod}".format(**locals())) - result = subprocess.run([sys.executable, mypy_module, "-p", mod, "--ignore-missing-imports"]) + if sys.platform == "win32": + result = subprocess.run([mypy_module, "-p", mod, "--ignore-missing-imports"]) + else: + result = subprocess.run([sys.executable, mypy_module, "-p", mod, "--ignore-missing-imports"]) if result.returncode != 0: print("\nModule {mod} failed checking. :(".format(**locals())) return 1 From de551ccf51916358927a2183bf223be58e23da9e Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Mon, 9 Jul 2018 16:22:59 +0200 Subject: [PATCH 078/174] WIP: Fix run_mypy on Windows via cmake --- run_mypy.py | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/run_mypy.py b/run_mypy.py index 3b75ecd2eb..27f07cd281 100644 --- a/run_mypy.py +++ b/run_mypy.py @@ -8,12 +8,24 @@ import subprocess def where(exe_name: str, search_path: str = os.getenv("PATH")) -> str: if search_path is None: search_path = "" - paths = search_path.split(";" if sys.platform == "win32" else ":") - for path in paths: + paths = search_path.split(os.pathsep) + result = "" + print(" -> sys.executable location: %s" % sys.executable) + sys_exec_dir = os.path.dirname(sys.executable) + root_dir = os.path.dirname(sys_exec_dir) + paths += [sys_exec_dir, + os.path.join(root_dir, "bin"), + os.path.join(root_dir, "scripts"), + ] + paths = set(paths) + + for path in sorted(paths): + print(" -> Searching %s" % path) candidate_path = os.path.join(path, exe_name) if os.path.exists(candidate_path): - return candidate_path - return "" + result = candidate_path + break + return result def findModules(path): @@ -42,6 +54,8 @@ def main(): mypy_exe_name = "mypy.exe" if sys.platform == "win32" else "mypy" mypy_exe_dir = where(mypy_exe_name) mypy_module = os.path.join(os.path.dirname(mypy_exe_dir), mypy_exe_name) + print("Found mypy exe path: %s" % mypy_exe_dir) + print("Found mypy module path: %s" % mypy_module) plugins = findModules("plugins") plugins.sort() From d709650def1d82845b9eb7034600e27101033a06 Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Tue, 10 Jul 2018 11:04:17 +0200 Subject: [PATCH 079/174] Try to ignore _process variable --- plugins/CuraEngineBackend/CuraEngineBackend.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index b893640939..2b3c2b29f8 100755 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -249,7 +249,7 @@ class CuraEngineBackend(QObject, Backend): if self._application.getPrintInformation() and build_plate_to_be_sliced == active_build_plate: self._application.getPrintInformation().setToZeroPrintInformation(build_plate_to_be_sliced) - if self._process is None: + if self._process is None: # type: ignore self._createSocket() self.stopSlicing() self._engine_is_fresh = False # Yes we're going to use the engine @@ -287,12 +287,12 @@ class CuraEngineBackend(QObject, Backend): if self._application.getUseExternalBackend(): return - if self._process is not None: + if self._process is not None: # type: ignore Logger.log("d", "Killing engine process") try: - self._process.terminate() - Logger.log("d", "Engine process is killed. Received return code %s", self._process.wait()) - self._process = None + self._process.terminate() # type: ignore + Logger.log("d", "Engine process is killed. Received return code %s", self._process.wait()) # type: ignore + self._process = None # type: ignore except Exception as e: # terminating a process that is already terminating causes an exception, silently ignore this. Logger.log("d", "Exception occurred while trying to kill the engine %s", str(e)) @@ -786,9 +786,9 @@ class CuraEngineBackend(QObject, Backend): # We should reset our state and start listening for new connections. def _onBackendQuit(self) -> None: if not self._restart: - if self._process: - Logger.log("d", "Backend quit with return code %s. Resetting process and socket.", self._process.wait()) - self._process = None + if self._process: # type: ignore + Logger.log("d", "Backend quit with return code %s. Resetting process and socket.", self._process.wait()) # type: ignore + self._process = None # type: ignore ## Called when the global container stack changes def _onGlobalStackChanged(self) -> None: From 33f74307987c92852eca3409cac732f55113358f Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 10 Jul 2018 12:03:59 +0200 Subject: [PATCH 080/174] Update change log for Cura 3.4.1 --- plugins/ChangeLogPlugin/ChangeLog.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/ChangeLogPlugin/ChangeLog.txt b/plugins/ChangeLogPlugin/ChangeLog.txt index 8da415df05..aefeb92ce5 100755 --- a/plugins/ChangeLogPlugin/ChangeLog.txt +++ b/plugins/ChangeLogPlugin/ChangeLog.txt @@ -1,4 +1,9 @@ - +[3.4.1] +*Bug fixes +- Fixed an issue that would occasionally cause an unnecessary extra skin wall to be printed, which increased print time. +- Fixed an issue in which supports were not generated on the initial layer, because the engine expected a brim to be in place. +- Conical and tree supports are now limited within the build plate volume. +- Fixed various startup crashes, including: copying of the version folder, errors while deleting packages, storing the old files, and losing data on install. [3.4.0] From e7c1d31beebd1fa028e5a99b1bc658d0f29ce987 Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Tue, 10 Jul 2018 13:14:11 +0200 Subject: [PATCH 081/174] Fixed change material diameter, changed signature of getContainerMetaDataEntry. CURA-5408 --- cura/Settings/ContainerManager.py | 76 ++++------------------ resources/qml/Preferences/MaterialView.qml | 6 +- 2 files changed, 13 insertions(+), 69 deletions(-) diff --git a/cura/Settings/ContainerManager.py b/cura/Settings/ContainerManager.py index 216637db21..2b8ff4a234 100644 --- a/cura/Settings/ContainerManager.py +++ b/cura/Settings/ContainerManager.py @@ -46,19 +46,21 @@ class ContainerManager(QObject): self._quality_manager = self._application.getQualityManager() self._container_name_filters = {} # type: Dict[str, Dict[str, Any]] - @pyqtSlot(str, str, str, result=str) - def getContainerMetaDataEntry(self, container_id, entry_name, sub_entry: Optional[str] = None): + @pyqtSlot(str, str, result=str) + def getContainerMetaDataEntry(self, container_id: str, entry_names: str) -> str: metadatas = self._container_registry.findContainersMetadata(id = container_id) if not metadatas: Logger.log("w", "Could not get metadata of container %s because it was not found.", container_id) return "" - sub_data = metadatas[0].get(entry_name, "") - result = str(sub_data) - if sub_entry: - result = str(sub_data.get(sub_entry, "")) - - return result + entries = entry_names.split("/") + result = metadatas[0] + while entries: + entry = entries.pop(0) + result = result.get(entry, {}) + if not result: + return "" + return str(result) ## Set a metadata entry of the specified container. # @@ -73,6 +75,7 @@ class ContainerManager(QObject): # # \return True if successful, False if not. # TODO: This is ONLY used by MaterialView for material containers. Maybe refactor this. + # Update: In order for QML to use objects and sub objects, those (sub) objects must all be QObject. Is that what we want? @pyqtSlot("QVariant", str, str) def setContainerMetaDataEntry(self, container_node, entry_name, entry_value): root_material_id = container_node.metadata["base_file"] @@ -107,63 +110,6 @@ class ContainerManager(QObject): if sub_item_changed: #If it was only a sub-item that has changed then the setMetaDataEntry won't correctly notice that something changed, and we must manually signal that the metadata changed. container.metaDataChanged.emit(container) - ## Set a setting property of the specified container. - # - # This will set the specified property of the specified setting of the container - # and all containers that share the same base_file (if any). The latter only - # happens for material containers. - # - # \param container_id \type{str} The ID of the container to change. - # \param setting_key \type{str} The key of the setting. - # \param property_name \type{str} The name of the property, eg "value". - # \param property_value \type{str} The new value of the property. - # - # \return True if successful, False if not. - @pyqtSlot(str, str, str, str, result = bool) - def setContainerProperty(self, container_id, setting_key, property_name, property_value): - if self._container_registry.isReadOnly(container_id): - Logger.log("w", "Cannot set properties of read-only container %s.", container_id) - return False - - containers = self._container_registry.findContainers(id = container_id) - if not containers: - Logger.log("w", "Could not set properties of container %s because it was not found.", container_id) - return False - - container = containers[0] - - container.setProperty(setting_key, property_name, property_value) - - basefile = container.getMetaDataEntry("base_file", container_id) - for sibbling_container in self._container_registry.findInstanceContainers(base_file = basefile): - if sibbling_container != container: - sibbling_container.setProperty(setting_key, property_name, property_value) - - return True - - ## Get a setting property of the specified container. - # - # This will get the specified property of the specified setting of the - # specified container. - # - # \param container_id The ID of the container to get the setting property - # of. - # \param setting_key The key of the setting to get the property of. - # \param property_name The property to obtain. - # \return The value of the specified property. The type of this property - # value depends on the type of the property. For instance, the "value" - # property of an integer setting will be a Python int, but the "value" - # property of an enum setting will be a Python str. - @pyqtSlot(str, str, str, result = QVariant) - def getContainerProperty(self, container_id: str, setting_key: str, property_name: str): - containers = self._container_registry.findContainers(id = container_id) - if not containers: - Logger.log("w", "Could not get properties of container %s because it was not found.", container_id) - return "" - container = containers[0] - - return container.getProperty(setting_key, property_name) - @pyqtSlot(str, result = str) def makeUniqueName(self, original_name): return self._container_registry.uniqueName(original_name) diff --git a/resources/qml/Preferences/MaterialView.qml b/resources/qml/Preferences/MaterialView.qml index bab0b703d2..528ea448cc 100644 --- a/resources/qml/Preferences/MaterialView.qml +++ b/resources/qml/Preferences/MaterialView.qml @@ -103,7 +103,6 @@ TabView onYes: { - Cura.ContainerManager.setContainerProperty(base.containerId, "material_diameter", "value", new_diameter_value); base.setMetaDataEntry("approximate_diameter", old_approximate_diameter_value, getApproximateDiameter(new_diameter_value).toString()); base.setMetaDataEntry("properties/diameter", properties.diameter, new_diameter_value); } @@ -230,7 +229,7 @@ TabView { // This does not use a SettingPropertyProvider, because we need to make the change to all containers // which derive from the same base_file - var old_diameter = Cura.ContainerManager.getContainerProperty(base.containerId, "material_diameter", "value").toString(); + var old_diameter = Cura.ContainerManager.getContainerMetaDataEntry(base.containerId, "properties/diameter"); var old_approximate_diameter = Cura.ContainerManager.getContainerMetaDataEntry(base.containerId, "approximate_diameter"); var new_approximate_diameter = getApproximateDiameter(value); if (new_approximate_diameter != Cura.ExtruderManager.getActiveExtruderStack().approximateMaterialDiameter) @@ -242,7 +241,6 @@ TabView confirmDiameterChangeDialog.open() } else { - Cura.ContainerManager.setContainerProperty(base.containerId, "material_diameter", "value", value); base.setMetaDataEntry("approximate_diameter", old_approximate_diameter, getApproximateDiameter(value).toString()); base.setMetaDataEntry("properties/diameter", properties.diameter, value); } @@ -530,7 +528,7 @@ TabView return materialPreferenceValues[material_guid][entry_name]; } - var material_weight = Cura.ContainerManager.getContainerMetaDataEntry(base.containerId, "properties", "weight"); + var material_weight = Cura.ContainerManager.getContainerMetaDataEntry(base.containerId, "properties/weight"); return material_weight || 0; } From f0ef236df083af3f6900e08d821ad70bd808a24d Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 10 Jul 2018 13:33:30 +0200 Subject: [PATCH 082/174] Change tab to spaces --- resources/definitions/raise3D_N2_plus_single.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/definitions/raise3D_N2_plus_single.def.json b/resources/definitions/raise3D_N2_plus_single.def.json index 55b8c9c8c5..b829147160 100644 --- a/resources/definitions/raise3D_N2_plus_single.def.json +++ b/resources/definitions/raise3D_N2_plus_single.def.json @@ -67,7 +67,7 @@ }, "machine_start_gcode": { "default_value": "G90\nG21\n; home all axes\nG28\nG92 X0 Y0 Z0\n; move heatbed into position\nG1 X20.0 Y20.0 Z1.0 F1000\n; zero extruders\nG92 E0 E1\nT0; right tool\n; set extruder steps per mm\nM92 E140\n; purge nozzle\nG1 E25 F250\n; zero extruders\nG92 E0 E1\n; move heatbed down a little more\nG1 Z5.0 F20\n; wait 600ms\nG4 600\n; move to tack down the strands\nG1 X20.0 Y30.0 Z0 F9000\n; wait 600ms\nG4 600\n;move up a bit\nG1 Z5.0 F9000\n; wait 300ms\nG4 300\n;fast move to center\nG1 X152.5 Y152.5 F9000\nT0\n;Raise3D Job Start\nM117 Printing…\nM1001\n" - }, + }, "machine_end_gcode": { "default_value": "M107\nM1002\nM104 S0 T1\nM104 S0 T0\nM140 S0\nM117 Print Complete.\nG28 X0 Y0\nG91\nG1 Z10\nG90\nM84" }, From cc5f35dd9181d6a951deeb2e2b007314df3705e3 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Tue, 10 Jul 2018 14:57:01 +0200 Subject: [PATCH 083/174] Rename some functions and variables --- cura/CuraPackageManager.py | 3 +-- plugins/Toolbox/src/Toolbox.py | 14 +++++++------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/cura/CuraPackageManager.py b/cura/CuraPackageManager.py index ff93c2b010..95b381989f 100644 --- a/cura/CuraPackageManager.py +++ b/cura/CuraPackageManager.py @@ -4,7 +4,6 @@ from cura.CuraApplication import CuraApplication #To find some resource types. from cura.Settings.GlobalStack import GlobalStack -from UM.Logger import Logger from UM.PackageManager import PackageManager #The class we're extending. from UM.Resources import Resources #To find storage paths for some resource types. from UM.Settings.ContainerRegistry import ContainerRegistry @@ -24,7 +23,7 @@ class CuraPackageManager(PackageManager): # empty if it is never used. # It loops through all the package contents and see if some of the ids are used. # The list consists of 3-tuples: (global_stack, extruder_nr, container_id) - def packageUsed(self, package_id: str): + def getMachinesUsingPackage(self, package_id: str): ids = self.getPackageContainerIds(package_id) container_stacks = ContainerRegistry.getInstance().findContainerStacks() global_stacks = [container_stack for container_stack in container_stacks if isinstance(container_stack, GlobalStack)] diff --git a/plugins/Toolbox/src/Toolbox.py b/plugins/Toolbox/src/Toolbox.py index 90d135c289..4e59fcd055 100644 --- a/plugins/Toolbox/src/Toolbox.py +++ b/plugins/Toolbox/src/Toolbox.py @@ -314,12 +314,12 @@ class Toolbox(QObject, Extension): ## Check package usage and uninstall # If the package is in use, you'll get a confirmation dialog to set everything to default @pyqtSlot(str) - def checkPackageUsageAndUninstall(self, plugin_id: str) -> None: - package_used_materials, package_used_qualities = self._package_manager.packageUsed(plugin_id) + def checkPackageUsageAndUninstall(self, package_id: str) -> None: + package_used_materials, package_used_qualities = self._package_manager.getMachinesUsingPackage(package_id) if package_used_materials or package_used_qualities: # Set up "uninstall variables" for resetMaterialsQualitiesAndUninstall - self._package_id_to_uninstall = plugin_id - package_info = self._package_manager.getInstalledPackageInfo(plugin_id) + self._package_id_to_uninstall = package_id + package_info = self._package_manager.getInstalledPackageInfo(package_id) self._package_name_to_uninstall = package_info.get("display_name", package_info.get("package_id")) self._package_used_materials = package_used_materials self._package_used_qualities = package_used_qualities @@ -330,7 +330,7 @@ class Toolbox(QObject, Extension): self._confirm_reset_dialog.show() else: # Plain uninstall - self.uninstall(plugin_id) + self.uninstall(package_id) @pyqtProperty(str, notify = uninstallVariablesChanged) def pluginToUninstall(self): @@ -368,8 +368,8 @@ class Toolbox(QObject, Extension): self.closeConfirmResetDialog() @pyqtSlot(str) - def uninstall(self, plugin_id: str) -> None: - self._package_manager.removePackage(plugin_id, force_add = True) + def uninstall(self, package_id: str) -> None: + self._package_manager.removePackage(package_id, force_add = True) self.installChanged.emit() self._updateInstalledModels() self.metadataChanged.emit() From 16226bdd4801026e0b7bb049eb34147ee80f1ab9 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 9 Jul 2018 16:43:41 +0200 Subject: [PATCH 084/174] Move exclude_materials into the material profiles An accompanying commit should be done in the fdm_materials repository. Contributes to issue CURA-5460. --- resources/definitions/ultimaker.def.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/resources/definitions/ultimaker.def.json b/resources/definitions/ultimaker.def.json index a980a1afdf..1ca7444d04 100644 --- a/resources/definitions/ultimaker.def.json +++ b/resources/definitions/ultimaker.def.json @@ -6,8 +6,7 @@ "author": "Ultimaker", "manufacturer": "Ultimaker B.V.", "category": "Ultimaker", - "visible": false, - "exclude_materials": [ "generic_hips", "generic_petg" ] + "visible": false }, "overrides": { "machine_max_feedrate_e": { From c0fc0a7eba1b44c2cf94d964f7d0c5c641a0a1aa Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 9 Jul 2018 17:06:05 +0200 Subject: [PATCH 085/174] Disable material if not compatible Similar to how it's displayed in the printer. Contributes to issue CURA-5460. --- cura/Machines/Models/BaseMaterialsModel.py | 4 +++- cura/Machines/Models/BrandMaterialsModel.py | 3 ++- cura/Machines/Models/GenericMaterialsModel.py | 5 +++-- resources/qml/Menus/MaterialMenu.qml | 1 + resources/qml/SidebarHeader.qml | 6 +++--- 5 files changed, 12 insertions(+), 7 deletions(-) diff --git a/cura/Machines/Models/BaseMaterialsModel.py b/cura/Machines/Models/BaseMaterialsModel.py index 4759c8b5b0..4d0b9eea36 100644 --- a/cura/Machines/Models/BaseMaterialsModel.py +++ b/cura/Machines/Models/BaseMaterialsModel.py @@ -21,10 +21,11 @@ class BaseMaterialsModel(ListModel): MaterialRole = Qt.UserRole + 5 ColorRole = Qt.UserRole + 6 ContainerNodeRole = Qt.UserRole + 7 + CompatibleRole = Qt.UserRole + 8 extruderPositionChanged = pyqtSignal() - def __init__(self, parent = None): + def __init__(self, parent = None) -> None: super().__init__(parent) self._application = Application.getInstance() self._machine_manager = self._application.getMachineManager() @@ -36,6 +37,7 @@ class BaseMaterialsModel(ListModel): self.addRoleName(self.MaterialRole, "material") self.addRoleName(self.ColorRole, "color_name") self.addRoleName(self.ContainerNodeRole, "container_node") + self.addRoleName(self.CompatibleRole, "compatible") self._extruder_position = 0 self._extruder_stack = None diff --git a/cura/Machines/Models/BrandMaterialsModel.py b/cura/Machines/Models/BrandMaterialsModel.py index 236f105d12..5adc3d10fd 100644 --- a/cura/Machines/Models/BrandMaterialsModel.py +++ b/cura/Machines/Models/BrandMaterialsModel.py @@ -122,7 +122,8 @@ class BrandMaterialsModel(ListModel): "brand": metadata["brand"], "material": metadata["material"], "color_name": metadata["color_name"], - "container_node": container_node + "container_node": container_node, + "compatible": metadata.get("compatible", "unknown") } brand_group_dict[brand][material_type].append(item) diff --git a/cura/Machines/Models/GenericMaterialsModel.py b/cura/Machines/Models/GenericMaterialsModel.py index 2fac919f3e..48f4c4ea50 100644 --- a/cura/Machines/Models/GenericMaterialsModel.py +++ b/cura/Machines/Models/GenericMaterialsModel.py @@ -19,7 +19,7 @@ class GenericMaterialsModel(BaseMaterialsModel): self._material_manager.materialsUpdated.connect(self._update) #Update when the list of materials changes. self._update() - def _update(self): + def _update(self) -> None: Logger.log("d", "Updating {model_class_name}.".format(model_class_name = self.__class__.__name__)) global_stack = self._machine_manager.activeMachine @@ -51,7 +51,8 @@ class GenericMaterialsModel(BaseMaterialsModel): "brand": metadata["brand"], "material": metadata["material"], "color_name": metadata["color_name"], - "container_node": container_node + "container_node": container_node, + "compatible": metadata.get("compatible", "unknown") } item_list.append(item) diff --git a/resources/qml/Menus/MaterialMenu.qml b/resources/qml/Menus/MaterialMenu.qml index 64b3130724..c2de8f31e9 100644 --- a/resources/qml/Menus/MaterialMenu.qml +++ b/resources/qml/Menus/MaterialMenu.qml @@ -22,6 +22,7 @@ Menu text: model.name checkable: true checked: model.root_material_id == Cura.MachineManager.currentRootMaterialId[extruderIndex] + enabled: model.compatible exclusiveGroup: group onTriggered: { diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index 0e5ac852e8..d39e2b9416 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -1,5 +1,5 @@ -// Copyright (c) 2017 Ultimaker B.V. -// Cura is released under the terms of the LGPLv3 or higher. +//Copyright (c) 2018 Ultimaker B.V. +//Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.7 import QtQuick.Controls 1.1 @@ -402,7 +402,7 @@ Column property var valueError: !isMaterialSupported() property var valueWarning: ! Cura.MachineManager.isActiveQualitySupported - function isMaterialSupported () + function isMaterialSupported() { if (!hasActiveExtruder) { From f712fc0f362a943f73a09e9caa4d17f7353f42b2 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 9 Jul 2018 17:29:45 +0200 Subject: [PATCH 086/174] No longer add incompatible materials to materials menus This removes the need for the 'compatible' role but I'll keep it in for now in case we want to change the design of this later. Contributes to issue CURA-5460. --- cura/Machines/Models/BrandMaterialsModel.py | 4 +++- cura/Machines/Models/GenericMaterialsModel.py | 4 +++- resources/qml/Menus/MaterialMenu.qml | 1 - 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/cura/Machines/Models/BrandMaterialsModel.py b/cura/Machines/Models/BrandMaterialsModel.py index 5adc3d10fd..dd286490ff 100644 --- a/cura/Machines/Models/BrandMaterialsModel.py +++ b/cura/Machines/Models/BrandMaterialsModel.py @@ -108,6 +108,8 @@ class BrandMaterialsModel(ListModel): # Only add results for generic materials if brand.lower() == "generic": continue + if not metadata.get("compatible", True): + continue if brand not in brand_group_dict: brand_group_dict[brand] = {} @@ -123,7 +125,7 @@ class BrandMaterialsModel(ListModel): "material": metadata["material"], "color_name": metadata["color_name"], "container_node": container_node, - "compatible": metadata.get("compatible", "unknown") + "compatible": metadata.get("compatible", True) } brand_group_dict[brand][material_type].append(item) diff --git a/cura/Machines/Models/GenericMaterialsModel.py b/cura/Machines/Models/GenericMaterialsModel.py index 48f4c4ea50..1580e7ff0c 100644 --- a/cura/Machines/Models/GenericMaterialsModel.py +++ b/cura/Machines/Models/GenericMaterialsModel.py @@ -44,6 +44,8 @@ class GenericMaterialsModel(BaseMaterialsModel): # Only add results for generic materials if metadata["brand"].lower() != "generic": continue + if not metadata.get("compatible", True): + continue item = {"root_material_id": root_material_id, "id": metadata["id"], @@ -52,7 +54,7 @@ class GenericMaterialsModel(BaseMaterialsModel): "material": metadata["material"], "color_name": metadata["color_name"], "container_node": container_node, - "compatible": metadata.get("compatible", "unknown") + "compatible": metadata.get("compatible", True) } item_list.append(item) diff --git a/resources/qml/Menus/MaterialMenu.qml b/resources/qml/Menus/MaterialMenu.qml index c2de8f31e9..64b3130724 100644 --- a/resources/qml/Menus/MaterialMenu.qml +++ b/resources/qml/Menus/MaterialMenu.qml @@ -22,7 +22,6 @@ Menu text: model.name checkable: true checked: model.root_material_id == Cura.MachineManager.currentRootMaterialId[extruderIndex] - enabled: model.compatible exclusiveGroup: group onTriggered: { From a18f77abdd0b7a7c46f17f4c09423378e66f5a51 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 10 Jul 2018 09:24:10 +0200 Subject: [PATCH 087/174] Move exclude_materials into material profiles They are there not 'hardware compatible' any more. Contributes to issue CURA-5460. --- resources/definitions/ultimaker2.def.json | 1 - resources/definitions/ultimaker_original.def.json | 1 - resources/definitions/ultimaker_original_dual.def.json | 1 - 3 files changed, 3 deletions(-) diff --git a/resources/definitions/ultimaker2.def.json b/resources/definitions/ultimaker2.def.json index aa684946c2..c45c3444ca 100644 --- a/resources/definitions/ultimaker2.def.json +++ b/resources/definitions/ultimaker2.def.json @@ -14,7 +14,6 @@ "platform_offset": [9, 0, 0], "has_materials": false, "has_machine_quality": true, - "exclude_materials": ["generic_hips", "generic_petg", "generic_bam", "ultimaker_bam", "generic_pva", "ultimaker_pva", "generic_tough_pla", "ultimaker_tough_pla_black", "ultimaker_tough_pla_green", "ultimaker_tough_pla_red", "ultimaker_tough_pla_white"], "first_start_actions": ["UM2UpgradeSelection"], "supported_actions":["UM2UpgradeSelection", "UpgradeFirmware"], "machine_extruder_trains": diff --git a/resources/definitions/ultimaker_original.def.json b/resources/definitions/ultimaker_original.def.json index c961423504..423312fcce 100644 --- a/resources/definitions/ultimaker_original.def.json +++ b/resources/definitions/ultimaker_original.def.json @@ -12,7 +12,6 @@ "platform": "ultimaker_platform.stl", "has_materials": true, "has_machine_quality": true, - "exclude_materials": ["generic_hips", "generic_petg", "generic_bam", "ultimaker_bam", "generic_pva", "ultimaker_pva", "generic_tough_pla", "ultimaker_tough_pla_black", "ultimaker_tough_pla_green", "ultimaker_tough_pla_red", "ultimaker_tough_pla_white"], "first_start_actions": ["UMOUpgradeSelection", "UMOCheckup", "BedLevel"], "supported_actions": ["UMOUpgradeSelection", "UMOCheckup", "BedLevel", "UpgradeFirmware"], "machine_extruder_trains": diff --git a/resources/definitions/ultimaker_original_dual.def.json b/resources/definitions/ultimaker_original_dual.def.json index 55eddba85f..6c0aa739d9 100644 --- a/resources/definitions/ultimaker_original_dual.def.json +++ b/resources/definitions/ultimaker_original_dual.def.json @@ -13,7 +13,6 @@ "has_materials": true, "has_machine_quality": true, "quality_definition": "ultimaker_original", - "exclude_materials": ["generic_hips", "generic_petg", "generic_bam", "ultimaker_bam", "generic_pva", "ultimaker_pva", "generic_tough_pla", "ultimaker_tough_pla_black", "ultimaker_tough_pla_green", "ultimaker_tough_pla_red", "ultimaker_tough_pla_white"], "machine_extruder_trains": { "0": "ultimaker_original_dual_1st", From f5c9458e86fa0952022b1d633de87e116cb2268f Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 10 Jul 2018 09:37:52 +0200 Subject: [PATCH 088/174] Remove mechanism for exclude_materials The fields were gone from the data, but now we remove the mechanism too. Contributes to issue CURA-5460. --- cura/Machines/MaterialManager.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/cura/Machines/MaterialManager.py b/cura/Machines/MaterialManager.py index 5d691fcef4..b81be5b5a8 100644 --- a/cura/Machines/MaterialManager.py +++ b/cura/Machines/MaterialManager.py @@ -287,19 +287,10 @@ class MaterialManager(QObject): # 1. variant-specific material # 2. machine-specific material # 3. generic material (for fdmprinter) - machine_exclude_materials = machine_definition.getMetaDataEntry("exclude_materials", []) - material_id_metadata_dict = dict() # type: Dict[str, MaterialNode] for node in nodes_to_check: if node is not None: - # Only exclude the materials that are explicitly specified in the "exclude_materials" field. - # Do not exclude other materials that are of the same type. for material_id, node in node.material_map.items(): - if material_id in machine_exclude_materials: - Logger.log("d", "Exclude material [%s] for machine [%s]", - material_id, machine_definition.getId()) - continue - if material_id not in material_id_metadata_dict: material_id_metadata_dict[material_id] = node From d7eb5a76be3b84ff826cd1474cd39a3d68907b01 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 10 Jul 2018 15:16:16 +0200 Subject: [PATCH 089/174] Remove compatible role It is no longer used. Contributes to issue CURA-5460. --- cura/Machines/Models/BaseMaterialsModel.py | 2 -- cura/Machines/Models/BrandMaterialsModel.py | 1 - cura/Machines/Models/GenericMaterialsModel.py | 1 - 3 files changed, 4 deletions(-) diff --git a/cura/Machines/Models/BaseMaterialsModel.py b/cura/Machines/Models/BaseMaterialsModel.py index 4d0b9eea36..03763e9a51 100644 --- a/cura/Machines/Models/BaseMaterialsModel.py +++ b/cura/Machines/Models/BaseMaterialsModel.py @@ -21,7 +21,6 @@ class BaseMaterialsModel(ListModel): MaterialRole = Qt.UserRole + 5 ColorRole = Qt.UserRole + 6 ContainerNodeRole = Qt.UserRole + 7 - CompatibleRole = Qt.UserRole + 8 extruderPositionChanged = pyqtSignal() @@ -37,7 +36,6 @@ class BaseMaterialsModel(ListModel): self.addRoleName(self.MaterialRole, "material") self.addRoleName(self.ColorRole, "color_name") self.addRoleName(self.ContainerNodeRole, "container_node") - self.addRoleName(self.CompatibleRole, "compatible") self._extruder_position = 0 self._extruder_stack = None diff --git a/cura/Machines/Models/BrandMaterialsModel.py b/cura/Machines/Models/BrandMaterialsModel.py index dd286490ff..d1e7eb0bb3 100644 --- a/cura/Machines/Models/BrandMaterialsModel.py +++ b/cura/Machines/Models/BrandMaterialsModel.py @@ -125,7 +125,6 @@ class BrandMaterialsModel(ListModel): "material": metadata["material"], "color_name": metadata["color_name"], "container_node": container_node, - "compatible": metadata.get("compatible", True) } brand_group_dict[brand][material_type].append(item) diff --git a/cura/Machines/Models/GenericMaterialsModel.py b/cura/Machines/Models/GenericMaterialsModel.py index 1580e7ff0c..eaf728afb7 100644 --- a/cura/Machines/Models/GenericMaterialsModel.py +++ b/cura/Machines/Models/GenericMaterialsModel.py @@ -54,7 +54,6 @@ class GenericMaterialsModel(BaseMaterialsModel): "material": metadata["material"], "color_name": metadata["color_name"], "container_node": container_node, - "compatible": metadata.get("compatible", True) } item_list.append(item) From f603b4c4263b7db74bfe38114061fab32071a964 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 10 Jul 2018 15:29:58 +0200 Subject: [PATCH 090/174] Also remove comma This makes the review task less, actually. Contributes to issue CURA-5460. --- cura/Machines/Models/BrandMaterialsModel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/Machines/Models/BrandMaterialsModel.py b/cura/Machines/Models/BrandMaterialsModel.py index d1e7eb0bb3..729478d974 100644 --- a/cura/Machines/Models/BrandMaterialsModel.py +++ b/cura/Machines/Models/BrandMaterialsModel.py @@ -124,7 +124,7 @@ class BrandMaterialsModel(ListModel): "brand": metadata["brand"], "material": metadata["material"], "color_name": metadata["color_name"], - "container_node": container_node, + "container_node": container_node } brand_group_dict[brand][material_type].append(item) From 3a1d57a7251d3a80a713fe474f639a09c3d96d72 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Tue, 10 Jul 2018 15:32:39 +0200 Subject: [PATCH 091/174] Increase dialog height --- .../resources/qml/ToolboxConfirmUninstallResetDialog.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/Toolbox/resources/qml/ToolboxConfirmUninstallResetDialog.qml b/plugins/Toolbox/resources/qml/ToolboxConfirmUninstallResetDialog.qml index a9d10eca2e..cefbe5218f 100644 --- a/plugins/Toolbox/resources/qml/ToolboxConfirmUninstallResetDialog.qml +++ b/plugins/Toolbox/resources/qml/ToolboxConfirmUninstallResetDialog.qml @@ -19,7 +19,7 @@ UM.Dialog title: catalog.i18nc("@title:window", "Confirm uninstall ") + toolbox.pluginToUninstall width: 450 * screenScaleFactor - height: (30 + dialogText.height) * screenScaleFactor + height: (100 + dialogText.height) * screenScaleFactor maximumWidth: 450 * screenScaleFactor maximumHeight: 450 * screenScaleFactor From d8f8f3f77e7c9949d9f5391e31783b97a1d0e34a Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 10 Jul 2018 15:36:19 +0200 Subject: [PATCH 092/174] Fix type of self._application Since the function is now typed, it actually checks for this. UM.Application has no function getMachineManager. cura.CuraApplication does. Contributes to issue CURA-5460. --- cura/Machines/Models/BaseMaterialsModel.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cura/Machines/Models/BaseMaterialsModel.py b/cura/Machines/Models/BaseMaterialsModel.py index 03763e9a51..f21474bd33 100644 --- a/cura/Machines/Models/BaseMaterialsModel.py +++ b/cura/Machines/Models/BaseMaterialsModel.py @@ -1,9 +1,9 @@ # Copyright (c) 2018 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. -from PyQt5.QtCore import Qt, pyqtSignal, pyqtProperty +from PyQt5.QtCore import QObject, Qt, pyqtSignal, pyqtProperty -from UM.Application import Application +from cura.CuraApplication import CuraApplication from UM.Qt.ListModel import ListModel @@ -24,9 +24,9 @@ class BaseMaterialsModel(ListModel): extruderPositionChanged = pyqtSignal() - def __init__(self, parent = None) -> None: + def __init__(self, parent: QObject = None) -> None: super().__init__(parent) - self._application = Application.getInstance() + self._application = CuraApplication.getInstance() self._machine_manager = self._application.getMachineManager() self.addRoleName(self.RootMaterialIdRole, "root_material_id") From 74340334051af89f59d98ebcbbc18267924012fa Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 10 Jul 2018 15:36:52 +0200 Subject: [PATCH 093/174] Add type for item_list Just to be complete. Contributes to issue CURA-5460. --- cura/Machines/Models/GenericMaterialsModel.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cura/Machines/Models/GenericMaterialsModel.py b/cura/Machines/Models/GenericMaterialsModel.py index eaf728afb7..369b59961c 100644 --- a/cura/Machines/Models/GenericMaterialsModel.py +++ b/cura/Machines/Models/GenericMaterialsModel.py @@ -1,6 +1,8 @@ # Copyright (c) 2018 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. +from typing import Dict, List + from UM.Logger import Logger from cura.Machines.Models.BaseMaterialsModel import BaseMaterialsModel @@ -38,7 +40,7 @@ class GenericMaterialsModel(BaseMaterialsModel): self.setItems([]) return - item_list = [] + item_list = [] #type: List[Dict[str, str]] for root_material_id, container_node in available_material_dict.items(): metadata = container_node.metadata # Only add results for generic materials From 3ee2b753e68fc64a7160e1cf53f8f76a15833cb0 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 10 Jul 2018 15:40:08 +0200 Subject: [PATCH 094/174] Fix circular import Yeah, running tests is not enough when it doesn't catch these. Contributes to issue CURA-5460. --- cura/Machines/Models/BaseMaterialsModel.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cura/Machines/Models/BaseMaterialsModel.py b/cura/Machines/Models/BaseMaterialsModel.py index f21474bd33..5480037563 100644 --- a/cura/Machines/Models/BaseMaterialsModel.py +++ b/cura/Machines/Models/BaseMaterialsModel.py @@ -3,7 +3,7 @@ from PyQt5.QtCore import QObject, Qt, pyqtSignal, pyqtProperty -from cura.CuraApplication import CuraApplication +import cura.CuraApplication from UM.Qt.ListModel import ListModel @@ -26,7 +26,7 @@ class BaseMaterialsModel(ListModel): def __init__(self, parent: QObject = None) -> None: super().__init__(parent) - self._application = CuraApplication.getInstance() + self._application = cura.CuraApplication.CuraApplication.getInstance() self._machine_manager = self._application.getMachineManager() self.addRoleName(self.RootMaterialIdRole, "root_material_id") From 5eb2230d82b96edf0ef09732b34bd97347fd6070 Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Tue, 10 Jul 2018 15:40:13 +0200 Subject: [PATCH 095/174] Fix default value for getMaterialPreferenceValue other than spool_weight, added cleanup code for saving default values. CURA-5408 --- resources/qml/Preferences/MaterialView.qml | 25 ++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/resources/qml/Preferences/MaterialView.qml b/resources/qml/Preferences/MaterialView.qml index 528ea448cc..2f705a8b5e 100644 --- a/resources/qml/Preferences/MaterialView.qml +++ b/resources/qml/Preferences/MaterialView.qml @@ -515,7 +515,21 @@ TabView // value has not changed return; } - materialPreferenceValues[material_guid][entry_name] = new_value; + if (entry_name in materialPreferenceValues[material_guid] && new_value.toString() == 0) + { + // no need to store a 0, that's the default, so remove it + materialPreferenceValues[material_guid].delete(entry_name); + if (!(materialPreferenceValues[material_guid])) + { + // remove empty map + materialPreferenceValues.delete(material_guid); + } + } + if (new_value.toString() != 0) + { + // store new value + materialPreferenceValues[material_guid][entry_name] = new_value; + } // store preference UM.Preferences.setValue("cura/material_settings", JSON.stringify(materialPreferenceValues)); @@ -527,9 +541,12 @@ TabView { return materialPreferenceValues[material_guid][entry_name]; } - - var material_weight = Cura.ContainerManager.getContainerMetaDataEntry(base.containerId, "properties/weight"); - return material_weight || 0; + if (entry_name === "spool_weight") { + // get the default value from the metadata + var material_weight = Cura.ContainerManager.getContainerMetaDataEntry(base.containerId, "properties/weight"); + return material_weight || 0; + } + return 0; } // update the display name of the material From 5255d6ca2a162a6637fdeaef89e798a16d380968 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Tue, 10 Jul 2018 16:11:56 +0200 Subject: [PATCH 096/174] Better height for dialog --- .../resources/qml/ToolboxConfirmUninstallResetDialog.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/Toolbox/resources/qml/ToolboxConfirmUninstallResetDialog.qml b/plugins/Toolbox/resources/qml/ToolboxConfirmUninstallResetDialog.qml index cefbe5218f..83ace5f80b 100644 --- a/plugins/Toolbox/resources/qml/ToolboxConfirmUninstallResetDialog.qml +++ b/plugins/Toolbox/resources/qml/ToolboxConfirmUninstallResetDialog.qml @@ -19,7 +19,7 @@ UM.Dialog title: catalog.i18nc("@title:window", "Confirm uninstall ") + toolbox.pluginToUninstall width: 450 * screenScaleFactor - height: (100 + dialogText.height) * screenScaleFactor + height: 50 * screenScaleFactor + dialogText.height + buttonBar.height maximumWidth: 450 * screenScaleFactor maximumHeight: 450 * screenScaleFactor From 7658ad34e2deee5f425ed68cbc6a6cd46e0ff106 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Tue, 10 Jul 2018 16:27:07 +0200 Subject: [PATCH 097/174] Revert "Move "Exclude Materials" metadata to materials" --- cura/Machines/MaterialManager.py | 9 +++++++++ cura/Machines/Models/BaseMaterialsModel.py | 8 ++++---- cura/Machines/Models/BrandMaterialsModel.py | 2 -- cura/Machines/Models/GenericMaterialsModel.py | 10 +++------- resources/definitions/ultimaker.def.json | 3 ++- resources/definitions/ultimaker2.def.json | 1 + resources/definitions/ultimaker_original.def.json | 1 + resources/definitions/ultimaker_original_dual.def.json | 1 + resources/qml/SidebarHeader.qml | 6 +++--- 9 files changed, 24 insertions(+), 17 deletions(-) diff --git a/cura/Machines/MaterialManager.py b/cura/Machines/MaterialManager.py index b81be5b5a8..5d691fcef4 100644 --- a/cura/Machines/MaterialManager.py +++ b/cura/Machines/MaterialManager.py @@ -287,10 +287,19 @@ class MaterialManager(QObject): # 1. variant-specific material # 2. machine-specific material # 3. generic material (for fdmprinter) + machine_exclude_materials = machine_definition.getMetaDataEntry("exclude_materials", []) + material_id_metadata_dict = dict() # type: Dict[str, MaterialNode] for node in nodes_to_check: if node is not None: + # Only exclude the materials that are explicitly specified in the "exclude_materials" field. + # Do not exclude other materials that are of the same type. for material_id, node in node.material_map.items(): + if material_id in machine_exclude_materials: + Logger.log("d", "Exclude material [%s] for machine [%s]", + material_id, machine_definition.getId()) + continue + if material_id not in material_id_metadata_dict: material_id_metadata_dict[material_id] = node diff --git a/cura/Machines/Models/BaseMaterialsModel.py b/cura/Machines/Models/BaseMaterialsModel.py index 5480037563..4759c8b5b0 100644 --- a/cura/Machines/Models/BaseMaterialsModel.py +++ b/cura/Machines/Models/BaseMaterialsModel.py @@ -1,9 +1,9 @@ # Copyright (c) 2018 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. -from PyQt5.QtCore import QObject, Qt, pyqtSignal, pyqtProperty +from PyQt5.QtCore import Qt, pyqtSignal, pyqtProperty -import cura.CuraApplication +from UM.Application import Application from UM.Qt.ListModel import ListModel @@ -24,9 +24,9 @@ class BaseMaterialsModel(ListModel): extruderPositionChanged = pyqtSignal() - def __init__(self, parent: QObject = None) -> None: + def __init__(self, parent = None): super().__init__(parent) - self._application = cura.CuraApplication.CuraApplication.getInstance() + self._application = Application.getInstance() self._machine_manager = self._application.getMachineManager() self.addRoleName(self.RootMaterialIdRole, "root_material_id") diff --git a/cura/Machines/Models/BrandMaterialsModel.py b/cura/Machines/Models/BrandMaterialsModel.py index 729478d974..236f105d12 100644 --- a/cura/Machines/Models/BrandMaterialsModel.py +++ b/cura/Machines/Models/BrandMaterialsModel.py @@ -108,8 +108,6 @@ class BrandMaterialsModel(ListModel): # Only add results for generic materials if brand.lower() == "generic": continue - if not metadata.get("compatible", True): - continue if brand not in brand_group_dict: brand_group_dict[brand] = {} diff --git a/cura/Machines/Models/GenericMaterialsModel.py b/cura/Machines/Models/GenericMaterialsModel.py index 369b59961c..2fac919f3e 100644 --- a/cura/Machines/Models/GenericMaterialsModel.py +++ b/cura/Machines/Models/GenericMaterialsModel.py @@ -1,8 +1,6 @@ # Copyright (c) 2018 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. -from typing import Dict, List - from UM.Logger import Logger from cura.Machines.Models.BaseMaterialsModel import BaseMaterialsModel @@ -21,7 +19,7 @@ class GenericMaterialsModel(BaseMaterialsModel): self._material_manager.materialsUpdated.connect(self._update) #Update when the list of materials changes. self._update() - def _update(self) -> None: + def _update(self): Logger.log("d", "Updating {model_class_name}.".format(model_class_name = self.__class__.__name__)) global_stack = self._machine_manager.activeMachine @@ -40,14 +38,12 @@ class GenericMaterialsModel(BaseMaterialsModel): self.setItems([]) return - item_list = [] #type: List[Dict[str, str]] + item_list = [] for root_material_id, container_node in available_material_dict.items(): metadata = container_node.metadata # Only add results for generic materials if metadata["brand"].lower() != "generic": continue - if not metadata.get("compatible", True): - continue item = {"root_material_id": root_material_id, "id": metadata["id"], @@ -55,7 +51,7 @@ class GenericMaterialsModel(BaseMaterialsModel): "brand": metadata["brand"], "material": metadata["material"], "color_name": metadata["color_name"], - "container_node": container_node, + "container_node": container_node } item_list.append(item) diff --git a/resources/definitions/ultimaker.def.json b/resources/definitions/ultimaker.def.json index 1ca7444d04..a980a1afdf 100644 --- a/resources/definitions/ultimaker.def.json +++ b/resources/definitions/ultimaker.def.json @@ -6,7 +6,8 @@ "author": "Ultimaker", "manufacturer": "Ultimaker B.V.", "category": "Ultimaker", - "visible": false + "visible": false, + "exclude_materials": [ "generic_hips", "generic_petg" ] }, "overrides": { "machine_max_feedrate_e": { diff --git a/resources/definitions/ultimaker2.def.json b/resources/definitions/ultimaker2.def.json index c45c3444ca..aa684946c2 100644 --- a/resources/definitions/ultimaker2.def.json +++ b/resources/definitions/ultimaker2.def.json @@ -14,6 +14,7 @@ "platform_offset": [9, 0, 0], "has_materials": false, "has_machine_quality": true, + "exclude_materials": ["generic_hips", "generic_petg", "generic_bam", "ultimaker_bam", "generic_pva", "ultimaker_pva", "generic_tough_pla", "ultimaker_tough_pla_black", "ultimaker_tough_pla_green", "ultimaker_tough_pla_red", "ultimaker_tough_pla_white"], "first_start_actions": ["UM2UpgradeSelection"], "supported_actions":["UM2UpgradeSelection", "UpgradeFirmware"], "machine_extruder_trains": diff --git a/resources/definitions/ultimaker_original.def.json b/resources/definitions/ultimaker_original.def.json index 423312fcce..c961423504 100644 --- a/resources/definitions/ultimaker_original.def.json +++ b/resources/definitions/ultimaker_original.def.json @@ -12,6 +12,7 @@ "platform": "ultimaker_platform.stl", "has_materials": true, "has_machine_quality": true, + "exclude_materials": ["generic_hips", "generic_petg", "generic_bam", "ultimaker_bam", "generic_pva", "ultimaker_pva", "generic_tough_pla", "ultimaker_tough_pla_black", "ultimaker_tough_pla_green", "ultimaker_tough_pla_red", "ultimaker_tough_pla_white"], "first_start_actions": ["UMOUpgradeSelection", "UMOCheckup", "BedLevel"], "supported_actions": ["UMOUpgradeSelection", "UMOCheckup", "BedLevel", "UpgradeFirmware"], "machine_extruder_trains": diff --git a/resources/definitions/ultimaker_original_dual.def.json b/resources/definitions/ultimaker_original_dual.def.json index 6c0aa739d9..55eddba85f 100644 --- a/resources/definitions/ultimaker_original_dual.def.json +++ b/resources/definitions/ultimaker_original_dual.def.json @@ -13,6 +13,7 @@ "has_materials": true, "has_machine_quality": true, "quality_definition": "ultimaker_original", + "exclude_materials": ["generic_hips", "generic_petg", "generic_bam", "ultimaker_bam", "generic_pva", "ultimaker_pva", "generic_tough_pla", "ultimaker_tough_pla_black", "ultimaker_tough_pla_green", "ultimaker_tough_pla_red", "ultimaker_tough_pla_white"], "machine_extruder_trains": { "0": "ultimaker_original_dual_1st", diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index d39e2b9416..0e5ac852e8 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -1,5 +1,5 @@ -//Copyright (c) 2018 Ultimaker B.V. -//Cura is released under the terms of the LGPLv3 or higher. +// Copyright (c) 2017 Ultimaker B.V. +// Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.7 import QtQuick.Controls 1.1 @@ -402,7 +402,7 @@ Column property var valueError: !isMaterialSupported() property var valueWarning: ! Cura.MachineManager.isActiveQualitySupported - function isMaterialSupported() + function isMaterialSupported () { if (!hasActiveExtruder) { From aa259cfb063f02413736776a8792e3ed2a640293 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Wed, 11 Jul 2018 09:26:24 +0200 Subject: [PATCH 098/174] Enforce focus on save button to ensure edits to jobname happen before saving Fixes #4007 --- resources/qml/SaveButton.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/qml/SaveButton.qml b/resources/qml/SaveButton.qml index 0369f492b4..0e0eec7277 100644 --- a/resources/qml/SaveButton.qml +++ b/resources/qml/SaveButton.qml @@ -256,7 +256,8 @@ Item { text: UM.OutputDeviceManager.activeDeviceShortDescription onClicked: { - UM.OutputDeviceManager.requestWriteToDevice(UM.OutputDeviceManager.activeDevice, PrintInformation.jobName, { "filter_by_machine": true, "preferred_mimetype":Printer.preferredOutputMimetype }) + forceActiveFocus(); + UM.OutputDeviceManager.requestWriteToDevice(UM.OutputDeviceManager.activeDevice, PrintInformation.jobName, { "filter_by_machine": true, "preferred_mimetype":Printer.preferredOutputMimetype }); } style: ButtonStyle { From 76417b7fb2069cca39f774c7fbf47c7120afa480 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Wed, 11 Jul 2018 10:57:55 +0200 Subject: [PATCH 099/174] Hide materials belong to a to-be-removed package --- cura/CuraPackageManager.py | 5 ++-- cura/Machines/MaterialGroup.py | 13 ++++++---- cura/Machines/Models/BrandMaterialsModel.py | 4 +++ cura/Machines/Models/GenericMaterialsModel.py | 5 ++++ plugins/Toolbox/src/Toolbox.py | 26 +++++++++++++++++-- .../XmlMaterialProfile/XmlMaterialProfile.py | 3 +++ 6 files changed, 46 insertions(+), 10 deletions(-) diff --git a/cura/CuraPackageManager.py b/cura/CuraPackageManager.py index 95b381989f..363b8034ec 100644 --- a/cura/CuraPackageManager.py +++ b/cura/CuraPackageManager.py @@ -6,7 +6,6 @@ from cura.Settings.GlobalStack import GlobalStack from UM.PackageManager import PackageManager #The class we're extending. from UM.Resources import Resources #To find storage paths for some resource types. -from UM.Settings.ContainerRegistry import ContainerRegistry class CuraPackageManager(PackageManager): @@ -25,14 +24,14 @@ class CuraPackageManager(PackageManager): # The list consists of 3-tuples: (global_stack, extruder_nr, container_id) def getMachinesUsingPackage(self, package_id: str): ids = self.getPackageContainerIds(package_id) - container_stacks = ContainerRegistry.getInstance().findContainerStacks() + container_stacks = self._application.getContainerRegistry().findContainerStacks() global_stacks = [container_stack for container_stack in container_stacks if isinstance(container_stack, GlobalStack)] machine_with_materials = [] machine_with_qualities = [] for container_id in ids: for global_stack in global_stacks: for extruder_nr, extruder_stack in global_stack.extruders.items(): - if container_id == extruder_stack.material.getId() or container_id == extruder_stack.material.getMetaData().get("base_file"): + if container_id in (extruder_stack.material.getId(), extruder_stack.material.getMetaData().get("base_file")): machine_with_materials.append((global_stack, extruder_nr, container_id)) if container_id == extruder_stack.quality.getId(): machine_with_qualities.append((global_stack, extruder_nr, container_id)) diff --git a/cura/Machines/MaterialGroup.py b/cura/Machines/MaterialGroup.py index b57e0e1808..e05647e674 100644 --- a/cura/Machines/MaterialGroup.py +++ b/cura/Machines/MaterialGroup.py @@ -1,8 +1,11 @@ # Copyright (c) 2018 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. -from typing import List -from cura.Machines.MaterialNode import MaterialNode #For type checking. +from typing import List, TYPE_CHECKING + +if TYPE_CHECKING: + from cura.Machines.MaterialNode import MaterialNode + ## A MaterialGroup represents a group of material InstanceContainers that are derived from a single material profile. # The main InstanceContainer which has the ID of the material profile file name is called the "root_material". For @@ -18,11 +21,11 @@ from cura.Machines.MaterialNode import MaterialNode #For type checking. class MaterialGroup: __slots__ = ("name", "is_read_only", "root_material_node", "derived_material_node_list") - def __init__(self, name: str, root_material_node: MaterialNode) -> None: + def __init__(self, name: str, root_material_node: "MaterialNode") -> None: self.name = name self.is_read_only = False - self.root_material_node = root_material_node # type: MaterialNode - self.derived_material_node_list = [] #type: List[MaterialNode] + self.root_material_node = root_material_node # type: MaterialNode + self.derived_material_node_list = [] # type: List[MaterialNode] def __str__(self) -> str: return "%s[%s]" % (self.__class__.__name__, self.name) diff --git a/cura/Machines/Models/BrandMaterialsModel.py b/cura/Machines/Models/BrandMaterialsModel.py index 236f105d12..ad48b3ea21 100644 --- a/cura/Machines/Models/BrandMaterialsModel.py +++ b/cura/Machines/Models/BrandMaterialsModel.py @@ -109,6 +109,10 @@ class BrandMaterialsModel(ListModel): if brand.lower() == "generic": continue + # Do not include the materials from a to-be-removed package + if bool(metadata.get("removed", False)): + continue + if brand not in brand_group_dict: brand_group_dict[brand] = {} diff --git a/cura/Machines/Models/GenericMaterialsModel.py b/cura/Machines/Models/GenericMaterialsModel.py index 2fac919f3e..f14b039c91 100644 --- a/cura/Machines/Models/GenericMaterialsModel.py +++ b/cura/Machines/Models/GenericMaterialsModel.py @@ -41,10 +41,15 @@ class GenericMaterialsModel(BaseMaterialsModel): item_list = [] for root_material_id, container_node in available_material_dict.items(): metadata = container_node.metadata + # Only add results for generic materials if metadata["brand"].lower() != "generic": continue + # Do not include the materials from a to-be-removed package + if bool(metadata.get("removed", False)): + continue + item = {"root_material_id": root_material_id, "id": metadata["id"], "name": metadata["name"], diff --git a/plugins/Toolbox/src/Toolbox.py b/plugins/Toolbox/src/Toolbox.py index 3fec67c96e..31b9dda9f4 100644 --- a/plugins/Toolbox/src/Toolbox.py +++ b/plugins/Toolbox/src/Toolbox.py @@ -360,16 +360,38 @@ class Toolbox(QObject, Extension): material_manager = application.getMaterialManager() quality_manager = application.getQualityManager() machine_manager = application.getMachineManager() - for global_stack, extruder_nr, _ in self._package_used_materials: + + for global_stack, extruder_nr, container_id in self._package_used_materials: default_material_node = material_manager.getDefaultMaterial(global_stack, extruder_nr, global_stack.extruders[extruder_nr].variant.getName()) machine_manager.setMaterial(extruder_nr, default_material_node, global_stack = global_stack) - for global_stack, extruder_nr, _ in self._package_used_qualities: + for global_stack, extruder_nr, container_id in self._package_used_qualities: default_quality_group = quality_manager.getDefaultQualityType(global_stack) machine_manager.setQualityGroup(default_quality_group, global_stack = global_stack) + + self._markPackageMaterialsAsRemove(self._package_id_to_uninstall) + self.uninstall(self._package_id_to_uninstall) self._resetUninstallVariables() self.closeConfirmResetDialog() + def _markPackageMaterialsAsRemove(self, package_id: str) -> None: + container_registry = self._application.getContainerRegistry() + + all_containers = self._package_manager.getPackageContainerIds(package_id) + for container_id in all_containers: + containers = container_registry.findInstanceContainers(id = container_id) + if not containers: + continue + container = containers[0] + if container.getMetaDataEntry("type") != "material": + continue + root_material_id = container.getMetaDataEntry("base_file") + root_material_containers = container_registry.findInstanceContainers(id = root_material_id) + if not root_material_containers: + continue + root_material_container = root_material_containers[0] + root_material_container.setMetaDataEntry("removed", True) + @pyqtSlot(str) def uninstall(self, package_id: str) -> None: self._package_manager.removePackage(package_id, force_add = True) diff --git a/plugins/XmlMaterialProfile/XmlMaterialProfile.py b/plugins/XmlMaterialProfile/XmlMaterialProfile.py index eac6646197..ca6271391e 100644 --- a/plugins/XmlMaterialProfile/XmlMaterialProfile.py +++ b/plugins/XmlMaterialProfile/XmlMaterialProfile.py @@ -63,6 +63,7 @@ class XmlMaterialProfile(InstanceContainer): # Prevent recursion if not apply_to_all: + super().addMetaDataEntry(key, value) super().setMetaDataEntry(key, value) return @@ -74,12 +75,14 @@ class XmlMaterialProfile(InstanceContainer): # Update the root material container root_material_container = material_group.root_material_node.getContainer() if root_material_container is not None: + root_material_container.addMetaDataEntry(key, value) root_material_container.setMetaDataEntry(key, value, apply_to_all = False) # Update all containers derived from it for node in material_group.derived_material_node_list: container = node.getContainer() if container is not None: + container.addMetaDataEntry(key, value) container.setMetaDataEntry(key, value, apply_to_all = False) ## Overridden from InstanceContainer, similar to setMetaDataEntry. From af02dc2758b8eec1f3c3ccc2b96c5cb9bdc5276a Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Wed, 11 Jul 2018 11:14:57 +0200 Subject: [PATCH 100/174] Only use setMetaDataEntry() --- cura/CuraApplication.py | 16 ++++---- cura/Machines/QualityManager.py | 8 ++-- cura/Settings/CuraContainerRegistry.py | 38 +++++++++---------- cura/Settings/CuraContainerStack.py | 2 +- cura/Settings/CuraStackBuilder.py | 12 +++--- cura/Settings/ExtruderStack.py | 8 ++-- cura/Settings/GlobalStack.py | 2 +- cura/Settings/MachineManager.py | 6 +-- cura/Settings/SettingOverrideDecorator.py | 2 +- plugins/3MFReader/ThreeMFWorkspaceReader.py | 2 +- .../CuraProfileReader/CuraProfileReader.py | 2 +- plugins/GCodeWriter/GCodeWriter.py | 10 ++--- .../LegacyProfileReader.py | 4 +- .../MachineSettingsAction.py | 5 +-- .../PostProcessingPlugin.py | 2 +- plugins/PostProcessingPlugin/Script.py | 2 +- .../UM3NetworkPrinting/DiscoverUM3Action.py | 6 +-- .../LegacyUM3OutputDevice.py | 10 +---- .../UM2UpgradeSelection.py | 5 +-- .../XmlMaterialProfile/XmlMaterialProfile.py | 3 -- tests/Settings/TestCuraContainerRegistry.py | 20 +++++----- tests/Settings/TestExtruderStack.py | 16 ++++---- tests/Settings/TestGlobalStack.py | 16 ++++---- 23 files changed, 91 insertions(+), 106 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index e5c0c5688c..f6a932546a 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -362,35 +362,35 @@ class CuraApplication(QtApplication): empty_definition_changes_container = copy.deepcopy(empty_container) empty_definition_changes_container.setMetaDataEntry("id", "empty_definition_changes") - empty_definition_changes_container.addMetaDataEntry("type", "definition_changes") + empty_definition_changes_container.setMetaDataEntry("type", "definition_changes") self._container_registry.addContainer(empty_definition_changes_container) self.empty_definition_changes_container = empty_definition_changes_container empty_variant_container = copy.deepcopy(empty_container) empty_variant_container.setMetaDataEntry("id", "empty_variant") - empty_variant_container.addMetaDataEntry("type", "variant") + empty_variant_container.setMetaDataEntry("type", "variant") self._container_registry.addContainer(empty_variant_container) self.empty_variant_container = empty_variant_container empty_material_container = copy.deepcopy(empty_container) empty_material_container.setMetaDataEntry("id", "empty_material") - empty_material_container.addMetaDataEntry("type", "material") + empty_material_container.setMetaDataEntry("type", "material") self._container_registry.addContainer(empty_material_container) self.empty_material_container = empty_material_container empty_quality_container = copy.deepcopy(empty_container) empty_quality_container.setMetaDataEntry("id", "empty_quality") empty_quality_container.setName("Not Supported") - empty_quality_container.addMetaDataEntry("quality_type", "not_supported") - empty_quality_container.addMetaDataEntry("type", "quality") - empty_quality_container.addMetaDataEntry("supported", False) + empty_quality_container.setMetaDataEntry("quality_type", "not_supported") + empty_quality_container.setMetaDataEntry("type", "quality") + empty_quality_container.setMetaDataEntry("supported", False) self._container_registry.addContainer(empty_quality_container) self.empty_quality_container = empty_quality_container empty_quality_changes_container = copy.deepcopy(empty_container) empty_quality_changes_container.setMetaDataEntry("id", "empty_quality_changes") - empty_quality_changes_container.addMetaDataEntry("type", "quality_changes") - empty_quality_changes_container.addMetaDataEntry("quality_type", "not_supported") + empty_quality_changes_container.setMetaDataEntry("type", "quality_changes") + empty_quality_changes_container.setMetaDataEntry("quality_type", "not_supported") self._container_registry.addContainer(empty_quality_changes_container) self.empty_quality_changes_container = empty_quality_changes_container diff --git a/cura/Machines/QualityManager.py b/cura/Machines/QualityManager.py index 5e78c04900..82a11f9960 100644 --- a/cura/Machines/QualityManager.py +++ b/cura/Machines/QualityManager.py @@ -466,18 +466,18 @@ class QualityManager(QObject): # Create a new quality_changes container for the quality. quality_changes = InstanceContainer(new_id) quality_changes.setName(new_name) - quality_changes.addMetaDataEntry("type", "quality_changes") - quality_changes.addMetaDataEntry("quality_type", quality_type) + quality_changes.setMetaDataEntry("type", "quality_changes") + quality_changes.setMetaDataEntry("quality_type", quality_type) # If we are creating a container for an extruder, ensure we add that to the container if extruder_stack is not None: - quality_changes.addMetaDataEntry("position", extruder_stack.getMetaDataEntry("position")) + quality_changes.setMetaDataEntry("position", extruder_stack.getMetaDataEntry("position")) # If the machine specifies qualities should be filtered, ensure we match the current criteria. machine_definition_id = getMachineDefinitionIDForQualitySearch(machine.definition) quality_changes.setDefinition(machine_definition_id) - quality_changes.addMetaDataEntry("setting_version", self._application.SettingVersion) + quality_changes.setMetaDataEntry("setting_version", self._application.SettingVersion) return quality_changes diff --git a/cura/Settings/CuraContainerRegistry.py b/cura/Settings/CuraContainerRegistry.py index 6cbb3036f8..e1f50a157d 100644 --- a/cura/Settings/CuraContainerRegistry.py +++ b/cura/Settings/CuraContainerRegistry.py @@ -260,11 +260,11 @@ class CuraContainerRegistry(ContainerRegistry): profile_id = ContainerRegistry.getInstance().uniqueName(global_stack.getId() + "_extruder_" + str(idx + 1)) profile = InstanceContainer(profile_id) profile.setName(quality_name) - profile.addMetaDataEntry("setting_version", cura.CuraApplication.CuraApplication.SettingVersion) - profile.addMetaDataEntry("type", "quality_changes") - profile.addMetaDataEntry("definition", expected_machine_definition) - profile.addMetaDataEntry("quality_type", quality_type) - profile.addMetaDataEntry("position", "0") + profile.setMetaDataEntry("setting_version", cura.CuraApplication.CuraApplication.SettingVersion) + profile.setMetaDataEntry("type", "quality_changes") + profile.setMetaDataEntry("definition", expected_machine_definition) + profile.setMetaDataEntry("quality_type", quality_type) + profile.setMetaDataEntry("position", "0") profile.setDirty(True) if idx == 0: # move all per-extruder settings to the first extruder's quality_changes @@ -298,7 +298,7 @@ class CuraContainerRegistry(ContainerRegistry): extruder_id = machine_extruders[profile_index - 1].definition.getId() extruder_position = str(profile_index - 1) if not profile.getMetaDataEntry("position"): - profile.addMetaDataEntry("position", extruder_position) + profile.setMetaDataEntry("position", extruder_position) else: profile.setMetaDataEntry("position", extruder_position) profile_id = (extruder_id + "_" + name_seed).lower().replace(" ", "_") @@ -349,7 +349,7 @@ class CuraContainerRegistry(ContainerRegistry): if "type" in profile.getMetaData(): profile.setMetaDataEntry("type", "quality_changes") else: - profile.addMetaDataEntry("type", "quality_changes") + profile.setMetaDataEntry("type", "quality_changes") quality_type = profile.getMetaDataEntry("quality_type") if not quality_type: @@ -480,16 +480,16 @@ class CuraContainerRegistry(ContainerRegistry): extruder_stack = ExtruderStack.ExtruderStack(unique_name) extruder_stack.setName(extruder_definition.getName()) extruder_stack.setDefinition(extruder_definition) - extruder_stack.addMetaDataEntry("position", extruder_definition.getMetaDataEntry("position")) + extruder_stack.setMetaDataEntry("position", extruder_definition.getMetaDataEntry("position")) # create a new definition_changes container for the extruder stack definition_changes_id = self.uniqueName(extruder_stack.getId() + "_settings") if create_new_ids else extruder_stack.getId() + "_settings" definition_changes_name = definition_changes_id definition_changes = InstanceContainer(definition_changes_id, parent = application) definition_changes.setName(definition_changes_name) - definition_changes.addMetaDataEntry("setting_version", application.SettingVersion) - definition_changes.addMetaDataEntry("type", "definition_changes") - definition_changes.addMetaDataEntry("definition", extruder_definition.getId()) + definition_changes.setMetaDataEntry("setting_version", application.SettingVersion) + definition_changes.setMetaDataEntry("type", "definition_changes") + definition_changes.setMetaDataEntry("definition", extruder_definition.getId()) # move definition_changes settings if exist for setting_key in definition_changes.getAllKeys(): @@ -514,9 +514,9 @@ class CuraContainerRegistry(ContainerRegistry): user_container_name = user_container_id user_container = InstanceContainer(user_container_id, parent = application) user_container.setName(user_container_name) - user_container.addMetaDataEntry("type", "user") - user_container.addMetaDataEntry("machine", machine.getId()) - user_container.addMetaDataEntry("setting_version", application.SettingVersion) + user_container.setMetaDataEntry("type", "user") + user_container.setMetaDataEntry("machine", machine.getId()) + user_container.setMetaDataEntry("setting_version", application.SettingVersion) user_container.setDefinition(machine.definition.getId()) user_container.setMetaDataEntry("position", extruder_stack.getMetaDataEntry("position")) @@ -580,7 +580,7 @@ class CuraContainerRegistry(ContainerRegistry): extruder_quality_changes_container = self._findQualityChangesContainerInCuraFolder(machine_quality_changes.getName()) if extruder_quality_changes_container: quality_changes_id = extruder_quality_changes_container.getId() - extruder_quality_changes_container.addMetaDataEntry("position", extruder_definition.getMetaDataEntry("position")) + extruder_quality_changes_container.setMetaDataEntry("position", extruder_definition.getMetaDataEntry("position")) extruder_stack.qualityChanges = self.findInstanceContainers(id = quality_changes_id)[0] else: # if we still cannot find a quality changes container for the extruder, create a new one @@ -588,10 +588,10 @@ class CuraContainerRegistry(ContainerRegistry): container_id = self.uniqueName(extruder_stack.getId() + "_qc_" + container_name) extruder_quality_changes_container = InstanceContainer(container_id, parent = application) extruder_quality_changes_container.setName(container_name) - extruder_quality_changes_container.addMetaDataEntry("type", "quality_changes") - extruder_quality_changes_container.addMetaDataEntry("setting_version", application.SettingVersion) - extruder_quality_changes_container.addMetaDataEntry("position", extruder_definition.getMetaDataEntry("position")) - extruder_quality_changes_container.addMetaDataEntry("quality_type", machine_quality_changes.getMetaDataEntry("quality_type")) + extruder_quality_changes_container.setMetaDataEntry("type", "quality_changes") + extruder_quality_changes_container.setMetaDataEntry("setting_version", application.SettingVersion) + extruder_quality_changes_container.setMetaDataEntry("position", extruder_definition.getMetaDataEntry("position")) + extruder_quality_changes_container.setMetaDataEntry("quality_type", machine_quality_changes.getMetaDataEntry("quality_type")) extruder_quality_changes_container.setDefinition(machine_quality_changes.getDefinition().getId()) self.addContainer(extruder_quality_changes_container) diff --git a/cura/Settings/CuraContainerStack.py b/cura/Settings/CuraContainerStack.py index 667b468bc0..bd3380dfb2 100755 --- a/cura/Settings/CuraContainerStack.py +++ b/cura/Settings/CuraContainerStack.py @@ -57,7 +57,7 @@ class CuraContainerStack(ContainerStack): self.containersChanged.connect(self._onContainersChanged) import cura.CuraApplication #Here to prevent circular imports. - self.addMetaDataEntry("setting_version", cura.CuraApplication.CuraApplication.SettingVersion) + self.setMetaDataEntry("setting_version", cura.CuraApplication.CuraApplication.SettingVersion) # This is emitted whenever the containersChanged signal from the ContainerStack base class is emitted. pyqtContainersChanged = pyqtSignal() diff --git a/cura/Settings/CuraStackBuilder.py b/cura/Settings/CuraStackBuilder.py index e593c3d349..841d45ed31 100644 --- a/cura/Settings/CuraStackBuilder.py +++ b/cura/Settings/CuraStackBuilder.py @@ -146,7 +146,7 @@ class CuraStackBuilder: stack.setName(extruder_definition.getName()) stack.setDefinition(extruder_definition) - stack.addMetaDataEntry("position", position) + stack.setMetaDataEntry("position", position) user_container = cls.createUserChangesContainer(new_stack_id + "_user", machine_definition_id, new_stack_id, is_global_stack = False) @@ -208,11 +208,11 @@ class CuraStackBuilder: container = InstanceContainer(unique_container_name) container.setDefinition(definition_id) - container.addMetaDataEntry("type", "user") - container.addMetaDataEntry("setting_version", CuraApplication.SettingVersion) + container.setMetaDataEntry("type", "user") + container.setMetaDataEntry("setting_version", CuraApplication.SettingVersion) metadata_key_to_add = "machine" if is_global_stack else "extruder" - container.addMetaDataEntry(metadata_key_to_add, stack_id) + container.setMetaDataEntry(metadata_key_to_add, stack_id) return container @@ -226,8 +226,8 @@ class CuraStackBuilder: definition_changes_container = InstanceContainer(unique_container_name) definition_changes_container.setDefinition(container_stack.getBottom().getId()) - definition_changes_container.addMetaDataEntry("type", "definition_changes") - definition_changes_container.addMetaDataEntry("setting_version", CuraApplication.SettingVersion) + definition_changes_container.setMetaDataEntry("type", "definition_changes") + definition_changes_container.setMetaDataEntry("setting_version", CuraApplication.SettingVersion) registry.addContainer(definition_changes_container) container_stack.definitionChanges = definition_changes_container diff --git a/cura/Settings/ExtruderStack.py b/cura/Settings/ExtruderStack.py index 4445563e00..47846fc1dd 100644 --- a/cura/Settings/ExtruderStack.py +++ b/cura/Settings/ExtruderStack.py @@ -29,7 +29,7 @@ class ExtruderStack(CuraContainerStack): def __init__(self, container_id: str) -> None: super().__init__(container_id) - self.addMetaDataEntry("type", "extruder_train") # For backward compatibility + self.setMetaDataEntry("type", "extruder_train") # For backward compatibility self.propertiesChanged.connect(self._onPropertiesChanged) @@ -42,7 +42,7 @@ class ExtruderStack(CuraContainerStack): def setNextStack(self, stack: CuraContainerStack, connect_signals: bool = True) -> None: super().setNextStack(stack) stack.addExtruder(self) - self.addMetaDataEntry("machine", stack.id) + self.setMetaDataEntry("machine", stack.id) # For backward compatibility: Register the extruder with the Extruder Manager ExtruderManager.getInstance().registerExtruder(self, stack.id) @@ -53,7 +53,7 @@ class ExtruderStack(CuraContainerStack): def setEnabled(self, enabled: bool) -> None: if "enabled" not in self._metadata: - self.addMetaDataEntry("enabled", "True") + self.setMetaDataEntry("enabled", "True") self.setMetaDataEntry("enabled", str(enabled)) self.enabledChanged.emit() @@ -138,7 +138,7 @@ class ExtruderStack(CuraContainerStack): def deserialize(self, contents: str, file_name: Optional[str] = None) -> None: super().deserialize(contents, file_name) if "enabled" not in self.getMetaData(): - self.addMetaDataEntry("enabled", "True") + self.setMetaDataEntry("enabled", "True") stacks = ContainerRegistry.getInstance().findContainerStacks(id=self.getMetaDataEntry("machine", "")) if stacks: self.setNextStack(stacks[0]) diff --git a/cura/Settings/GlobalStack.py b/cura/Settings/GlobalStack.py index 6552e43073..66f3290b85 100755 --- a/cura/Settings/GlobalStack.py +++ b/cura/Settings/GlobalStack.py @@ -27,7 +27,7 @@ class GlobalStack(CuraContainerStack): def __init__(self, container_id: str) -> None: super().__init__(container_id) - self.addMetaDataEntry("type", "machine") # For backward compatibility + self.setMetaDataEntry("type", "machine") # For backward compatibility self._extruders = {} # type: Dict[str, "ExtruderStack"] diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index 772c01191c..26f5a490dd 100755 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -1299,9 +1299,9 @@ class MachineManager(QObject): new_machine = CuraStackBuilder.createMachine(machine_definition_id + "_sync", machine_definition_id) if not new_machine: return - new_machine.addMetaDataEntry("um_network_key", self.activeMachineNetworkKey) - new_machine.addMetaDataEntry("connect_group_name", self.activeMachineNetworkGroupName) - new_machine.addMetaDataEntry("hidden", False) + new_machine.setMetaDataEntry("um_network_key", self.activeMachineNetworkKey) + new_machine.setMetaDataEntry("connect_group_name", self.activeMachineNetworkGroupName) + new_machine.setMetaDataEntry("hidden", False) else: Logger.log("i", "Found a %s with the key %s. Let's use it!", machine_name, self.activeMachineNetworkKey) new_machine.setMetaDataEntry("hidden", False) diff --git a/cura/Settings/SettingOverrideDecorator.py b/cura/Settings/SettingOverrideDecorator.py index 27ae1d69f0..429e6d16ec 100644 --- a/cura/Settings/SettingOverrideDecorator.py +++ b/cura/Settings/SettingOverrideDecorator.py @@ -37,7 +37,7 @@ class SettingOverrideDecorator(SceneNodeDecorator): self._stack = PerObjectContainerStack(container_id = "per_object_stack_" + str(id(self))) self._stack.setDirty(False) # This stack does not need to be saved. user_container = InstanceContainer(container_id = self._generateUniqueName()) - user_container.addMetaDataEntry("type", "user") + user_container.setMetaDataEntry("type", "user") self._stack.userChanges = user_container self._extruder_stack = ExtruderManager.getInstance().getExtruderStack(0).getId() diff --git a/plugins/3MFReader/ThreeMFWorkspaceReader.py b/plugins/3MFReader/ThreeMFWorkspaceReader.py index 008bf24cda..f72029524e 100755 --- a/plugins/3MFReader/ThreeMFWorkspaceReader.py +++ b/plugins/3MFReader/ThreeMFWorkspaceReader.py @@ -963,7 +963,7 @@ class ThreeMFWorkspaceReader(WorkspaceReader): if not extruder_info: continue if "enabled" not in extruder_stack.getMetaData(): - extruder_stack.addMetaDataEntry("enabled", "True") + extruder_stack.setMetaDataEntry("enabled", "True") extruder_stack.setMetaDataEntry("enabled", str(extruder_info.enabled)) def _updateActiveMachine(self, global_stack): diff --git a/plugins/CuraProfileReader/CuraProfileReader.py b/plugins/CuraProfileReader/CuraProfileReader.py index d7370326e4..5957b2cecf 100644 --- a/plugins/CuraProfileReader/CuraProfileReader.py +++ b/plugins/CuraProfileReader/CuraProfileReader.py @@ -75,7 +75,7 @@ class CuraProfileReader(ProfileReader): def _loadProfile(self, serialized, profile_id): # Create an empty profile. profile = InstanceContainer(profile_id) - profile.addMetaDataEntry("type", "quality_changes") + profile.setMetaDataEntry("type", "quality_changes") try: profile.deserialize(serialized) except ContainerFormatError as e: diff --git a/plugins/GCodeWriter/GCodeWriter.py b/plugins/GCodeWriter/GCodeWriter.py index d334c66dbe..aea0698d19 100644 --- a/plugins/GCodeWriter/GCodeWriter.py +++ b/plugins/GCodeWriter/GCodeWriter.py @@ -127,11 +127,11 @@ class GCodeWriter(MeshWriter): flat_global_container = self._createFlattenedContainerInstance(stack.userChanges, container_with_profile) # If the quality changes is not set, we need to set type manually if flat_global_container.getMetaDataEntry("type", None) is None: - flat_global_container.addMetaDataEntry("type", "quality_changes") + flat_global_container.setMetaDataEntry("type", "quality_changes") # Ensure that quality_type is set. (Can happen if we have empty quality changes). if flat_global_container.getMetaDataEntry("quality_type", None) is None: - flat_global_container.addMetaDataEntry("quality_type", stack.quality.getMetaDataEntry("quality_type", "normal")) + flat_global_container.setMetaDataEntry("quality_type", stack.quality.getMetaDataEntry("quality_type", "normal")) # Get the machine definition ID for quality profiles machine_definition_id_for_quality = getMachineDefinitionIDForQualitySearch(stack.definition) @@ -151,15 +151,15 @@ class GCodeWriter(MeshWriter): flat_extruder_quality = self._createFlattenedContainerInstance(extruder.userChanges, extruder_quality) # If the quality changes is not set, we need to set type manually if flat_extruder_quality.getMetaDataEntry("type", None) is None: - flat_extruder_quality.addMetaDataEntry("type", "quality_changes") + flat_extruder_quality.setMetaDataEntry("type", "quality_changes") # Ensure that extruder is set. (Can happen if we have empty quality changes). if flat_extruder_quality.getMetaDataEntry("position", None) is None: - flat_extruder_quality.addMetaDataEntry("position", extruder.getMetaDataEntry("position")) + flat_extruder_quality.setMetaDataEntry("position", extruder.getMetaDataEntry("position")) # Ensure that quality_type is set. (Can happen if we have empty quality changes). if flat_extruder_quality.getMetaDataEntry("quality_type", None) is None: - flat_extruder_quality.addMetaDataEntry("quality_type", extruder.quality.getMetaDataEntry("quality_type", "normal")) + flat_extruder_quality.setMetaDataEntry("quality_type", extruder.quality.getMetaDataEntry("quality_type", "normal")) # Change the default definition flat_extruder_quality.setMetaDataEntry("definition", machine_definition_id_for_quality) diff --git a/plugins/LegacyProfileReader/LegacyProfileReader.py b/plugins/LegacyProfileReader/LegacyProfileReader.py index 40a843e6c4..93c15ca8e0 100644 --- a/plugins/LegacyProfileReader/LegacyProfileReader.py +++ b/plugins/LegacyProfileReader/LegacyProfileReader.py @@ -145,9 +145,9 @@ class LegacyProfileReader(ProfileReader): if len(profile.getAllKeys()) == 0: Logger.log("i", "A legacy profile was imported but everything evaluates to the defaults, creating an empty profile.") - profile.addMetaDataEntry("type", "profile") + profile.setMetaDataEntry("type", "profile") # don't know what quality_type it is based on, so use "normal" by default - profile.addMetaDataEntry("quality_type", "normal") + profile.setMetaDataEntry("quality_type", "normal") profile.setName(profile_id) profile.setDirty(True) diff --git a/plugins/MachineSettingsAction/MachineSettingsAction.py b/plugins/MachineSettingsAction/MachineSettingsAction.py index acfec7938d..afd7aac86d 100755 --- a/plugins/MachineSettingsAction/MachineSettingsAction.py +++ b/plugins/MachineSettingsAction/MachineSettingsAction.py @@ -135,10 +135,7 @@ class MachineSettingsAction(MachineAction): material_node = None if has_materials: - if "has_materials" in self._global_container_stack.getMetaData(): - self._global_container_stack.setMetaDataEntry("has_materials", True) - else: - self._global_container_stack.addMetaDataEntry("has_materials", True) + self._global_container_stack.setMetaDataEntry("has_materials", True) else: # The metadata entry is stored in an ini, and ini files are parsed as strings only. # Because any non-empty string evaluates to a boolean True, we have to remove the entry to make it False. diff --git a/plugins/PostProcessingPlugin/PostProcessingPlugin.py b/plugins/PostProcessingPlugin/PostProcessingPlugin.py index 1bbe4bb66c..da971a8e61 100644 --- a/plugins/PostProcessingPlugin/PostProcessingPlugin.py +++ b/plugins/PostProcessingPlugin/PostProcessingPlugin.py @@ -248,7 +248,7 @@ class PostProcessingPlugin(QObject, Extension): global_stack = Application.getInstance().getGlobalContainerStack() if "post_processing_scripts" not in global_stack.getMetaData(): - global_stack.addMetaDataEntry("post_processing_scripts", "") + global_stack.setMetaDataEntry("post_processing_scripts", "") Application.getInstance().getGlobalContainerStack().setMetaDataEntry("post_processing_scripts", script_list_strs) ## Creates the view used by show popup. The view is saved because of the fairly aggressive garbage collection. diff --git a/plugins/PostProcessingPlugin/Script.py b/plugins/PostProcessingPlugin/Script.py index cc839ca485..7e430a5c78 100644 --- a/plugins/PostProcessingPlugin/Script.py +++ b/plugins/PostProcessingPlugin/Script.py @@ -48,7 +48,7 @@ class Script: self._stack.addContainer(self._definition) self._instance = InstanceContainer(container_id="ScriptInstanceContainer") self._instance.setDefinition(self._definition.getId()) - self._instance.addMetaDataEntry("setting_version", self._definition.getMetaDataEntry("setting_version", default = 0)) + self._instance.setMetaDataEntry("setting_version", self._definition.getMetaDataEntry("setting_version", default = 0)) self._stack.addContainer(self._instance) self._stack.propertyChanged.connect(self._onPropertyChanged) diff --git a/plugins/UM3NetworkPrinting/DiscoverUM3Action.py b/plugins/UM3NetworkPrinting/DiscoverUM3Action.py index b48a57e0a2..135bc06d3a 100644 --- a/plugins/UM3NetworkPrinting/DiscoverUM3Action.py +++ b/plugins/UM3NetworkPrinting/DiscoverUM3Action.py @@ -108,8 +108,8 @@ class DiscoverUM3Action(MachineAction): # Find all the places where there is the same group name and change it accordingly CuraApplication.getInstance().getMachineManager().replaceContainersMetadata(key = "connect_group_name", value = previous_connect_group_name, new_value = group_name) else: - global_container_stack.addMetaDataEntry("connect_group_name", group_name) - global_container_stack.addMetaDataEntry("hidden", False) + global_container_stack.setMetaDataEntry("connect_group_name", group_name) + global_container_stack.setMetaDataEntry("hidden", False) if self._network_plugin: # Ensure that the connection states are refreshed. @@ -130,7 +130,7 @@ class DiscoverUM3Action(MachineAction): global_container_stack.removeMetaDataEntry("network_authentication_key") CuraApplication.getInstance().getMachineManager().replaceContainersMetadata(key = "um_network_key", value = previous_network_key, new_value = key) else: - global_container_stack.addMetaDataEntry("um_network_key", key) + global_container_stack.setMetaDataEntry("um_network_key", key) if self._network_plugin: # Ensure that the connection states are refreshed. diff --git a/plugins/UM3NetworkPrinting/LegacyUM3OutputDevice.py b/plugins/UM3NetworkPrinting/LegacyUM3OutputDevice.py index 9b90f8542d..4c5d56e0da 100644 --- a/plugins/UM3NetworkPrinting/LegacyUM3OutputDevice.py +++ b/plugins/UM3NetworkPrinting/LegacyUM3OutputDevice.py @@ -458,15 +458,9 @@ class LegacyUM3OutputDevice(NetworkedPrinterOutputDevice): def _saveAuthentication(self): global_container_stack = CuraApplication.getInstance().getGlobalContainerStack() if global_container_stack: - if "network_authentication_key" in global_container_stack.getMetaData(): - global_container_stack.setMetaDataEntry("network_authentication_key", self._authentication_key) - else: - global_container_stack.addMetaDataEntry("network_authentication_key", self._authentication_key) + global_container_stack.setMetaDataEntry("network_authentication_key", self._authentication_key) - if "network_authentication_id" in global_container_stack.getMetaData(): - global_container_stack.setMetaDataEntry("network_authentication_id", self._authentication_id) - else: - global_container_stack.addMetaDataEntry("network_authentication_id", self._authentication_id) + global_container_stack.setMetaDataEntry("network_authentication_id", self._authentication_id) # Force save so we are sure the data is not lost. CuraApplication.getInstance().saveStack(global_container_stack) diff --git a/plugins/UltimakerMachineActions/UM2UpgradeSelection.py b/plugins/UltimakerMachineActions/UM2UpgradeSelection.py index e21256f6bd..6ff3f0b629 100644 --- a/plugins/UltimakerMachineActions/UM2UpgradeSelection.py +++ b/plugins/UltimakerMachineActions/UM2UpgradeSelection.py @@ -47,10 +47,7 @@ class UM2UpgradeSelection(MachineAction): variant_container = global_container_stack.extruders["0"].variant if has_variants: - if "has_variants" in global_container_stack.getMetaData(): - global_container_stack.setMetaDataEntry("has_variants", True) - else: - global_container_stack.addMetaDataEntry("has_variants", True) + global_container_stack.setMetaDataEntry("has_variants", True) # Set the variant container to a sane default empty_container = ContainerRegistry.getInstance().getEmptyInstanceContainer() diff --git a/plugins/XmlMaterialProfile/XmlMaterialProfile.py b/plugins/XmlMaterialProfile/XmlMaterialProfile.py index ca6271391e..eac6646197 100644 --- a/plugins/XmlMaterialProfile/XmlMaterialProfile.py +++ b/plugins/XmlMaterialProfile/XmlMaterialProfile.py @@ -63,7 +63,6 @@ class XmlMaterialProfile(InstanceContainer): # Prevent recursion if not apply_to_all: - super().addMetaDataEntry(key, value) super().setMetaDataEntry(key, value) return @@ -75,14 +74,12 @@ class XmlMaterialProfile(InstanceContainer): # Update the root material container root_material_container = material_group.root_material_node.getContainer() if root_material_container is not None: - root_material_container.addMetaDataEntry(key, value) root_material_container.setMetaDataEntry(key, value, apply_to_all = False) # Update all containers derived from it for node in material_group.derived_material_node_list: container = node.getContainer() if container is not None: - container.addMetaDataEntry(key, value) container.setMetaDataEntry(key, value, apply_to_all = False) ## Overridden from InstanceContainer, similar to setMetaDataEntry. diff --git a/tests/Settings/TestCuraContainerRegistry.py b/tests/Settings/TestCuraContainerRegistry.py index b97f6b4faf..38b2e0f6ea 100644 --- a/tests/Settings/TestCuraContainerRegistry.py +++ b/tests/Settings/TestCuraContainerRegistry.py @@ -23,25 +23,25 @@ def creteEmptyContainers(): empty_container = ContainerRegistry.getInstance().getEmptyInstanceContainer() empty_variant_container = copy.deepcopy(empty_container) empty_variant_container.setMetaDataEntry("id", "empty_variant") - empty_variant_container.addMetaDataEntry("type", "variant") + empty_variant_container.setMetaDataEntry("type", "variant") ContainerRegistry.getInstance().addContainer(empty_variant_container) empty_material_container = copy.deepcopy(empty_container) empty_material_container.setMetaDataEntry("id", "empty_material") - empty_material_container.addMetaDataEntry("type", "material") + empty_material_container.setMetaDataEntry("type", "material") ContainerRegistry.getInstance().addContainer(empty_material_container) empty_quality_container = copy.deepcopy(empty_container) empty_quality_container.setMetaDataEntry("id", "empty_quality") empty_quality_container.setName("Not Supported") - empty_quality_container.addMetaDataEntry("quality_type", "not_supported") - empty_quality_container.addMetaDataEntry("type", "quality") - empty_quality_container.addMetaDataEntry("supported", False) + empty_quality_container.setMetaDataEntry("quality_type", "not_supported") + empty_quality_container.setMetaDataEntry("type", "quality") + empty_quality_container.setMetaDataEntry("supported", False) ContainerRegistry.getInstance().addContainer(empty_quality_container) empty_quality_changes_container = copy.deepcopy(empty_container) empty_quality_changes_container.setMetaDataEntry("id", "empty_quality_changes") - empty_quality_changes_container.addMetaDataEntry("type", "quality_changes") + empty_quality_changes_container.setMetaDataEntry("type", "quality_changes") ContainerRegistry.getInstance().addContainer(empty_quality_changes_container) ## Gives a fresh CuraContainerRegistry instance. @@ -69,7 +69,7 @@ def test_addContainerExtruderStack(container_registry, definition_container): container_registry.addContainer(definition_container) container_stack = UM.Settings.ContainerStack.ContainerStack(stack_id = "Test Container Stack") #A container we're going to convert. - container_stack.addMetaDataEntry("type", "extruder_train") #This is now an extruder train. + container_stack.setMetaDataEntry("type", "extruder_train") #This is now an extruder train. container_stack.insertContainer(0, definition_container) #Add a definition to it so it doesn't complain. mock_super_add_container = unittest.mock.MagicMock() #Takes the role of the Uranium-ContainerRegistry where the resulting containers get registered. @@ -85,7 +85,7 @@ def test_addContainerGlobalStack(container_registry, definition_container): container_registry.addContainer(definition_container) container_stack = UM.Settings.ContainerStack.ContainerStack(stack_id = "Test Container Stack") #A container we're going to convert. - container_stack.addMetaDataEntry("type", "machine") #This is now a global stack. + container_stack.setMetaDataEntry("type", "machine") #This is now a global stack. container_stack.insertContainer(0, definition_container) #Must have a definition. mock_super_add_container = unittest.mock.MagicMock() #Takes the role of the Uranium-ContainerRegistry where the resulting containers get registered. @@ -102,7 +102,7 @@ def test_addContainerGoodSettingVersion(container_registry, definition_container container_registry.addContainer(definition_container) instance = UM.Settings.InstanceContainer.InstanceContainer(container_id = "Test Instance") - instance.addMetaDataEntry("setting_version", CuraApplication.SettingVersion) + instance.setMetaDataEntry("setting_version", CuraApplication.SettingVersion) instance.setDefinition(definition_container.getId()) mock_super_add_container = unittest.mock.MagicMock() #Take the role of the Uranium-ContainerRegistry where the resulting containers get registered. @@ -132,7 +132,7 @@ def test_addContainerBadSettingVersion(container_registry, definition_container) container_registry.addContainer(definition_container) instance = UM.Settings.InstanceContainer.InstanceContainer(container_id = "Test Instance") - instance.addMetaDataEntry("setting_version", 9001) #Wrong version! + instance.setMetaDataEntry("setting_version", 9001) #Wrong version! instance.setDefinition(definition_container.getId()) mock_super_add_container = unittest.mock.MagicMock() #Take the role of the Uranium-ContainerRegistry where the resulting container should not get registered. diff --git a/tests/Settings/TestExtruderStack.py b/tests/Settings/TestExtruderStack.py index b418ae4306..7c463fb9be 100644 --- a/tests/Settings/TestExtruderStack.py +++ b/tests/Settings/TestExtruderStack.py @@ -45,32 +45,32 @@ def extruder_stack() -> cura.Settings.ExtruderStack.ExtruderStack: # \return An instance container instance. def getInstanceContainer(container_type) -> InstanceContainer: container = InstanceContainer(container_id = "InstanceContainer") - container.addMetaDataEntry("type", container_type) + container.setMetaDataEntry("type", container_type) return container def creteEmptyContainers(): empty_container = ContainerRegistry.getInstance().getEmptyInstanceContainer() empty_variant_container = copy.deepcopy(empty_container) empty_variant_container.setMetaDataEntry("id", "empty_variant") - empty_variant_container.addMetaDataEntry("type", "variant") + empty_variant_container.setMetaDataEntry("type", "variant") ContainerRegistry.getInstance().addContainer(empty_variant_container) empty_material_container = copy.deepcopy(empty_container) empty_material_container.setMetaDataEntry("id", "empty_material") - empty_material_container.addMetaDataEntry("type", "material") + empty_material_container.setMetaDataEntry("type", "material") ContainerRegistry.getInstance().addContainer(empty_material_container) empty_quality_container = copy.deepcopy(empty_container) empty_quality_container.setMetaDataEntry("id", "empty_quality") empty_quality_container.setName("Not Supported") - empty_quality_container.addMetaDataEntry("quality_type", "not_supported") - empty_quality_container.addMetaDataEntry("type", "quality") - empty_quality_container.addMetaDataEntry("supported", False) + empty_quality_container.setMetaDataEntry("quality_type", "not_supported") + empty_quality_container.setMetaDataEntry("type", "quality") + empty_quality_container.setMetaDataEntry("supported", False) ContainerRegistry.getInstance().addContainer(empty_quality_container) empty_quality_changes_container = copy.deepcopy(empty_container) empty_quality_changes_container.setMetaDataEntry("id", "empty_quality_changes") - empty_quality_changes_container.addMetaDataEntry("type", "quality_changes") + empty_quality_changes_container.setMetaDataEntry("type", "quality_changes") ContainerRegistry.getInstance().addContainer(empty_quality_changes_container) class DefinitionContainerSubClass(DefinitionContainer): @@ -80,7 +80,7 @@ class DefinitionContainerSubClass(DefinitionContainer): class InstanceContainerSubClass(InstanceContainer): def __init__(self, container_type): super().__init__(container_id = "SubInstanceContainer") - self.addMetaDataEntry("type", container_type) + self.setMetaDataEntry("type", container_type) #############################START OF TEST CASES################################ diff --git a/tests/Settings/TestGlobalStack.py b/tests/Settings/TestGlobalStack.py index 05c7cf1677..3e74e3e575 100755 --- a/tests/Settings/TestGlobalStack.py +++ b/tests/Settings/TestGlobalStack.py @@ -45,32 +45,32 @@ def global_stack() -> cura.Settings.GlobalStack.GlobalStack: # \return An instance container instance. def getInstanceContainer(container_type) -> InstanceContainer: container = InstanceContainer(container_id = "InstanceContainer") - container.addMetaDataEntry("type", container_type) + container.setMetaDataEntry("type", container_type) return container def creteEmptyContainers(): empty_container = ContainerRegistry.getInstance().getEmptyInstanceContainer() empty_variant_container = copy.deepcopy(empty_container) empty_variant_container.setMetaDataEntry("id", "empty_variant") - empty_variant_container.addMetaDataEntry("type", "variant") + empty_variant_container.setMetaDataEntry("type", "variant") ContainerRegistry.getInstance().addContainer(empty_variant_container) empty_material_container = copy.deepcopy(empty_container) empty_material_container.setMetaDataEntry("id", "empty_material") - empty_material_container.addMetaDataEntry("type", "material") + empty_material_container.setMetaDataEntry("type", "material") ContainerRegistry.getInstance().addContainer(empty_material_container) empty_quality_container = copy.deepcopy(empty_container) empty_quality_container.setMetaDataEntry("id", "empty_quality") empty_quality_container.setName("Not Supported") - empty_quality_container.addMetaDataEntry("quality_type", "not_supported") - empty_quality_container.addMetaDataEntry("type", "quality") - empty_quality_container.addMetaDataEntry("supported", False) + empty_quality_container.setMetaDataEntry("quality_type", "not_supported") + empty_quality_container.setMetaDataEntry("type", "quality") + empty_quality_container.setMetaDataEntry("supported", False) ContainerRegistry.getInstance().addContainer(empty_quality_container) empty_quality_changes_container = copy.deepcopy(empty_container) empty_quality_changes_container.setMetaDataEntry("id", "empty_quality_changes") - empty_quality_changes_container.addMetaDataEntry("type", "quality_changes") + empty_quality_changes_container.setMetaDataEntry("type", "quality_changes") ContainerRegistry.getInstance().addContainer(empty_quality_changes_container) class DefinitionContainerSubClass(DefinitionContainer): @@ -80,7 +80,7 @@ class DefinitionContainerSubClass(DefinitionContainer): class InstanceContainerSubClass(InstanceContainer): def __init__(self, container_type): super().__init__(container_id = "SubInstanceContainer") - self.addMetaDataEntry("type", container_type) + self.setMetaDataEntry("type", container_type) #############################START OF TEST CASES################################ From 6a5c0b608dd42b5cf5dff8f62fd427350f8b9d37 Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Wed, 11 Jul 2018 11:24:16 +0200 Subject: [PATCH 101/174] Fix missing layer view --- plugins/CuraEngineBackend/CuraEngineBackend.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index 2b3c2b29f8..6bf06533bd 100755 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -587,7 +587,9 @@ class CuraEngineBackend(QObject, Backend): if self._start_slice_job_build_plate: if self._start_slice_job_build_plate not in self._stored_optimized_layer_data: self._stored_optimized_layer_data[self._start_slice_job_build_plate] = [] - self._stored_optimized_layer_data[self._start_slice_job_build_plate].append(message) + else: + self._start_slice_job_build_plate = 0 + self._stored_optimized_layer_data[self._start_slice_job_build_plate].append(message) ## Called when a progress message is received from the engine. # From 993dd7a90ea8ecc9288feb9c154c5126e67fec67 Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Wed, 11 Jul 2018 11:34:31 +0200 Subject: [PATCH 102/174] Check for None instead of evaluating the variable as True/False. --- plugins/CuraEngineBackend/CuraEngineBackend.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index 6bf06533bd..b588e7d9d5 100755 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -584,12 +584,10 @@ class CuraEngineBackend(QObject, Backend): # # \param message The protobuf message containing sliced layer data. def _onOptimizedLayerMessage(self, message: Arcus.PythonMessage) -> None: - if self._start_slice_job_build_plate: + if self._start_slice_job_build_plate is not None: if self._start_slice_job_build_plate not in self._stored_optimized_layer_data: self._stored_optimized_layer_data[self._start_slice_job_build_plate] = [] - else: - self._start_slice_job_build_plate = 0 - self._stored_optimized_layer_data[self._start_slice_job_build_plate].append(message) + self._stored_optimized_layer_data[self._start_slice_job_build_plate].append(message) ## Called when a progress message is received from the engine. # From 596a7b7169b9c7e41cd4751f99eea656f67ed2b7 Mon Sep 17 00:00:00 2001 From: Aleksei S Date: Wed, 11 Jul 2018 13:23:30 +0200 Subject: [PATCH 103/174] Added signal to prevent window closing if USB printer is printing CURA-5384 --- cura/CuraApplication.py | 19 +++++++ plugins/USBPrinting/USBPrinterOutputDevice.py | 3 + .../USBPrinterOutputDeviceManager.py | 56 ++++++++++++++++++- resources/qml/Cura.qml | 6 ++ 4 files changed, 83 insertions(+), 1 deletion(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index e5c0c5688c..0de5066d8b 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -1701,3 +1701,22 @@ class CuraApplication(QtApplication): @pyqtSlot() def showMoreInformationDialogForAnonymousDataCollection(self): cast(SliceInfo, self._plugin_registry.getPluginObject("SliceInfoPlugin")).showMoreInfoDialog() + + ## Signal to check whether the application can be closed or not + checkCuraCloseChange = pyqtSignal() + + # This variable is necessary to ensure that all methods that were subscribed for the checkCuraCloseChange event + # have been passed checks + _isCuraCanBeClosed = True + + def setCuraCanBeClosed(self, value: bool): + self._isCuraCanBeClosed = value + + @pyqtSlot(result=bool) + def preCloseEventHandler(self)-> bool: + + # If any of checks failed then then _isCuraCanBeClosed should be set to False and Cura will not be closed + # after clicking the quit button + self.checkCuraCloseChange.emit() + + return self._isCuraCanBeClosed diff --git a/plugins/USBPrinting/USBPrinterOutputDevice.py b/plugins/USBPrinting/USBPrinterOutputDevice.py index f9c6011f7b..fc9558056b 100644 --- a/plugins/USBPrinting/USBPrinterOutputDevice.py +++ b/plugins/USBPrinting/USBPrinterOutputDevice.py @@ -435,6 +435,9 @@ class USBPrinterOutputDevice(PrinterOutputDevice): self._gcode_position += 1 + def getIsPrinting(self)-> bool: + return self._is_printing + class FirmwareUpdateState(IntEnum): idle = 0 diff --git a/plugins/USBPrinting/USBPrinterOutputDeviceManager.py b/plugins/USBPrinting/USBPrinterOutputDeviceManager.py index 2ee85187ee..b2dc24480c 100644 --- a/plugins/USBPrinting/USBPrinterOutputDeviceManager.py +++ b/plugins/USBPrinting/USBPrinterOutputDeviceManager.py @@ -6,7 +6,8 @@ import platform import time import serial.tools.list_ports -from PyQt5.QtCore import QObject, pyqtSlot, pyqtProperty, pyqtSignal +from PyQt5.QtCore import QObject, pyqtSlot, pyqtSignal, QCoreApplication +from PyQt5.QtWidgets import QMessageBox from UM.Logger import Logger from UM.Resources import Resources @@ -50,6 +51,11 @@ class USBPrinterOutputDeviceManager(QObject, OutputDevicePlugin): self._application.globalContainerStackChanged.connect(self.updateUSBPrinterOutputDevices) + self._application.checkCuraCloseChange.connect(self.checkWheterUSBIsActiveOrNot) + + self._lock = threading.Lock() + self._confirm_dialog_visible = False + # The method updates/reset the USB settings for all connected USB devices def updateUSBPrinterOutputDevices(self): for key, device in self._usb_output_devices.items(): @@ -184,3 +190,51 @@ class USBPrinterOutputDeviceManager(QObject, OutputDevicePlugin): @classmethod def getInstance(cls, *args, **kwargs) -> "USBPrinterOutputDeviceManager": return cls.__instance + + # The method checks whether a printer is printing via USB or not before closing cura. If the printer is printing then pop up a + # dialog to confirm stop printing + def checkWheterUSBIsActiveOrNot(self)-> None: + + is_printing = False + for key, device in self._usb_output_devices.items(): + if type(device) is USBPrinterOutputDevice.USBPrinterOutputDevice: + if device.getIsPrinting(): + is_printing = True + break + + if is_printing: + if threading.current_thread() != threading.main_thread(): + self._lock.acquire() + self._confirm_dialog_visible = True + + CuraApplication.getInstance().messageBox(i18n_catalog.i18nc("@window:title", "Confirm stop printing"), + i18n_catalog.i18nc("@window:message","A USB print is in progress, closing Cura will stop this print. Are you sure?"), + buttons=QMessageBox.Yes + QMessageBox.No, + icon=QMessageBox.Question, + callback=self._messageBoxCallback) + # Wait for dialog result + self.waitForClose() + + ## Block thread until the dialog is closed. + def waitForClose(self)-> None: + if self._confirm_dialog_visible: + if threading.current_thread() != threading.main_thread(): + self._lock.acquire() + self._lock.release() + else: + # If this is not run from a separate thread, we need to ensure that the events are still processed. + while self._confirm_dialog_visible: + time.sleep(1 / 50) + QCoreApplication.processEvents() # Ensure that the GUI does not freeze. + + def _messageBoxCallback(self, button): + if button == QMessageBox.Yes: + self._application.setCuraCanBeClosed(True) + else: + self._application.setCuraCanBeClosed(False) + + self._confirm_dialog_visible = False + try: + self._lock.release() + except: + pass \ No newline at end of file diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index 692a6fc259..20638e8850 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -22,6 +22,12 @@ UM.MainWindow backgroundColor: UM.Theme.getColor("viewport_background") + // Event which does the check before closing the window + onPreCloseChange: + { + event.accepted = CuraApplication.preCloseEventHandler() + } + // This connection is here to support legacy printer output devices that use the showPrintMonitor signal on Application to switch to the monitor stage // It should be phased out in newer plugin versions. Connections From abf1610923d991c0b7f2c3adf41c26bd61d14406 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 11 Jul 2018 13:29:54 +0200 Subject: [PATCH 104/174] Rename Custom FDM Printer to Custom FFF printer FFF is easier to type... But that's probably not the real reason why we need to do this. Contributes to issue CURA-5461. --- resources/definitions/custom.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/definitions/custom.def.json b/resources/definitions/custom.def.json index e973a75bbf..d0d9e904c5 100644 --- a/resources/definitions/custom.def.json +++ b/resources/definitions/custom.def.json @@ -1,6 +1,6 @@ { "version": 2, - "name": "Custom FDM printer", + "name": "Custom FFF printer", "inherits": "fdmprinter", "metadata": { "visible": true, From 2bd8350141439814d92827ef67243c93f3d70872 Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Thu, 12 Jul 2018 14:06:34 +0200 Subject: [PATCH 105/174] Added error checking, added typing, renamed function. CURA-5389 --- cura/CuraPackageManager.py | 4 +++- cura/Machines/MaterialGroup.py | 4 ++-- .../qml/ToolboxConfirmUninstallResetDialog.qml | 13 ++++++++----- plugins/Toolbox/src/Toolbox.py | 9 ++++++--- plugins/UM3NetworkPrinting/LegacyUM3OutputDevice.py | 10 ++++++++-- 5 files changed, 27 insertions(+), 13 deletions(-) diff --git a/cura/CuraPackageManager.py b/cura/CuraPackageManager.py index 363b8034ec..6422469bdf 100644 --- a/cura/CuraPackageManager.py +++ b/cura/CuraPackageManager.py @@ -1,6 +1,8 @@ # Copyright (c) 2018 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. +from typing import List, Tuple + from cura.CuraApplication import CuraApplication #To find some resource types. from cura.Settings.GlobalStack import GlobalStack @@ -22,7 +24,7 @@ class CuraPackageManager(PackageManager): # empty if it is never used. # It loops through all the package contents and see if some of the ids are used. # The list consists of 3-tuples: (global_stack, extruder_nr, container_id) - def getMachinesUsingPackage(self, package_id: str): + def getMachinesUsingPackage(self, package_id: str) -> Tuple[List[Tuple[GlobalStack, str, str]], List[Tuple[GlobalStack, str, str]]]: ids = self.getPackageContainerIds(package_id) container_stacks = self._application.getContainerRegistry().findContainerStacks() global_stacks = [container_stack for container_stack in container_stacks if isinstance(container_stack, GlobalStack)] diff --git a/cura/Machines/MaterialGroup.py b/cura/Machines/MaterialGroup.py index e05647e674..8a73796a7a 100644 --- a/cura/Machines/MaterialGroup.py +++ b/cura/Machines/MaterialGroup.py @@ -24,8 +24,8 @@ class MaterialGroup: def __init__(self, name: str, root_material_node: "MaterialNode") -> None: self.name = name self.is_read_only = False - self.root_material_node = root_material_node # type: MaterialNode - self.derived_material_node_list = [] # type: List[MaterialNode] + self.root_material_node = root_material_node # type: MaterialNode + self.derived_material_node_list = [] # type: List[MaterialNode] def __str__(self) -> str: return "%s[%s]" % (self.__class__.__name__, self.name) diff --git a/plugins/Toolbox/resources/qml/ToolboxConfirmUninstallResetDialog.qml b/plugins/Toolbox/resources/qml/ToolboxConfirmUninstallResetDialog.qml index 83ace5f80b..4aa8b883b7 100644 --- a/plugins/Toolbox/resources/qml/ToolboxConfirmUninstallResetDialog.qml +++ b/plugins/Toolbox/resources/qml/ToolboxConfirmUninstallResetDialog.qml @@ -32,11 +32,14 @@ UM.Dialog { UM.I18nCatalog { id: catalog; name: "cura" } - anchors.fill: parent - anchors.leftMargin: Math.round(20 * screenScaleFactor) - anchors.rightMargin: Math.round(20 * screenScaleFactor) - anchors.topMargin: Math.round(10 * screenScaleFactor) - anchors.bottomMargin: Math.round(10 * screenScaleFactor) + anchors + { + fill: parent + leftMargin: Math.round(20 * screenScaleFactor) + rightMargin: Math.round(20 * screenScaleFactor) + topMargin: Math.round(10 * screenScaleFactor) + bottomMargin: Math.round(10 * screenScaleFactor) + } spacing: Math.round(15 * screenScaleFactor) Label diff --git a/plugins/Toolbox/src/Toolbox.py b/plugins/Toolbox/src/Toolbox.py index 31b9dda9f4..b1128722e9 100644 --- a/plugins/Toolbox/src/Toolbox.py +++ b/plugins/Toolbox/src/Toolbox.py @@ -330,7 +330,10 @@ class Toolbox(QObject, Extension): if self._confirm_reset_dialog is None: self._confirm_reset_dialog = self._createDialog("ToolboxConfirmUninstallResetDialog.qml") self.uninstallVariablesChanged.emit() - self._confirm_reset_dialog.show() + if self._confirm_reset_dialog is None: + Logger.log("e", "ToolboxConfirmUninstallResetDialog should have been initialized, but it is not. Not showing dialog and not uninstalling package.") + else: + self._confirm_reset_dialog.show() else: # Plain uninstall self.uninstall(package_id) @@ -368,13 +371,13 @@ class Toolbox(QObject, Extension): default_quality_group = quality_manager.getDefaultQualityType(global_stack) machine_manager.setQualityGroup(default_quality_group, global_stack = global_stack) - self._markPackageMaterialsAsRemove(self._package_id_to_uninstall) + self._markPackageMaterialsAsToBeUninstalled(self._package_id_to_uninstall) self.uninstall(self._package_id_to_uninstall) self._resetUninstallVariables() self.closeConfirmResetDialog() - def _markPackageMaterialsAsRemove(self, package_id: str) -> None: + def _markPackageMaterialsAsToBeUninstalled(self, package_id: str) -> None: container_registry = self._application.getContainerRegistry() all_containers = self._package_manager.getPackageContainerIds(package_id) diff --git a/plugins/UM3NetworkPrinting/LegacyUM3OutputDevice.py b/plugins/UM3NetworkPrinting/LegacyUM3OutputDevice.py index 4c5d56e0da..f38c1a1c7a 100644 --- a/plugins/UM3NetworkPrinting/LegacyUM3OutputDevice.py +++ b/plugins/UM3NetworkPrinting/LegacyUM3OutputDevice.py @@ -455,8 +455,14 @@ class LegacyUM3OutputDevice(NetworkedPrinterOutputDevice): self.setAuthenticationState(AuthState.AuthenticationDenied) self._authentication_failed_message.show() - def _saveAuthentication(self): + def _saveAuthentication(self) -> None: global_container_stack = CuraApplication.getInstance().getGlobalContainerStack() + if self._authentication_key is None: + Logger.log("e", "Authentication key is None, nothing to save.") + return + if self._authentication_id is None: + Logger.log("e", "Authentication id is None, nothing to save.") + return if global_container_stack: global_container_stack.setMetaDataEntry("network_authentication_key", self._authentication_key) @@ -631,4 +637,4 @@ class LegacyUM3OutputDevice(NetworkedPrinterOutputDevice): result = "********" + result return result - return self._authentication_key \ No newline at end of file + return self._authentication_key From e88362930d991e81ee2dc5bbf2b6650215bbed1a Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Thu, 12 Jul 2018 14:34:42 +0200 Subject: [PATCH 106/174] CURA-5562 Don't trigger the stop slicing if some nodes without build plate associated with it changes in the scene, such as the NozzleNode in the SimulationView. --- plugins/CuraEngineBackend/CuraEngineBackend.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index b588e7d9d5..9aff42a9e1 100755 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -457,7 +457,8 @@ class CuraEngineBackend(QObject, Backend): # Only count sliceable objects if node.callDecoration("isSliceable"): build_plate_number = node.callDecoration("getBuildPlateNumber") - num_objects[build_plate_number] += 1 + if build_plate_number is not None: + num_objects[build_plate_number] += 1 return num_objects ## Listener for when the scene has changed. @@ -490,7 +491,9 @@ class CuraEngineBackend(QObject, Backend): if mesh_data and mesh_data.getVertices() is None: return - build_plate_changed.add(source_build_plate_number) + # There are some SceneNodes that do not have any build plate associated, then do not add to the list. + if source_build_plate_number is not None: + build_plate_changed.add(source_build_plate_number) if not build_plate_changed: return From e53e62ccab47e81aac180fa4c2cf3cf951f5524a Mon Sep 17 00:00:00 2001 From: Mark Date: Thu, 12 Jul 2018 14:54:10 +0200 Subject: [PATCH 107/174] CURA-5458 Use Save and Export --- resources/qml/Cura.qml | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index 20638e8850..eb89160c7a 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -122,29 +122,10 @@ UM.MainWindow MenuSeparator { } - MenuItem - { - text: catalog.i18nc("@action:inmenu menubar:file", "&Save Selection to File"); - enabled: UM.Selection.hasSelection; - iconName: "document-save-as"; - onTriggered: UM.OutputDeviceManager.requestWriteSelectionToDevice("local_file", PrintInformation.jobName, { "filter_by_machine": false, "preferred_mimetype": "application/vnd.ms-package.3dmanufacturing-3dmodel+xml"}); - } - - MenuItem - { - id: saveAsMenu - text: catalog.i18nc("@title:menu menubar:file", "Save &As...") - onTriggered: - { - var localDeviceId = "local_file"; - UM.OutputDeviceManager.requestWriteToDevice(localDeviceId, PrintInformation.jobName, { "filter_by_machine": false, "preferred_mimetype": "application/vnd.ms-package.3dmanufacturing-3dmodel+xml"}); - } - } - MenuItem { id: saveWorkspaceMenu - text: catalog.i18nc("@title:menu menubar:file","Save &Project...") + text: catalog.i18nc("@title:menu menubar:file","&Save..") onTriggered: { var args = { "filter_by_machine": false, "file_type": "workspace", "preferred_mimetype": "application/x-curaproject+xml" }; @@ -160,6 +141,27 @@ UM.MainWindow } } + MenuItem + { + id: saveAsMenu + text: catalog.i18nc("@title:menu menubar:file", "&Export..") + onTriggered: + { + var localDeviceId = "local_file"; + UM.OutputDeviceManager.requestWriteToDevice(localDeviceId, PrintInformation.jobName, { "filter_by_machine": false, "preferred_mimetype": "application/vnd.ms-package.3dmanufacturing-3dmodel+xml"}); + } + } + + MenuItem + { + text: catalog.i18nc("@action:inmenu menubar:file", "Export Selection to File"); + enabled: UM.Selection.hasSelection; + iconName: "document-save-as"; + onTriggered: UM.OutputDeviceManager.requestWriteSelectionToDevice("local_file", PrintInformation.jobName, { "filter_by_machine": false, "preferred_mimetype": "application/vnd.ms-package.3dmanufacturing-3dmodel+xml"}); + } + + MenuSeparator { } + MenuItem { action: Cura.Actions.reloadAll; } MenuSeparator { } From 395c5d3a8bb9aaf6d301df5b49c2178e28a99d45 Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Thu, 12 Jul 2018 15:16:01 +0200 Subject: [PATCH 108/174] CURA-5458 Add three dots in the options that will open a new window. Add the Save option together with the New and Open, and then separate it from the Export options. --- resources/qml/Cura.qml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index eb89160c7a..7b4f3c613b 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -120,12 +120,10 @@ UM.MainWindow RecentFilesMenu { } - MenuSeparator { } - MenuItem { id: saveWorkspaceMenu - text: catalog.i18nc("@title:menu menubar:file","&Save..") + text: catalog.i18nc("@title:menu menubar:file","&Save...") onTriggered: { var args = { "filter_by_machine": false, "file_type": "workspace", "preferred_mimetype": "application/x-curaproject+xml" }; @@ -141,10 +139,12 @@ UM.MainWindow } } + MenuSeparator { } + MenuItem { id: saveAsMenu - text: catalog.i18nc("@title:menu menubar:file", "&Export..") + text: catalog.i18nc("@title:menu menubar:file", "&Export...") onTriggered: { var localDeviceId = "local_file"; @@ -154,7 +154,7 @@ UM.MainWindow MenuItem { - text: catalog.i18nc("@action:inmenu menubar:file", "Export Selection to File"); + text: catalog.i18nc("@action:inmenu menubar:file", "Export Selection..."); enabled: UM.Selection.hasSelection; iconName: "document-save-as"; onTriggered: UM.OutputDeviceManager.requestWriteSelectionToDevice("local_file", PrintInformation.jobName, { "filter_by_machine": false, "preferred_mimetype": "application/vnd.ms-package.3dmanufacturing-3dmodel+xml"}); From abbbdb17e6288f4b4a536eccc8dea4e3a355a679 Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Thu, 12 Jul 2018 15:17:46 +0200 Subject: [PATCH 109/174] Fix if you randomly click around in the materials then some spool_weights of 0 gets mixed up. The cause was that base.containerId was not updated at the same time as properties.guid. CURA-5408 --- resources/qml/Preferences/MaterialView.qml | 14 +++++--------- resources/qml/Preferences/MaterialsPage.qml | 2 ++ 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/resources/qml/Preferences/MaterialView.qml b/resources/qml/Preferences/MaterialView.qml index 2f705a8b5e..0929f1790a 100644 --- a/resources/qml/Preferences/MaterialView.qml +++ b/resources/qml/Preferences/MaterialView.qml @@ -269,7 +269,7 @@ TabView { id: spoolWeightSpinBox width: scrollView.columnWidth - value: base.getMaterialPreferenceValue(properties.guid, "spool_weight") + value: base.getMaterialPreferenceValue(properties.guid, "spool_weight", Cura.ContainerManager.getContainerMetaDataEntry(properties.container_id, "properties/weight")) suffix: " g" stepSize: 100 decimals: 0 @@ -466,7 +466,7 @@ TabView } if(!spoolWeight) { - spoolWeight = base.getMaterialPreferenceValue(properties.guid, "spool_weight"); + spoolWeight = base.getMaterialPreferenceValue(properties.guid, "spool_weight", Cura.ContainerManager.getContainerMetaDataEntry(properties.container_id, "properties/weight")); } if (diameter == 0 || density == 0 || spoolWeight == 0) @@ -535,18 +535,14 @@ TabView UM.Preferences.setValue("cura/material_settings", JSON.stringify(materialPreferenceValues)); } - function getMaterialPreferenceValue(material_guid, entry_name) + function getMaterialPreferenceValue(material_guid, entry_name, default_value) { if(material_guid in materialPreferenceValues && entry_name in materialPreferenceValues[material_guid]) { return materialPreferenceValues[material_guid][entry_name]; } - if (entry_name === "spool_weight") { - // get the default value from the metadata - var material_weight = Cura.ContainerManager.getContainerMetaDataEntry(base.containerId, "properties/weight"); - return material_weight || 0; - } - return 0; + default_value = default_value | 0; + return default_value; } // update the display name of the material diff --git a/resources/qml/Preferences/MaterialsPage.qml b/resources/qml/Preferences/MaterialsPage.qml index fb3623569c..e2e3edec2f 100644 --- a/resources/qml/Preferences/MaterialsPage.qml +++ b/resources/qml/Preferences/MaterialsPage.qml @@ -486,6 +486,7 @@ Item materialProperties.name = currentItem.name ? currentItem.name : "Unknown"; materialProperties.guid = currentItem.guid; + materialProperties.container_id = currentItem.container_id; materialProperties.brand = currentItem.brand ? currentItem.brand : "Unknown"; materialProperties.material = currentItem.material ? currentItem.material : "Unknown"; @@ -543,6 +544,7 @@ Item id: materialProperties property string guid: "00000000-0000-0000-0000-000000000000" + property string container_id: "Unknown"; property string name: "Unknown"; property string profile_type: "Unknown"; property string brand: "Unknown"; From ac3d3bc5c08671a5afee481ea0c8f27e69ba98ad Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Fri, 13 Jul 2018 08:08:56 +0200 Subject: [PATCH 110/174] Revert "Added signal to prevent window closing if USB printer is printing" This reverts commit 596a7b7169b9c7e41cd4751f99eea656f67ed2b7. --- cura/CuraApplication.py | 19 ------- plugins/USBPrinting/USBPrinterOutputDevice.py | 3 - .../USBPrinterOutputDeviceManager.py | 56 +------------------ resources/qml/Cura.qml | 6 -- 4 files changed, 1 insertion(+), 83 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 3ffa4291ba..f6a932546a 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -1701,22 +1701,3 @@ class CuraApplication(QtApplication): @pyqtSlot() def showMoreInformationDialogForAnonymousDataCollection(self): cast(SliceInfo, self._plugin_registry.getPluginObject("SliceInfoPlugin")).showMoreInfoDialog() - - ## Signal to check whether the application can be closed or not - checkCuraCloseChange = pyqtSignal() - - # This variable is necessary to ensure that all methods that were subscribed for the checkCuraCloseChange event - # have been passed checks - _isCuraCanBeClosed = True - - def setCuraCanBeClosed(self, value: bool): - self._isCuraCanBeClosed = value - - @pyqtSlot(result=bool) - def preCloseEventHandler(self)-> bool: - - # If any of checks failed then then _isCuraCanBeClosed should be set to False and Cura will not be closed - # after clicking the quit button - self.checkCuraCloseChange.emit() - - return self._isCuraCanBeClosed diff --git a/plugins/USBPrinting/USBPrinterOutputDevice.py b/plugins/USBPrinting/USBPrinterOutputDevice.py index fc9558056b..f9c6011f7b 100644 --- a/plugins/USBPrinting/USBPrinterOutputDevice.py +++ b/plugins/USBPrinting/USBPrinterOutputDevice.py @@ -435,9 +435,6 @@ class USBPrinterOutputDevice(PrinterOutputDevice): self._gcode_position += 1 - def getIsPrinting(self)-> bool: - return self._is_printing - class FirmwareUpdateState(IntEnum): idle = 0 diff --git a/plugins/USBPrinting/USBPrinterOutputDeviceManager.py b/plugins/USBPrinting/USBPrinterOutputDeviceManager.py index b2dc24480c..2ee85187ee 100644 --- a/plugins/USBPrinting/USBPrinterOutputDeviceManager.py +++ b/plugins/USBPrinting/USBPrinterOutputDeviceManager.py @@ -6,8 +6,7 @@ import platform import time import serial.tools.list_ports -from PyQt5.QtCore import QObject, pyqtSlot, pyqtSignal, QCoreApplication -from PyQt5.QtWidgets import QMessageBox +from PyQt5.QtCore import QObject, pyqtSlot, pyqtProperty, pyqtSignal from UM.Logger import Logger from UM.Resources import Resources @@ -51,11 +50,6 @@ class USBPrinterOutputDeviceManager(QObject, OutputDevicePlugin): self._application.globalContainerStackChanged.connect(self.updateUSBPrinterOutputDevices) - self._application.checkCuraCloseChange.connect(self.checkWheterUSBIsActiveOrNot) - - self._lock = threading.Lock() - self._confirm_dialog_visible = False - # The method updates/reset the USB settings for all connected USB devices def updateUSBPrinterOutputDevices(self): for key, device in self._usb_output_devices.items(): @@ -190,51 +184,3 @@ class USBPrinterOutputDeviceManager(QObject, OutputDevicePlugin): @classmethod def getInstance(cls, *args, **kwargs) -> "USBPrinterOutputDeviceManager": return cls.__instance - - # The method checks whether a printer is printing via USB or not before closing cura. If the printer is printing then pop up a - # dialog to confirm stop printing - def checkWheterUSBIsActiveOrNot(self)-> None: - - is_printing = False - for key, device in self._usb_output_devices.items(): - if type(device) is USBPrinterOutputDevice.USBPrinterOutputDevice: - if device.getIsPrinting(): - is_printing = True - break - - if is_printing: - if threading.current_thread() != threading.main_thread(): - self._lock.acquire() - self._confirm_dialog_visible = True - - CuraApplication.getInstance().messageBox(i18n_catalog.i18nc("@window:title", "Confirm stop printing"), - i18n_catalog.i18nc("@window:message","A USB print is in progress, closing Cura will stop this print. Are you sure?"), - buttons=QMessageBox.Yes + QMessageBox.No, - icon=QMessageBox.Question, - callback=self._messageBoxCallback) - # Wait for dialog result - self.waitForClose() - - ## Block thread until the dialog is closed. - def waitForClose(self)-> None: - if self._confirm_dialog_visible: - if threading.current_thread() != threading.main_thread(): - self._lock.acquire() - self._lock.release() - else: - # If this is not run from a separate thread, we need to ensure that the events are still processed. - while self._confirm_dialog_visible: - time.sleep(1 / 50) - QCoreApplication.processEvents() # Ensure that the GUI does not freeze. - - def _messageBoxCallback(self, button): - if button == QMessageBox.Yes: - self._application.setCuraCanBeClosed(True) - else: - self._application.setCuraCanBeClosed(False) - - self._confirm_dialog_visible = False - try: - self._lock.release() - except: - pass \ No newline at end of file diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index 7b4f3c613b..d187f34122 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -22,12 +22,6 @@ UM.MainWindow backgroundColor: UM.Theme.getColor("viewport_background") - // Event which does the check before closing the window - onPreCloseChange: - { - event.accepted = CuraApplication.preCloseEventHandler() - } - // This connection is here to support legacy printer output devices that use the showPrintMonitor signal on Application to switch to the monitor stage // It should be phased out in newer plugin versions. Connections From c0b7e40b0d250818060b6dbaded2a6de0fd6b7e6 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Fri, 13 Jul 2018 09:16:09 +0200 Subject: [PATCH 111/174] Add on-exit callback management and check for active USB printing CURA-5384 --- cura/CuraApplication.py | 37 ++++++++-- cura/TaskManagement/OnExitCallbackManager.py | 69 +++++++++++++++++++ cura/TaskManagement/__init__.py | 0 plugins/USBPrinting/USBPrinterOutputDevice.py | 19 +++++ resources/qml/Cura.qml | 42 +++++++++-- 5 files changed, 158 insertions(+), 9 deletions(-) create mode 100644 cura/TaskManagement/OnExitCallbackManager.py create mode 100644 cura/TaskManagement/__init__.py diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index f6a932546a..a2ef85f3de 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -5,6 +5,7 @@ import copy import os import sys import time +from typing import cast, TYPE_CHECKING, Optional import numpy @@ -13,8 +14,6 @@ from PyQt5.QtGui import QColor, QIcon from PyQt5.QtWidgets import QMessageBox from PyQt5.QtQml import qmlRegisterUncreatableType, qmlRegisterSingletonType, qmlRegisterType -from typing import cast, TYPE_CHECKING - from UM.Scene.SceneNode import SceneNode from UM.Scene.Camera import Camera from UM.Math.Vector import Vector @@ -97,6 +96,8 @@ from . import CuraSplashScreen from . import CameraImageProvider from . import MachineActionManager +from cura.TaskManagement.OnExitCallbackManager import OnExitCallbackManager + from cura.Settings.MachineManager import MachineManager from cura.Settings.ExtruderManager import ExtruderManager from cura.Settings.UserChangesModel import UserChangesModel @@ -158,6 +159,8 @@ class CuraApplication(QtApplication): self._boot_loading_time = time.time() + self._on_exit_callback_manager = OnExitCallbackManager(self) + # Variables set from CLI self._files_to_open = [] self._use_single_instance = False @@ -520,8 +523,8 @@ class CuraApplication(QtApplication): def setNeedToShowUserAgreement(self, set_value = True): self._need_to_show_user_agreement = set_value - ## The "Quit" button click event handler. - @pyqtSlot() + # DO NOT call this function to close the application, use checkAndExitApplication() instead which will perform + # pre-exit checks such as checking for in-progress USB printing, etc. def closeApplication(self): Logger.log("i", "Close application") main_window = self.getMainWindow() @@ -530,6 +533,32 @@ class CuraApplication(QtApplication): else: self.exit(0) + # This function first performs all upon-exit checks such as USB printing that is in progress. + # Use this to close the application. + @pyqtSlot() + def checkAndExitApplication(self) -> None: + self._on_exit_callback_manager.resetCurrentState() + self._on_exit_callback_manager.triggerNextCallback() + + @pyqtSlot(result = bool) + def getIsAllChecksPassed(self) -> bool: + return self._on_exit_callback_manager.getIsAllChecksPassed() + + def getOnExitCallbackManager(self) -> "OnExitCallbackManager": + return self._on_exit_callback_manager + + def triggerNextExitCheck(self) -> None: + self._on_exit_callback_manager.triggerNextCallback() + + showConfirmExitDialog = pyqtSignal(str, arguments = ["message"]) + + def setConfirmExitDialogCallback(self, callback): + self._confirm_exit_dialog_callback = callback + + @pyqtSlot(bool) + def callConfirmExitDialogCallback(self, yes_or_no: bool): + self._confirm_exit_dialog_callback(yes_or_no) + ## Signal to connect preferences action in QML showPreferencesWindow = pyqtSignal() diff --git a/cura/TaskManagement/OnExitCallbackManager.py b/cura/TaskManagement/OnExitCallbackManager.py new file mode 100644 index 0000000000..9e641a1778 --- /dev/null +++ b/cura/TaskManagement/OnExitCallbackManager.py @@ -0,0 +1,69 @@ +# Copyright (c) 2018 Ultimaker B.V. +# Cura is released under the terms of the LGPLv3 or higher. + +from typing import TYPE_CHECKING, List + +from UM.Logger import Logger + +if TYPE_CHECKING: + from cura.CuraApplication import CuraApplication + + +# +# This class manages a all registered upon-exit checks that need to be perform when the application tries to exit. +# For example, to show a confirmation dialog when there is USB printing in progress, etc. All callbacks will be called +# in the order of when they got registered. If all callbacks "passes", that is, for example, if the user clicks "yes" +# on the exit confirmation dialog or nothing that's blocking the exit, then the application will quit after that. +# +class OnExitCallbackManager: + + def __init__(self, application: "CuraApplication") -> None: + self._application = application + self._on_exit_callback_list = list() # type: List[callable] + self._current_callback_idx = 0 + self._is_all_checks_passed = False + + def addCallback(self, callback: callable) -> None: + self._on_exit_callback_list.append(callback) + Logger.log("d", "on-app-exit callback [%s] added.", callback) + + # Reset the current state so the next time it will call all the callbacks again. + def resetCurrentState(self) -> None: + self._current_callback_idx = 0 + self._is_all_checks_passed = False + + def getIsAllChecksPassed(self) -> bool: + return self._is_all_checks_passed + + # Trigger the next callback if available. If not, it means that all callbacks have "passed", which means we should + # not block the application to quit, and it will call the application to actually quit. + def triggerNextCallback(self) -> None: + # Get the next callback and schedule that if + this_callback = None + if self._current_callback_idx < len(self._on_exit_callback_list): + this_callback = self._on_exit_callback_list[self._current_callback_idx] + self._current_callback_idx += 1 + + if this_callback is not None: + Logger.log("d", "Scheduled the next on-app-exit callback [%s]", this_callback) + self._application.callLater(this_callback) + else: + Logger.log("d", "No more on-app-exit callbacks to process. Tell the app to exit.") + + self._is_all_checks_passed = True + + # Tell the application to exit + self._application.callLater(self._application.closeApplication) + + # This is the callback function which an on-exit callback should call when it finishes, it should provide the + # "should_proceed" flag indicating whether this check has "passed", or in other words, whether quiting the + # application should be blocked. If the last on-exit callback doesn't block the quiting, it will call the next + # registered on-exit callback if available. + def onCurrentCallbackFinished(self, should_proceed: bool = True) -> None: + if not should_proceed: + Logger.log("d", "on-app-exit callback finished and we should not proceed.") + # Reset the state + self.resetCurrentState() + return + + self.triggerNextCallback() diff --git a/cura/TaskManagement/__init__.py b/cura/TaskManagement/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/plugins/USBPrinting/USBPrinterOutputDevice.py b/plugins/USBPrinting/USBPrinterOutputDevice.py index f9c6011f7b..ddb215d882 100644 --- a/plugins/USBPrinting/USBPrinterOutputDevice.py +++ b/plugins/USBPrinting/USBPrinterOutputDevice.py @@ -88,6 +88,25 @@ class USBPrinterOutputDevice(PrinterOutputDevice): self._command_received = Event() self._command_received.set() + CuraApplication.getInstance().getOnExitCallbackManager().addCallback(self._checkActivePrintingUponAppExit) + + # This is a callback function that checks if there is any printing in progress via USB when the application tries + # to exit. If so, it will show a confirmation before + def _checkActivePrintingUponAppExit(self) -> None: + application = CuraApplication.getInstance() + if not self._is_printing: + # This USB printer is not printing, so we have nothing to do. Call the next callback if exists. + application.triggerNextExitCheck() + return + + application.setConfirmExitDialogCallback(self._onConfirmExitDialogResult) + application.showConfirmExitDialog.emit("USB printing is in progress") + + def _onConfirmExitDialogResult(self, result: bool) -> None: + if result: + application = CuraApplication.getInstance() + application.triggerNextExitCheck() + ## Reset USB device settings # def resetDeviceSettings(self): diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index d187f34122..2ad0c75cbe 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -1,11 +1,11 @@ // Copyright (c) 2017 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. -import QtQuick 2.2 -import QtQuick.Controls 1.1 -import QtQuick.Controls.Styles 1.1 +import QtQuick 2.7 +import QtQuick.Controls 1.4 +import QtQuick.Controls.Styles 1.4 import QtQuick.Layouts 1.1 -import QtQuick.Dialogs 1.1 +import QtQuick.Dialogs 1.2 import UM 1.3 as UM import Cura 1.0 as Cura @@ -700,10 +700,42 @@ UM.MainWindow id: contextMenu } + onPreClosing: + { + close.accepted = CuraApplication.getIsAllChecksPassed(); + if (!close.accepted) + { + CuraApplication.checkAndExitApplication(); + } + } + + MessageDialog + { + id: exitConfirmationDialog + title: catalog.i18nc("@title:window", "Closing Cura") + text: catalog.i18nc("@label", "Are you sure you want to exit Cura?") + icon: StandardIcon.Question + modality: Qt.ApplicationModal + standardButtons: StandardButton.Yes | StandardButton.No + onYes: CuraApplication.callConfirmExitDialogCallback(true) + onNo: CuraApplication.callConfirmExitDialogCallback(false) + onRejected: CuraApplication.callConfirmExitDialogCallback(false) + } + + Connections + { + target: CuraApplication + onShowConfirmExitDialog: + { + exitConfirmationDialog.text = message; + exitConfirmationDialog.open(); + } + } + Connections { target: Cura.Actions.quit - onTriggered: CuraApplication.closeApplication(); + onTriggered: CuraApplication.exitApplication(); } Connections From e6c6edc9ebaaff9b21d78d245ea4963ffaac73d9 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Fri, 13 Jul 2018 09:21:34 +0200 Subject: [PATCH 112/174] Fix code style CURA-5384 --- cura/TaskManagement/OnExitCallbackManager.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cura/TaskManagement/OnExitCallbackManager.py b/cura/TaskManagement/OnExitCallbackManager.py index 9e641a1778..2e8e42595b 100644 --- a/cura/TaskManagement/OnExitCallbackManager.py +++ b/cura/TaskManagement/OnExitCallbackManager.py @@ -1,7 +1,7 @@ # Copyright (c) 2018 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. -from typing import TYPE_CHECKING, List +from typing import TYPE_CHECKING, Callable, List from UM.Logger import Logger @@ -19,11 +19,11 @@ class OnExitCallbackManager: def __init__(self, application: "CuraApplication") -> None: self._application = application - self._on_exit_callback_list = list() # type: List[callable] + self._on_exit_callback_list = list() # type: List[Callable] self._current_callback_idx = 0 self._is_all_checks_passed = False - def addCallback(self, callback: callable) -> None: + def addCallback(self, callback: Callable) -> None: self._on_exit_callback_list.append(callback) Logger.log("d", "on-app-exit callback [%s] added.", callback) From 302072bd6e8c6ee1d3b44a3d39486bcf08e24722 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 13 Jul 2018 09:40:43 +0200 Subject: [PATCH 113/174] Set change log URL in Cura instead of Uranium This is a Cura-specific URL that was in Uranium. Contributes to issue CURA-4952. --- cura/CuraApplication.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 3ffa4291ba..16689f05ff 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -279,6 +279,8 @@ class CuraApplication(QtApplication): self._machine_action_manager = MachineActionManager.MachineActionManager(self) self._machine_action_manager.initialize() + self.change_log_url = "https://ultimaker.com/ultimaker-cura-latest-features" + def __sendCommandToSingleInstance(self): self._single_instance = SingleInstance(self, self._files_to_open) From 5e4ccf004daf3fa8bf75b27676f69f86bd345142 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 13 Jul 2018 09:59:32 +0200 Subject: [PATCH 114/174] Make default job name translateable Contributes to issue CURA-5367. --- resources/qml/JobSpecs.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/JobSpecs.qml b/resources/qml/JobSpecs.qml index 3b10cf59d5..20ec8ce289 100644 --- a/resources/qml/JobSpecs.qml +++ b/resources/qml/JobSpecs.qml @@ -81,7 +81,7 @@ Item { text: PrintInformation.jobName horizontalAlignment: TextInput.AlignRight onEditingFinished: { - var new_name = text == "" ? "unnamed" : text; + var new_name = text == "" ? catalog.i18nc("@text Print job name", "unnamed") : text; PrintInformation.setJobName(new_name, true); printJobTextfield.focus = false; } From 49bd249819924f0cf1f0881c646fc01fd102f6f9 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Fri, 13 Jul 2018 11:09:58 +0200 Subject: [PATCH 115/174] Update text for USB printing exit confirmation CURA-5384 --- plugins/USBPrinting/USBPrinterOutputDevice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/USBPrinting/USBPrinterOutputDevice.py b/plugins/USBPrinting/USBPrinterOutputDevice.py index ddb215d882..109888a15d 100644 --- a/plugins/USBPrinting/USBPrinterOutputDevice.py +++ b/plugins/USBPrinting/USBPrinterOutputDevice.py @@ -100,7 +100,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice): return application.setConfirmExitDialogCallback(self._onConfirmExitDialogResult) - application.showConfirmExitDialog.emit("USB printing is in progress") + application.showConfirmExitDialog.emit(catalog.i18nc("@label", "A USB print is in progress, closing Cura will stop this print. Are you sure?")) def _onConfirmExitDialogResult(self, result: bool) -> None: if result: From 6d34d77b6b2a888d03584b2b68f130af70660815 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Fri, 13 Jul 2018 11:10:38 +0200 Subject: [PATCH 116/174] Reset confirm exit dialog text upon close CURA-5384 --- resources/qml/Cura.qml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index 2ad0c75cbe..61d2c9f655 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -720,6 +720,14 @@ UM.MainWindow onYes: CuraApplication.callConfirmExitDialogCallback(true) onNo: CuraApplication.callConfirmExitDialogCallback(false) onRejected: CuraApplication.callConfirmExitDialogCallback(false) + onVisibilityChanged: + { + if (!visible) + { + // reset the text to default because other modules may change the message text. + text = catalog.i18nc("@label", "Are you sure you want to exit Cura?"); + } + } } Connections From 62f219757d25c52fd83df505614e8cec0ccc9f51 Mon Sep 17 00:00:00 2001 From: Aleksei S Date: Fri, 13 Jul 2018 11:47:42 +0200 Subject: [PATCH 117/174] Set machine defintion setting machine_head_with_fans_polygon for Prusa-i3 CURA-5569 --- resources/definitions/prusa_i3.def.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/resources/definitions/prusa_i3.def.json b/resources/definitions/prusa_i3.def.json index a3759eb6c0..c676f7fe96 100644 --- a/resources/definitions/prusa_i3.def.json +++ b/resources/definitions/prusa_i3.def.json @@ -40,6 +40,14 @@ [18, -18] ] }, + "machine_head_with_fans_polygon": { + "default_value": [ + [-75, -18], + [-75, 35], + [18, 35], + [18, -18] + ] + }, "gantry_height": { "default_value": 55 }, From a41f9d0c7035ce04d072d0bce381354a95972aba Mon Sep 17 00:00:00 2001 From: Aleksei S Date: Fri, 13 Jul 2018 11:47:42 +0200 Subject: [PATCH 118/174] Set machine defintion setting machine_head_with_fans_polygon for Prusa-i3 CURA-5569 --- resources/definitions/prusa_i3.def.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/resources/definitions/prusa_i3.def.json b/resources/definitions/prusa_i3.def.json index a3759eb6c0..c676f7fe96 100644 --- a/resources/definitions/prusa_i3.def.json +++ b/resources/definitions/prusa_i3.def.json @@ -40,6 +40,14 @@ [18, -18] ] }, + "machine_head_with_fans_polygon": { + "default_value": [ + [-75, -18], + [-75, 35], + [18, 35], + [18, -18] + ] + }, "gantry_height": { "default_value": 55 }, From 1b6c172e6dcd2b55da62e2cc81ddf269e1fe7b40 Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Thu, 12 Jul 2018 16:42:48 +0200 Subject: [PATCH 119/174] CURA-5536 Add the icon indicating when a plugin is already installed. --- .../Toolbox/resources/images/installed_check.svg | 8 ++++++++ .../resources/qml/ToolboxDownloadsGridTile.qml | 15 +++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 plugins/Toolbox/resources/images/installed_check.svg diff --git a/plugins/Toolbox/resources/images/installed_check.svg b/plugins/Toolbox/resources/images/installed_check.svg new file mode 100644 index 0000000000..1f1302770b --- /dev/null +++ b/plugins/Toolbox/resources/images/installed_check.svg @@ -0,0 +1,8 @@ + + + + + diff --git a/plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml b/plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml index 17b28fe136..89966caba4 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml @@ -40,6 +40,21 @@ Item source: model.icon_url || "../images/logobot.svg" mipmap: true } + UM.RecolorImage + { + width: (parent.width * 0.4) | 0 + height: (parent.height * 0.4) | 0 + anchors + { + bottom: parent.bottom + right: parent.right + } + sourceSize.width: width + sourceSize.height: height + visible: toolbox.isInstalled(model.id) + color: UM.Theme.getColor("primary") + source: "../images/installed_check.svg" + } } Column { From 96cc1be2ffe34cd950dd97794c2c1676f4bcedfb Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Fri, 13 Jul 2018 11:59:19 +0200 Subject: [PATCH 120/174] CURA-5536 Calculate the number of installed packages by author. --- .../qml/ToolboxDownloadsGridTile.qml | 2 +- plugins/Toolbox/src/AuthorsModel.py | 2 +- plugins/Toolbox/src/Toolbox.py | 23 +++++++++++++------ 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml b/plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml index 89966caba4..41d09d19ab 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml @@ -63,7 +63,7 @@ Item Label { id: name - text: model.name + text: toolbox.viewCategory == "material" ? model.name + " (" + toolbox.getNumberOfInstalledPackagesByAuthor(model.id) + "/" + model.package_count + ")" : model.name width: parent.width wrapMode: Text.WordWrap color: UM.Theme.getColor("text") diff --git a/plugins/Toolbox/src/AuthorsModel.py b/plugins/Toolbox/src/AuthorsModel.py index 880ecbe2a0..45424d7e42 100644 --- a/plugins/Toolbox/src/AuthorsModel.py +++ b/plugins/Toolbox/src/AuthorsModel.py @@ -43,7 +43,7 @@ class AuthorsModel(ListModel): "package_count": author["package_count"] if "package_count" in author else 0, "package_types": author["package_types"] if "package_types" in author else [], "icon_url": author["icon_url"] if "icon_url" in author else None, - "description": "Material and quality profiles from {author_name}".format( author_name = author["display_name"]) + "description": "Material and quality profiles from {author_name}".format(author_name = author["display_name"]) }) # Filter on all the key-word arguments. diff --git a/plugins/Toolbox/src/Toolbox.py b/plugins/Toolbox/src/Toolbox.py index b1128722e9..bf91b817a0 100644 --- a/plugins/Toolbox/src/Toolbox.py +++ b/plugins/Toolbox/src/Toolbox.py @@ -501,6 +501,15 @@ class Toolbox(QObject, Extension): def isInstalled(self, package_id: str) -> bool: return self._package_manager.isPackageInstalled(package_id) + @pyqtSlot(str, result = int) + def getNumberOfInstalledPackagesByAuthor(self, author_id: str) -> int: + count = 0 + for package in self._metadata["materials_installed"]: + if package["author"]["author_id"] == author_id: + if self.isInstalled(package["package_id"]): + count += 1 + return count + @pyqtSlot(str, result = bool) def isEnabled(self, package_id: str) -> bool: if package_id in self._plugin_registry.getActivePlugins(): @@ -722,27 +731,27 @@ class Toolbox(QObject, Extension): # -------------------------------------------------------------------------- @pyqtProperty(QObject, notify = metadataChanged) def authorsModel(self) -> AuthorsModel: - return self._models["authors"] + return cast(AuthorsModel, self._models["authors"]) @pyqtProperty(QObject, notify = metadataChanged) def packagesModel(self) -> PackagesModel: - return self._models["packages"] + return cast(PackagesModel, self._models["packages"]) @pyqtProperty(QObject, notify = metadataChanged) def pluginsShowcaseModel(self) -> PackagesModel: - return self._models["plugins_showcase"] + return cast(PackagesModel, self._models["plugins_showcase"]) @pyqtProperty(QObject, notify = metadataChanged) def pluginsInstalledModel(self) -> PackagesModel: - return self._models["plugins_installed"] + return cast(PackagesModel, self._models["plugins_installed"]) @pyqtProperty(QObject, notify = metadataChanged) - def materialsShowcaseModel(self) -> PackagesModel: - return self._models["materials_showcase"] + def materialsShowcaseModel(self) -> AuthorsModel: + return cast(AuthorsModel, self._models["materials_showcase"]) @pyqtProperty(QObject, notify = metadataChanged) def materialsInstalledModel(self) -> PackagesModel: - return self._models["materials_installed"] + return cast(PackagesModel, self._models["materials_installed"]) From 62b1d361fada21120462606df1f4024cdc655f10 Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Fri, 13 Jul 2018 13:16:44 +0200 Subject: [PATCH 121/174] CURA-5536 Set different colors indicating that all the inner packages are installed of just some. --- .../Toolbox/resources/qml/ToolboxDownloadsGridTile.qml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml b/plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml index 41d09d19ab..a69904d840 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml @@ -9,6 +9,8 @@ import UM 1.1 as UM Item { + property int packageCount: toolbox.viewCategory == "material" ? model.package_count : 1 + property int installedPackages: toolbox.viewCategory == "material" ? toolbox.getNumberOfInstalledPackagesByAuthor(model.id) : (toolbox.isInstalled(model.id) ? 1 : 0) height: childrenRect.height Layout.alignment: Qt.AlignTop | Qt.AlignLeft Rectangle @@ -51,8 +53,8 @@ Item } sourceSize.width: width sourceSize.height: height - visible: toolbox.isInstalled(model.id) - color: UM.Theme.getColor("primary") + visible: installedPackages != 0 + color: (installedPackages == packageCount) ? UM.Theme.getColor("primary") : UM.Theme.getColor("border") source: "../images/installed_check.svg" } } @@ -63,7 +65,7 @@ Item Label { id: name - text: toolbox.viewCategory == "material" ? model.name + " (" + toolbox.getNumberOfInstalledPackagesByAuthor(model.id) + "/" + model.package_count + ")" : model.name + text: model.name width: parent.width wrapMode: Text.WordWrap color: UM.Theme.getColor("text") From dd7168e8b80ae30dca1488c48a05aba2389f8f72 Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Fri, 13 Jul 2018 13:41:19 +0200 Subject: [PATCH 122/174] CURA-5536 Add the installed check also to the featured items. --- .../qml/ToolboxDownloadsShowcaseTile.qml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/plugins/Toolbox/resources/qml/ToolboxDownloadsShowcaseTile.qml b/plugins/Toolbox/resources/qml/ToolboxDownloadsShowcaseTile.qml index 561b2b4046..90829789e5 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDownloadsShowcaseTile.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDownloadsShowcaseTile.qml @@ -9,6 +9,8 @@ import UM 1.1 as UM Rectangle { + property int packageCount: toolbox.viewCategory == "material" ? model.package_count : 1 + property int installedPackages: toolbox.viewCategory == "material" ? toolbox.getNumberOfInstalledPackagesByAuthor(model.id) : (toolbox.isInstalled(model.id) ? 1 : 0) id: tileBase width: UM.Theme.getSize("toolbox_thumbnail_large").width + (2 * UM.Theme.getSize("default_lining").width) height: thumbnail.height + packageNameBackground.height + (2 * UM.Theme.getSize("default_lining").width) @@ -36,6 +38,22 @@ Rectangle source: model.icon_url || "../images/logobot.svg" mipmap: true } + UM.RecolorImage + { + width: (parent.width * 0.3) | 0 + height: (parent.height * 0.3) | 0 + anchors + { + bottom: parent.bottom + right: parent.right + bottomMargin: UM.Theme.getSize("default_lining").width + } + sourceSize.width: width + sourceSize.height: height + visible: installedPackages != 0 + color: (installedPackages == packageCount) ? UM.Theme.getColor("primary") : UM.Theme.getColor("border") + source: "../images/installed_check.svg" + } } Rectangle { From af697c69990df049d21d8916cb46cdf2afaea93f Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Fri, 13 Jul 2018 15:13:38 +0200 Subject: [PATCH 123/174] CURA-5536 The api call does not return the package_count for the showcase, so we can't trust in that value. The total number of material packages by author is now calculated. --- .../resources/qml/ToolboxDownloadsGridTile.qml | 2 +- .../resources/qml/ToolboxDownloadsShowcaseTile.qml | 2 +- plugins/Toolbox/src/Toolbox.py | 12 ++++++++++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml b/plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml index a69904d840..dbaa2c83dc 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml @@ -9,7 +9,7 @@ import UM 1.1 as UM Item { - property int packageCount: toolbox.viewCategory == "material" ? model.package_count : 1 + property int packageCount: toolbox.viewCategory == "material" ? toolbox.getTotalNumberOfPackagesByAuthor(model.id) : 1 property int installedPackages: toolbox.viewCategory == "material" ? toolbox.getNumberOfInstalledPackagesByAuthor(model.id) : (toolbox.isInstalled(model.id) ? 1 : 0) height: childrenRect.height Layout.alignment: Qt.AlignTop | Qt.AlignLeft diff --git a/plugins/Toolbox/resources/qml/ToolboxDownloadsShowcaseTile.qml b/plugins/Toolbox/resources/qml/ToolboxDownloadsShowcaseTile.qml index 90829789e5..2ca0b522fe 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 Rectangle { - property int packageCount: toolbox.viewCategory == "material" ? model.package_count : 1 + property int packageCount: toolbox.viewCategory == "material" ? toolbox.getTotalNumberOfPackagesByAuthor(model.id) : 1 property int installedPackages: toolbox.viewCategory == "material" ? toolbox.getNumberOfInstalledPackagesByAuthor(model.id) : (toolbox.isInstalled(model.id) ? 1 : 0) id: tileBase width: UM.Theme.getSize("toolbox_thumbnail_large").width + (2 * UM.Theme.getSize("default_lining").width) diff --git a/plugins/Toolbox/src/Toolbox.py b/plugins/Toolbox/src/Toolbox.py index bf91b817a0..e0c73cd7fc 100644 --- a/plugins/Toolbox/src/Toolbox.py +++ b/plugins/Toolbox/src/Toolbox.py @@ -228,6 +228,7 @@ class Toolbox(QObject, Extension): self._makeRequestByType("authors") self._makeRequestByType("plugins_showcase") self._makeRequestByType("materials_showcase") + self._makeRequestByType("materials_available") # Gather installed packages: self._updateInstalledModels() @@ -506,8 +507,15 @@ class Toolbox(QObject, Extension): count = 0 for package in self._metadata["materials_installed"]: if package["author"]["author_id"] == author_id: - if self.isInstalled(package["package_id"]): - count += 1 + count += 1 + return count + + @pyqtSlot(str, result = int) + def getTotalNumberOfPackagesByAuthor(self, author_id: str) -> int: + count = 0 + for package in self._metadata["materials_available"]: + if package["author"]["author_id"] == author_id: + count += 1 return count @pyqtSlot(str, result = bool) From 01a26b0360f199b9227b9bd97db471eec18565bc Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Fri, 13 Jul 2018 16:05:13 +0200 Subject: [PATCH 124/174] CURA-5572 The scene was not updated when a Gcode was loaded. This fixes a bug that we introduced when fixing code style. This was a bad translation. --- cura/CuraApplication.py | 4 ++-- plugins/CuraEngineBackend/CuraEngineBackend.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 087f081ae9..3f0a5b9cb2 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -1562,7 +1562,7 @@ class CuraApplication(QtApplication): self.callLater(self.openProjectFile.emit, file) return - if Preferences.getInstance().getValue("cura/select_models_on_load"): + if self.getPreferences().getValue("cura/select_models_on_load"): Selection.clear() f = file.toLocalFile() @@ -1619,7 +1619,7 @@ class CuraApplication(QtApplication): default_extruder_position = self.getMachineManager().defaultExtruderPosition default_extruder_id = self._global_container_stack.extruders[default_extruder_position].getId() - select_models_on_load = Preferences.getInstance().getValue("cura/select_models_on_load") + select_models_on_load = self.getPreferences().getValue("cura/select_models_on_load") for original_node in nodes: diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index 9aff42a9e1..c1ca2448ce 100755 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -488,7 +488,7 @@ class CuraEngineBackend(QObject, Backend): # we got a single scenenode if not source.callDecoration("isGroup"): mesh_data = source.getMeshData() - if mesh_data and mesh_data.getVertices() is None: + if mesh_data is None or mesh_data.getVertices() is None: return # There are some SceneNodes that do not have any build plate associated, then do not add to the list. From 817a304ed1a252cd3937391cd616fd3952c2b06c Mon Sep 17 00:00:00 2001 From: Aleksei S Date: Fri, 13 Jul 2018 23:50:02 +0200 Subject: [PATCH 125/174] After reconecting to another port update job status '_is_cancelled' to false CURA-5549 --- plugins/CuraEngineBackend/CuraEngineBackend.py | 5 +++++ plugins/CuraEngineBackend/StartSliceJob.py | 3 +++ 2 files changed, 8 insertions(+) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index 9aff42a9e1..6814674308 100755 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -534,6 +534,11 @@ class CuraEngineBackend(QObject, Backend): if error.getErrorCode() not in [Arcus.ErrorCode.BindFailedError, Arcus.ErrorCode.ConnectionResetError, Arcus.ErrorCode.Debug]: Logger.log("w", "A socket error caused the connection to be reset") + # _terminate()' function sets the job status to 'cancel', after reconnecting to another Port the job status + # needs to be updated. Otherwise backendState is "Unable To Slice" + if error.getErrorCode() == Arcus.ErrorCode.BindFailedError and self._start_slice_job is not None: + self._start_slice_job.setIsCancelled(False) + ## Remove old layer data (if any) def _clearLayerData(self, build_plate_numbers: Set = None) -> None: for node in DepthFirstIterator(self._scene.getRoot()): #type: ignore #Ignore type error because iter() should get called automatically by Python syntax. diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py index 9a40445a18..eb392de121 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.py @@ -290,6 +290,9 @@ class StartSliceJob(Job): def isCancelled(self) -> bool: return self._is_cancelled + def setIsCancelled(self, value: bool): + self._is_cancelled = value + ## Creates a dictionary of tokens to replace in g-code pieces. # # This indicates what should be replaced in the start and end g-codes. From 4aca455ec86d0930dd0e66fab73da846e8258379 Mon Sep 17 00:00:00 2001 From: Cherubim Date: Sat, 14 Jul 2018 17:05:26 +0200 Subject: [PATCH 126/174] Add Dutch translation to desktop file Can't hurt, can it? --- cura.desktop.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cura.desktop.in b/cura.desktop.in index a91032dd6f..6ddf4f0aea 100644 --- a/cura.desktop.in +++ b/cura.desktop.in @@ -1,10 +1,13 @@ [Desktop Entry] Name=Ultimaker Cura Name[de]=Ultimaker Cura +Name[nl]=Ultimaker Cura GenericName=3D Printing Software GenericName[de]=3D-Druck-Software +GenericName[nl]=3D-printsoftware Comment=Cura converts 3D models into paths for a 3D printer. It prepares your print for maximum accuracy, minimum printing time and good reliability with many extra features that make your print come out great. Comment[de]=Cura wandelt 3D-Modelle in Pfade für einen 3D-Drucker um. Es bereitet Ihren Druck für maximale Genauigkeit, minimale Druckzeit und guter Zuverlässigkeit mit vielen zusätzlichen Funktionen vor, damit Ihr Druck großartig wird. +Comment[nl]=Cura converteert 3D-modellen naar paden voor een 3D printer. Het bereidt je print voor om zeer precies, snel en betrouwbaar te kunnen printen, met veel extra functionaliteit om je print er goed uit te laten komen. Exec=@CMAKE_INSTALL_FULL_BINDIR@/cura %F TryExec=@CMAKE_INSTALL_FULL_BINDIR@/cura Icon=cura-icon From 31599485e79eca22f2d7065558d6f26fed7a72cc Mon Sep 17 00:00:00 2001 From: Cherubim Date: Sat, 14 Jul 2018 17:08:12 +0200 Subject: [PATCH 127/174] Add slicer keyword Doesn't matter much since the keywords is really only used in software managers/browsers where we don't publish Cura, but if someone is to make a package (like people did for Arch and Debian) this should get Cura a few more hits. --- cura.desktop.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura.desktop.in b/cura.desktop.in index 6ddf4f0aea..fe61b47217 100644 --- a/cura.desktop.in +++ b/cura.desktop.in @@ -15,4 +15,4 @@ Terminal=false Type=Application MimeType=application/sla;application/vnd.ms-3mfdocument;application/prs.wavefront-obj;image/bmp;image/gif;image/jpeg;image/png;model/x3d+xml; Categories=Graphics; -Keywords=3D;Printing; +Keywords=3D;Printing;Slicer; From e3a193d6a6a257471ec88b66b58a912fdaa5b203 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Mon, 16 Jul 2018 09:59:43 +0200 Subject: [PATCH 128/174] Fix invisible texts in setting dropdown menu on Linux --- resources/qml/Settings/SettingComboBox.qml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/resources/qml/Settings/SettingComboBox.qml b/resources/qml/Settings/SettingComboBox.qml index ed4a7b41c2..d48d2620df 100644 --- a/resources/qml/Settings/SettingComboBox.qml +++ b/resources/qml/Settings/SettingComboBox.qml @@ -116,6 +116,10 @@ SettingItem contentItem: Label { + // FIXME: Somehow the top/bottom anchoring is not correct on Linux and it results in invisible texts. + anchors.top: parent.top + anchors.bottom: parent.bottom + text: modelData.value renderType: Text.NativeRendering color: control.contentItem.color From 14bb8cc180949029e421959910896f366a66c28c Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Mon, 16 Jul 2018 11:43:23 +0200 Subject: [PATCH 129/174] Modify qualities and variants for the Cartesio printers. --- resources/definitions/cartesio.def.json | 2 +- resources/quality/cartesio/abs/cartesio_0.25_abs_high.inst.cfg | 2 +- .../quality/cartesio/abs/cartesio_0.25_abs_normal.inst.cfg | 2 +- resources/quality/cartesio/abs/cartesio_0.4_abs_high.inst.cfg | 2 +- resources/quality/cartesio/abs/cartesio_0.4_abs_normal.inst.cfg | 2 +- resources/quality/cartesio/abs/cartesio_0.8_abs_coarse.inst.cfg | 2 +- .../quality/cartesio/abs/cartesio_0.8_abs_extra_coarse.inst.cfg | 2 +- resources/quality/cartesio/abs/cartesio_0.8_abs_high.inst.cfg | 2 +- resources/quality/cartesio/abs/cartesio_0.8_abs_normal.inst.cfg | 2 +- .../cartesio/arnitel/cartesio_0.4_arnitel2045_high.inst.cfg | 2 +- .../cartesio/arnitel/cartesio_0.4_arnitel2045_normal.inst.cfg | 2 +- .../quality/cartesio/hips/cartesio_0.25_hips_high.inst.cfg | 2 +- .../quality/cartesio/hips/cartesio_0.25_hips_normal.inst.cfg | 2 +- resources/quality/cartesio/hips/cartesio_0.4_hips_high.inst.cfg | 2 +- .../quality/cartesio/hips/cartesio_0.4_hips_normal.inst.cfg | 2 +- .../quality/cartesio/hips/cartesio_0.8_hips_coarse.inst.cfg | 2 +- .../cartesio/hips/cartesio_0.8_hips_extra_coarse.inst.cfg | 2 +- resources/quality/cartesio/hips/cartesio_0.8_hips_high.inst.cfg | 2 +- .../quality/cartesio/hips/cartesio_0.8_hips_normal.inst.cfg | 2 +- .../quality/cartesio/nylon/cartesio_0.25_nylon_high.inst.cfg | 2 +- .../quality/cartesio/nylon/cartesio_0.25_nylon_normal.inst.cfg | 2 +- .../quality/cartesio/nylon/cartesio_0.4_nylon_high.inst.cfg | 2 +- .../quality/cartesio/nylon/cartesio_0.4_nylon_normal.inst.cfg | 2 +- .../quality/cartesio/nylon/cartesio_0.8_nylon_coarse.inst.cfg | 2 +- .../cartesio/nylon/cartesio_0.8_nylon_extra_coarse.inst.cfg | 2 +- .../quality/cartesio/nylon/cartesio_0.8_nylon_high.inst.cfg | 2 +- .../quality/cartesio/nylon/cartesio_0.8_nylon_normal.inst.cfg | 2 +- resources/quality/cartesio/pc/cartesio_0.25_pc_high.inst.cfg | 2 +- resources/quality/cartesio/pc/cartesio_0.25_pc_normal.inst.cfg | 2 +- resources/quality/cartesio/pc/cartesio_0.4_pc_high.inst.cfg | 2 +- resources/quality/cartesio/pc/cartesio_0.4_pc_normal.inst.cfg | 2 +- resources/quality/cartesio/pc/cartesio_0.8_pc_coarse.inst.cfg | 2 +- .../quality/cartesio/pc/cartesio_0.8_pc_extra_coarse.inst.cfg | 2 +- resources/quality/cartesio/pc/cartesio_0.8_pc_high.inst.cfg | 2 +- resources/quality/cartesio/pc/cartesio_0.8_pc_normal.inst.cfg | 2 +- .../quality/cartesio/petg/cartesio_0.25_petg_high.inst.cfg | 2 +- .../quality/cartesio/petg/cartesio_0.25_petg_normal.inst.cfg | 2 +- resources/quality/cartesio/petg/cartesio_0.4_petg_high.inst.cfg | 2 +- .../quality/cartesio/petg/cartesio_0.4_petg_normal.inst.cfg | 2 +- .../quality/cartesio/petg/cartesio_0.8_petg_coarse.inst.cfg | 2 +- .../cartesio/petg/cartesio_0.8_petg_extra_coarse.inst.cfg | 2 +- resources/quality/cartesio/petg/cartesio_0.8_petg_high.inst.cfg | 2 +- .../quality/cartesio/petg/cartesio_0.8_petg_normal.inst.cfg | 2 +- resources/quality/cartesio/pla/cartesio_0.25_pla_high.inst.cfg | 2 +- .../quality/cartesio/pla/cartesio_0.25_pla_normal.inst.cfg | 2 +- resources/quality/cartesio/pla/cartesio_0.4_pla_high.inst.cfg | 2 +- resources/quality/cartesio/pla/cartesio_0.4_pla_normal.inst.cfg | 2 +- resources/quality/cartesio/pla/cartesio_0.8_pla_coarse.inst.cfg | 2 +- .../quality/cartesio/pla/cartesio_0.8_pla_extra_coarse.inst.cfg | 2 +- resources/quality/cartesio/pla/cartesio_0.8_pla_high.inst.cfg | 2 +- resources/quality/cartesio/pla/cartesio_0.8_pla_normal.inst.cfg | 2 +- resources/quality/cartesio/pva/cartesio_0.25_pva_high.inst.cfg | 2 +- .../quality/cartesio/pva/cartesio_0.25_pva_normal.inst.cfg | 2 +- resources/quality/cartesio/pva/cartesio_0.4_pva_high.inst.cfg | 2 +- resources/quality/cartesio/pva/cartesio_0.4_pva_normal.inst.cfg | 2 +- resources/quality/cartesio/pva/cartesio_0.8_pva_coarse.inst.cfg | 2 +- .../quality/cartesio/pva/cartesio_0.8_pva_extra_coarse.inst.cfg | 2 +- resources/quality/cartesio/pva/cartesio_0.8_pva_high.inst.cfg | 2 +- resources/quality/cartesio/pva/cartesio_0.8_pva_normal.inst.cfg | 2 +- resources/variants/cartesio_0.25.inst.cfg | 2 +- resources/variants/cartesio_0.4.inst.cfg | 2 +- resources/variants/cartesio_0.8.inst.cfg | 2 +- 62 files changed, 62 insertions(+), 62 deletions(-) diff --git a/resources/definitions/cartesio.def.json b/resources/definitions/cartesio.def.json index 04279ce392..57c16241a0 100644 --- a/resources/definitions/cartesio.def.json +++ b/resources/definitions/cartesio.def.json @@ -15,7 +15,7 @@ "has_variants": true, "variants_name": "Tool", - "preferred_variant_name": "0.8 mm", + "preferred_variant_name": "0.8mm thermoplastic extruder", "preferred_material": "generic_pla", "preferred_quality_type": "normal", diff --git a/resources/quality/cartesio/abs/cartesio_0.25_abs_high.inst.cfg b/resources/quality/cartesio/abs/cartesio_0.25_abs_high.inst.cfg index dc22d5bae9..5626ed58de 100644 --- a/resources/quality/cartesio/abs/cartesio_0.25_abs_high.inst.cfg +++ b/resources/quality/cartesio/abs/cartesio_0.25_abs_high.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = high weight = 1 material = generic_abs -variant = 0.25 mm +variant = 0.25mm thermoplastic extruder [values] infill_line_width = 0.3 diff --git a/resources/quality/cartesio/abs/cartesio_0.25_abs_normal.inst.cfg b/resources/quality/cartesio/abs/cartesio_0.25_abs_normal.inst.cfg index 4ac83bf1f9..f74918ef4f 100644 --- a/resources/quality/cartesio/abs/cartesio_0.25_abs_normal.inst.cfg +++ b/resources/quality/cartesio/abs/cartesio_0.25_abs_normal.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = normal weight = 2 material = generic_abs -variant = 0.25 mm +variant = 0.25mm thermoplastic extruder [values] infill_line_width = 0.3 diff --git a/resources/quality/cartesio/abs/cartesio_0.4_abs_high.inst.cfg b/resources/quality/cartesio/abs/cartesio_0.4_abs_high.inst.cfg index 0b88cfb7a0..d4dd85b09d 100644 --- a/resources/quality/cartesio/abs/cartesio_0.4_abs_high.inst.cfg +++ b/resources/quality/cartesio/abs/cartesio_0.4_abs_high.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = high weight = 1 material = generic_abs -variant = 0.4 mm +variant = 0.4mm thermoplastic extruder [values] infill_line_width = 0.5 diff --git a/resources/quality/cartesio/abs/cartesio_0.4_abs_normal.inst.cfg b/resources/quality/cartesio/abs/cartesio_0.4_abs_normal.inst.cfg index 6eec53c0ba..ab72092035 100644 --- a/resources/quality/cartesio/abs/cartesio_0.4_abs_normal.inst.cfg +++ b/resources/quality/cartesio/abs/cartesio_0.4_abs_normal.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = normal weight = 2 material = generic_abs -variant = 0.4 mm +variant = 0.4mm thermoplastic extruder [values] infill_line_width = 0.5 diff --git a/resources/quality/cartesio/abs/cartesio_0.8_abs_coarse.inst.cfg b/resources/quality/cartesio/abs/cartesio_0.8_abs_coarse.inst.cfg index c334807e0e..d15efb770f 100644 --- a/resources/quality/cartesio/abs/cartesio_0.8_abs_coarse.inst.cfg +++ b/resources/quality/cartesio/abs/cartesio_0.8_abs_coarse.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = coarse weight = 3 material = generic_abs -variant = 0.8 mm +variant = 0.8mm thermoplastic extruder [values] infill_line_width = 0.9 diff --git a/resources/quality/cartesio/abs/cartesio_0.8_abs_extra_coarse.inst.cfg b/resources/quality/cartesio/abs/cartesio_0.8_abs_extra_coarse.inst.cfg index df02a0b818..7467da765f 100644 --- a/resources/quality/cartesio/abs/cartesio_0.8_abs_extra_coarse.inst.cfg +++ b/resources/quality/cartesio/abs/cartesio_0.8_abs_extra_coarse.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = extra coarse weight = 4 material = generic_abs -variant = 0.8 mm +variant = 0.8mm thermoplastic extruder [values] infill_line_width = 0.9 diff --git a/resources/quality/cartesio/abs/cartesio_0.8_abs_high.inst.cfg b/resources/quality/cartesio/abs/cartesio_0.8_abs_high.inst.cfg index 7c8c8c0864..caa6b71a4a 100644 --- a/resources/quality/cartesio/abs/cartesio_0.8_abs_high.inst.cfg +++ b/resources/quality/cartesio/abs/cartesio_0.8_abs_high.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = high weight = 1 material = generic_abs -variant = 0.8 mm +variant = 0.8mm thermoplastic extruder [values] infill_line_width = 0.9 diff --git a/resources/quality/cartesio/abs/cartesio_0.8_abs_normal.inst.cfg b/resources/quality/cartesio/abs/cartesio_0.8_abs_normal.inst.cfg index f43b45985c..9eea2177a8 100644 --- a/resources/quality/cartesio/abs/cartesio_0.8_abs_normal.inst.cfg +++ b/resources/quality/cartesio/abs/cartesio_0.8_abs_normal.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = normal weight = 2 material = generic_abs -variant = 0.8 mm +variant = 0.8mm thermoplastic extruder [values] infill_line_width = 0.9 diff --git a/resources/quality/cartesio/arnitel/cartesio_0.4_arnitel2045_high.inst.cfg b/resources/quality/cartesio/arnitel/cartesio_0.4_arnitel2045_high.inst.cfg index 6cacdcf717..17f2acd8d1 100644 --- a/resources/quality/cartesio/arnitel/cartesio_0.4_arnitel2045_high.inst.cfg +++ b/resources/quality/cartesio/arnitel/cartesio_0.4_arnitel2045_high.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = high weight = 1 material = dsm_arnitel2045_175 -variant = 0.4 mm +variant = 0.4mm thermoplastic extruder [values] infill_line_width = 0.5 diff --git a/resources/quality/cartesio/arnitel/cartesio_0.4_arnitel2045_normal.inst.cfg b/resources/quality/cartesio/arnitel/cartesio_0.4_arnitel2045_normal.inst.cfg index 3e10a68a70..8215eb2f50 100644 --- a/resources/quality/cartesio/arnitel/cartesio_0.4_arnitel2045_normal.inst.cfg +++ b/resources/quality/cartesio/arnitel/cartesio_0.4_arnitel2045_normal.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = normal weight = 2 material = dsm_arnitel2045_175 -variant = 0.4 mm +variant = 0.4mm thermoplastic extruder [values] infill_line_width = 0.5 diff --git a/resources/quality/cartesio/hips/cartesio_0.25_hips_high.inst.cfg b/resources/quality/cartesio/hips/cartesio_0.25_hips_high.inst.cfg index 401ded5e5d..3e212b2446 100644 --- a/resources/quality/cartesio/hips/cartesio_0.25_hips_high.inst.cfg +++ b/resources/quality/cartesio/hips/cartesio_0.25_hips_high.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = high weight = 1 material = generic_hips -variant = 0.25 mm +variant = 0.25mm thermoplastic extruder [values] infill_line_width = 0.3 diff --git a/resources/quality/cartesio/hips/cartesio_0.25_hips_normal.inst.cfg b/resources/quality/cartesio/hips/cartesio_0.25_hips_normal.inst.cfg index 5665207b30..0cf82847a0 100644 --- a/resources/quality/cartesio/hips/cartesio_0.25_hips_normal.inst.cfg +++ b/resources/quality/cartesio/hips/cartesio_0.25_hips_normal.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = normal weight = 2 material = generic_hips -variant = 0.25 mm +variant = 0.25mm thermoplastic extruder [values] infill_line_width = 0.3 diff --git a/resources/quality/cartesio/hips/cartesio_0.4_hips_high.inst.cfg b/resources/quality/cartesio/hips/cartesio_0.4_hips_high.inst.cfg index d58fbd313a..a9664cf9d1 100644 --- a/resources/quality/cartesio/hips/cartesio_0.4_hips_high.inst.cfg +++ b/resources/quality/cartesio/hips/cartesio_0.4_hips_high.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = high weight = 1 material = generic_hips -variant = 0.4 mm +variant = 0.4mm thermoplastic extruder [values] infill_line_width = 0.5 diff --git a/resources/quality/cartesio/hips/cartesio_0.4_hips_normal.inst.cfg b/resources/quality/cartesio/hips/cartesio_0.4_hips_normal.inst.cfg index afe82df10e..8101fb6dd8 100644 --- a/resources/quality/cartesio/hips/cartesio_0.4_hips_normal.inst.cfg +++ b/resources/quality/cartesio/hips/cartesio_0.4_hips_normal.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = normal weight = 2 material = generic_hips -variant = 0.4 mm +variant = 0.4mm thermoplastic extruder [values] infill_line_width = 0.5 diff --git a/resources/quality/cartesio/hips/cartesio_0.8_hips_coarse.inst.cfg b/resources/quality/cartesio/hips/cartesio_0.8_hips_coarse.inst.cfg index 7e6fe59884..f009383ad8 100644 --- a/resources/quality/cartesio/hips/cartesio_0.8_hips_coarse.inst.cfg +++ b/resources/quality/cartesio/hips/cartesio_0.8_hips_coarse.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = coarse weight = 3 material = generic_hips -variant = 0.8 mm +variant = 0.8mm thermoplastic extruder [values] infill_line_width = 0.9 diff --git a/resources/quality/cartesio/hips/cartesio_0.8_hips_extra_coarse.inst.cfg b/resources/quality/cartesio/hips/cartesio_0.8_hips_extra_coarse.inst.cfg index a5247f1eb9..1adbbb0fb9 100644 --- a/resources/quality/cartesio/hips/cartesio_0.8_hips_extra_coarse.inst.cfg +++ b/resources/quality/cartesio/hips/cartesio_0.8_hips_extra_coarse.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = extra coarse weight = 4 material = generic_hips -variant = 0.8 mm +variant = 0.8mm thermoplastic extruder [values] infill_line_width = 0.9 diff --git a/resources/quality/cartesio/hips/cartesio_0.8_hips_high.inst.cfg b/resources/quality/cartesio/hips/cartesio_0.8_hips_high.inst.cfg index f96703a661..d3e6df227f 100644 --- a/resources/quality/cartesio/hips/cartesio_0.8_hips_high.inst.cfg +++ b/resources/quality/cartesio/hips/cartesio_0.8_hips_high.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = high weight = 1 material = generic_hips -variant = 0.8 mm +variant = 0.8mm thermoplastic extruder [values] infill_line_width = 0.9 diff --git a/resources/quality/cartesio/hips/cartesio_0.8_hips_normal.inst.cfg b/resources/quality/cartesio/hips/cartesio_0.8_hips_normal.inst.cfg index 571138f794..0b019d555f 100644 --- a/resources/quality/cartesio/hips/cartesio_0.8_hips_normal.inst.cfg +++ b/resources/quality/cartesio/hips/cartesio_0.8_hips_normal.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = normal weight = 2 material = generic_hips -variant = 0.8 mm +variant = 0.8mm thermoplastic extruder [values] infill_line_width = 0.9 diff --git a/resources/quality/cartesio/nylon/cartesio_0.25_nylon_high.inst.cfg b/resources/quality/cartesio/nylon/cartesio_0.25_nylon_high.inst.cfg index 39d4442d16..9eb5d5c4e9 100644 --- a/resources/quality/cartesio/nylon/cartesio_0.25_nylon_high.inst.cfg +++ b/resources/quality/cartesio/nylon/cartesio_0.25_nylon_high.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = high weight = 1 material = generic_nylon -variant = 0.25 mm +variant = 0.25mm thermoplastic extruder [values] infill_line_width = 0.3 diff --git a/resources/quality/cartesio/nylon/cartesio_0.25_nylon_normal.inst.cfg b/resources/quality/cartesio/nylon/cartesio_0.25_nylon_normal.inst.cfg index 5f1de86bb6..e0100d37ec 100644 --- a/resources/quality/cartesio/nylon/cartesio_0.25_nylon_normal.inst.cfg +++ b/resources/quality/cartesio/nylon/cartesio_0.25_nylon_normal.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = normal weight = 2 material = generic_nylon -variant = 0.25 mm +variant = 0.25mm thermoplastic extruder [values] infill_line_width = 0.3 diff --git a/resources/quality/cartesio/nylon/cartesio_0.4_nylon_high.inst.cfg b/resources/quality/cartesio/nylon/cartesio_0.4_nylon_high.inst.cfg index 6d83aa4492..d4b261b99f 100644 --- a/resources/quality/cartesio/nylon/cartesio_0.4_nylon_high.inst.cfg +++ b/resources/quality/cartesio/nylon/cartesio_0.4_nylon_high.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = high weight = 1 material = generic_nylon -variant = 0.4 mm +variant = 0.4mm thermoplastic extruder [values] infill_line_width = 0.5 diff --git a/resources/quality/cartesio/nylon/cartesio_0.4_nylon_normal.inst.cfg b/resources/quality/cartesio/nylon/cartesio_0.4_nylon_normal.inst.cfg index 7985292782..7d899ae927 100644 --- a/resources/quality/cartesio/nylon/cartesio_0.4_nylon_normal.inst.cfg +++ b/resources/quality/cartesio/nylon/cartesio_0.4_nylon_normal.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = normal weight = 2 material = generic_nylon -variant = 0.4 mm +variant = 0.4mm thermoplastic extruder [values] infill_line_width = 0.5 diff --git a/resources/quality/cartesio/nylon/cartesio_0.8_nylon_coarse.inst.cfg b/resources/quality/cartesio/nylon/cartesio_0.8_nylon_coarse.inst.cfg index 27f6d4960c..21e6d357b0 100644 --- a/resources/quality/cartesio/nylon/cartesio_0.8_nylon_coarse.inst.cfg +++ b/resources/quality/cartesio/nylon/cartesio_0.8_nylon_coarse.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = coarse weight = 3 material = generic_nylon -variant = 0.8 mm +variant = 0.8mm thermoplastic extruder [values] infill_line_width = 0.9 diff --git a/resources/quality/cartesio/nylon/cartesio_0.8_nylon_extra_coarse.inst.cfg b/resources/quality/cartesio/nylon/cartesio_0.8_nylon_extra_coarse.inst.cfg index dbe71150f2..15128584e1 100644 --- a/resources/quality/cartesio/nylon/cartesio_0.8_nylon_extra_coarse.inst.cfg +++ b/resources/quality/cartesio/nylon/cartesio_0.8_nylon_extra_coarse.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = extra coarse weight = 4 material = generic_nylon -variant = 0.8 mm +variant = 0.8mm thermoplastic extruder [values] infill_line_width = 0.9 diff --git a/resources/quality/cartesio/nylon/cartesio_0.8_nylon_high.inst.cfg b/resources/quality/cartesio/nylon/cartesio_0.8_nylon_high.inst.cfg index 62f3f7fa94..1d78bd0f1d 100644 --- a/resources/quality/cartesio/nylon/cartesio_0.8_nylon_high.inst.cfg +++ b/resources/quality/cartesio/nylon/cartesio_0.8_nylon_high.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = high weight = 1 material = generic_nylon -variant = 0.8 mm +variant = 0.8mm thermoplastic extruder [values] infill_line_width = 0.9 diff --git a/resources/quality/cartesio/nylon/cartesio_0.8_nylon_normal.inst.cfg b/resources/quality/cartesio/nylon/cartesio_0.8_nylon_normal.inst.cfg index bc191a050e..95be159ff2 100644 --- a/resources/quality/cartesio/nylon/cartesio_0.8_nylon_normal.inst.cfg +++ b/resources/quality/cartesio/nylon/cartesio_0.8_nylon_normal.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = normal weight = 2 material = generic_nylon -variant = 0.8 mm +variant = 0.8mm thermoplastic extruder [values] infill_line_width = 0.9 diff --git a/resources/quality/cartesio/pc/cartesio_0.25_pc_high.inst.cfg b/resources/quality/cartesio/pc/cartesio_0.25_pc_high.inst.cfg index c90ac50c68..c45194e18b 100644 --- a/resources/quality/cartesio/pc/cartesio_0.25_pc_high.inst.cfg +++ b/resources/quality/cartesio/pc/cartesio_0.25_pc_high.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = high weight = 1 material = generic_pc -variant = 0.25 mm +variant = 0.25mm thermoplastic extruder [values] infill_line_width = 0.3 diff --git a/resources/quality/cartesio/pc/cartesio_0.25_pc_normal.inst.cfg b/resources/quality/cartesio/pc/cartesio_0.25_pc_normal.inst.cfg index 1af6da9c08..248517d769 100644 --- a/resources/quality/cartesio/pc/cartesio_0.25_pc_normal.inst.cfg +++ b/resources/quality/cartesio/pc/cartesio_0.25_pc_normal.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = normal weight = 2 material = generic_pc -variant = 0.25 mm +variant = 0.25mm thermoplastic extruder [values] infill_line_width = 0.3 diff --git a/resources/quality/cartesio/pc/cartesio_0.4_pc_high.inst.cfg b/resources/quality/cartesio/pc/cartesio_0.4_pc_high.inst.cfg index 770aaa16f0..8c46693c91 100644 --- a/resources/quality/cartesio/pc/cartesio_0.4_pc_high.inst.cfg +++ b/resources/quality/cartesio/pc/cartesio_0.4_pc_high.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = high weight = 1 material = generic_pc -variant = 0.4 mm +variant = 0.4mm thermoplastic extruder [values] infill_line_width = 0.5 diff --git a/resources/quality/cartesio/pc/cartesio_0.4_pc_normal.inst.cfg b/resources/quality/cartesio/pc/cartesio_0.4_pc_normal.inst.cfg index 2f437d1f1f..a0b71f1f0a 100644 --- a/resources/quality/cartesio/pc/cartesio_0.4_pc_normal.inst.cfg +++ b/resources/quality/cartesio/pc/cartesio_0.4_pc_normal.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = normal weight = 2 material = generic_pc -variant = 0.4 mm +variant = 0.4mm thermoplastic extruder [values] infill_line_width = 0.5 diff --git a/resources/quality/cartesio/pc/cartesio_0.8_pc_coarse.inst.cfg b/resources/quality/cartesio/pc/cartesio_0.8_pc_coarse.inst.cfg index d02bec4ff4..04f01db6ba 100644 --- a/resources/quality/cartesio/pc/cartesio_0.8_pc_coarse.inst.cfg +++ b/resources/quality/cartesio/pc/cartesio_0.8_pc_coarse.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = coarse weight = 3 material = generic_pc -variant = 0.8 mm +variant = 0.8mm thermoplastic extruder [values] infill_line_width = 0.9 diff --git a/resources/quality/cartesio/pc/cartesio_0.8_pc_extra_coarse.inst.cfg b/resources/quality/cartesio/pc/cartesio_0.8_pc_extra_coarse.inst.cfg index 068702f726..53e21ec4d0 100644 --- a/resources/quality/cartesio/pc/cartesio_0.8_pc_extra_coarse.inst.cfg +++ b/resources/quality/cartesio/pc/cartesio_0.8_pc_extra_coarse.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = extra coarse weight = 4 material = generic_pc -variant = 0.8 mm +variant = 0.8mm thermoplastic extruder [values] infill_line_width = 0.9 diff --git a/resources/quality/cartesio/pc/cartesio_0.8_pc_high.inst.cfg b/resources/quality/cartesio/pc/cartesio_0.8_pc_high.inst.cfg index 17e463b61a..0b2b9dcb26 100644 --- a/resources/quality/cartesio/pc/cartesio_0.8_pc_high.inst.cfg +++ b/resources/quality/cartesio/pc/cartesio_0.8_pc_high.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = high weight = 1 material = generic_pc -variant = 0.8 mm +variant = 0.8mm thermoplastic extruder [values] infill_line_width = 0.9 diff --git a/resources/quality/cartesio/pc/cartesio_0.8_pc_normal.inst.cfg b/resources/quality/cartesio/pc/cartesio_0.8_pc_normal.inst.cfg index 49e44ceb29..173ad406f3 100644 --- a/resources/quality/cartesio/pc/cartesio_0.8_pc_normal.inst.cfg +++ b/resources/quality/cartesio/pc/cartesio_0.8_pc_normal.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = normal weight = 2 material = generic_pc -variant = 0.8 mm +variant = 0.8mm thermoplastic extruder [values] infill_line_width = 0.9 diff --git a/resources/quality/cartesio/petg/cartesio_0.25_petg_high.inst.cfg b/resources/quality/cartesio/petg/cartesio_0.25_petg_high.inst.cfg index 6272285a45..9dc7adfc88 100644 --- a/resources/quality/cartesio/petg/cartesio_0.25_petg_high.inst.cfg +++ b/resources/quality/cartesio/petg/cartesio_0.25_petg_high.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = high weight = 1 material = generic_petg -variant = 0.25 mm +variant = 0.25mm thermoplastic extruder [values] infill_line_width = 0.3 diff --git a/resources/quality/cartesio/petg/cartesio_0.25_petg_normal.inst.cfg b/resources/quality/cartesio/petg/cartesio_0.25_petg_normal.inst.cfg index 64ea598aee..019af9d905 100644 --- a/resources/quality/cartesio/petg/cartesio_0.25_petg_normal.inst.cfg +++ b/resources/quality/cartesio/petg/cartesio_0.25_petg_normal.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = normal weight = 2 material = generic_petg -variant = 0.25 mm +variant = 0.25mm thermoplastic extruder [values] infill_line_width = 0.3 diff --git a/resources/quality/cartesio/petg/cartesio_0.4_petg_high.inst.cfg b/resources/quality/cartesio/petg/cartesio_0.4_petg_high.inst.cfg index 1de10c48d6..93388787e6 100644 --- a/resources/quality/cartesio/petg/cartesio_0.4_petg_high.inst.cfg +++ b/resources/quality/cartesio/petg/cartesio_0.4_petg_high.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = high weight = 1 material = generic_petg -variant = 0.4 mm +variant = 0.4mm thermoplastic extruder [values] infill_line_width = 0.5 diff --git a/resources/quality/cartesio/petg/cartesio_0.4_petg_normal.inst.cfg b/resources/quality/cartesio/petg/cartesio_0.4_petg_normal.inst.cfg index eaeb47dc30..ed17ccce31 100644 --- a/resources/quality/cartesio/petg/cartesio_0.4_petg_normal.inst.cfg +++ b/resources/quality/cartesio/petg/cartesio_0.4_petg_normal.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = normal weight = 2 material = generic_petg -variant = 0.4 mm +variant = 0.4mm thermoplastic extruder [values] infill_line_width = 0.5 diff --git a/resources/quality/cartesio/petg/cartesio_0.8_petg_coarse.inst.cfg b/resources/quality/cartesio/petg/cartesio_0.8_petg_coarse.inst.cfg index 370bb88a7d..754c55caf5 100644 --- a/resources/quality/cartesio/petg/cartesio_0.8_petg_coarse.inst.cfg +++ b/resources/quality/cartesio/petg/cartesio_0.8_petg_coarse.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = coarse weight = 3 material = generic_petg -variant = 0.8 mm +variant = 0.8mm thermoplastic extruder [values] infill_line_width = 0.9 diff --git a/resources/quality/cartesio/petg/cartesio_0.8_petg_extra_coarse.inst.cfg b/resources/quality/cartesio/petg/cartesio_0.8_petg_extra_coarse.inst.cfg index 395d5569f9..81b1de32a2 100644 --- a/resources/quality/cartesio/petg/cartesio_0.8_petg_extra_coarse.inst.cfg +++ b/resources/quality/cartesio/petg/cartesio_0.8_petg_extra_coarse.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = extra coarse weight = 4 material = generic_petg -variant = 0.8 mm +variant = 0.8mm thermoplastic extruder [values] infill_line_width = 0.9 diff --git a/resources/quality/cartesio/petg/cartesio_0.8_petg_high.inst.cfg b/resources/quality/cartesio/petg/cartesio_0.8_petg_high.inst.cfg index b4942c6b93..86e93c8a32 100644 --- a/resources/quality/cartesio/petg/cartesio_0.8_petg_high.inst.cfg +++ b/resources/quality/cartesio/petg/cartesio_0.8_petg_high.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = high weight = 1 material = generic_petg -variant = 0.8 mm +variant = 0.8mm thermoplastic extruder [values] infill_line_width = 0.9 diff --git a/resources/quality/cartesio/petg/cartesio_0.8_petg_normal.inst.cfg b/resources/quality/cartesio/petg/cartesio_0.8_petg_normal.inst.cfg index b9153a1982..08f918f59b 100644 --- a/resources/quality/cartesio/petg/cartesio_0.8_petg_normal.inst.cfg +++ b/resources/quality/cartesio/petg/cartesio_0.8_petg_normal.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = normal weight = 2 material = generic_petg -variant = 0.8 mm +variant = 0.8mm thermoplastic extruder [values] infill_line_width = 0.9 diff --git a/resources/quality/cartesio/pla/cartesio_0.25_pla_high.inst.cfg b/resources/quality/cartesio/pla/cartesio_0.25_pla_high.inst.cfg index fe21ca8b9a..4841f9f368 100644 --- a/resources/quality/cartesio/pla/cartesio_0.25_pla_high.inst.cfg +++ b/resources/quality/cartesio/pla/cartesio_0.25_pla_high.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = high weight = 1 material = generic_pla -variant = 0.25 mm +variant = 0.25mm thermoplastic extruder [values] infill_line_width = 0.3 diff --git a/resources/quality/cartesio/pla/cartesio_0.25_pla_normal.inst.cfg b/resources/quality/cartesio/pla/cartesio_0.25_pla_normal.inst.cfg index c6e5bf5ca7..3ba36f9436 100644 --- a/resources/quality/cartesio/pla/cartesio_0.25_pla_normal.inst.cfg +++ b/resources/quality/cartesio/pla/cartesio_0.25_pla_normal.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = normal weight = 0 material = generic_pla -variant = 0.25 mm +variant = 0.25mm thermoplastic extruder [values] infill_line_width = 0.3 diff --git a/resources/quality/cartesio/pla/cartesio_0.4_pla_high.inst.cfg b/resources/quality/cartesio/pla/cartesio_0.4_pla_high.inst.cfg index 34240f5b8d..7c785a750a 100644 --- a/resources/quality/cartesio/pla/cartesio_0.4_pla_high.inst.cfg +++ b/resources/quality/cartesio/pla/cartesio_0.4_pla_high.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = high weight = 1 material = generic_pla -variant = 0.4 mm +variant = 0.4mm thermoplastic extruder [values] infill_line_width = 0.5 diff --git a/resources/quality/cartesio/pla/cartesio_0.4_pla_normal.inst.cfg b/resources/quality/cartesio/pla/cartesio_0.4_pla_normal.inst.cfg index 3f9edb490a..b24394daf0 100644 --- a/resources/quality/cartesio/pla/cartesio_0.4_pla_normal.inst.cfg +++ b/resources/quality/cartesio/pla/cartesio_0.4_pla_normal.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = normal weight = 0 material = generic_pla -variant = 0.4 mm +variant = 0.4mm thermoplastic extruder [values] infill_line_width = 0.5 diff --git a/resources/quality/cartesio/pla/cartesio_0.8_pla_coarse.inst.cfg b/resources/quality/cartesio/pla/cartesio_0.8_pla_coarse.inst.cfg index 4231ab3fbe..6443f2d526 100644 --- a/resources/quality/cartesio/pla/cartesio_0.8_pla_coarse.inst.cfg +++ b/resources/quality/cartesio/pla/cartesio_0.8_pla_coarse.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = coarse weight = -3 material = generic_pla -variant = 0.8 mm +variant = 0.8mm thermoplastic extruder [values] infill_line_width = 0.9 diff --git a/resources/quality/cartesio/pla/cartesio_0.8_pla_extra_coarse.inst.cfg b/resources/quality/cartesio/pla/cartesio_0.8_pla_extra_coarse.inst.cfg index 4a4a2bc241..51a93f76d9 100644 --- a/resources/quality/cartesio/pla/cartesio_0.8_pla_extra_coarse.inst.cfg +++ b/resources/quality/cartesio/pla/cartesio_0.8_pla_extra_coarse.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = extra coarse weight = -4 material = generic_pla -variant = 0.8 mm +variant = 0.8mm thermoplastic extruder [values] infill_line_width = 0.9 diff --git a/resources/quality/cartesio/pla/cartesio_0.8_pla_high.inst.cfg b/resources/quality/cartesio/pla/cartesio_0.8_pla_high.inst.cfg index 36f5c8acf4..2f72d9d158 100644 --- a/resources/quality/cartesio/pla/cartesio_0.8_pla_high.inst.cfg +++ b/resources/quality/cartesio/pla/cartesio_0.8_pla_high.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = high weight = 1 material = generic_pla -variant = 0.8 mm +variant = 0.8mm thermoplastic extruder [values] infill_line_width = 0.9 diff --git a/resources/quality/cartesio/pla/cartesio_0.8_pla_normal.inst.cfg b/resources/quality/cartesio/pla/cartesio_0.8_pla_normal.inst.cfg index bc074a4a31..431f7c0fff 100644 --- a/resources/quality/cartesio/pla/cartesio_0.8_pla_normal.inst.cfg +++ b/resources/quality/cartesio/pla/cartesio_0.8_pla_normal.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = normal weight = 0 material = generic_pla -variant = 0.8 mm +variant = 0.8mm thermoplastic extruder [values] infill_line_width = 0.9 diff --git a/resources/quality/cartesio/pva/cartesio_0.25_pva_high.inst.cfg b/resources/quality/cartesio/pva/cartesio_0.25_pva_high.inst.cfg index 35551cbaa4..fe21c17e22 100644 --- a/resources/quality/cartesio/pva/cartesio_0.25_pva_high.inst.cfg +++ b/resources/quality/cartesio/pva/cartesio_0.25_pva_high.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = high weight = 1 material = generic_pva -variant = 0.25 mm +variant = 0.25mm thermoplastic extruder [values] infill_line_width = 0.3 diff --git a/resources/quality/cartesio/pva/cartesio_0.25_pva_normal.inst.cfg b/resources/quality/cartesio/pva/cartesio_0.25_pva_normal.inst.cfg index 290d5d192b..6525991986 100644 --- a/resources/quality/cartesio/pva/cartesio_0.25_pva_normal.inst.cfg +++ b/resources/quality/cartesio/pva/cartesio_0.25_pva_normal.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = normal weight = 2 material = generic_pva -variant = 0.25 mm +variant = 0.25mm thermoplastic extruder [values] infill_line_width = 0.3 diff --git a/resources/quality/cartesio/pva/cartesio_0.4_pva_high.inst.cfg b/resources/quality/cartesio/pva/cartesio_0.4_pva_high.inst.cfg index 9e7d7ab449..cdf8f8cae7 100644 --- a/resources/quality/cartesio/pva/cartesio_0.4_pva_high.inst.cfg +++ b/resources/quality/cartesio/pva/cartesio_0.4_pva_high.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = high weight = 1 material = generic_pva -variant = 0.4 mm +variant = 0.4mm thermoplastic extruder [values] infill_line_width = 0.5 diff --git a/resources/quality/cartesio/pva/cartesio_0.4_pva_normal.inst.cfg b/resources/quality/cartesio/pva/cartesio_0.4_pva_normal.inst.cfg index 833145b377..e7267735e4 100644 --- a/resources/quality/cartesio/pva/cartesio_0.4_pva_normal.inst.cfg +++ b/resources/quality/cartesio/pva/cartesio_0.4_pva_normal.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = normal weight = 2 material = generic_pva -variant = 0.4 mm +variant = 0.4mm thermoplastic extruder [values] infill_line_width = 0.5 diff --git a/resources/quality/cartesio/pva/cartesio_0.8_pva_coarse.inst.cfg b/resources/quality/cartesio/pva/cartesio_0.8_pva_coarse.inst.cfg index 8462149916..fc35e14fc6 100644 --- a/resources/quality/cartesio/pva/cartesio_0.8_pva_coarse.inst.cfg +++ b/resources/quality/cartesio/pva/cartesio_0.8_pva_coarse.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = coarse weight = 3 material = generic_pva -variant = 0.8 mm +variant = 0.8mm thermoplastic extruder [values] infill_line_width = 0.9 diff --git a/resources/quality/cartesio/pva/cartesio_0.8_pva_extra_coarse.inst.cfg b/resources/quality/cartesio/pva/cartesio_0.8_pva_extra_coarse.inst.cfg index a849ec6184..0e1b8b1241 100644 --- a/resources/quality/cartesio/pva/cartesio_0.8_pva_extra_coarse.inst.cfg +++ b/resources/quality/cartesio/pva/cartesio_0.8_pva_extra_coarse.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = extra coarse weight = 4 material = generic_pva -variant = 0.8 mm +variant = 0.8mm thermoplastic extruder [values] infill_line_width = 0.9 diff --git a/resources/quality/cartesio/pva/cartesio_0.8_pva_high.inst.cfg b/resources/quality/cartesio/pva/cartesio_0.8_pva_high.inst.cfg index 2457eb8bb2..249cf6485e 100644 --- a/resources/quality/cartesio/pva/cartesio_0.8_pva_high.inst.cfg +++ b/resources/quality/cartesio/pva/cartesio_0.8_pva_high.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = high weight = 1 material = generic_pva -variant = 0.8 mm +variant = 0.8mm thermoplastic extruder [values] infill_line_width = 0.9 diff --git a/resources/quality/cartesio/pva/cartesio_0.8_pva_normal.inst.cfg b/resources/quality/cartesio/pva/cartesio_0.8_pva_normal.inst.cfg index 616aaec50f..a6c0a89fcc 100644 --- a/resources/quality/cartesio/pva/cartesio_0.8_pva_normal.inst.cfg +++ b/resources/quality/cartesio/pva/cartesio_0.8_pva_normal.inst.cfg @@ -9,7 +9,7 @@ type = quality quality_type = normal weight = 2 material = generic_pva -variant = 0.8 mm +variant = 0.8mm thermoplastic extruder [values] infill_line_width = 0.9 diff --git a/resources/variants/cartesio_0.25.inst.cfg b/resources/variants/cartesio_0.25.inst.cfg index 866a232e8b..b3aae8a393 100644 --- a/resources/variants/cartesio_0.25.inst.cfg +++ b/resources/variants/cartesio_0.25.inst.cfg @@ -1,5 +1,5 @@ [general] -name = 0.25 mm +name = 0.25mm thermoplastic extruder version = 4 definition = cartesio diff --git a/resources/variants/cartesio_0.4.inst.cfg b/resources/variants/cartesio_0.4.inst.cfg index 24aa911103..5cea5823c4 100644 --- a/resources/variants/cartesio_0.4.inst.cfg +++ b/resources/variants/cartesio_0.4.inst.cfg @@ -1,5 +1,5 @@ [general] -name = 0.4 mm +name = 0.4mm thermoplastic extruder version = 4 definition = cartesio diff --git a/resources/variants/cartesio_0.8.inst.cfg b/resources/variants/cartesio_0.8.inst.cfg index fff2501999..b4009cf9ed 100644 --- a/resources/variants/cartesio_0.8.inst.cfg +++ b/resources/variants/cartesio_0.8.inst.cfg @@ -1,5 +1,5 @@ [general] -name = 0.8 mm +name = 0.8mm thermoplastic extruder version = 4 definition = cartesio From 5ef8aa09f80cb9766e6a750afea56bc5cb6cdb0e Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Mon, 16 Jul 2018 13:05:32 +0200 Subject: [PATCH 130/174] Translate the old material types to the new in the Version Upgrade. --- .../VersionUpgrade34to40.py | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/plugins/VersionUpgrade/VersionUpgrade34to40/VersionUpgrade34to40.py b/plugins/VersionUpgrade/VersionUpgrade34to40/VersionUpgrade34to40.py index 0cf7ef0cc4..83609206ef 100644 --- a/plugins/VersionUpgrade/VersionUpgrade34to40/VersionUpgrade34to40.py +++ b/plugins/VersionUpgrade/VersionUpgrade34to40/VersionUpgrade34to40.py @@ -8,6 +8,54 @@ from UM.VersionUpgrade import VersionUpgrade deleted_settings = {"prime_tower_wall_thickness", "dual_pre_wipe", "prime_tower_purge_volume"} +_RENAMED_MATERIAL_PROFILES = { + "dsm_arnitel2045_175_cartesio_0.25_mm": "dsm_arnitel2045_175_cartesio_0.25mm_thermoplastic_extruder", + "dsm_arnitel2045_175_cartesio_0.4_mm": "dsm_arnitel2045_175_cartesio_0.4mm_thermoplastic_extruder", + "dsm_arnitel2045_175_cartesio_0.8_mm": "dsm_arnitel2045_175_cartesio_0.8mm_thermoplastic_extruder", + "dsm_novamid1070_175_cartesio_0.25_mm": "dsm_novamid1070_175_cartesio_0.25mm_thermoplastic_extruder", + "dsm_novamid1070_175_cartesio_0.4_mm": "dsm_novamid1070_175_cartesio_0.4mm_thermoplastic_extruder", + "dsm_novamid1070_175_cartesio_0.8_mm": "dsm_novamid1070_175_cartesio_0.8mm_thermoplastic_extruder", + "generic_abs_175_cartesio_0.25_mm": "generic_abs_175_cartesio_0.25mm_thermoplastic_extruder", + "generic_abs_175_cartesio_0.4_mm": "generic_abs_175_cartesio_0.4mm_thermoplastic_extruder", + "generic_abs_175_cartesio_0.8_mm": "generic_abs_175_cartesio_0.8mm_thermoplastic_extruder", + "generic_hips_175_cartesio_0.25_mm": "generic_hips_175_cartesio_0.25mm_thermoplastic_extruder", + "generic_hips_175_cartesio_0.4_mm": "generic_hips_175_cartesio_0.4mm_thermoplastic_extruder", + "generic_hips_175_cartesio_0.8_mm": "generic_hips_175_cartesio_0.8mm_thermoplastic_extruder", + "generic_nylon_175_cartesio_0.25_mm": "generic_nylon_175_cartesio_0.25mm_thermoplastic_extruder", + "generic_nylon_175_cartesio_0.4_mm": "generic_nylon_175_cartesio_0.4mm_thermoplastic_extruder", + "generic_nylon_175_cartesio_0.8_mm": "generic_nylon_175_cartesio_0.8mm_thermoplastic_extruder", + "generic_pc_cartesio_0.25_mm": "generic_pc_cartesio_0.25mm_thermoplastic_extruder", + "generic_pc_cartesio_0.4_mm": "generic_pc_cartesio_0.4mm_thermoplastic_extruder", + "generic_pc_cartesio_0.8_mm": "generic_pc_cartesio_0.8mm_thermoplastic_extruder", + "generic_pc_175_cartesio_0.25_mm": "generic_pc_175_cartesio_0.25mm_thermoplastic_extruder", + "generic_pc_175_cartesio_0.4_mm": "generic_pc_175_cartesio_0.4mm_thermoplastic_extruder", + "generic_pc_175_cartesio_0.8_mm": "generic_pc_175_cartesio_0.8mm_thermoplastic_extruder", + "generic_petg_175_cartesio_0.25_mm": "generic_petg_175_cartesio_0.25mm_thermoplastic_extruder", + "generic_petg_175_cartesio_0.4_mm": "generic_petg_175_cartesio_0.4mm_thermoplastic_extruder", + "generic_petg_175_cartesio_0.8_mm": "generic_petg_175_cartesio_0.8mm_thermoplastic_extruder", + "generic_pla_175_cartesio_0.25_mm": "generic_pla_175_cartesio_0.25mm_thermoplastic_extruder", + "generic_pla_175_cartesio_0.4_mm": "generic_pla_175_cartesio_0.4mm_thermoplastic_extruder", + "generic_pla_175_cartesio_0.8_mm": "generic_pla_175_cartesio_0.8mm_thermoplastic_extruder", + "generic_pva_cartesio_0.25_mm": "generic_pva_cartesio_0.25mm_thermoplastic_extruder", + "generic_pva_cartesio_0.4_mm": "generic_pva_cartesio_0.4mm_thermoplastic_extruder", + "generic_pva_cartesio_0.8_mm": "generic_pva_cartesio_0.8mm_thermoplastic_extruder", + "generic_pva_175_cartesio_0.25_mm": "generic_pva_175_cartesio_0.25mm_thermoplastic_extruder", + "generic_pva_175_cartesio_0.4_mm": "generic_pva_175_cartesio_0.4mm_thermoplastic_extruder", + "generic_pva_175_cartesio_0.8_mm": "generic_pva_175_cartesio_0.8mm_thermoplastic_extruder", + "ultimaker_pc_black_cartesio_0.25_mm": "ultimaker_pc_black_cartesio_0.25mm_thermoplastic_extruder", + "ultimaker_pc_black_cartesio_0.4_mm": "ultimaker_pc_black_cartesio_0.4mm_thermoplastic_extruder", + "ultimaker_pc_black_cartesio_0.8_mm": "ultimaker_pc_black_cartesio_0.8mm_thermoplastic_extruder", + "ultimaker_pc_transparent_cartesio_0.25_mm": "ultimaker_pc_transparent_cartesio_0.25mm_thermoplastic_extruder", + "ultimaker_pc_transparent_cartesio_0.4_mm": "ultimaker_pc_transparent_cartesio_0.4mm_thermoplastic_extruder", + "ultimaker_pc_transparent_cartesio_0.8_mm": "ultimaker_pc_transparent_cartesio_0.8mm_thermoplastic_extruder", + "ultimaker_pc_white_cartesio_0.25_mm": "ultimaker_pc_white_cartesio_0.25mm_thermoplastic_extruder", + "ultimaker_pc_white_cartesio_0.4_mm": "ultimaker_pc_white_cartesio_0.4mm_thermoplastic_extruder", + "ultimaker_pc_white_cartesio_0.8_mm": "ultimaker_pc_white_cartesio_0.8mm_thermoplastic_extruder", + "ultimaker_pva_cartesio_0.25_mm": "ultimaker_pva_cartesio_0.25mm_thermoplastic_extruder", + "ultimaker_pva_cartesio_0.4_mm": "ultimaker_pva_cartesio_0.4mm_thermoplastic_extruder", + "ultimaker_pva_cartesio_0.8_mm": "ultimaker_pva_cartesio_0.8mm_thermoplastic_extruder" +} + ## Upgrades configurations from the state they were in at version 3.4 to the # state they should be in at version 4.0. class VersionUpgrade34to40(VersionUpgrade): @@ -54,6 +102,10 @@ class VersionUpgrade34to40(VersionUpgrade): parser["general"]["version"] = "4" parser["metadata"]["setting_version"] = "5" + #Update the name of the quality profile. + if parser["containers"]["3"] in _RENAMED_MATERIAL_PROFILES: + parser["containers"]["3"] = _RENAMED_MATERIAL_PROFILES[parser["containers"]["3"]] + result = io.StringIO() parser.write(result) return [filename], [result.getvalue()] From 4167f81e3b0b352c1f2c07e379501bbc2761e06c Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Mon, 16 Jul 2018 13:32:35 +0200 Subject: [PATCH 131/174] Fix printer missing from the list after connection; now always adds the field 'hidden' in the metadata, don't know why it worked before. CURA-5574 --- plugins/UM3NetworkPrinting/DiscoverUM3Action.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/UM3NetworkPrinting/DiscoverUM3Action.py b/plugins/UM3NetworkPrinting/DiscoverUM3Action.py index 135bc06d3a..c0a828ece9 100644 --- a/plugins/UM3NetworkPrinting/DiscoverUM3Action.py +++ b/plugins/UM3NetworkPrinting/DiscoverUM3Action.py @@ -109,7 +109,8 @@ class DiscoverUM3Action(MachineAction): CuraApplication.getInstance().getMachineManager().replaceContainersMetadata(key = "connect_group_name", value = previous_connect_group_name, new_value = group_name) else: global_container_stack.setMetaDataEntry("connect_group_name", group_name) - global_container_stack.setMetaDataEntry("hidden", False) + # Set the default value for "hidden", which is used when you have a group with multiple types of printers + global_container_stack.setMetaDataEntry("hidden", False) if self._network_plugin: # Ensure that the connection states are refreshed. From 543128e28c44018f72dcd08fddc8cb394581f2af Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Mon, 16 Jul 2018 13:44:24 +0200 Subject: [PATCH 132/174] Modify the suggestion message when a material is not compatible with the buildplate to only use glue but not adhesion sheets. --- resources/qml/SidebarHeader.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index 0e5ac852e8..02b6bef983 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -535,7 +535,7 @@ Column y: -Math.round(UM.Theme.getSize("sidebar_margin").height / 3) anchors.left: parent.left width: parent.width - materialCompatibilityLink.width - text: catalog.i18nc("@label", "Use adhesion sheet or glue with this material combination") + text: catalog.i18nc("@label", "Use glue with this material combination") font: UM.Theme.getFont("very_small") color: UM.Theme.getColor("text") visible: buildplateCompatibilityError || buildplateCompatibilityWarning From 6850ad4c9d55ce11b89026da3a74a9f380454548 Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Mon, 16 Jul 2018 14:54:44 +0200 Subject: [PATCH 133/174] Align the dropdown panel in the combobox with the parent and get rid of binding loop messages. --- resources/qml/Settings/SettingComboBox.qml | 7 ++++--- resources/qml/Settings/SettingExtruder.qml | 6 +++++- resources/qml/Settings/SettingOptionalExtruder.qml | 6 +++++- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/resources/qml/Settings/SettingComboBox.qml b/resources/qml/Settings/SettingComboBox.qml index d48d2620df..5462c26398 100644 --- a/resources/qml/Settings/SettingComboBox.qml +++ b/resources/qml/Settings/SettingComboBox.qml @@ -90,7 +90,7 @@ SettingItem popup: Popup { y: control.height - UM.Theme.getSize("default_lining").height width: control.width - implicitHeight: contentItem.implicitHeight + implicitHeight: contentItem.implicitHeight + 2 * UM.Theme.getSize("default_lining").width padding: UM.Theme.getSize("default_lining").width contentItem: ListView { @@ -117,8 +117,9 @@ SettingItem contentItem: Label { // FIXME: Somehow the top/bottom anchoring is not correct on Linux and it results in invisible texts. - anchors.top: parent.top - anchors.bottom: parent.bottom + anchors.fill: parent + anchors.leftMargin: UM.Theme.getSize("setting_unit_margin").width + anchors.rightMargin: UM.Theme.getSize("setting_unit_margin").width text: modelData.value renderType: Text.NativeRendering diff --git a/resources/qml/Settings/SettingExtruder.qml b/resources/qml/Settings/SettingExtruder.qml index 2239628e3f..83f06ebc5f 100644 --- a/resources/qml/Settings/SettingExtruder.qml +++ b/resources/qml/Settings/SettingExtruder.qml @@ -180,7 +180,7 @@ SettingItem popup: Popup { y: control.height - UM.Theme.getSize("default_lining").height width: control.width - implicitHeight: contentItem.implicitHeight + implicitHeight: contentItem.implicitHeight + 2 * UM.Theme.getSize("default_lining").width padding: UM.Theme.getSize("default_lining").width contentItem: ListView { @@ -206,6 +206,10 @@ SettingItem contentItem: Label { + anchors.fill: parent + anchors.leftMargin: UM.Theme.getSize("setting_unit_margin").width + anchors.rightMargin: UM.Theme.getSize("setting_unit_margin").width + text: model.name renderType: Text.NativeRendering color: diff --git a/resources/qml/Settings/SettingOptionalExtruder.qml b/resources/qml/Settings/SettingOptionalExtruder.qml index a370ec6259..db79468315 100644 --- a/resources/qml/Settings/SettingOptionalExtruder.qml +++ b/resources/qml/Settings/SettingOptionalExtruder.qml @@ -175,7 +175,7 @@ SettingItem popup: Popup { y: control.height - UM.Theme.getSize("default_lining").height width: control.width - implicitHeight: contentItem.implicitHeight + implicitHeight: contentItem.implicitHeight + 2 * UM.Theme.getSize("default_lining").width padding: UM.Theme.getSize("default_lining").width contentItem: ListView { @@ -201,6 +201,10 @@ SettingItem contentItem: Label { + anchors.fill: parent + anchors.leftMargin: UM.Theme.getSize("setting_unit_margin").width + anchors.rightMargin: UM.Theme.getSize("setting_unit_margin").width + text: model.name renderType: Text.NativeRendering color: From 0bde1487e71074db168b8530dbb422529c284c64 Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Mon, 16 Jul 2018 16:13:43 +0200 Subject: [PATCH 134/174] Add generic material packages to materials page Contributes to CURA-5510 --- .../resources/qml/ToolboxDownloadsGrid.qml | 8 +++++--- .../resources/qml/ToolboxDownloadsGridTile.qml | 14 ++++++++++++-- .../resources/qml/ToolboxDownloadsPage.qml | 11 +++++++++++ plugins/Toolbox/src/PackagesModel.py | 9 ++++++--- plugins/Toolbox/src/Toolbox.py | 16 +++++++++++++--- 5 files changed, 47 insertions(+), 11 deletions(-) diff --git a/plugins/Toolbox/resources/qml/ToolboxDownloadsGrid.qml b/plugins/Toolbox/resources/qml/ToolboxDownloadsGrid.qml index 823a85cf09..c586828969 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDownloadsGrid.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDownloadsGrid.qml @@ -9,6 +9,9 @@ import UM 1.1 as UM Column { + property var heading: "" + property var model + id: gridArea height: childrenRect.height + 2 * padding width: parent.width spacing: UM.Theme.getSize("default_margin").height @@ -16,7 +19,7 @@ Column Label { id: heading - text: toolbox.viewCategory == "material" ? catalog.i18nc("@label", "Community contributions") : catalog.i18nc("@label", "Community plugins") + text: gridArea.heading width: parent.width color: UM.Theme.getColor("text_medium") font: UM.Theme.getFont("medium") @@ -24,14 +27,13 @@ Column GridLayout { id: grid - property var model: toolbox.viewCategory == "material" ? toolbox.authorsModel : toolbox.packagesModel width: parent.width - 2 * parent.padding columns: 2 columnSpacing: UM.Theme.getSize("default_margin").height rowSpacing: UM.Theme.getSize("default_margin").width Repeater { - model: grid.model + model: gridArea.model delegate: ToolboxDownloadsGridTile { Layout.preferredWidth: (grid.width - (grid.columns - 1) * grid.columnSpacing) / grid.columns diff --git a/plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml b/plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml index dbaa2c83dc..17a41f2e83 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml @@ -104,8 +104,18 @@ Item switch(toolbox.viewCategory) { case "material": - toolbox.viewPage = "author" - toolbox.filterModelByProp("packages", "author_id", model.id) + + // If model has a type, it must be a package + if (model.type) + { + toolbox.viewPage = "detail" + toolbox.filterModelByProp("packages", "id", model.id) + } + else + { + toolbox.viewPage = "author" + toolbox.filterModelByProp("packages", "author_id", model.id) + } break default: toolbox.viewPage = "detail" diff --git a/plugins/Toolbox/resources/qml/ToolboxDownloadsPage.qml b/plugins/Toolbox/resources/qml/ToolboxDownloadsPage.qml index 9dd64aacfe..1089fcc51e 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDownloadsPage.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDownloadsPage.qml @@ -29,6 +29,17 @@ ScrollView { id: allPlugins width: parent.width + heading: toolbox.viewCategory == "material" ? catalog.i18nc("@label", "Community Contributions") : catalog.i18nc("@label", "Community Plugins") + model: toolbox.viewCategory == "material" ? toolbox.authorsModel : toolbox.packagesModel + } + + ToolboxDownloadsGrid + { + id: genericMaterials + visible: toolbox.viewCategory == "material" + width: parent.width + heading: catalog.i18nc("@label", "Generic Materials") + model: toolbox.materialsGenericModel } } } diff --git a/plugins/Toolbox/src/PackagesModel.py b/plugins/Toolbox/src/PackagesModel.py index 8694619fde..23aa639bde 100644 --- a/plugins/Toolbox/src/PackagesModel.py +++ b/plugins/Toolbox/src/PackagesModel.py @@ -33,6 +33,7 @@ class PackagesModel(ListModel): self.addRoleName(Qt.UserRole + 16, "has_configs") self.addRoleName(Qt.UserRole + 17, "supported_configs") self.addRoleName(Qt.UserRole + 18, "download_count") + self.addRoleName(Qt.UserRole + 19, "tags") # List of filters for queries. The result is the union of the each list of results. self._filter = {} # type: Dict[str, str] @@ -78,13 +79,15 @@ class PackagesModel(ListModel): "is_installed": package["is_installed"] if "is_installed" in package else False, "has_configs": has_configs, "supported_configs": configs_model, - "download_count": package["download_count"] if "download_count" in package else 0 - + "download_count": package["download_count"] if "download_count" in package else 0, + "tags": package["tags"] if "tags" in package else [] }) # Filter on all the key-word arguments. for key, value in self._filter.items(): - if "*" in value: + if key is "tags": + key_filter = lambda item, value = value: value in item["tags"] + elif "*" in value: key_filter = lambda candidate, key = key, value = value: self._matchRegExp(candidate, key, value) else: key_filter = lambda candidate, key = key, value = value: self._matchString(candidate, key, value) diff --git a/plugins/Toolbox/src/Toolbox.py b/plugins/Toolbox/src/Toolbox.py index e0c73cd7fc..a9d0bb03d1 100644 --- a/plugins/Toolbox/src/Toolbox.py +++ b/plugins/Toolbox/src/Toolbox.py @@ -71,7 +71,8 @@ class Toolbox(QObject, Extension): "plugins_installed": [], "materials_showcase": [], "materials_available": [], - "materials_installed": [] + "materials_installed": [], + "materials_generic": [] } # type: Dict[str, List[Any]] # Models: @@ -83,7 +84,8 @@ class Toolbox(QObject, Extension): "plugins_installed": PackagesModel(self), "materials_showcase": AuthorsModel(self), "materials_available": PackagesModel(self), - "materials_installed": PackagesModel(self) + "materials_installed": PackagesModel(self), + "materials_generic": PackagesModel(self) } # type: Dict[str, ListModel] # These properties are for keeping track of the UI state: @@ -178,7 +180,8 @@ class Toolbox(QObject, Extension): "plugins_showcase": QUrl("{base_url}/showcase".format(base_url=self._api_url)), "plugins_available": QUrl("{base_url}/packages?package_type=plugin".format(base_url=self._api_url)), "materials_showcase": QUrl("{base_url}/showcase".format(base_url=self._api_url)), - "materials_available": QUrl("{base_url}/packages?package_type=material".format(base_url=self._api_url)) + "materials_available": QUrl("{base_url}/packages?package_type=material".format(base_url=self._api_url)), + "materials_generic": QUrl("{base_url}/packages?package_type=material&tags=generic".format(base_url=self._api_url)) } # Get the API root for the packages API depending on Cura version settings. @@ -229,6 +232,7 @@ class Toolbox(QObject, Extension): self._makeRequestByType("plugins_showcase") self._makeRequestByType("materials_showcase") self._makeRequestByType("materials_available") + self._makeRequestByType("materials_generic") # Gather installed packages: self._updateInstalledModels() @@ -640,6 +644,8 @@ class Toolbox(QObject, Extension): self._models[type].setFilter({"type": "plugin"}) if type is "authors": self._models[type].setFilter({"package_types": "material"}) + if type is "materials_generic": + self._models[type].setFilter({"tags": "generic"}) self.metadataChanged.emit() @@ -761,6 +767,10 @@ class Toolbox(QObject, Extension): def materialsInstalledModel(self) -> PackagesModel: return cast(PackagesModel, self._models["materials_installed"]) + @pyqtProperty(QObject, notify=metadataChanged) + def materialsGenericModel(self) -> PackagesModel: + return cast(PackagesModel, self._models["materials_generic"]) + # Filter Models: From 51c499b08c333b45e7d6604d8f4e565a97aa38bb Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Mon, 16 Jul 2018 16:26:55 +0200 Subject: [PATCH 135/174] When the extruder is being disabled and it is the currently selected one, then switch to the default extruder. Also do not allow users to click in a disabled extruder, only if they want to enable it again. --- cura/Settings/MachineManager.py | 5 +++++ resources/qml/SidebarHeader.qml | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index 26f5a490dd..ff585deb54 100755 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -985,6 +985,11 @@ class MachineManager(QObject): self.updateDefaultExtruder() self.updateNumberExtrudersEnabled() self.correctExtruderSettings() + + # In case this extruder is being disabled and it's the currently selected one, switch to the default extruder + if not enabled and position == ExtruderManager.getInstance().activeExtruderIndex: + ExtruderManager.getInstance().setActiveExtruderIndex(int(self._default_extruder_position)) + # ensure that the quality profile is compatible with current combination, or choose a compatible one if available self._updateQualityWithMaterial() self.extruderChanged.emit() diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index 02b6bef983..4e8911b3c1 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -164,8 +164,12 @@ Column onClicked: { switch (mouse.button) { case Qt.LeftButton: - forceActiveFocus(); // Changing focus applies the currently-being-typed values so it can change the displayed setting values. - Cura.ExtruderManager.setActiveExtruderIndex(index); + extruder_enabled = Cura.MachineManager.getExtruder(model.index).isEnabled + if (extruder_enabled) + { + forceActiveFocus(); // Changing focus applies the currently-being-typed values so it can change the displayed setting values. + Cura.ExtruderManager.setActiveExtruderIndex(index); + } break; case Qt.RightButton: extruder_enabled = Cura.MachineManager.getExtruder(model.index).isEnabled From 46ce90c803cea95a68c76d151f76d5934d2aec35 Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Mon, 16 Jul 2018 16:54:50 +0200 Subject: [PATCH 136/174] Fix-up Dagoma definitions - Removed nozzle size in magis def because it's in the extruder def on other machines - Removed material diam from disco extruder def because its in the disco machine - Remove material diam from neva extruder def because its in the neva machine Contributes to CURA-5499 --- .../definitions/dagoma_neva_magis.def.json | 3 --- .../dagoma_discoeasy200_extruder_0.def.json | 9 ++++++--- .../extruders/dagoma_neva_extruder_0.def.json | 9 ++++++--- .../dagoma_neva_magis_extruder_0.def.json | 19 +++++++++++++++++++ 4 files changed, 31 insertions(+), 9 deletions(-) create mode 100644 resources/extruders/dagoma_neva_magis_extruder_0.def.json diff --git a/resources/definitions/dagoma_neva_magis.def.json b/resources/definitions/dagoma_neva_magis.def.json index fe5cff471e..91f99146ba 100644 --- a/resources/definitions/dagoma_neva_magis.def.json +++ b/resources/definitions/dagoma_neva_magis.def.json @@ -24,9 +24,6 @@ "machine_center_is_zero": { "default_value": true }, - "machine_nozzle_size": { - "default_value": 0.4 - }, "machine_head_with_fans_polygon": { "default_value": [ [-36, -42], diff --git a/resources/extruders/dagoma_discoeasy200_extruder_0.def.json b/resources/extruders/dagoma_discoeasy200_extruder_0.def.json index eb2b8ef1f7..342741c559 100644 --- a/resources/extruders/dagoma_discoeasy200_extruder_0.def.json +++ b/resources/extruders/dagoma_discoeasy200_extruder_0.def.json @@ -9,8 +9,11 @@ }, "overrides": { - "extruder_nr": { "default_value": 0 }, - "machine_nozzle_size": { "default_value": 0.4 }, - "material_diameter": { "default_value": 1.75 } + "extruder_nr": { + "default_value": 0 + }, + "machine_nozzle_size": { + "default_value": 0.4 + } } } diff --git a/resources/extruders/dagoma_neva_extruder_0.def.json b/resources/extruders/dagoma_neva_extruder_0.def.json index dcb8311be4..eeb8a42a3a 100644 --- a/resources/extruders/dagoma_neva_extruder_0.def.json +++ b/resources/extruders/dagoma_neva_extruder_0.def.json @@ -9,8 +9,11 @@ }, "overrides": { - "extruder_nr": { "default_value": 0 }, - "machine_nozzle_size": { "default_value": 0.4 }, - "material_diameter": { "default_value": 1.75 } + "extruder_nr": { + "default_value": 0 + }, + "machine_nozzle_size": { + "default_value": 0.4 + } } } diff --git a/resources/extruders/dagoma_neva_magis_extruder_0.def.json b/resources/extruders/dagoma_neva_magis_extruder_0.def.json new file mode 100644 index 0000000000..4a20b64fe8 --- /dev/null +++ b/resources/extruders/dagoma_neva_magis_extruder_0.def.json @@ -0,0 +1,19 @@ +{ + "id": "dagoma_neva_magis_extruder_0", + "version": 2, + "name": "Extruder 1", + "inherits": "fdmextruder", + "metadata": { + "machine": "dagoma_neva_magis", + "position": "0" + }, + + "overrides": { + "extruder_nr": { + "default_value": 0 + }, + "machine_nozzle_size": { + "default_value": 0.4 + } + } +} From 28eaf50bace0a0f60535928d3e1a91cd1b61bc8c Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Tue, 17 Jul 2018 10:26:13 +0200 Subject: [PATCH 137/174] Fix exit application Typo... --- resources/qml/Cura.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index 61d2c9f655..09c66f98f9 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -743,7 +743,7 @@ UM.MainWindow Connections { target: Cura.Actions.quit - onTriggered: CuraApplication.exitApplication(); + onTriggered: CuraApplication.checkAndExitApplication(); } Connections From ed1e47dcc99e79d05f80fdd7d7e8d899b2347ea9 Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Tue, 17 Jul 2018 10:56:33 +0200 Subject: [PATCH 138/174] Moved material diameters to extruders defs Contributes to CURA-5499 --- resources/definitions/dagoma_discoeasy200.def.json | 3 --- resources/definitions/dagoma_neva.def.json | 4 ---- resources/definitions/dagoma_neva_magis.def.json | 4 ---- resources/extruders/dagoma_discoeasy200_extruder_0.def.json | 4 +++- resources/extruders/dagoma_neva_extruder_0.def.json | 4 +++- resources/extruders/dagoma_neva_magis_extruder_0.def.json | 4 +++- 6 files changed, 9 insertions(+), 14 deletions(-) diff --git a/resources/definitions/dagoma_discoeasy200.def.json b/resources/definitions/dagoma_discoeasy200.def.json index 60f371ec88..5e45947393 100644 --- a/resources/definitions/dagoma_discoeasy200.def.json +++ b/resources/definitions/dagoma_discoeasy200.def.json @@ -44,9 +44,6 @@ "machine_end_gcode": { "default_value": "\nM104 S0\nM106 S255\nM140 S0\nG91\nG1 E-1 F300\nG1 Z+3 F3000\nG90\nG28 X Y\nM107\nM84\n" }, - "material_diameter": { - "default_value": 1.75 - }, "default_material_print_temperature": { "default_value": 205 }, diff --git a/resources/definitions/dagoma_neva.def.json b/resources/definitions/dagoma_neva.def.json index b7a15995c3..be429e32af 100644 --- a/resources/definitions/dagoma_neva.def.json +++ b/resources/definitions/dagoma_neva.def.json @@ -1,5 +1,4 @@ { - "id": "dagoma_neva", "name": "Dagoma NEVA", "version": 2, "inherits": "fdmprinter", @@ -51,9 +50,6 @@ "machine_end_gcode": { "default_value": "\nM104 S0\nM106 S255\nM140 S0\nG91\nG1 E-1 F300\nG1 Z+3 E-2 F9000\nG90\nG28\n" }, - "material_diameter": { - "default_value": 1.75 - }, "default_material_print_temperature": { "default_value": 205 }, diff --git a/resources/definitions/dagoma_neva_magis.def.json b/resources/definitions/dagoma_neva_magis.def.json index 91f99146ba..6a856044b2 100644 --- a/resources/definitions/dagoma_neva_magis.def.json +++ b/resources/definitions/dagoma_neva_magis.def.json @@ -1,5 +1,4 @@ { - "id": "dagoma_neva_magis", "name": "Dagoma NEVA Magis", "version": 2, "inherits": "fdmprinter", @@ -47,9 +46,6 @@ "machine_end_gcode": { "default_value": "\nM104 S0\nM106 S255\nM140 S0\nG91\nG1 E-1 F300\nG1 Z+3 E-2 F9000\nG90\nG28\n" }, - "material_diameter": { - "default_value": 1.75 - }, "default_material_print_temperature": { "default_value": 205 }, diff --git a/resources/extruders/dagoma_discoeasy200_extruder_0.def.json b/resources/extruders/dagoma_discoeasy200_extruder_0.def.json index 342741c559..c885ac971e 100644 --- a/resources/extruders/dagoma_discoeasy200_extruder_0.def.json +++ b/resources/extruders/dagoma_discoeasy200_extruder_0.def.json @@ -1,5 +1,4 @@ { - "id": "dagoma_discoeasy200_extruder_0", "version": 2, "name": "Extruder 1", "inherits": "fdmextruder", @@ -14,6 +13,9 @@ }, "machine_nozzle_size": { "default_value": 0.4 + }, + "material_diameter": { + "default_value": 1.75 } } } diff --git a/resources/extruders/dagoma_neva_extruder_0.def.json b/resources/extruders/dagoma_neva_extruder_0.def.json index eeb8a42a3a..95035f63f2 100644 --- a/resources/extruders/dagoma_neva_extruder_0.def.json +++ b/resources/extruders/dagoma_neva_extruder_0.def.json @@ -1,5 +1,4 @@ { - "id": "dagoma_neva_extruder_0", "version": 2, "name": "Extruder 1", "inherits": "fdmextruder", @@ -14,6 +13,9 @@ }, "machine_nozzle_size": { "default_value": 0.4 + }, + "material_diameter": { + "default_value": 1.75 } } } diff --git a/resources/extruders/dagoma_neva_magis_extruder_0.def.json b/resources/extruders/dagoma_neva_magis_extruder_0.def.json index 4a20b64fe8..0d5fd3c9b4 100644 --- a/resources/extruders/dagoma_neva_magis_extruder_0.def.json +++ b/resources/extruders/dagoma_neva_magis_extruder_0.def.json @@ -1,5 +1,4 @@ { - "id": "dagoma_neva_magis_extruder_0", "version": 2, "name": "Extruder 1", "inherits": "fdmextruder", @@ -14,6 +13,9 @@ }, "machine_nozzle_size": { "default_value": 0.4 + }, + "material_diameter": { + "default_value": 1.75 } } } From 139ac5c5460da2e118b9258f472edc09160304b5 Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Tue, 17 Jul 2018 13:18:22 +0200 Subject: [PATCH 139/174] Quality profile fixes Contributes to CURA-5499 --- .../quality/dagoma/dagoma_discoeasy200_pla_fast.inst.cfg | 2 +- .../quality/dagoma/dagoma_discoeasy200_pla_fine.inst.cfg | 4 ++-- .../quality/dagoma/dagoma_discoeasy200_pla_standard.inst.cfg | 4 ++-- resources/quality/dagoma/dagoma_neva_magis_pla_fast.inst.cfg | 2 +- resources/quality/dagoma/dagoma_neva_magis_pla_fine.inst.cfg | 4 ++-- .../quality/dagoma/dagoma_neva_magis_pla_standard.inst.cfg | 4 ++-- resources/quality/dagoma/dagoma_neva_pla_fast.inst.cfg | 2 +- resources/quality/dagoma/dagoma_neva_pla_fine.inst.cfg | 4 ++-- resources/quality/dagoma/dagoma_neva_pla_standard.inst.cfg | 4 ++-- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/resources/quality/dagoma/dagoma_discoeasy200_pla_fast.inst.cfg b/resources/quality/dagoma/dagoma_discoeasy200_pla_fast.inst.cfg index 6cd88f819c..b1b742935d 100644 --- a/resources/quality/dagoma/dagoma_discoeasy200_pla_fast.inst.cfg +++ b/resources/quality/dagoma/dagoma_discoeasy200_pla_fast.inst.cfg @@ -4,7 +4,7 @@ name = Fast definition = dagoma_discoeasy200 [metadata] -setting_version = 4 +setting_version = 5 type = quality quality_type = draft weight = -2 diff --git a/resources/quality/dagoma/dagoma_discoeasy200_pla_fine.inst.cfg b/resources/quality/dagoma/dagoma_discoeasy200_pla_fine.inst.cfg index 0f59401dd5..e6ac921430 100644 --- a/resources/quality/dagoma/dagoma_discoeasy200_pla_fine.inst.cfg +++ b/resources/quality/dagoma/dagoma_discoeasy200_pla_fine.inst.cfg @@ -4,9 +4,9 @@ name = Fine definition = dagoma_discoeasy200 [metadata] -setting_version = 4 +setting_version = 5 type = quality -quality_type = high +quality_type = normal weight = 0 material = generic_pla diff --git a/resources/quality/dagoma/dagoma_discoeasy200_pla_standard.inst.cfg b/resources/quality/dagoma/dagoma_discoeasy200_pla_standard.inst.cfg index 9c1cc19f9e..7261c2c416 100644 --- a/resources/quality/dagoma/dagoma_discoeasy200_pla_standard.inst.cfg +++ b/resources/quality/dagoma/dagoma_discoeasy200_pla_standard.inst.cfg @@ -4,9 +4,9 @@ name = Standard definition = dagoma_discoeasy200 [metadata] -setting_version = 4 +setting_version = 5 type = quality -quality_type = normal +quality_type = fast weight = -1 material = generic_pla diff --git a/resources/quality/dagoma/dagoma_neva_magis_pla_fast.inst.cfg b/resources/quality/dagoma/dagoma_neva_magis_pla_fast.inst.cfg index f0f5810e82..8f75d6733d 100644 --- a/resources/quality/dagoma/dagoma_neva_magis_pla_fast.inst.cfg +++ b/resources/quality/dagoma/dagoma_neva_magis_pla_fast.inst.cfg @@ -4,7 +4,7 @@ name = Fast definition = dagoma_neva [metadata] -setting_version = 4 +setting_version = 5 type = quality quality_type = draft weight = -2 diff --git a/resources/quality/dagoma/dagoma_neva_magis_pla_fine.inst.cfg b/resources/quality/dagoma/dagoma_neva_magis_pla_fine.inst.cfg index 3dc4ce5627..018e7f1e63 100644 --- a/resources/quality/dagoma/dagoma_neva_magis_pla_fine.inst.cfg +++ b/resources/quality/dagoma/dagoma_neva_magis_pla_fine.inst.cfg @@ -4,9 +4,9 @@ name = Fine definition = dagoma_neva [metadata] -setting_version = 4 +setting_version = 5 type = quality -quality_type = high +quality_type = normal weight = 0 material = generic_pla diff --git a/resources/quality/dagoma/dagoma_neva_magis_pla_standard.inst.cfg b/resources/quality/dagoma/dagoma_neva_magis_pla_standard.inst.cfg index ce2157c90b..9456eb25f8 100644 --- a/resources/quality/dagoma/dagoma_neva_magis_pla_standard.inst.cfg +++ b/resources/quality/dagoma/dagoma_neva_magis_pla_standard.inst.cfg @@ -4,9 +4,9 @@ name = Standard definition = dagoma_neva [metadata] -setting_version = 4 +setting_version = 5 type = quality -quality_type = normal +quality_type = fast weight = -1 material = generic_pla diff --git a/resources/quality/dagoma/dagoma_neva_pla_fast.inst.cfg b/resources/quality/dagoma/dagoma_neva_pla_fast.inst.cfg index f0f5810e82..8f75d6733d 100644 --- a/resources/quality/dagoma/dagoma_neva_pla_fast.inst.cfg +++ b/resources/quality/dagoma/dagoma_neva_pla_fast.inst.cfg @@ -4,7 +4,7 @@ name = Fast definition = dagoma_neva [metadata] -setting_version = 4 +setting_version = 5 type = quality quality_type = draft weight = -2 diff --git a/resources/quality/dagoma/dagoma_neva_pla_fine.inst.cfg b/resources/quality/dagoma/dagoma_neva_pla_fine.inst.cfg index 3dc4ce5627..018e7f1e63 100644 --- a/resources/quality/dagoma/dagoma_neva_pla_fine.inst.cfg +++ b/resources/quality/dagoma/dagoma_neva_pla_fine.inst.cfg @@ -4,9 +4,9 @@ name = Fine definition = dagoma_neva [metadata] -setting_version = 4 +setting_version = 5 type = quality -quality_type = high +quality_type = normal weight = 0 material = generic_pla diff --git a/resources/quality/dagoma/dagoma_neva_pla_standard.inst.cfg b/resources/quality/dagoma/dagoma_neva_pla_standard.inst.cfg index ce2157c90b..9456eb25f8 100644 --- a/resources/quality/dagoma/dagoma_neva_pla_standard.inst.cfg +++ b/resources/quality/dagoma/dagoma_neva_pla_standard.inst.cfg @@ -4,9 +4,9 @@ name = Standard definition = dagoma_neva [metadata] -setting_version = 4 +setting_version = 5 type = quality -quality_type = normal +quality_type = fast weight = -1 material = generic_pla From f1efaa78b7719efaf425316e3896d013a2ce6b28 Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Tue, 17 Jul 2018 13:22:15 +0200 Subject: [PATCH 140/174] General version to v4, fixed bed temp Contributes to CURA-5499 --- .../quality/dagoma/dagoma_discoeasy200_pla_fast.inst.cfg | 2 +- .../quality/dagoma/dagoma_discoeasy200_pla_fine.inst.cfg | 2 +- .../quality/dagoma/dagoma_discoeasy200_pla_standard.inst.cfg | 4 ++-- resources/quality/dagoma/dagoma_neva_magis_pla_fast.inst.cfg | 4 ++-- resources/quality/dagoma/dagoma_neva_magis_pla_fine.inst.cfg | 2 +- .../quality/dagoma/dagoma_neva_magis_pla_standard.inst.cfg | 4 ++-- resources/quality/dagoma/dagoma_neva_pla_fast.inst.cfg | 4 ++-- resources/quality/dagoma/dagoma_neva_pla_fine.inst.cfg | 2 +- resources/quality/dagoma/dagoma_neva_pla_standard.inst.cfg | 4 ++-- 9 files changed, 14 insertions(+), 14 deletions(-) diff --git a/resources/quality/dagoma/dagoma_discoeasy200_pla_fast.inst.cfg b/resources/quality/dagoma/dagoma_discoeasy200_pla_fast.inst.cfg index b1b742935d..5ba805a4fa 100644 --- a/resources/quality/dagoma/dagoma_discoeasy200_pla_fast.inst.cfg +++ b/resources/quality/dagoma/dagoma_discoeasy200_pla_fast.inst.cfg @@ -1,5 +1,5 @@ [general] -version = 3 +version = 4 name = Fast definition = dagoma_discoeasy200 diff --git a/resources/quality/dagoma/dagoma_discoeasy200_pla_fine.inst.cfg b/resources/quality/dagoma/dagoma_discoeasy200_pla_fine.inst.cfg index e6ac921430..695fd7bc7e 100644 --- a/resources/quality/dagoma/dagoma_discoeasy200_pla_fine.inst.cfg +++ b/resources/quality/dagoma/dagoma_discoeasy200_pla_fine.inst.cfg @@ -1,5 +1,5 @@ [general] -version = 3 +version = 4 name = Fine definition = dagoma_discoeasy200 diff --git a/resources/quality/dagoma/dagoma_discoeasy200_pla_standard.inst.cfg b/resources/quality/dagoma/dagoma_discoeasy200_pla_standard.inst.cfg index 7261c2c416..b6b086403d 100644 --- a/resources/quality/dagoma/dagoma_discoeasy200_pla_standard.inst.cfg +++ b/resources/quality/dagoma/dagoma_discoeasy200_pla_standard.inst.cfg @@ -1,5 +1,5 @@ [general] -version = 3 +version = 4 name = Standard definition = dagoma_discoeasy200 @@ -14,4 +14,4 @@ material = generic_pla layer_height = 0.15 material_print_temperature = =default_material_print_temperature + 5 -material_bed_temperature_layer_0 = =default_material_print_temperature + 5 +material_bed_temperature_layer_0 = =default_material_bed_temperature + 5 diff --git a/resources/quality/dagoma/dagoma_neva_magis_pla_fast.inst.cfg b/resources/quality/dagoma/dagoma_neva_magis_pla_fast.inst.cfg index 8f75d6733d..51fb17a5cc 100644 --- a/resources/quality/dagoma/dagoma_neva_magis_pla_fast.inst.cfg +++ b/resources/quality/dagoma/dagoma_neva_magis_pla_fast.inst.cfg @@ -1,5 +1,5 @@ [general] -version = 3 +version = 4 name = Fast definition = dagoma_neva @@ -14,4 +14,4 @@ material = generic_pla layer_height = 0.2 material_print_temperature = =default_material_print_temperature + 10 -material_bed_temperature_layer_0 = =default_material_print_temperature + 10 +material_bed_temperature_layer_0 = =default_material_bed_temperature + 10 diff --git a/resources/quality/dagoma/dagoma_neva_magis_pla_fine.inst.cfg b/resources/quality/dagoma/dagoma_neva_magis_pla_fine.inst.cfg index 018e7f1e63..1ff947d766 100644 --- a/resources/quality/dagoma/dagoma_neva_magis_pla_fine.inst.cfg +++ b/resources/quality/dagoma/dagoma_neva_magis_pla_fine.inst.cfg @@ -1,5 +1,5 @@ [general] -version = 3 +version = 4 name = Fine definition = dagoma_neva diff --git a/resources/quality/dagoma/dagoma_neva_magis_pla_standard.inst.cfg b/resources/quality/dagoma/dagoma_neva_magis_pla_standard.inst.cfg index 9456eb25f8..dfcc1c967b 100644 --- a/resources/quality/dagoma/dagoma_neva_magis_pla_standard.inst.cfg +++ b/resources/quality/dagoma/dagoma_neva_magis_pla_standard.inst.cfg @@ -1,5 +1,5 @@ [general] -version = 3 +version = 4 name = Standard definition = dagoma_neva @@ -14,4 +14,4 @@ material = generic_pla layer_height = 0.15 material_print_temperature = =default_material_print_temperature + 5 -material_bed_temperature_layer_0 = =default_material_print_temperature + 5 +material_bed_temperature_layer_0 = =default_material_bed_temperature + 5 diff --git a/resources/quality/dagoma/dagoma_neva_pla_fast.inst.cfg b/resources/quality/dagoma/dagoma_neva_pla_fast.inst.cfg index 8f75d6733d..51fb17a5cc 100644 --- a/resources/quality/dagoma/dagoma_neva_pla_fast.inst.cfg +++ b/resources/quality/dagoma/dagoma_neva_pla_fast.inst.cfg @@ -1,5 +1,5 @@ [general] -version = 3 +version = 4 name = Fast definition = dagoma_neva @@ -14,4 +14,4 @@ material = generic_pla layer_height = 0.2 material_print_temperature = =default_material_print_temperature + 10 -material_bed_temperature_layer_0 = =default_material_print_temperature + 10 +material_bed_temperature_layer_0 = =default_material_bed_temperature + 10 diff --git a/resources/quality/dagoma/dagoma_neva_pla_fine.inst.cfg b/resources/quality/dagoma/dagoma_neva_pla_fine.inst.cfg index 018e7f1e63..1ff947d766 100644 --- a/resources/quality/dagoma/dagoma_neva_pla_fine.inst.cfg +++ b/resources/quality/dagoma/dagoma_neva_pla_fine.inst.cfg @@ -1,5 +1,5 @@ [general] -version = 3 +version = 4 name = Fine definition = dagoma_neva diff --git a/resources/quality/dagoma/dagoma_neva_pla_standard.inst.cfg b/resources/quality/dagoma/dagoma_neva_pla_standard.inst.cfg index 9456eb25f8..dfcc1c967b 100644 --- a/resources/quality/dagoma/dagoma_neva_pla_standard.inst.cfg +++ b/resources/quality/dagoma/dagoma_neva_pla_standard.inst.cfg @@ -1,5 +1,5 @@ [general] -version = 3 +version = 4 name = Standard definition = dagoma_neva @@ -14,4 +14,4 @@ material = generic_pla layer_height = 0.15 material_print_temperature = =default_material_print_temperature + 5 -material_bed_temperature_layer_0 = =default_material_print_temperature + 5 +material_bed_temperature_layer_0 = =default_material_bed_temperature + 5 From f1379135e0fd847b456c409060894a1a097e2dfc Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Tue, 17 Jul 2018 13:49:17 +0200 Subject: [PATCH 141/174] CURA-5510 Add the Generic materials to the list of the bundled packages so that they show up as installed. Show the installed icon on those packages as well. --- .../qml/ToolboxDownloadsGridTile.qml | 6 +- resources/bundled_packages.json | 216 ++++++++++++++++++ 2 files changed, 219 insertions(+), 3 deletions(-) diff --git a/plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml b/plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml index 17a41f2e83..392b867071 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDownloadsGridTile.qml @@ -9,8 +9,8 @@ import UM 1.1 as UM Item { - property int packageCount: toolbox.viewCategory == "material" ? toolbox.getTotalNumberOfPackagesByAuthor(model.id) : 1 - property int installedPackages: toolbox.viewCategory == "material" ? toolbox.getNumberOfInstalledPackagesByAuthor(model.id) : (toolbox.isInstalled(model.id) ? 1 : 0) + property int packageCount: (toolbox.viewCategory == "material" && model.type === undefined) ? toolbox.getTotalNumberOfPackagesByAuthor(model.id) : 1 + property int installedPackages: (toolbox.viewCategory == "material" && model.type === undefined) ? toolbox.getNumberOfInstalledPackagesByAuthor(model.id) : (toolbox.isInstalled(model.id) ? 1 : 0) height: childrenRect.height Layout.alignment: Qt.AlignTop | Qt.AlignLeft Rectangle @@ -106,7 +106,7 @@ Item case "material": // If model has a type, it must be a package - if (model.type) + if (model.type !== undefined) { toolbox.viewPage = "detail" toolbox.filterModelByProp("packages", "id", model.id) diff --git a/resources/bundled_packages.json b/resources/bundled_packages.json index 7f3ba2a92e..428b9e3dc9 100644 --- a/resources/bundled_packages.json +++ b/resources/bundled_packages.json @@ -713,6 +713,222 @@ } } }, + "GenericABS": { + "package_info": { + "package_id": "GenericABS", + "package_type": "material", + "display_name": "Generic ABS", + "description": "The generic ABS profile which other profiles can be based upon.", + "package_version": "1.0.0", + "sdk_version": 6, + "website": "https://github.com/Ultimaker/fdm_materials", + "author": { + "author_id": "Generic", + "display_name": "Generic", + "email": "materials@ultimaker.com", + "website": "https://github.com/Ultimaker/fdm_materials", + "description": "Professional 3D printing made accessible." + } + } + }, + "GenericBAM": { + "package_info": { + "package_id": "GenericBAM", + "package_type": "material", + "display_name": "Generic BAM", + "description": "The generic BAM profile which other profiles can be based upon.", + "package_version": "1.0.0", + "sdk_version": 6, + "website": "https://github.com/Ultimaker/fdm_materials", + "author": { + "author_id": "Generic", + "display_name": "Generic", + "email": "materials@ultimaker.com", + "website": "https://github.com/Ultimaker/fdm_materials", + "description": "Professional 3D printing made accessible." + } + } + }, + "GenericCPE": { + "package_info": { + "package_id": "GenericCPE", + "package_type": "material", + "display_name": "Generic CPE", + "description": "The generic CPE profile which other profiles can be based upon.", + "package_version": "1.0.0", + "sdk_version": 6, + "website": "https://github.com/Ultimaker/fdm_materials", + "author": { + "author_id": "Generic", + "display_name": "Generic", + "email": "materials@ultimaker.com", + "website": "https://github.com/Ultimaker/fdm_materials", + "description": "Professional 3D printing made accessible." + } + } + }, + "GenericHIPS": { + "package_info": { + "package_id": "GenericHIPS", + "package_type": "material", + "display_name": "Generic HIPS", + "description": "The generic HIPS profile which other profiles can be based upon.", + "package_version": "1.0.0", + "sdk_version": 6, + "website": "https://github.com/Ultimaker/fdm_materials", + "author": { + "author_id": "Generic", + "display_name": "Generic", + "email": "materials@ultimaker.com", + "website": "https://github.com/Ultimaker/fdm_materials", + "description": "Professional 3D printing made accessible." + } + } + }, + "GenericNylon": { + "package_info": { + "package_id": "GenericNylon", + "package_type": "material", + "display_name": "Generic Nylon", + "description": "The generic Nylon profile which other profiles can be based upon.", + "package_version": "1.0.0", + "sdk_version": 6, + "website": "https://github.com/Ultimaker/fdm_materials", + "author": { + "author_id": "Generic", + "display_name": "Generic", + "email": "materials@ultimaker.com", + "website": "https://github.com/Ultimaker/fdm_materials", + "description": "Professional 3D printing made accessible." + } + } + }, + "GenericPC": { + "package_info": { + "package_id": "GenericPC", + "package_type": "material", + "display_name": "Generic PC", + "description": "The generic PC profile which other profiles can be based upon.", + "package_version": "1.0.0", + "sdk_version": 6, + "website": "https://github.com/Ultimaker/fdm_materials", + "author": { + "author_id": "Generic", + "display_name": "Generic", + "email": "materials@ultimaker.com", + "website": "https://github.com/Ultimaker/fdm_materials", + "description": "Professional 3D printing made accessible." + } + } + }, + "GenericPETG": { + "package_info": { + "package_id": "GenericPETG", + "package_type": "material", + "display_name": "Generic PETG", + "description": "The generic PETG profile which other profiles can be based upon.", + "package_version": "1.0.0", + "sdk_version": 6, + "website": "https://github.com/Ultimaker/fdm_materials", + "author": { + "author_id": "Generic", + "display_name": "Generic", + "email": "materials@ultimaker.com", + "website": "https://github.com/Ultimaker/fdm_materials", + "description": "Professional 3D printing made accessible." + } + } + }, + "GenericPLA": { + "package_info": { + "package_id": "GenericPLA", + "package_type": "material", + "display_name": "Generic PLA", + "description": "The generic PLA profile which other profiles can be based upon.", + "package_version": "1.0.0", + "sdk_version": 6, + "website": "https://github.com/Ultimaker/fdm_materials", + "author": { + "author_id": "Generic", + "display_name": "Generic", + "email": "materials@ultimaker.com", + "website": "https://github.com/Ultimaker/fdm_materials", + "description": "Professional 3D printing made accessible." + } + } + }, + "GenericPP": { + "package_info": { + "package_id": "GenericPP", + "package_type": "material", + "display_name": "Generic PP", + "description": "The generic PP profile which other profiles can be based upon.", + "package_version": "1.0.0", + "sdk_version": 6, + "website": "https://github.com/Ultimaker/fdm_materials", + "author": { + "author_id": "Generic", + "display_name": "Generic", + "email": "materials@ultimaker.com", + "website": "https://github.com/Ultimaker/fdm_materials", + "description": "Professional 3D printing made accessible." + } + } + }, + "GenericPVA": { + "package_info": { + "package_id": "GenericPVA", + "package_type": "material", + "display_name": "Generic PVA", + "description": "The generic PVA profile which other profiles can be based upon.", + "package_version": "1.0.0", + "sdk_version": 6, + "website": "https://github.com/Ultimaker/fdm_materials", + "author": { + "author_id": "Generic", + "display_name": "Generic", + "email": "materials@ultimaker.com", + "website": "https://github.com/Ultimaker/fdm_materials", + "description": "Professional 3D printing made accessible." + } + } + }, + "GenericToughPLA": { + "package_info": { + "package_id": "GenericToughPLA", + "package_type": "material", + "display_name": "Generic Tough PLA", + "description": "The generic Tough PLA profile which other profiles can be based upon.", + "package_version": "1.0.0", + "sdk_version": 6, + "website": "https://github.com/Ultimaker/fdm_materials", + "author": { + "author_id": "Generic", + "display_name": "Generic", + "email": "materials@ultimaker.com", + "website": "https://github.com/Ultimaker/fdm_materials", + "description": "Professional 3D printing made accessible." + } + } + }, + "GenericTPU": { + "package_info": { + "package_id": "GenericTPU", + "package_type": "material", + "display_name": "Generic TPU", + "description": "The generic TPU profile which other profiles can be based upon.", + "package_version": "1.0.0", + "sdk_version": 6, + "website": "https://github.com/Ultimaker/fdm_materials", + "author": { + "author_id": "Generic", + "display_name": "Generic", + "email": "materials@ultimaker.com", + "website": "https://github.com/Ultimaker/fdm_materials", + "description": "Professional 3D printing made accessible." + } + } + }, "DagomaChromatikPLA": { "package_info": { "package_id": "DagomaChromatikPLA", From f90409452df8dc47cd21c54292372edabb98f6a9 Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Tue, 17 Jul 2018 14:01:44 +0200 Subject: [PATCH 142/174] Add generic CPE+ as a bundled package. Contributes to CURA-5510. --- resources/bundled_packages.json | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/resources/bundled_packages.json b/resources/bundled_packages.json index 428b9e3dc9..6d9b9d1a95 100644 --- a/resources/bundled_packages.json +++ b/resources/bundled_packages.json @@ -767,6 +767,24 @@ } } }, + "GenericCPEPlus": { + "package_info": { + "package_id": "GenericCPEPlus", + "package_type": "material", + "display_name": "Generic CPE+", + "description": "The generic CPE+ profile which other profiles can be based upon.", + "package_version": "1.0.0", + "sdk_version": 6, + "website": "https://github.com/Ultimaker/fdm_materials", + "author": { + "author_id": "Generic", + "display_name": "Generic", + "email": "materials@ultimaker.com", + "website": "https://github.com/Ultimaker/fdm_materials", + "description": "Professional 3D printing made accessible." + } + } + }, "GenericHIPS": { "package_info": { "package_id": "GenericHIPS", From 350f9caa2a69259b82527f68bf3d539f8234a554 Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Tue, 17 Jul 2018 14:15:16 +0200 Subject: [PATCH 143/174] Use material bed temperature as reference for the bed temperature of the first layer. Contributes to CURA-5499. --- resources/quality/dagoma/dagoma_discoeasy200_pla_fast.inst.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/quality/dagoma/dagoma_discoeasy200_pla_fast.inst.cfg b/resources/quality/dagoma/dagoma_discoeasy200_pla_fast.inst.cfg index 5ba805a4fa..a75d01c9f0 100644 --- a/resources/quality/dagoma/dagoma_discoeasy200_pla_fast.inst.cfg +++ b/resources/quality/dagoma/dagoma_discoeasy200_pla_fast.inst.cfg @@ -14,4 +14,4 @@ material = generic_pla layer_height = 0.2 material_print_temperature = =default_material_print_temperature + 10 -material_bed_temperature_layer_0 = =default_material_print_temperature + 10 +material_bed_temperature_layer_0 = =default_material_bed_temperature + 10 From eab10401eeaefdaecf0e5cf3499be2f476410c34 Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Tue, 17 Jul 2018 18:02:11 +0200 Subject: [PATCH 144/174] Add global profiles and define that the printers have materials and quality profiles, in the definition files. Contributes to CURA-5499 --- cura/Settings/MachineManager.py | 2 ++ resources/definitions/dagoma_discoeasy200.def.json | 2 ++ resources/definitions/dagoma_neva.def.json | 2 ++ resources/definitions/dagoma_neva_magis.def.json | 8 +++++++- .../dagoma/dagoma_discoeasy200_pla_fast.inst.cfg | 2 -- .../dagoma/dagoma_discoeasy200_pla_fine.inst.cfg | 1 - .../dagoma_discoeasy200_pla_standard.inst.cfg | 2 -- .../quality/dagoma/dagoma_global_fast.inst.cfg | 14 ++++++++++++++ .../quality/dagoma/dagoma_global_fine.inst.cfg | 14 ++++++++++++++ .../quality/dagoma/dagoma_global_standard.inst.cfg | 14 ++++++++++++++ .../dagoma/dagoma_neva_magis_pla_fast.inst.cfg | 2 -- .../dagoma/dagoma_neva_magis_pla_fine.inst.cfg | 1 - .../dagoma/dagoma_neva_magis_pla_standard.inst.cfg | 2 -- .../quality/dagoma/dagoma_neva_pla_fast.inst.cfg | 2 -- .../quality/dagoma/dagoma_neva_pla_fine.inst.cfg | 1 - .../dagoma/dagoma_neva_pla_standard.inst.cfg | 2 -- 16 files changed, 55 insertions(+), 16 deletions(-) create mode 100644 resources/quality/dagoma/dagoma_global_fast.inst.cfg create mode 100644 resources/quality/dagoma/dagoma_global_fine.inst.cfg create mode 100644 resources/quality/dagoma/dagoma_global_standard.inst.cfg diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index 26f5a490dd..1f1e940100 100755 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -335,6 +335,7 @@ class MachineManager(QObject): global_stack.getName(), new_quality_changes_group.name) else: new_quality_group = quality_groups.get(quality_type) + print(quality_groups) if new_quality_group is not None: self._setQualityGroup(new_quality_group, empty_quality_changes = True) same_quality_found = True @@ -1107,6 +1108,7 @@ class MachineManager(QObject): # Set quality and quality_changes for each ExtruderStack for position, node in quality_group.nodes_for_extruders.items(): self._global_container_stack.extruders[str(position)].quality = node.getContainer() + print("#######", node.getContainer().getName()) if empty_quality_changes: self._global_container_stack.extruders[str(position)].qualityChanges = self._empty_quality_changes_container diff --git a/resources/definitions/dagoma_discoeasy200.def.json b/resources/definitions/dagoma_discoeasy200.def.json index 5e45947393..89d94ff6b7 100644 --- a/resources/definitions/dagoma_discoeasy200.def.json +++ b/resources/definitions/dagoma_discoeasy200.def.json @@ -9,6 +9,8 @@ "file_formats": "text/x-gcode", "platform": "discoeasy200.stl", "platform_offset": [ 105, -59, 280], + "has_machine_quality": true, + "has_materials": true, "machine_extruder_trains": { "0": "dagoma_discoeasy200_extruder_0" diff --git a/resources/definitions/dagoma_neva.def.json b/resources/definitions/dagoma_neva.def.json index be429e32af..cdd5725765 100644 --- a/resources/definitions/dagoma_neva.def.json +++ b/resources/definitions/dagoma_neva.def.json @@ -9,6 +9,8 @@ "file_formats": "text/x-gcode", "platform": "neva.stl", "platform_offset": [ 0, 0, 0], + "has_machine_quality": true, + "has_materials": true, "machine_extruder_trains": { "0": "dagoma_neva_extruder_0" diff --git a/resources/definitions/dagoma_neva_magis.def.json b/resources/definitions/dagoma_neva_magis.def.json index 6a856044b2..07bf5987f5 100644 --- a/resources/definitions/dagoma_neva_magis.def.json +++ b/resources/definitions/dagoma_neva_magis.def.json @@ -8,7 +8,13 @@ "manufacturer": "Dagoma", "file_formats": "text/x-gcode", "platform": "neva.stl", - "platform_offset": [ 0, 0, 0] + "platform_offset": [ 0, 0, 0], + "has_machine_quality": true, + "has_materials": true, + "machine_extruder_trains": + { + "0": "dagoma_neva_extruder_0" + } }, "overrides": { "machine_width": { diff --git a/resources/quality/dagoma/dagoma_discoeasy200_pla_fast.inst.cfg b/resources/quality/dagoma/dagoma_discoeasy200_pla_fast.inst.cfg index a75d01c9f0..a302f5b513 100644 --- a/resources/quality/dagoma/dagoma_discoeasy200_pla_fast.inst.cfg +++ b/resources/quality/dagoma/dagoma_discoeasy200_pla_fast.inst.cfg @@ -11,7 +11,5 @@ weight = -2 material = generic_pla [values] -layer_height = 0.2 - material_print_temperature = =default_material_print_temperature + 10 material_bed_temperature_layer_0 = =default_material_bed_temperature + 10 diff --git a/resources/quality/dagoma/dagoma_discoeasy200_pla_fine.inst.cfg b/resources/quality/dagoma/dagoma_discoeasy200_pla_fine.inst.cfg index 695fd7bc7e..b26eb1d910 100644 --- a/resources/quality/dagoma/dagoma_discoeasy200_pla_fine.inst.cfg +++ b/resources/quality/dagoma/dagoma_discoeasy200_pla_fine.inst.cfg @@ -11,4 +11,3 @@ weight = 0 material = generic_pla [values] -layer_height = 0.1 diff --git a/resources/quality/dagoma/dagoma_discoeasy200_pla_standard.inst.cfg b/resources/quality/dagoma/dagoma_discoeasy200_pla_standard.inst.cfg index b6b086403d..9ec56f696a 100644 --- a/resources/quality/dagoma/dagoma_discoeasy200_pla_standard.inst.cfg +++ b/resources/quality/dagoma/dagoma_discoeasy200_pla_standard.inst.cfg @@ -11,7 +11,5 @@ weight = -1 material = generic_pla [values] -layer_height = 0.15 - material_print_temperature = =default_material_print_temperature + 5 material_bed_temperature_layer_0 = =default_material_bed_temperature + 5 diff --git a/resources/quality/dagoma/dagoma_global_fast.inst.cfg b/resources/quality/dagoma/dagoma_global_fast.inst.cfg new file mode 100644 index 0000000000..28569387f2 --- /dev/null +++ b/resources/quality/dagoma/dagoma_global_fast.inst.cfg @@ -0,0 +1,14 @@ +[general] +version = 4 +name = Fast +definition = dagoma_discoeasy200 + +[metadata] +setting_version = 5 +type = quality +quality_type = draft +weight = -2 +global_quality = True + +[values] +layer_height = 0.2 diff --git a/resources/quality/dagoma/dagoma_global_fine.inst.cfg b/resources/quality/dagoma/dagoma_global_fine.inst.cfg new file mode 100644 index 0000000000..1f7d577c1b --- /dev/null +++ b/resources/quality/dagoma/dagoma_global_fine.inst.cfg @@ -0,0 +1,14 @@ +[general] +version = 4 +name = Fine +definition = dagoma_discoeasy200 + +[metadata] +setting_version = 5 +type = quality +quality_type = normal +weight = 0 +global_quality = True + +[values] +layer_height = 0.1 diff --git a/resources/quality/dagoma/dagoma_global_standard.inst.cfg b/resources/quality/dagoma/dagoma_global_standard.inst.cfg new file mode 100644 index 0000000000..167062c1d7 --- /dev/null +++ b/resources/quality/dagoma/dagoma_global_standard.inst.cfg @@ -0,0 +1,14 @@ +[general] +version = 4 +name = Standard +definition = dagoma_discoeasy200 + +[metadata] +setting_version = 5 +type = quality +quality_type = fast +weight = -1 +global_quality = True + +[values] +layer_height = 0.15 diff --git a/resources/quality/dagoma/dagoma_neva_magis_pla_fast.inst.cfg b/resources/quality/dagoma/dagoma_neva_magis_pla_fast.inst.cfg index 51fb17a5cc..efdf2f7d32 100644 --- a/resources/quality/dagoma/dagoma_neva_magis_pla_fast.inst.cfg +++ b/resources/quality/dagoma/dagoma_neva_magis_pla_fast.inst.cfg @@ -11,7 +11,5 @@ weight = -2 material = generic_pla [values] -layer_height = 0.2 - material_print_temperature = =default_material_print_temperature + 10 material_bed_temperature_layer_0 = =default_material_bed_temperature + 10 diff --git a/resources/quality/dagoma/dagoma_neva_magis_pla_fine.inst.cfg b/resources/quality/dagoma/dagoma_neva_magis_pla_fine.inst.cfg index 1ff947d766..50915db112 100644 --- a/resources/quality/dagoma/dagoma_neva_magis_pla_fine.inst.cfg +++ b/resources/quality/dagoma/dagoma_neva_magis_pla_fine.inst.cfg @@ -11,4 +11,3 @@ weight = 0 material = generic_pla [values] -layer_height = 0.1 diff --git a/resources/quality/dagoma/dagoma_neva_magis_pla_standard.inst.cfg b/resources/quality/dagoma/dagoma_neva_magis_pla_standard.inst.cfg index dfcc1c967b..ed67800eac 100644 --- a/resources/quality/dagoma/dagoma_neva_magis_pla_standard.inst.cfg +++ b/resources/quality/dagoma/dagoma_neva_magis_pla_standard.inst.cfg @@ -11,7 +11,5 @@ weight = -1 material = generic_pla [values] -layer_height = 0.15 - material_print_temperature = =default_material_print_temperature + 5 material_bed_temperature_layer_0 = =default_material_bed_temperature + 5 diff --git a/resources/quality/dagoma/dagoma_neva_pla_fast.inst.cfg b/resources/quality/dagoma/dagoma_neva_pla_fast.inst.cfg index 51fb17a5cc..efdf2f7d32 100644 --- a/resources/quality/dagoma/dagoma_neva_pla_fast.inst.cfg +++ b/resources/quality/dagoma/dagoma_neva_pla_fast.inst.cfg @@ -11,7 +11,5 @@ weight = -2 material = generic_pla [values] -layer_height = 0.2 - material_print_temperature = =default_material_print_temperature + 10 material_bed_temperature_layer_0 = =default_material_bed_temperature + 10 diff --git a/resources/quality/dagoma/dagoma_neva_pla_fine.inst.cfg b/resources/quality/dagoma/dagoma_neva_pla_fine.inst.cfg index 1ff947d766..50915db112 100644 --- a/resources/quality/dagoma/dagoma_neva_pla_fine.inst.cfg +++ b/resources/quality/dagoma/dagoma_neva_pla_fine.inst.cfg @@ -11,4 +11,3 @@ weight = 0 material = generic_pla [values] -layer_height = 0.1 diff --git a/resources/quality/dagoma/dagoma_neva_pla_standard.inst.cfg b/resources/quality/dagoma/dagoma_neva_pla_standard.inst.cfg index dfcc1c967b..ed67800eac 100644 --- a/resources/quality/dagoma/dagoma_neva_pla_standard.inst.cfg +++ b/resources/quality/dagoma/dagoma_neva_pla_standard.inst.cfg @@ -11,7 +11,5 @@ weight = -1 material = generic_pla [values] -layer_height = 0.15 - material_print_temperature = =default_material_print_temperature + 5 material_bed_temperature_layer_0 = =default_material_bed_temperature + 5 From 327eaf9564b7369e35041c234b0e966bb5b45da0 Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Tue, 17 Jul 2018 18:09:59 +0200 Subject: [PATCH 145/174] Remove debug printing Contributes to CURA-5499 --- cura/Settings/MachineManager.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index 1f1e940100..26f5a490dd 100755 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -335,7 +335,6 @@ class MachineManager(QObject): global_stack.getName(), new_quality_changes_group.name) else: new_quality_group = quality_groups.get(quality_type) - print(quality_groups) if new_quality_group is not None: self._setQualityGroup(new_quality_group, empty_quality_changes = True) same_quality_found = True @@ -1108,7 +1107,6 @@ class MachineManager(QObject): # Set quality and quality_changes for each ExtruderStack for position, node in quality_group.nodes_for_extruders.items(): self._global_container_stack.extruders[str(position)].quality = node.getContainer() - print("#######", node.getContainer().getName()) if empty_quality_changes: self._global_container_stack.extruders[str(position)].qualityChanges = self._empty_quality_changes_container From e96c59223434705c99df915f68594783d0fb43d9 Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Tue, 17 Jul 2018 18:12:22 +0200 Subject: [PATCH 146/174] Add correct name to the Dagoma Neva Magis extruder. Contributes to CURA-5499 --- resources/definitions/dagoma_neva_magis.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/definitions/dagoma_neva_magis.def.json b/resources/definitions/dagoma_neva_magis.def.json index 07bf5987f5..0b7b50cb5f 100644 --- a/resources/definitions/dagoma_neva_magis.def.json +++ b/resources/definitions/dagoma_neva_magis.def.json @@ -13,7 +13,7 @@ "has_materials": true, "machine_extruder_trains": { - "0": "dagoma_neva_extruder_0" + "0": "dagoma_neva_magis_extruder_0" } }, "overrides": { From f90f5f5180937b0251ebc927ad751541fb9d4826 Mon Sep 17 00:00:00 2001 From: Aleksei S Date: Thu, 19 Jul 2018 12:18:53 +0200 Subject: [PATCH 147/174] Update available configuration button --- .../ConfigurationMenu/ConfigurationItem.qml | 28 +++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/resources/qml/Menus/ConfigurationMenu/ConfigurationItem.qml b/resources/qml/Menus/ConfigurationMenu/ConfigurationItem.qml index 6f0130d5ca..942dd81d9c 100644 --- a/resources/qml/Menus/ConfigurationMenu/ConfigurationItem.qml +++ b/resources/qml/Menus/ConfigurationMenu/ConfigurationItem.qml @@ -103,9 +103,24 @@ Rectangle id: mouse anchors.fill: parent onClicked: activateConfiguration() + cursorShape: Qt.PointingHandCursor hoverEnabled: true - onEntered: parent.border.color = UM.Theme.getColor("configuration_item_border_hover") - onExited: updateBorderColor() + onEntered: + { + parent.border.color = UM.Theme.getColor("configuration_item_border_hover") + if (configurationItem.selected == false) + { + configurationItem.color = UM.Theme.getColor("sidebar_lining") + } + } + onExited: + { + updateBorderColor() + if (configurationItem.selected == false) + { + configurationItem.color = UM.Theme.getColor("configuration_item") + } + } } Connections @@ -122,4 +137,13 @@ Rectangle configurationItem.selected = Cura.MachineManager.matchesConfiguration(configuration) updateBorderColor() } + + onVisibleChanged: + { + if(visible) + { + // I cannot trigger function updateBorderColor() after visibility change + color = selected ? UM.Theme.getColor("configuration_item_active") : UM.Theme.getColor("configuration_item") + } + } } \ No newline at end of file From 3848ec66bdff51a34011bd9df5b84ebb8d8bbc11 Mon Sep 17 00:00:00 2001 From: Aleksei S Date: Thu, 19 Jul 2018 16:32:36 +0200 Subject: [PATCH 148/174] Disable 'Alternate Mesh Removal' and 'Remove Mesh Intersection' if Surface Model == 'Surface' CURA-5580 --- resources/definitions/fdmprinter.def.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index e376d8a9c2..04b4f34f8b 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -5173,6 +5173,7 @@ "type": "bool", "default_value": true, "value": "extruders_enabled_count > 1", + "enabled": "all(p != 'surface' for p in extruderValues('magic_mesh_surface_mode'))", "settable_per_mesh": false, "settable_per_extruder": false, "settable_per_meshgroup": true @@ -5183,7 +5184,7 @@ "description": "Switch to which mesh intersecting volumes will belong with every layer, so that the overlapping meshes become interwoven. Turning this setting off will cause one of the meshes to obtain all of the volume in the overlap, while it is removed from the other meshes.", "type": "bool", "default_value": true, - "enabled": "carve_multiple_volumes", + "enabled": "carve_multiple_volumes and all(p != 'surface' for p in extruderValues('magic_mesh_surface_mode'))", "settable_per_mesh": false, "settable_per_extruder": false, "settable_per_meshgroup": true From 2a8a52c0d9adc801f4643f53a05c48162053c375 Mon Sep 17 00:00:00 2001 From: THeijmans Date: Fri, 20 Jul 2018 10:22:17 +0200 Subject: [PATCH 149/174] TPU 08 profiles cleanup Removed an unneccesary line and changed first layer print temperature formula to use the set temperature, and not the default temperature. --- .../quality/ultimaker3/um3_aa0.8_TPU_Draft_Print.inst.cfg | 3 +-- .../quality/ultimaker3/um3_aa0.8_TPU_Superdraft_Print.inst.cfg | 3 +-- .../quality/ultimaker3/um3_aa0.8_TPU_Verydraft_Print.inst.cfg | 3 +-- .../quality/ultimaker_s5/um_s5_aa0.8_TPU_Draft_Print.inst.cfg | 3 +-- .../ultimaker_s5/um_s5_aa0.8_TPU_Superdraft_Print.inst.cfg | 3 +-- .../ultimaker_s5/um_s5_aa0.8_TPU_Verydraft_Print.inst.cfg | 3 +-- 6 files changed, 6 insertions(+), 12 deletions(-) diff --git a/resources/quality/ultimaker3/um3_aa0.8_TPU_Draft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.8_TPU_Draft_Print.inst.cfg index 52fe1cb01d..1d5cea601f 100644 --- a/resources/quality/ultimaker3/um3_aa0.8_TPU_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.8_TPU_Draft_Print.inst.cfg @@ -25,12 +25,11 @@ jerk_support = =math.ceil(jerk_print * 25 / 25) jerk_wall_0 = =math.ceil(jerk_wall * 15 / 25) machine_nozzle_cool_down_speed = 0.5 machine_nozzle_heat_up_speed = 2.5 -material_bed_temperature_layer_0 = 0 material_final_print_temperature = =material_print_temperature - 21 material_flow = 105 material_initial_print_temperature = =material_print_temperature - 16 material_print_temperature = =default_material_print_temperature - 2 -material_print_temperature_layer_0 = =default_material_print_temperature + 2 +material_print_temperature_layer_0 = =material_print_temperature + 4 material_standby_temperature = 100 multiple_mesh_overlap = 0.2 prime_tower_enable = True diff --git a/resources/quality/ultimaker3/um3_aa0.8_TPU_Superdraft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.8_TPU_Superdraft_Print.inst.cfg index 857ea39491..9535685efe 100644 --- a/resources/quality/ultimaker3/um3_aa0.8_TPU_Superdraft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.8_TPU_Superdraft_Print.inst.cfg @@ -26,12 +26,11 @@ jerk_wall_0 = =math.ceil(jerk_wall * 15 / 25) layer_height = 0.4 machine_nozzle_cool_down_speed = 0.5 machine_nozzle_heat_up_speed = 2.5 -material_bed_temperature_layer_0 = 0 material_final_print_temperature = =material_print_temperature - 21 material_flow = 105 material_initial_print_temperature = =material_print_temperature - 16 material_print_temperature = =default_material_print_temperature + 2 -material_print_temperature_layer_0 = =default_material_print_temperature + 2 +material_print_temperature_layer_0 = =material_print_temperature + 2 material_standby_temperature = 100 multiple_mesh_overlap = 0.2 prime_tower_enable = True diff --git a/resources/quality/ultimaker3/um3_aa0.8_TPU_Verydraft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.8_TPU_Verydraft_Print.inst.cfg index 10673c133a..50282f8b49 100644 --- a/resources/quality/ultimaker3/um3_aa0.8_TPU_Verydraft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.8_TPU_Verydraft_Print.inst.cfg @@ -26,11 +26,10 @@ jerk_wall_0 = =math.ceil(jerk_wall * 15 / 25) layer_height = 0.3 machine_nozzle_cool_down_speed = 0.5 machine_nozzle_heat_up_speed = 2.5 -material_bed_temperature_layer_0 = 0 material_final_print_temperature = =material_print_temperature - 21 material_flow = 105 material_initial_print_temperature = =material_print_temperature - 16 -material_print_temperature_layer_0 = =default_material_print_temperature + 2 +material_print_temperature_layer_0 = =material_print_temperature + 2 material_standby_temperature = 100 multiple_mesh_overlap = 0.2 prime_tower_enable = True diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.8_TPU_Draft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.8_TPU_Draft_Print.inst.cfg index 889ffaf567..f88da43ac1 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.8_TPU_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.8_TPU_Draft_Print.inst.cfg @@ -23,12 +23,11 @@ jerk_support = =math.ceil(jerk_print * 25 / 25) jerk_wall_0 = =math.ceil(jerk_wall * 15 / 25) machine_nozzle_cool_down_speed = 0.5 machine_nozzle_heat_up_speed = 2.5 -material_bed_temperature_layer_0 = 0 material_final_print_temperature = =material_print_temperature - 21 material_flow = 105 material_initial_print_temperature = =material_print_temperature - 16 material_print_temperature = =default_material_print_temperature - 2 -material_print_temperature_layer_0 = =default_material_print_temperature + 2 +material_print_temperature_layer_0 = =material_print_temperature + 4 material_standby_temperature = 100 multiple_mesh_overlap = 0.2 prime_tower_enable = True diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.8_TPU_Superdraft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.8_TPU_Superdraft_Print.inst.cfg index fca907e8fd..2967f3539b 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.8_TPU_Superdraft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.8_TPU_Superdraft_Print.inst.cfg @@ -24,12 +24,11 @@ jerk_support = =math.ceil(jerk_print * 25 / 25) jerk_wall_0 = =math.ceil(jerk_wall * 15 / 25) machine_nozzle_cool_down_speed = 0.5 machine_nozzle_heat_up_speed = 2.5 -material_bed_temperature_layer_0 = 0 material_final_print_temperature = =material_print_temperature - 21 material_flow = 105 material_initial_print_temperature = =material_print_temperature - 16 material_print_temperature = =default_material_print_temperature + 2 -material_print_temperature_layer_0 = =default_material_print_temperature + 2 +material_print_temperature_layer_0 = =material_print_temperature material_standby_temperature = 100 multiple_mesh_overlap = 0.2 prime_tower_enable = True diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.8_TPU_Verydraft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.8_TPU_Verydraft_Print.inst.cfg index 673d64d432..caa87f9437 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.8_TPU_Verydraft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.8_TPU_Verydraft_Print.inst.cfg @@ -24,11 +24,10 @@ jerk_support = =math.ceil(jerk_print * 25 / 25) jerk_wall_0 = =math.ceil(jerk_wall * 15 / 25) machine_nozzle_cool_down_speed = 0.5 machine_nozzle_heat_up_speed = 2.5 -material_bed_temperature_layer_0 = 0 material_final_print_temperature = =material_print_temperature - 21 material_flow = 105 material_initial_print_temperature = =material_print_temperature - 16 -material_print_temperature_layer_0 = =default_material_print_temperature + 2 +material_print_temperature_layer_0 = =material_print_temperature + 2 material_standby_temperature = 100 multiple_mesh_overlap = 0.2 prime_tower_enable = True From e75a2eaaf296a475037581075920ad2e39f32259 Mon Sep 17 00:00:00 2001 From: THeijmans Date: Fri, 20 Jul 2018 10:29:05 +0200 Subject: [PATCH 150/174] small error fixed with first layer print temperature Set the first layer temperature 2 degrees too high --- .../quality/ultimaker3/um3_aa0.8_TPU_Superdraft_Print.inst.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/quality/ultimaker3/um3_aa0.8_TPU_Superdraft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.8_TPU_Superdraft_Print.inst.cfg index 9535685efe..0c94b64159 100644 --- a/resources/quality/ultimaker3/um3_aa0.8_TPU_Superdraft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.8_TPU_Superdraft_Print.inst.cfg @@ -30,7 +30,7 @@ material_final_print_temperature = =material_print_temperature - 21 material_flow = 105 material_initial_print_temperature = =material_print_temperature - 16 material_print_temperature = =default_material_print_temperature + 2 -material_print_temperature_layer_0 = =material_print_temperature + 2 +material_print_temperature_layer_0 = =material_print_temperature material_standby_temperature = 100 multiple_mesh_overlap = 0.2 prime_tower_enable = True From 97dad9c1c4d5273ee56ad61aef6e2d3cb0276666 Mon Sep 17 00:00:00 2001 From: kaleidoscopeit Date: Fri, 20 Jul 2018 12:38:19 +0200 Subject: [PATCH 151/174] Updated Deltacomb 3D machine and quality definitions --- resources/definitions/deltacomb.def.json | 5 +- ...g => deltacomb_abs_Draft_Quality.inst.cfg} | 12 ++-- ...fg => deltacomb_abs_Fast_Quality.inst.cfg} | 11 ++-- .../deltacomb_abs_High_Quality.inst.cfg | 25 ++++++++ ... => deltacomb_abs_Normal_Quality.inst.cfg} | 11 ++-- .../deltacomb_abs_Superdraft_Quality.inst.cfg | 25 ++++++++ .../deltacomb_abs_Verydraft_Quality.inst.cfg | 25 ++++++++ .../deltacomb_global_Draft_Quality.inst.cfg | 14 +++++ .../deltacomb_global_Fast_Quality.inst.cfg | 14 +++++ .../deltacomb_global_High_Quality.inst.cfg | 14 +++++ .../deltacomb_global_Normal_Quality.inst.cfg | 14 +++++ ...ltacomb_global_Superdraft_Quality.inst.cfg | 14 +++++ ...eltacomb_global_Verydraft_Quality.inst.cfg | 14 +++++ .../deltacomb/deltacomb_nylon_fast.inst.cfg | 57 ------------------- .../deltacomb/deltacomb_nylon_high.inst.cfg | 57 ------------------- .../deltacomb/deltacomb_nylon_normal.inst.cfg | 57 ------------------- ...g => deltacomb_pla_Draft_Quality.inst.cfg} | 11 ++-- ...fg => deltacomb_pla_Fast_Quality.inst.cfg} | 11 ++-- .../deltacomb_pla_High_Quality.inst.cfg | 24 ++++++++ ... => deltacomb_pla_Normal_Quality.inst.cfg} | 10 ++-- .../deltacomb_pla_Superdraft_Quality.inst.cfg | 24 ++++++++ .../deltacomb_pla_Verydraft_Quality.inst.cfg | 24 ++++++++ 22 files changed, 271 insertions(+), 202 deletions(-) rename resources/quality/deltacomb/{deltacomb_abs_fast.inst.cfg => deltacomb_abs_Draft_Quality.inst.cfg} (66%) rename resources/quality/deltacomb/{deltacomb_abs_normal.inst.cfg => deltacomb_abs_Fast_Quality.inst.cfg} (66%) create mode 100644 resources/quality/deltacomb/deltacomb_abs_High_Quality.inst.cfg rename resources/quality/deltacomb/{deltacomb_abs_high.inst.cfg => deltacomb_abs_Normal_Quality.inst.cfg} (66%) create mode 100644 resources/quality/deltacomb/deltacomb_abs_Superdraft_Quality.inst.cfg create mode 100644 resources/quality/deltacomb/deltacomb_abs_Verydraft_Quality.inst.cfg create mode 100755 resources/quality/deltacomb/deltacomb_global_Draft_Quality.inst.cfg create mode 100755 resources/quality/deltacomb/deltacomb_global_Fast_Quality.inst.cfg create mode 100755 resources/quality/deltacomb/deltacomb_global_High_Quality.inst.cfg create mode 100755 resources/quality/deltacomb/deltacomb_global_Normal_Quality.inst.cfg create mode 100755 resources/quality/deltacomb/deltacomb_global_Superdraft_Quality.inst.cfg create mode 100755 resources/quality/deltacomb/deltacomb_global_Verydraft_Quality.inst.cfg delete mode 100644 resources/quality/deltacomb/deltacomb_nylon_fast.inst.cfg delete mode 100644 resources/quality/deltacomb/deltacomb_nylon_high.inst.cfg delete mode 100644 resources/quality/deltacomb/deltacomb_nylon_normal.inst.cfg rename resources/quality/deltacomb/{deltacomb_pla_fast.inst.cfg => deltacomb_pla_Draft_Quality.inst.cfg} (64%) rename resources/quality/deltacomb/{deltacomb_pla_normal.inst.cfg => deltacomb_pla_Fast_Quality.inst.cfg} (63%) create mode 100644 resources/quality/deltacomb/deltacomb_pla_High_Quality.inst.cfg rename resources/quality/deltacomb/{deltacomb_pla_high.inst.cfg => deltacomb_pla_Normal_Quality.inst.cfg} (79%) create mode 100644 resources/quality/deltacomb/deltacomb_pla_Superdraft_Quality.inst.cfg create mode 100644 resources/quality/deltacomb/deltacomb_pla_Verydraft_Quality.inst.cfg diff --git a/resources/definitions/deltacomb.def.json b/resources/definitions/deltacomb.def.json index f1114583c0..1eb816b945 100644 --- a/resources/definitions/deltacomb.def.json +++ b/resources/definitions/deltacomb.def.json @@ -52,6 +52,9 @@ "top_bottom_thickness": { "default_value": 0.6 }, "support_z_distance": { "value": "layer_height * 2" }, "support_bottom_distance": { "value": "layer_height" }, - "support_use_towers" : { "default_value": false } + "support_use_towers" : { "default_value": false }, + "jerk_wall_0" : { "value": "30" }, + "jerk_travel" : { "default_value": 20 }, + "acceleration_travel" : { "value": 10000 } } } diff --git a/resources/quality/deltacomb/deltacomb_abs_fast.inst.cfg b/resources/quality/deltacomb/deltacomb_abs_Draft_Quality.inst.cfg similarity index 66% rename from resources/quality/deltacomb/deltacomb_abs_fast.inst.cfg rename to resources/quality/deltacomb/deltacomb_abs_Draft_Quality.inst.cfg index 87d4031f28..1a3d0ceb1e 100644 --- a/resources/quality/deltacomb/deltacomb_abs_fast.inst.cfg +++ b/resources/quality/deltacomb/deltacomb_abs_Draft_Quality.inst.cfg @@ -1,13 +1,13 @@ [general] version = 4 +name = Fast (beta) definition = deltacomb -name = Fast Quality (beta) [metadata] -setting_version = 5 +setting_version = 4 type = quality -quality_type = fast -weight = -1 +quality_type = draft +weight = -2 material = generic_abs [values] @@ -19,6 +19,8 @@ cool_fan_full_at_height = 0.4 cool_fan_speed = 50 cool_fan_speed_max = 50 cool_fan_speed_min = 50 -cool_min_layer_time = 3 +cool_min_layer_time = 5 cool_min_speed = 20 material_bed_temperature = 80 +material_print_temperature_layer_0 = =default_material_print_temperature + 5 + diff --git a/resources/quality/deltacomb/deltacomb_abs_normal.inst.cfg b/resources/quality/deltacomb/deltacomb_abs_Fast_Quality.inst.cfg similarity index 66% rename from resources/quality/deltacomb/deltacomb_abs_normal.inst.cfg rename to resources/quality/deltacomb/deltacomb_abs_Fast_Quality.inst.cfg index a5069cd827..ed47c1d4d5 100644 --- a/resources/quality/deltacomb/deltacomb_abs_normal.inst.cfg +++ b/resources/quality/deltacomb/deltacomb_abs_Fast_Quality.inst.cfg @@ -1,13 +1,13 @@ [general] version = 4 +name = Normal (beta) definition = deltacomb -name = Normal Quality (beta) [metadata] -setting_version = 5 +setting_version = 4 type = quality -quality_type = normal -weight = 0 +quality_type = fast +weight = -1 material = generic_abs [values] @@ -19,6 +19,7 @@ cool_fan_full_at_height = 0.3 cool_fan_speed = 50 cool_fan_speed_max = 50 cool_fan_speed_min = 50 -cool_min_layer_time = 3 +cool_min_layer_time = 5 cool_min_speed = 20 material_bed_temperature = 80 +material_print_temperature_layer_0 = =default_material_print_temperature + 5 diff --git a/resources/quality/deltacomb/deltacomb_abs_High_Quality.inst.cfg b/resources/quality/deltacomb/deltacomb_abs_High_Quality.inst.cfg new file mode 100644 index 0000000000..2fc0db1aff --- /dev/null +++ b/resources/quality/deltacomb/deltacomb_abs_High_Quality.inst.cfg @@ -0,0 +1,25 @@ +[general] +version = 4 +name = Extra Fine (beta) +definition = deltacomb + +[metadata] +setting_version = 4 +type = quality +quality_type = high +weight = 0 +material = generic_abs + +[values] +adhesion_type = raft +layer_height = 0.05 +layer_height_0 = 0.05 +cool_fan_enabled = True +cool_fan_full_at_height = 0.1 +cool_fan_speed = 50 +cool_fan_speed_max = 50 +cool_fan_speed_min = 50 +cool_min_layer_time = 5 +cool_min_speed = 20 +material_bed_temperature = 80 +material_print_temperature_layer_0 = =default_material_print_temperature + 5 diff --git a/resources/quality/deltacomb/deltacomb_abs_high.inst.cfg b/resources/quality/deltacomb/deltacomb_abs_Normal_Quality.inst.cfg similarity index 66% rename from resources/quality/deltacomb/deltacomb_abs_high.inst.cfg rename to resources/quality/deltacomb/deltacomb_abs_Normal_Quality.inst.cfg index f24b6f9662..22ea1dde21 100644 --- a/resources/quality/deltacomb/deltacomb_abs_high.inst.cfg +++ b/resources/quality/deltacomb/deltacomb_abs_Normal_Quality.inst.cfg @@ -1,13 +1,13 @@ [general] version = 4 +name = Fine (beta) definition = deltacomb -name = High Quality (beta) [metadata] -setting_version = 5 +setting_version = 4 type = quality -quality_type = high -weight = 1 +quality_type = normal +weight = 0 material = generic_abs [values] @@ -19,6 +19,7 @@ cool_fan_full_at_height = 0.2 cool_fan_speed = 50 cool_fan_speed_max = 50 cool_fan_speed_min = 50 -cool_min_layer_time = 3 +cool_min_layer_time = 5 cool_min_speed = 20 material_bed_temperature = 80 +material_print_temperature_layer_0 = =default_material_print_temperature + 5 diff --git a/resources/quality/deltacomb/deltacomb_abs_Superdraft_Quality.inst.cfg b/resources/quality/deltacomb/deltacomb_abs_Superdraft_Quality.inst.cfg new file mode 100644 index 0000000000..408be4dbc9 --- /dev/null +++ b/resources/quality/deltacomb/deltacomb_abs_Superdraft_Quality.inst.cfg @@ -0,0 +1,25 @@ +[general] +version = 4 +name = Sprint (beta) +definition = deltacomb + +[metadata] +setting_version = 4 +type = quality +quality_type = superdraft +weight = -4 +material = generic_abs + +[values] +adhesion_type = raft +layer_height = 0.4 +layer_height_0 = 0.4 +cool_fan_enabled = True +cool_fan_full_at_height = 0.8 +cool_fan_speed = 50 +cool_fan_speed_max = 50 +cool_fan_speed_min = 50 +cool_min_layer_time = 5 +cool_min_speed = 20 +material_bed_temperature = 80 +material_print_temperature_layer_0 = =default_material_print_temperature + 5 diff --git a/resources/quality/deltacomb/deltacomb_abs_Verydraft_Quality.inst.cfg b/resources/quality/deltacomb/deltacomb_abs_Verydraft_Quality.inst.cfg new file mode 100644 index 0000000000..0d231b4776 --- /dev/null +++ b/resources/quality/deltacomb/deltacomb_abs_Verydraft_Quality.inst.cfg @@ -0,0 +1,25 @@ +[general] +version = 4 +name = Extra Fast (beta) +definition = deltacomb + +[metadata] +setting_version = 4 +type = quality +quality_type = verydraft +weight = -3 +material = generic_abs + +[values] +adhesion_type = raft +layer_height = 0.3 +layer_height_0 = 0.3 +cool_fan_enabled = True +cool_fan_full_at_height = 0.6 +cool_fan_speed = 50 +cool_fan_speed_max = 50 +cool_fan_speed_min = 50 +cool_min_layer_time = 5 +cool_min_speed = 20 +material_bed_temperature = 80 +material_print_temperature_layer_0 = =default_material_print_temperature + 5 diff --git a/resources/quality/deltacomb/deltacomb_global_Draft_Quality.inst.cfg b/resources/quality/deltacomb/deltacomb_global_Draft_Quality.inst.cfg new file mode 100755 index 0000000000..2f8b6ae80d --- /dev/null +++ b/resources/quality/deltacomb/deltacomb_global_Draft_Quality.inst.cfg @@ -0,0 +1,14 @@ +[general] +version = 4 +name = Fast +definition = deltacomb + +[metadata] +setting_version = 4 +type = quality +quality_type = draft +weight = -2 +global_quality = True + +[values] +layer_height = 0.2 diff --git a/resources/quality/deltacomb/deltacomb_global_Fast_Quality.inst.cfg b/resources/quality/deltacomb/deltacomb_global_Fast_Quality.inst.cfg new file mode 100755 index 0000000000..0483503583 --- /dev/null +++ b/resources/quality/deltacomb/deltacomb_global_Fast_Quality.inst.cfg @@ -0,0 +1,14 @@ +[general] +version = 4 +name = Normal +definition = deltacomb + +[metadata] +setting_version = 4 +type = quality +quality_type = fast +weight = -1 +global_quality = True + +[values] +layer_height = 0.15 diff --git a/resources/quality/deltacomb/deltacomb_global_High_Quality.inst.cfg b/resources/quality/deltacomb/deltacomb_global_High_Quality.inst.cfg new file mode 100755 index 0000000000..ce1e787847 --- /dev/null +++ b/resources/quality/deltacomb/deltacomb_global_High_Quality.inst.cfg @@ -0,0 +1,14 @@ +[general] +version = 4 +name = Extra Fine +definition = deltacomb + +[metadata] +setting_version = 4 +type = quality +quality_type = high +weight = 0 +global_quality = True + +[values] +layer_height = 0.06 diff --git a/resources/quality/deltacomb/deltacomb_global_Normal_Quality.inst.cfg b/resources/quality/deltacomb/deltacomb_global_Normal_Quality.inst.cfg new file mode 100755 index 0000000000..817fdf62b5 --- /dev/null +++ b/resources/quality/deltacomb/deltacomb_global_Normal_Quality.inst.cfg @@ -0,0 +1,14 @@ +[general] +version = 4 +name = Fine +definition = deltacomb + +[metadata] +setting_version = 4 +type = quality +quality_type = normal +weight = 0 +global_quality = True + +[values] +layer_height = 0.1 diff --git a/resources/quality/deltacomb/deltacomb_global_Superdraft_Quality.inst.cfg b/resources/quality/deltacomb/deltacomb_global_Superdraft_Quality.inst.cfg new file mode 100755 index 0000000000..ab211efc24 --- /dev/null +++ b/resources/quality/deltacomb/deltacomb_global_Superdraft_Quality.inst.cfg @@ -0,0 +1,14 @@ +[general] +version = 4 +name = Sprint +definition = deltacomb + +[metadata] +setting_version = 4 +type = quality +quality_type = superdraft +weight = -4 +global_quality = True + +[values] +layer_height = 0.4 diff --git a/resources/quality/deltacomb/deltacomb_global_Verydraft_Quality.inst.cfg b/resources/quality/deltacomb/deltacomb_global_Verydraft_Quality.inst.cfg new file mode 100755 index 0000000000..687cda0aa6 --- /dev/null +++ b/resources/quality/deltacomb/deltacomb_global_Verydraft_Quality.inst.cfg @@ -0,0 +1,14 @@ +[general] +version = 4 +name = Extra Fast +definition = deltacomb + +[metadata] +setting_version = 4 +type = quality +quality_type = verydraft +weight = -3 +global_quality = True + +[values] +layer_height = 0.3 diff --git a/resources/quality/deltacomb/deltacomb_nylon_fast.inst.cfg b/resources/quality/deltacomb/deltacomb_nylon_fast.inst.cfg deleted file mode 100644 index 0deac00593..0000000000 --- a/resources/quality/deltacomb/deltacomb_nylon_fast.inst.cfg +++ /dev/null @@ -1,57 +0,0 @@ -[general] -version = 4 -name = Fast Quality (beta) -definition = deltacomb - -[metadata] -setting_version = 5 -type = quality -quality_type = fast -weight = -1 -material = generic_nylon - -[values] -adhesion_type = raft -brim_width = 4 -cool_fan_enabled = False -cool_fan_full_at_height = 0.45 -cool_fan_speed = 0 -cool_fan_speed_max = 0 -cool_fan_speed_min = 0 -cool_min_layer_time = 5 -cool_min_speed = 0 -infill_overlap = 15 -infill_sparse_density = 24 -layer_height = 0.20 -layer_height_0 = 0.15 -line_width = =machine_nozzle_size -material_flow = 100 -raft_airgap = 0.22 -raft_base_line_width= =line_width * 2 -raft_base_thickness = =layer_height_0 * 2 -raft_interface_line_width = =line_width -raft_interface_thickness = =layer_height -raft_margin = 5 -raft_surface_layers = 2 -raft_surface_line_width = =line_width -raft_surface_thickness = =layer_height -retraction_hop = 0.5 -retraction_hop_enabled = False -retraction_hop_only_when_collides = True -skin_overlap = 10 -skirt_brim_minimal_length = 75 -skirt_gap = 1.5 -skirt_line_count = 5 -speed_infill = =speed_print -speed_layer_0 = =math.ceil(speed_print * 25 / 50) -speed_print = 50 -speed_topbottom = =math.ceil(speed_print * 40 / 50) -speed_travel = 200 -speed_wall_0 = =math.ceil(speed_print * 40 / 50) -speed_wall_x = =speed_print -support_angle = 70 -support_type = buildplate -support_z_distance = 0.15 -top_bottom_thickness = 0.8 -wall_thickness = 0.8 -z_seam_type = random diff --git a/resources/quality/deltacomb/deltacomb_nylon_high.inst.cfg b/resources/quality/deltacomb/deltacomb_nylon_high.inst.cfg deleted file mode 100644 index a5d00b40e7..0000000000 --- a/resources/quality/deltacomb/deltacomb_nylon_high.inst.cfg +++ /dev/null @@ -1,57 +0,0 @@ -[general] -version = 4 -name = High Quality (beta) -definition = deltacomb - -[metadata] -setting_version = 5 -type = quality -quality_type = high -weight = 1 -material = generic_nylon - -[values] -adhesion_type = raft -brim_width = 4 -cool_fan_enabled = False -cool_fan_full_at_height = 0.45 -cool_fan_speed = 0 -cool_fan_speed_max = 0 -cool_fan_speed_min = 0 -cool_min_layer_time = 5 -cool_min_speed = 0 -infill_overlap = 15 -infill_sparse_density = 24 -layer_height = 0.10 -layer_height_0 = 0.10 -line_width = =machine_nozzle_size -material_flow = 100 -raft_airgap = 0.22 -raft_base_line_width= =line_width * 2 -raft_base_thickness = =layer_height_0 * 2 -raft_interface_line_width = =line_width -raft_interface_thickness = =layer_height -raft_margin = 5 -raft_surface_layers = 2 -raft_surface_line_width = =line_width -raft_surface_thickness = =layer_height -retraction_hop = 0.5 -retraction_hop_enabled = False -retraction_hop_only_when_collides = True -skin_overlap = 10 -skirt_brim_minimal_length = 75 -skirt_gap = 1.5 -skirt_line_count = 5 -speed_infill = =speed_print -speed_layer_0 = =math.ceil(speed_print * 25 / 50) -speed_print = 50 -speed_topbottom = =math.ceil(speed_print * 40 / 50) -speed_travel = 200 -speed_wall_0 = =math.ceil(speed_print * 40 / 50) -speed_wall_x = =speed_print -support_angle = 70 -support_type = buildplate -support_z_distance = 0.15 -top_bottom_thickness = 0.8 -wall_thickness = 0.8 -z_seam_type = random diff --git a/resources/quality/deltacomb/deltacomb_nylon_normal.inst.cfg b/resources/quality/deltacomb/deltacomb_nylon_normal.inst.cfg deleted file mode 100644 index 06e79c8dc2..0000000000 --- a/resources/quality/deltacomb/deltacomb_nylon_normal.inst.cfg +++ /dev/null @@ -1,57 +0,0 @@ -[general] -version = 4 -name = Normal Quality (beta) -definition = deltacomb - -[metadata] -setting_version = 5 -type = quality -quality_type = normal -weight = 0 -material = generic_nylon - -[values] -adhesion_type = raft -brim_width = 4 -cool_fan_enabled = False -cool_fan_full_at_height = 0.45 -cool_fan_speed = 0 -cool_fan_speed_max = 0 -cool_fan_speed_min = 0 -cool_min_layer_time = 5 -cool_min_speed = 0 -infill_overlap = 15 -infill_sparse_density = 24 -layer_height = 0.15 -layer_height_0 = 0.10 -line_width = =machine_nozzle_size -material_flow = 100 -raft_airgap = 0.22 -raft_base_line_width= =line_width * 2 -raft_base_thickness = =layer_height_0 * 2 -raft_interface_line_width = =line_width -raft_interface_thickness = =layer_height -raft_margin = 5 -raft_surface_layers = 2 -raft_surface_line_width = =line_width -raft_surface_thickness = =layer_height -retraction_hop = 0.5 -retraction_hop_enabled = False -retraction_hop_only_when_collides = True -skin_overlap = 10 -skirt_brim_minimal_length = 75 -skirt_gap = 1.5 -skirt_line_count = 5 -speed_infill = =speed_print -speed_layer_0 = =math.ceil(speed_print * 25 / 50) -speed_print = 50 -speed_topbottom = =math.ceil(speed_print * 40 / 50) -speed_travel = 200 -speed_wall_0 = =math.ceil(speed_print * 40 / 50) -speed_wall_x = =speed_print -support_angle = 70 -support_type = buildplate -support_z_distance = 0.15 -top_bottom_thickness = 0.8 -wall_thickness = 0.8 -z_seam_type = random diff --git a/resources/quality/deltacomb/deltacomb_pla_fast.inst.cfg b/resources/quality/deltacomb/deltacomb_pla_Draft_Quality.inst.cfg similarity index 64% rename from resources/quality/deltacomb/deltacomb_pla_fast.inst.cfg rename to resources/quality/deltacomb/deltacomb_pla_Draft_Quality.inst.cfg index ea4a2908b3..d1f70b65fc 100644 --- a/resources/quality/deltacomb/deltacomb_pla_fast.inst.cfg +++ b/resources/quality/deltacomb/deltacomb_pla_Draft_Quality.inst.cfg @@ -1,13 +1,13 @@ [general] version = 4 +name = Fast definition = deltacomb -name = Fast Quality [metadata] -setting_version = 5 +setting_version = 4 type = quality -quality_type = fast -weight = -1 +quality_type = draft +weight = -2 material = generic_pla [values] @@ -15,9 +15,10 @@ adhesion_type = skirt layer_height = 0.2 layer_height_0 = 0.2 cool_fan_enabled = True -cool_fan_full_at_height = 0.4 +cool_fan_full_at_height = 0.2 cool_fan_speed = 100 cool_fan_speed_max = 100 cool_fan_speed_min = 100 cool_min_layer_time = 5 cool_min_speed = 20 +material_print_temperature_layer_0 = =default_material_print_temperature + 5 diff --git a/resources/quality/deltacomb/deltacomb_pla_normal.inst.cfg b/resources/quality/deltacomb/deltacomb_pla_Fast_Quality.inst.cfg similarity index 63% rename from resources/quality/deltacomb/deltacomb_pla_normal.inst.cfg rename to resources/quality/deltacomb/deltacomb_pla_Fast_Quality.inst.cfg index 2e9dca5c25..e0899d65c7 100644 --- a/resources/quality/deltacomb/deltacomb_pla_normal.inst.cfg +++ b/resources/quality/deltacomb/deltacomb_pla_Fast_Quality.inst.cfg @@ -1,13 +1,13 @@ [general] version = 4 +name = Normal definition = deltacomb -name = Normal Quality [metadata] -setting_version = 5 +setting_version = 4 type = quality -quality_type = normal -weight = 0 +quality_type = fast +weight = -1 material = generic_pla [values] @@ -15,9 +15,10 @@ adhesion_type = skirt layer_height = 0.15 layer_height_0 = 0.15 cool_fan_enabled = True -cool_fan_full_at_height = 0.3 +cool_fan_full_at_height = 0.15 cool_fan_speed = 100 cool_fan_speed_max = 100 cool_fan_speed_min = 100 cool_min_layer_time = 5 cool_min_speed = 20 +material_print_temperature_layer_0 = =default_material_print_temperature + 5 diff --git a/resources/quality/deltacomb/deltacomb_pla_High_Quality.inst.cfg b/resources/quality/deltacomb/deltacomb_pla_High_Quality.inst.cfg new file mode 100644 index 0000000000..c46b2639ca --- /dev/null +++ b/resources/quality/deltacomb/deltacomb_pla_High_Quality.inst.cfg @@ -0,0 +1,24 @@ +[general] +version = 4 +name = Extra Fine +definition = deltacomb + +[metadata] +setting_version = 4 +type = quality +quality_type = high +weight = 0 +material = generic_pla + +[values] +adhesion_type = skirt +layer_height = 0.05 +layer_height_0 = 0.05 +cool_fan_enabled = True +cool_fan_full_at_height = 0.05 +cool_fan_speed = 100 +cool_fan_speed_max = 100 +cool_fan_speed_min = 100 +cool_min_layer_time = 5 +cool_min_speed = 20 +material_print_temperature_layer_0 = =default_material_print_temperature + 5 diff --git a/resources/quality/deltacomb/deltacomb_pla_high.inst.cfg b/resources/quality/deltacomb/deltacomb_pla_Normal_Quality.inst.cfg similarity index 79% rename from resources/quality/deltacomb/deltacomb_pla_high.inst.cfg rename to resources/quality/deltacomb/deltacomb_pla_Normal_Quality.inst.cfg index 69f8478cfe..9aaaf294e0 100644 --- a/resources/quality/deltacomb/deltacomb_pla_high.inst.cfg +++ b/resources/quality/deltacomb/deltacomb_pla_Normal_Quality.inst.cfg @@ -1,13 +1,13 @@ [general] version = 4 +name = Fine definition = deltacomb -name = High Quality [metadata] -setting_version = 5 +setting_version = 4 type = quality -quality_type = high -weight = 1 +quality_type = normal +weight = 0 material = generic_pla [values] @@ -15,7 +15,7 @@ adhesion_type = skirt layer_height = 0.1 layer_height_0 = 0.1 cool_fan_enabled = True -cool_fan_full_at_height = 0.2 +cool_fan_full_at_height = 0.1 cool_fan_speed = 100 cool_fan_speed_max = 100 cool_fan_speed_min = 100 diff --git a/resources/quality/deltacomb/deltacomb_pla_Superdraft_Quality.inst.cfg b/resources/quality/deltacomb/deltacomb_pla_Superdraft_Quality.inst.cfg new file mode 100644 index 0000000000..88ed9a13bd --- /dev/null +++ b/resources/quality/deltacomb/deltacomb_pla_Superdraft_Quality.inst.cfg @@ -0,0 +1,24 @@ +[general] +version = 4 +name = Sprint +definition = deltacomb + +[metadata] +setting_version = 4 +type = quality +quality_type = superdraft +weight = -4 +material = generic_pla + +[values] +adhesion_type = skirt +layer_height = 0.4 +layer_height_0 = 0.4 +cool_fan_enabled = True +cool_fan_full_at_height = 0.4 +cool_fan_speed = 100 +cool_fan_speed_max = 100 +cool_fan_speed_min = 100 +cool_min_layer_time = 5 +cool_min_speed = 20 +material_print_temperature_layer_0 = =default_material_print_temperature + 5 diff --git a/resources/quality/deltacomb/deltacomb_pla_Verydraft_Quality.inst.cfg b/resources/quality/deltacomb/deltacomb_pla_Verydraft_Quality.inst.cfg new file mode 100644 index 0000000000..2c39b34e36 --- /dev/null +++ b/resources/quality/deltacomb/deltacomb_pla_Verydraft_Quality.inst.cfg @@ -0,0 +1,24 @@ +[general] +version = 4 +name = Extra Fast +definition = deltacomb + +[metadata] +setting_version = 4 +type = quality +quality_type = verydraft +weight = -3 +material = generic_pla + +[values] +adhesion_type = skirt +layer_height = 0.3 +layer_height_0 = 0.3 +cool_fan_enabled = True +cool_fan_full_at_height = 0.3 +cool_fan_speed = 100 +cool_fan_speed_max = 100 +cool_fan_speed_min = 100 +cool_min_layer_time = 5 +cool_min_speed = 20 +material_print_temperature_layer_0 = =default_material_print_temperature + 5 From 94954ea40f06ee9dd7cc3553b6c8cd49b99cb317 Mon Sep 17 00:00:00 2001 From: kaleidoscopeit Date: Fri, 20 Jul 2018 16:41:48 +0200 Subject: [PATCH 152/174] Quality corrections in Deltacomb 3D --- resources/definitions/deltacomb.def.json | 4 +-- .../deltacomb_abs_Draft_Quality.inst.cfg | 4 +-- .../deltacomb_abs_Fast_Quality.inst.cfg | 4 +-- .../deltacomb_abs_High_Quality.inst.cfg | 4 +-- .../deltacomb_abs_Normal_Quality.inst.cfg | 4 +-- .../deltacomb_abs_Superdraft_Quality.inst.cfg | 25 ------------------- .../deltacomb_abs_Verydraft_Quality.inst.cfg | 4 +-- .../deltacomb_global_Draft_Quality.inst.cfg | 1 + .../deltacomb_global_Fast_Quality.inst.cfg | 1 + .../deltacomb_global_High_Quality.inst.cfg | 3 ++- .../deltacomb_global_Normal_Quality.inst.cfg | 1 + ...ltacomb_global_Superdraft_Quality.inst.cfg | 14 ----------- ...eltacomb_global_Verydraft_Quality.inst.cfg | 1 + .../deltacomb_pla_Draft_Quality.inst.cfg | 4 +-- .../deltacomb_pla_Fast_Quality.inst.cfg | 4 +-- .../deltacomb_pla_High_Quality.inst.cfg | 4 +-- .../deltacomb_pla_Normal_Quality.inst.cfg | 4 +-- .../deltacomb_pla_Superdraft_Quality.inst.cfg | 24 ------------------ .../deltacomb_pla_Verydraft_Quality.inst.cfg | 4 +-- 19 files changed, 18 insertions(+), 96 deletions(-) delete mode 100644 resources/quality/deltacomb/deltacomb_abs_Superdraft_Quality.inst.cfg delete mode 100755 resources/quality/deltacomb/deltacomb_global_Superdraft_Quality.inst.cfg delete mode 100644 resources/quality/deltacomb/deltacomb_pla_Superdraft_Quality.inst.cfg diff --git a/resources/definitions/deltacomb.def.json b/resources/definitions/deltacomb.def.json index 1eb816b945..a4b2d47a7b 100644 --- a/resources/definitions/deltacomb.def.json +++ b/resources/definitions/deltacomb.def.json @@ -34,7 +34,7 @@ "material_initial_print_temperature": { "value": "material_print_temperature" }, "material_print_temperature_layer_0": { "value": "material_print_temperature + 5" }, "travel_avoid_distance": { "default_value": 1, "value": "1" }, - "speed_print" : { "default_value": 60 }, + "speed_print" : { "default_value": 70 }, "speed_travel": { "value": "150.0" }, "speed_infill": { "value": "round(speed_print * 1.05, 0)" }, "speed_topbottom": { "value": "round(speed_print * 0.95, 0)" }, @@ -54,7 +54,7 @@ "support_bottom_distance": { "value": "layer_height" }, "support_use_towers" : { "default_value": false }, "jerk_wall_0" : { "value": "30" }, - "jerk_travel" : { "default_value": 20 }, + "jerk_travel" : { "default_value": 20 }, "acceleration_travel" : { "value": 10000 } } } diff --git a/resources/quality/deltacomb/deltacomb_abs_Draft_Quality.inst.cfg b/resources/quality/deltacomb/deltacomb_abs_Draft_Quality.inst.cfg index 1a3d0ceb1e..fe16999e8c 100644 --- a/resources/quality/deltacomb/deltacomb_abs_Draft_Quality.inst.cfg +++ b/resources/quality/deltacomb/deltacomb_abs_Draft_Quality.inst.cfg @@ -12,10 +12,8 @@ material = generic_abs [values] adhesion_type = raft -layer_height = 0.2 -layer_height_0 = 0.2 cool_fan_enabled = True -cool_fan_full_at_height = 0.4 +cool_fan_full_at_height = =layer_height * 2 cool_fan_speed = 50 cool_fan_speed_max = 50 cool_fan_speed_min = 50 diff --git a/resources/quality/deltacomb/deltacomb_abs_Fast_Quality.inst.cfg b/resources/quality/deltacomb/deltacomb_abs_Fast_Quality.inst.cfg index ed47c1d4d5..82ba40c81b 100644 --- a/resources/quality/deltacomb/deltacomb_abs_Fast_Quality.inst.cfg +++ b/resources/quality/deltacomb/deltacomb_abs_Fast_Quality.inst.cfg @@ -12,10 +12,8 @@ material = generic_abs [values] adhesion_type = raft -layer_height = 0.15 -layer_height_0 = 0.15 cool_fan_enabled = True -cool_fan_full_at_height = 0.3 +cool_fan_full_at_height = =layer_height * 2 cool_fan_speed = 50 cool_fan_speed_max = 50 cool_fan_speed_min = 50 diff --git a/resources/quality/deltacomb/deltacomb_abs_High_Quality.inst.cfg b/resources/quality/deltacomb/deltacomb_abs_High_Quality.inst.cfg index 2fc0db1aff..6f0b7fbb94 100644 --- a/resources/quality/deltacomb/deltacomb_abs_High_Quality.inst.cfg +++ b/resources/quality/deltacomb/deltacomb_abs_High_Quality.inst.cfg @@ -12,10 +12,8 @@ material = generic_abs [values] adhesion_type = raft -layer_height = 0.05 -layer_height_0 = 0.05 cool_fan_enabled = True -cool_fan_full_at_height = 0.1 +cool_fan_full_at_height = =layer_height * 2 cool_fan_speed = 50 cool_fan_speed_max = 50 cool_fan_speed_min = 50 diff --git a/resources/quality/deltacomb/deltacomb_abs_Normal_Quality.inst.cfg b/resources/quality/deltacomb/deltacomb_abs_Normal_Quality.inst.cfg index 22ea1dde21..b9a14d6128 100644 --- a/resources/quality/deltacomb/deltacomb_abs_Normal_Quality.inst.cfg +++ b/resources/quality/deltacomb/deltacomb_abs_Normal_Quality.inst.cfg @@ -12,10 +12,8 @@ material = generic_abs [values] adhesion_type = raft -layer_height = 0.1 -layer_height_0 = 0.1 cool_fan_enabled = True -cool_fan_full_at_height = 0.2 +cool_fan_full_at_height = =layer_height * 2 cool_fan_speed = 50 cool_fan_speed_max = 50 cool_fan_speed_min = 50 diff --git a/resources/quality/deltacomb/deltacomb_abs_Superdraft_Quality.inst.cfg b/resources/quality/deltacomb/deltacomb_abs_Superdraft_Quality.inst.cfg deleted file mode 100644 index 408be4dbc9..0000000000 --- a/resources/quality/deltacomb/deltacomb_abs_Superdraft_Quality.inst.cfg +++ /dev/null @@ -1,25 +0,0 @@ -[general] -version = 4 -name = Sprint (beta) -definition = deltacomb - -[metadata] -setting_version = 4 -type = quality -quality_type = superdraft -weight = -4 -material = generic_abs - -[values] -adhesion_type = raft -layer_height = 0.4 -layer_height_0 = 0.4 -cool_fan_enabled = True -cool_fan_full_at_height = 0.8 -cool_fan_speed = 50 -cool_fan_speed_max = 50 -cool_fan_speed_min = 50 -cool_min_layer_time = 5 -cool_min_speed = 20 -material_bed_temperature = 80 -material_print_temperature_layer_0 = =default_material_print_temperature + 5 diff --git a/resources/quality/deltacomb/deltacomb_abs_Verydraft_Quality.inst.cfg b/resources/quality/deltacomb/deltacomb_abs_Verydraft_Quality.inst.cfg index 0d231b4776..925473e933 100644 --- a/resources/quality/deltacomb/deltacomb_abs_Verydraft_Quality.inst.cfg +++ b/resources/quality/deltacomb/deltacomb_abs_Verydraft_Quality.inst.cfg @@ -12,10 +12,8 @@ material = generic_abs [values] adhesion_type = raft -layer_height = 0.3 -layer_height_0 = 0.3 cool_fan_enabled = True -cool_fan_full_at_height = 0.6 +cool_fan_full_at_height = =layer_height * 2 cool_fan_speed = 50 cool_fan_speed_max = 50 cool_fan_speed_min = 50 diff --git a/resources/quality/deltacomb/deltacomb_global_Draft_Quality.inst.cfg b/resources/quality/deltacomb/deltacomb_global_Draft_Quality.inst.cfg index 2f8b6ae80d..71bc28185f 100755 --- a/resources/quality/deltacomb/deltacomb_global_Draft_Quality.inst.cfg +++ b/resources/quality/deltacomb/deltacomb_global_Draft_Quality.inst.cfg @@ -12,3 +12,4 @@ global_quality = True [values] layer_height = 0.2 +layer_height_0 = =layer_height diff --git a/resources/quality/deltacomb/deltacomb_global_Fast_Quality.inst.cfg b/resources/quality/deltacomb/deltacomb_global_Fast_Quality.inst.cfg index 0483503583..0a1d1aa4bf 100755 --- a/resources/quality/deltacomb/deltacomb_global_Fast_Quality.inst.cfg +++ b/resources/quality/deltacomb/deltacomb_global_Fast_Quality.inst.cfg @@ -12,3 +12,4 @@ global_quality = True [values] layer_height = 0.15 +layer_height_0 = =layer_height diff --git a/resources/quality/deltacomb/deltacomb_global_High_Quality.inst.cfg b/resources/quality/deltacomb/deltacomb_global_High_Quality.inst.cfg index ce1e787847..d8c10de5e3 100755 --- a/resources/quality/deltacomb/deltacomb_global_High_Quality.inst.cfg +++ b/resources/quality/deltacomb/deltacomb_global_High_Quality.inst.cfg @@ -11,4 +11,5 @@ weight = 0 global_quality = True [values] -layer_height = 0.06 +layer_height = 0.05 +layer_height_0 = =layer_height * 2 diff --git a/resources/quality/deltacomb/deltacomb_global_Normal_Quality.inst.cfg b/resources/quality/deltacomb/deltacomb_global_Normal_Quality.inst.cfg index 817fdf62b5..2ae0c58845 100755 --- a/resources/quality/deltacomb/deltacomb_global_Normal_Quality.inst.cfg +++ b/resources/quality/deltacomb/deltacomb_global_Normal_Quality.inst.cfg @@ -12,3 +12,4 @@ global_quality = True [values] layer_height = 0.1 +layer_height_0 = =layer_height * 2 diff --git a/resources/quality/deltacomb/deltacomb_global_Superdraft_Quality.inst.cfg b/resources/quality/deltacomb/deltacomb_global_Superdraft_Quality.inst.cfg deleted file mode 100755 index ab211efc24..0000000000 --- a/resources/quality/deltacomb/deltacomb_global_Superdraft_Quality.inst.cfg +++ /dev/null @@ -1,14 +0,0 @@ -[general] -version = 4 -name = Sprint -definition = deltacomb - -[metadata] -setting_version = 4 -type = quality -quality_type = superdraft -weight = -4 -global_quality = True - -[values] -layer_height = 0.4 diff --git a/resources/quality/deltacomb/deltacomb_global_Verydraft_Quality.inst.cfg b/resources/quality/deltacomb/deltacomb_global_Verydraft_Quality.inst.cfg index 687cda0aa6..4dd79b6a5e 100755 --- a/resources/quality/deltacomb/deltacomb_global_Verydraft_Quality.inst.cfg +++ b/resources/quality/deltacomb/deltacomb_global_Verydraft_Quality.inst.cfg @@ -12,3 +12,4 @@ global_quality = True [values] layer_height = 0.3 +layer_height_0 = =layer_height diff --git a/resources/quality/deltacomb/deltacomb_pla_Draft_Quality.inst.cfg b/resources/quality/deltacomb/deltacomb_pla_Draft_Quality.inst.cfg index d1f70b65fc..109b241a1f 100644 --- a/resources/quality/deltacomb/deltacomb_pla_Draft_Quality.inst.cfg +++ b/resources/quality/deltacomb/deltacomb_pla_Draft_Quality.inst.cfg @@ -12,10 +12,8 @@ material = generic_pla [values] adhesion_type = skirt -layer_height = 0.2 -layer_height_0 = 0.2 cool_fan_enabled = True -cool_fan_full_at_height = 0.2 +cool_fan_full_at_height = =layer_height cool_fan_speed = 100 cool_fan_speed_max = 100 cool_fan_speed_min = 100 diff --git a/resources/quality/deltacomb/deltacomb_pla_Fast_Quality.inst.cfg b/resources/quality/deltacomb/deltacomb_pla_Fast_Quality.inst.cfg index e0899d65c7..32e49fb209 100644 --- a/resources/quality/deltacomb/deltacomb_pla_Fast_Quality.inst.cfg +++ b/resources/quality/deltacomb/deltacomb_pla_Fast_Quality.inst.cfg @@ -12,10 +12,8 @@ material = generic_pla [values] adhesion_type = skirt -layer_height = 0.15 -layer_height_0 = 0.15 cool_fan_enabled = True -cool_fan_full_at_height = 0.15 +cool_fan_full_at_height = =layer_height cool_fan_speed = 100 cool_fan_speed_max = 100 cool_fan_speed_min = 100 diff --git a/resources/quality/deltacomb/deltacomb_pla_High_Quality.inst.cfg b/resources/quality/deltacomb/deltacomb_pla_High_Quality.inst.cfg index c46b2639ca..3c3fa9513f 100644 --- a/resources/quality/deltacomb/deltacomb_pla_High_Quality.inst.cfg +++ b/resources/quality/deltacomb/deltacomb_pla_High_Quality.inst.cfg @@ -12,10 +12,8 @@ material = generic_pla [values] adhesion_type = skirt -layer_height = 0.05 -layer_height_0 = 0.05 cool_fan_enabled = True -cool_fan_full_at_height = 0.05 +cool_fan_full_at_height = =layer_height cool_fan_speed = 100 cool_fan_speed_max = 100 cool_fan_speed_min = 100 diff --git a/resources/quality/deltacomb/deltacomb_pla_Normal_Quality.inst.cfg b/resources/quality/deltacomb/deltacomb_pla_Normal_Quality.inst.cfg index 9aaaf294e0..c836c6a5a6 100644 --- a/resources/quality/deltacomb/deltacomb_pla_Normal_Quality.inst.cfg +++ b/resources/quality/deltacomb/deltacomb_pla_Normal_Quality.inst.cfg @@ -12,10 +12,8 @@ material = generic_pla [values] adhesion_type = skirt -layer_height = 0.1 -layer_height_0 = 0.1 cool_fan_enabled = True -cool_fan_full_at_height = 0.1 +cool_fan_full_at_height = =layer_height cool_fan_speed = 100 cool_fan_speed_max = 100 cool_fan_speed_min = 100 diff --git a/resources/quality/deltacomb/deltacomb_pla_Superdraft_Quality.inst.cfg b/resources/quality/deltacomb/deltacomb_pla_Superdraft_Quality.inst.cfg deleted file mode 100644 index 88ed9a13bd..0000000000 --- a/resources/quality/deltacomb/deltacomb_pla_Superdraft_Quality.inst.cfg +++ /dev/null @@ -1,24 +0,0 @@ -[general] -version = 4 -name = Sprint -definition = deltacomb - -[metadata] -setting_version = 4 -type = quality -quality_type = superdraft -weight = -4 -material = generic_pla - -[values] -adhesion_type = skirt -layer_height = 0.4 -layer_height_0 = 0.4 -cool_fan_enabled = True -cool_fan_full_at_height = 0.4 -cool_fan_speed = 100 -cool_fan_speed_max = 100 -cool_fan_speed_min = 100 -cool_min_layer_time = 5 -cool_min_speed = 20 -material_print_temperature_layer_0 = =default_material_print_temperature + 5 diff --git a/resources/quality/deltacomb/deltacomb_pla_Verydraft_Quality.inst.cfg b/resources/quality/deltacomb/deltacomb_pla_Verydraft_Quality.inst.cfg index 2c39b34e36..64c84fa3a9 100644 --- a/resources/quality/deltacomb/deltacomb_pla_Verydraft_Quality.inst.cfg +++ b/resources/quality/deltacomb/deltacomb_pla_Verydraft_Quality.inst.cfg @@ -12,10 +12,8 @@ material = generic_pla [values] adhesion_type = skirt -layer_height = 0.3 -layer_height_0 = 0.3 cool_fan_enabled = True -cool_fan_full_at_height = 0.3 +cool_fan_full_at_height = =layer_height cool_fan_speed = 100 cool_fan_speed_max = 100 cool_fan_speed_min = 100 From a883c9ebb07a5dadca8bbc039931b6d380e2a409 Mon Sep 17 00:00:00 2001 From: kaleidoscopeit Date: Fri, 20 Jul 2018 16:57:59 +0200 Subject: [PATCH 153/174] settings_vesion to 5 in quality --- .../quality/deltacomb/deltacomb_abs_Draft_Quality.inst.cfg | 2 +- resources/quality/deltacomb/deltacomb_abs_Fast_Quality.inst.cfg | 2 +- resources/quality/deltacomb/deltacomb_abs_High_Quality.inst.cfg | 2 +- .../quality/deltacomb/deltacomb_abs_Normal_Quality.inst.cfg | 2 +- .../quality/deltacomb/deltacomb_abs_Verydraft_Quality.inst.cfg | 2 +- .../quality/deltacomb/deltacomb_global_Draft_Quality.inst.cfg | 2 +- .../quality/deltacomb/deltacomb_global_Fast_Quality.inst.cfg | 2 +- .../quality/deltacomb/deltacomb_global_High_Quality.inst.cfg | 2 +- .../quality/deltacomb/deltacomb_global_Normal_Quality.inst.cfg | 2 +- .../deltacomb/deltacomb_global_Verydraft_Quality.inst.cfg | 2 +- .../quality/deltacomb/deltacomb_pla_Draft_Quality.inst.cfg | 2 +- resources/quality/deltacomb/deltacomb_pla_Fast_Quality.inst.cfg | 2 +- resources/quality/deltacomb/deltacomb_pla_High_Quality.inst.cfg | 2 +- .../quality/deltacomb/deltacomb_pla_Normal_Quality.inst.cfg | 2 +- .../quality/deltacomb/deltacomb_pla_Verydraft_Quality.inst.cfg | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/resources/quality/deltacomb/deltacomb_abs_Draft_Quality.inst.cfg b/resources/quality/deltacomb/deltacomb_abs_Draft_Quality.inst.cfg index fe16999e8c..f540400575 100644 --- a/resources/quality/deltacomb/deltacomb_abs_Draft_Quality.inst.cfg +++ b/resources/quality/deltacomb/deltacomb_abs_Draft_Quality.inst.cfg @@ -4,7 +4,7 @@ name = Fast (beta) definition = deltacomb [metadata] -setting_version = 4 +setting_version = 5 type = quality quality_type = draft weight = -2 diff --git a/resources/quality/deltacomb/deltacomb_abs_Fast_Quality.inst.cfg b/resources/quality/deltacomb/deltacomb_abs_Fast_Quality.inst.cfg index 82ba40c81b..2214813913 100644 --- a/resources/quality/deltacomb/deltacomb_abs_Fast_Quality.inst.cfg +++ b/resources/quality/deltacomb/deltacomb_abs_Fast_Quality.inst.cfg @@ -4,7 +4,7 @@ name = Normal (beta) definition = deltacomb [metadata] -setting_version = 4 +setting_version = 5 type = quality quality_type = fast weight = -1 diff --git a/resources/quality/deltacomb/deltacomb_abs_High_Quality.inst.cfg b/resources/quality/deltacomb/deltacomb_abs_High_Quality.inst.cfg index 6f0b7fbb94..c196209553 100644 --- a/resources/quality/deltacomb/deltacomb_abs_High_Quality.inst.cfg +++ b/resources/quality/deltacomb/deltacomb_abs_High_Quality.inst.cfg @@ -4,7 +4,7 @@ name = Extra Fine (beta) definition = deltacomb [metadata] -setting_version = 4 +setting_version = 5 type = quality quality_type = high weight = 0 diff --git a/resources/quality/deltacomb/deltacomb_abs_Normal_Quality.inst.cfg b/resources/quality/deltacomb/deltacomb_abs_Normal_Quality.inst.cfg index b9a14d6128..332e1890c6 100644 --- a/resources/quality/deltacomb/deltacomb_abs_Normal_Quality.inst.cfg +++ b/resources/quality/deltacomb/deltacomb_abs_Normal_Quality.inst.cfg @@ -4,7 +4,7 @@ name = Fine (beta) definition = deltacomb [metadata] -setting_version = 4 +setting_version = 5 type = quality quality_type = normal weight = 0 diff --git a/resources/quality/deltacomb/deltacomb_abs_Verydraft_Quality.inst.cfg b/resources/quality/deltacomb/deltacomb_abs_Verydraft_Quality.inst.cfg index 925473e933..674174c0bd 100644 --- a/resources/quality/deltacomb/deltacomb_abs_Verydraft_Quality.inst.cfg +++ b/resources/quality/deltacomb/deltacomb_abs_Verydraft_Quality.inst.cfg @@ -4,7 +4,7 @@ name = Extra Fast (beta) definition = deltacomb [metadata] -setting_version = 4 +setting_version = 5 type = quality quality_type = verydraft weight = -3 diff --git a/resources/quality/deltacomb/deltacomb_global_Draft_Quality.inst.cfg b/resources/quality/deltacomb/deltacomb_global_Draft_Quality.inst.cfg index 71bc28185f..f8887810d5 100755 --- a/resources/quality/deltacomb/deltacomb_global_Draft_Quality.inst.cfg +++ b/resources/quality/deltacomb/deltacomb_global_Draft_Quality.inst.cfg @@ -4,7 +4,7 @@ name = Fast definition = deltacomb [metadata] -setting_version = 4 +setting_version = 5 type = quality quality_type = draft weight = -2 diff --git a/resources/quality/deltacomb/deltacomb_global_Fast_Quality.inst.cfg b/resources/quality/deltacomb/deltacomb_global_Fast_Quality.inst.cfg index 0a1d1aa4bf..99030a084b 100755 --- a/resources/quality/deltacomb/deltacomb_global_Fast_Quality.inst.cfg +++ b/resources/quality/deltacomb/deltacomb_global_Fast_Quality.inst.cfg @@ -4,7 +4,7 @@ name = Normal definition = deltacomb [metadata] -setting_version = 4 +setting_version = 5 type = quality quality_type = fast weight = -1 diff --git a/resources/quality/deltacomb/deltacomb_global_High_Quality.inst.cfg b/resources/quality/deltacomb/deltacomb_global_High_Quality.inst.cfg index d8c10de5e3..d6d853466a 100755 --- a/resources/quality/deltacomb/deltacomb_global_High_Quality.inst.cfg +++ b/resources/quality/deltacomb/deltacomb_global_High_Quality.inst.cfg @@ -4,7 +4,7 @@ name = Extra Fine definition = deltacomb [metadata] -setting_version = 4 +setting_version = 5 type = quality quality_type = high weight = 0 diff --git a/resources/quality/deltacomb/deltacomb_global_Normal_Quality.inst.cfg b/resources/quality/deltacomb/deltacomb_global_Normal_Quality.inst.cfg index 2ae0c58845..a3bafadeec 100755 --- a/resources/quality/deltacomb/deltacomb_global_Normal_Quality.inst.cfg +++ b/resources/quality/deltacomb/deltacomb_global_Normal_Quality.inst.cfg @@ -4,7 +4,7 @@ name = Fine definition = deltacomb [metadata] -setting_version = 4 +setting_version = 5 type = quality quality_type = normal weight = 0 diff --git a/resources/quality/deltacomb/deltacomb_global_Verydraft_Quality.inst.cfg b/resources/quality/deltacomb/deltacomb_global_Verydraft_Quality.inst.cfg index 4dd79b6a5e..84c6e66f61 100755 --- a/resources/quality/deltacomb/deltacomb_global_Verydraft_Quality.inst.cfg +++ b/resources/quality/deltacomb/deltacomb_global_Verydraft_Quality.inst.cfg @@ -4,7 +4,7 @@ name = Extra Fast definition = deltacomb [metadata] -setting_version = 4 +setting_version = 5 type = quality quality_type = verydraft weight = -3 diff --git a/resources/quality/deltacomb/deltacomb_pla_Draft_Quality.inst.cfg b/resources/quality/deltacomb/deltacomb_pla_Draft_Quality.inst.cfg index 109b241a1f..c4f884486e 100644 --- a/resources/quality/deltacomb/deltacomb_pla_Draft_Quality.inst.cfg +++ b/resources/quality/deltacomb/deltacomb_pla_Draft_Quality.inst.cfg @@ -4,7 +4,7 @@ name = Fast definition = deltacomb [metadata] -setting_version = 4 +setting_version = 5 type = quality quality_type = draft weight = -2 diff --git a/resources/quality/deltacomb/deltacomb_pla_Fast_Quality.inst.cfg b/resources/quality/deltacomb/deltacomb_pla_Fast_Quality.inst.cfg index 32e49fb209..714d4e3517 100644 --- a/resources/quality/deltacomb/deltacomb_pla_Fast_Quality.inst.cfg +++ b/resources/quality/deltacomb/deltacomb_pla_Fast_Quality.inst.cfg @@ -4,7 +4,7 @@ name = Normal definition = deltacomb [metadata] -setting_version = 4 +setting_version = 5 type = quality quality_type = fast weight = -1 diff --git a/resources/quality/deltacomb/deltacomb_pla_High_Quality.inst.cfg b/resources/quality/deltacomb/deltacomb_pla_High_Quality.inst.cfg index 3c3fa9513f..774b8969c0 100644 --- a/resources/quality/deltacomb/deltacomb_pla_High_Quality.inst.cfg +++ b/resources/quality/deltacomb/deltacomb_pla_High_Quality.inst.cfg @@ -4,7 +4,7 @@ name = Extra Fine definition = deltacomb [metadata] -setting_version = 4 +setting_version = 5 type = quality quality_type = high weight = 0 diff --git a/resources/quality/deltacomb/deltacomb_pla_Normal_Quality.inst.cfg b/resources/quality/deltacomb/deltacomb_pla_Normal_Quality.inst.cfg index c836c6a5a6..58470ed650 100644 --- a/resources/quality/deltacomb/deltacomb_pla_Normal_Quality.inst.cfg +++ b/resources/quality/deltacomb/deltacomb_pla_Normal_Quality.inst.cfg @@ -4,7 +4,7 @@ name = Fine definition = deltacomb [metadata] -setting_version = 4 +setting_version = 5 type = quality quality_type = normal weight = 0 diff --git a/resources/quality/deltacomb/deltacomb_pla_Verydraft_Quality.inst.cfg b/resources/quality/deltacomb/deltacomb_pla_Verydraft_Quality.inst.cfg index 64c84fa3a9..9c00877c24 100644 --- a/resources/quality/deltacomb/deltacomb_pla_Verydraft_Quality.inst.cfg +++ b/resources/quality/deltacomb/deltacomb_pla_Verydraft_Quality.inst.cfg @@ -4,7 +4,7 @@ name = Extra Fast definition = deltacomb [metadata] -setting_version = 4 +setting_version = 5 type = quality quality_type = verydraft weight = -3 From 75d8cba8a91c1275eb84059b2752cb34448227cc Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 24 Jul 2018 09:09:26 +0200 Subject: [PATCH 154/174] Fix start g-code of Monoprice Select Mini v2 Apparently the original start code caused it to move outside the build volume or beyond the limit in the Y direction. Fixes #3924. --- resources/definitions/monoprice_select_mini_v2.def.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/resources/definitions/monoprice_select_mini_v2.def.json b/resources/definitions/monoprice_select_mini_v2.def.json index 4e3d63044e..bed4fb1adb 100644 --- a/resources/definitions/monoprice_select_mini_v2.def.json +++ b/resources/definitions/monoprice_select_mini_v2.def.json @@ -20,6 +20,10 @@ "overrides": { "machine_name": { "default_value": "Monoprice Select Mini V2" }, + "machine_end_gcode": + { + "default_value": "G0 X0 Y120;(Stick out the part)\nM190 S0;(Turn off heat bed, don't wait.)\nG92 E10;(Set extruder to 10)\nG1 E7 F200;(retract 3mm)\nM104 S0;(Turn off nozzle, don't wait)\nG4 S300;(Delay 5 minutes)\nM107;(Turn off part fan)\nM84;(Turn off stepper motors.)" + }, "adhesion_type": { "default_value": "brim" }, "retraction_combing": { "default_value": "noskin" }, "retraction_amount" : { "default_value": 2.5}, From 988de2b68c7681d1aa7b3a163cc17d21d6f44070 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 24 Jul 2018 09:09:54 +0200 Subject: [PATCH 155/174] Fix z-fighting with build plate mesh --- resources/definitions/malyan_m200.def.json | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/definitions/malyan_m200.def.json b/resources/definitions/malyan_m200.def.json index b3b0651e1a..f2c01b3831 100644 --- a/resources/definitions/malyan_m200.def.json +++ b/resources/definitions/malyan_m200.def.json @@ -9,6 +9,7 @@ "category": "Other", "file_formats": "text/x-gcode", "platform": "malyan_m200_platform.stl", + "platform_offset": [0, -0.25, 0], "has_machine_quality": true, "has_materials": true, "preferred_quality_type": "normal", From 296b74b03244ee4ca42c934c8feb43c6c69bb76c Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Tue, 24 Jul 2018 10:48:52 +0200 Subject: [PATCH 156/174] Set negative values to retraction in the filament change script. Fixes #4114 --- plugins/PostProcessingPlugin/scripts/FilamentChange.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/PostProcessingPlugin/scripts/FilamentChange.py b/plugins/PostProcessingPlugin/scripts/FilamentChange.py index 1246bc8b43..0fa52de4f1 100644 --- a/plugins/PostProcessingPlugin/scripts/FilamentChange.py +++ b/plugins/PostProcessingPlugin/scripts/FilamentChange.py @@ -58,10 +58,10 @@ class FilamentChange(Script): color_change = "M600" if initial_retract is not None and initial_retract > 0.: - color_change = color_change + (" E%.2f" % initial_retract) + color_change = color_change + (" E-%.2f" % initial_retract) if later_retract is not None and later_retract > 0.: - color_change = color_change + (" L%.2f" % later_retract) + color_change = color_change + (" L-%.2f" % later_retract) color_change = color_change + " ; Generated by FilamentChange plugin" From 320d73c6e51f8ec59bfce65fcd97c7b058c52236 Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Tue, 24 Jul 2018 12:17:53 +0200 Subject: [PATCH 157/174] Retain 3MF mesh positions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Contributes to CURA-5465 Fixed bug by preventing read jobs for 3mf files from being auto-arranged. Boyscout changes: - Fixed typo in `ThreeMFReader.py` (`splitted` → `split`) - Fixed code style in `CuraApplication.py` (`filename` → `file_name`) --- cura/CuraApplication.py | 23 ++++++++++++----------- plugins/3MFReader/ThreeMFReader.py | 26 +++++++++++++------------- 2 files changed, 25 insertions(+), 24 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 3f0a5b9cb2..4513d7edff 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -1599,10 +1599,12 @@ class CuraApplication(QtApplication): def _readMeshFinished(self, job): nodes = job.getResult() - filename = job.getFileName() - self._currently_loading_files.remove(filename) + file_name = job.getFileName() + file_name_lower = file_name.lower() + file_extension = file_name_lower.split(".")[-1] + self._currently_loading_files.remove(file_name) - self.fileLoaded.emit(filename) + self.fileLoaded.emit(file_name) arrange_objects_on_load = not self.getPreferences().getValue("cura/use_multi_build_plate") target_build_plate = self.getMultiBuildPlateModel().activeBuildPlate if arrange_objects_on_load else -1 @@ -1635,15 +1637,14 @@ class CuraApplication(QtApplication): node.scale(original_node.getScale()) node.setSelectable(True) - node.setName(os.path.basename(filename)) + node.setName(os.path.basename(file_name)) self.getBuildVolume().checkBoundsAndUpdate(node) is_non_sliceable = False - filename_lower = filename.lower() - for extension in self._non_sliceable_extensions: - if filename_lower.endswith(extension): - is_non_sliceable = True - break + + if file_extension in self._non_sliceable_extensions: + is_non_sliceable = True + if is_non_sliceable: self.callLater(lambda: self.getController().setActiveView("SimulationView")) @@ -1662,7 +1663,7 @@ class CuraApplication(QtApplication): if not child.getDecorator(ConvexHullDecorator): child.addDecorator(ConvexHullDecorator()) - if arrange_objects_on_load: + if file_extension != "3mf" and arrange_objects_on_load: if node.callDecoration("isSliceable"): # Only check position if it's not already blatantly obvious that it won't fit. if node.getBoundingBox() is None or self._volume.getBoundingBox() is None or node.getBoundingBox().width < self._volume.getBoundingBox().width or node.getBoundingBox().depth < self._volume.getBoundingBox().depth: @@ -1696,7 +1697,7 @@ class CuraApplication(QtApplication): if select_models_on_load: Selection.add(node) - self.fileCompleted.emit(filename) + self.fileCompleted.emit(file_name) def addNonSliceableExtension(self, extension): self._non_sliceable_extensions.append(extension) diff --git a/plugins/3MFReader/ThreeMFReader.py b/plugins/3MFReader/ThreeMFReader.py index 0280600834..9ba82364e8 100755 --- a/plugins/3MFReader/ThreeMFReader.py +++ b/plugins/3MFReader/ThreeMFReader.py @@ -59,7 +59,7 @@ class ThreeMFReader(MeshReader): if transformation == "": return Matrix() - splitted_transformation = transformation.split() + split_transformation = transformation.split() ## Transformation is saved as: ## M00 M01 M02 0.0 ## M10 M11 M12 0.0 @@ -68,20 +68,20 @@ class ThreeMFReader(MeshReader): ## We switch the row & cols as that is how everyone else uses matrices! temp_mat = Matrix() # Rotation & Scale - temp_mat._data[0, 0] = splitted_transformation[0] - temp_mat._data[1, 0] = splitted_transformation[1] - temp_mat._data[2, 0] = splitted_transformation[2] - temp_mat._data[0, 1] = splitted_transformation[3] - temp_mat._data[1, 1] = splitted_transformation[4] - temp_mat._data[2, 1] = splitted_transformation[5] - temp_mat._data[0, 2] = splitted_transformation[6] - temp_mat._data[1, 2] = splitted_transformation[7] - temp_mat._data[2, 2] = splitted_transformation[8] + temp_mat._data[0, 0] = split_transformation[0] + temp_mat._data[1, 0] = split_transformation[1] + temp_mat._data[2, 0] = split_transformation[2] + temp_mat._data[0, 1] = split_transformation[3] + temp_mat._data[1, 1] = split_transformation[4] + temp_mat._data[2, 1] = split_transformation[5] + temp_mat._data[0, 2] = split_transformation[6] + temp_mat._data[1, 2] = split_transformation[7] + temp_mat._data[2, 2] = split_transformation[8] # Translation - temp_mat._data[0, 3] = splitted_transformation[9] - temp_mat._data[1, 3] = splitted_transformation[10] - temp_mat._data[2, 3] = splitted_transformation[11] + temp_mat._data[0, 3] = split_transformation[9] + temp_mat._data[1, 3] = split_transformation[10] + temp_mat._data[2, 3] = split_transformation[11] return temp_mat From 1f15599b4de0cbb2f78c91b867b6713c60717fcb Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Tue, 24 Jul 2018 15:53:52 +0200 Subject: [PATCH 158/174] Fix non-slicable check CURA-5465 --- cura/CuraApplication.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 4513d7edff..8dd17896bb 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -1640,10 +1640,7 @@ class CuraApplication(QtApplication): node.setName(os.path.basename(file_name)) self.getBuildVolume().checkBoundsAndUpdate(node) - is_non_sliceable = False - - if file_extension in self._non_sliceable_extensions: - is_non_sliceable = True + is_non_sliceable = "." + file_extension in self._non_sliceable_extensions if is_non_sliceable: self.callLater(lambda: self.getController().setActiveView("SimulationView")) From 952bc54452b6692d7c1bbe597585dbe0c85accf4 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Tue, 24 Jul 2018 15:59:00 +0200 Subject: [PATCH 159/174] Make stretch script work with relative movements CURA-5480 --- .../PostProcessingPlugin/scripts/Stretch.py | 54 ++++++++++++++----- 1 file changed, 41 insertions(+), 13 deletions(-) diff --git a/plugins/PostProcessingPlugin/scripts/Stretch.py b/plugins/PostProcessingPlugin/scripts/Stretch.py index c7a36ab7d6..945483c321 100644 --- a/plugins/PostProcessingPlugin/scripts/Stretch.py +++ b/plugins/PostProcessingPlugin/scripts/Stretch.py @@ -35,25 +35,40 @@ class GCodeStep(): Class to store the current value of each G_Code parameter for any G-Code step """ - def __init__(self, step): + def __init__(self, step, in_relative_movement: bool = False): self.step = step self.step_x = 0 self.step_y = 0 self.step_z = 0 self.step_e = 0 self.step_f = 0 + + self.in_relative_movement = in_relative_movement + self.comment = "" def readStep(self, line): """ Reads gcode from line into self """ - self.step_x = _getValue(line, "X", self.step_x) - self.step_y = _getValue(line, "Y", self.step_y) - self.step_z = _getValue(line, "Z", self.step_z) - self.step_e = _getValue(line, "E", self.step_e) - self.step_f = _getValue(line, "F", self.step_f) - return + if not self.in_relative_movement: + self.step_x = _getValue(line, "X", self.step_x) + self.step_y = _getValue(line, "Y", self.step_y) + self.step_z = _getValue(line, "Z", self.step_z) + self.step_e = _getValue(line, "E", self.step_e) + self.step_f = _getValue(line, "F", self.step_f) + else: + delta_step_x = _getValue(line, "X", 0) + delta_step_y = _getValue(line, "Y", 0) + delta_step_z = _getValue(line, "Z", 0) + delta_step_e = _getValue(line, "E", 0) + delta_step_f = _getValue(line, "F", 0) + + self.step_x += delta_step_x + self.step_y += delta_step_y + self.step_z += delta_step_z + self.step_e += delta_step_e + self.step_f += delta_step_f def copyPosFrom(self, step): """ @@ -65,7 +80,9 @@ class GCodeStep(): self.step_e = step.step_e self.step_f = step.step_f self.comment = step.comment - return + + def setInRelativeMovement(self, value: bool) -> None: + self.in_relative_movement = value # Execution part of the stretch plugin @@ -86,6 +103,7 @@ class Stretcher(): # of already deposited material for current layer self.layer_z = 0 # Z position of the extrusion moves of the current layer self.layergcode = "" + self._in_relative_movement = False def execute(self, data): """ @@ -96,7 +114,8 @@ class Stretcher(): + " and push wall stretch " + str(self.pw_stretch) + "mm") retdata = [] layer_steps = [] - current = GCodeStep(0) + in_relative_movement = False + current = GCodeStep(0, in_relative_movement) self.layer_z = 0. current_e = 0. for layer in data: @@ -107,20 +126,29 @@ class Stretcher(): current.comment = line[line.find(";"):] if _getValue(line, "G") == 0: current.readStep(line) - onestep = GCodeStep(0) + onestep = GCodeStep(0, in_relative_movement) onestep.copyPosFrom(current) elif _getValue(line, "G") == 1: current.readStep(line) - onestep = GCodeStep(1) + onestep = GCodeStep(1, in_relative_movement) onestep.copyPosFrom(current) + + # end of relative movement + elif _getValue(line, "G") == 90: + in_relative_movement = False + # start of relative movement + elif _getValue(line, "G") == 91: + in_relative_movement = True + elif _getValue(line, "G") == 92: current.readStep(line) - onestep = GCodeStep(-1) + onestep = GCodeStep(-1, in_relative_movement) onestep.copyPosFrom(current) else: - onestep = GCodeStep(-1) + onestep = GCodeStep(-1, in_relative_movement) onestep.copyPosFrom(current) onestep.comment = line + if line.find(";LAYER:") >= 0 and len(layer_steps): # Previous plugin "forgot" to separate two layers... Logger.log("d", "Layer Z " + "{:.3f}".format(self.layer_z) From e89983b171d8c6975ce1be61a62e3ad915940ac7 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 24 Jul 2018 16:17:53 +0200 Subject: [PATCH 160/174] When dismissing the print window, also reset the "sending_gcode" flag CL-913 --- plugins/UM3NetworkPrinting/PrintWindow.qml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/UM3NetworkPrinting/PrintWindow.qml b/plugins/UM3NetworkPrinting/PrintWindow.qml index 0553db0eb2..9793b218fc 100644 --- a/plugins/UM3NetworkPrinting/PrintWindow.qml +++ b/plugins/UM3NetworkPrinting/PrintWindow.qml @@ -26,6 +26,10 @@ UM.Dialog { resetPrintersModel() } + else + { + OutputDevice.cancelPrintSelection() + } } title: catalog.i18nc("@title:window", "Print over network") From 1cb896904b870baadf15fefe1f374bc11574ddeb Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 24 Jul 2018 16:24:28 +0200 Subject: [PATCH 161/174] Fixed missed renames of onFinished keyword --- .../ClusterUM3PrinterOutputController.py | 2 +- .../UM3NetworkPrinting/LegacyUM3OutputDevice.py | 14 +++++++------- .../LegacyUM3PrinterOutputController.py | 10 +++++----- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/plugins/UM3NetworkPrinting/ClusterUM3PrinterOutputController.py b/plugins/UM3NetworkPrinting/ClusterUM3PrinterOutputController.py index 707443b9ea..4a0319cafc 100644 --- a/plugins/UM3NetworkPrinting/ClusterUM3PrinterOutputController.py +++ b/plugins/UM3NetworkPrinting/ClusterUM3PrinterOutputController.py @@ -19,5 +19,5 @@ class ClusterUM3PrinterOutputController(PrinterOutputController): def setJobState(self, job: "PrintJobOutputModel", state: str): data = "{\"action\": \"%s\"}" % state - self._output_device.put("print_jobs/%s/action" % job.key, data, onFinished=None) + self._output_device.put("print_jobs/%s/action" % job.key, data, on_finished=None) diff --git a/plugins/UM3NetworkPrinting/LegacyUM3OutputDevice.py b/plugins/UM3NetworkPrinting/LegacyUM3OutputDevice.py index f38c1a1c7a..8617b5b2ff 100644 --- a/plugins/UM3NetworkPrinting/LegacyUM3OutputDevice.py +++ b/plugins/UM3NetworkPrinting/LegacyUM3OutputDevice.py @@ -165,7 +165,7 @@ class LegacyUM3OutputDevice(NetworkedPrinterOutputDevice): file_name = "none.xml" - self.postForm("materials", "form-data; name=\"file\";filename=\"%s\"" % file_name, xml_data.encode(), onFinished=None) + self.postForm("materials", "form-data; name=\"file\";filename=\"%s\"" % file_name, xml_data.encode(), on_finished=None) except NotImplementedError: # If the material container is not the most "generic" one it can't be serialized an will raise a @@ -270,7 +270,7 @@ class LegacyUM3OutputDevice(NetworkedPrinterOutputDevice): file_name = "%s.gcode.gz" % CuraApplication.getInstance().getPrintInformation().jobName self.postForm("print_job", "form-data; name=\"file\";filename=\"%s\"" % file_name, compressed_gcode, - onFinished=self._onPostPrintJobFinished) + on_finished=self._onPostPrintJobFinished) return @@ -381,8 +381,8 @@ class LegacyUM3OutputDevice(NetworkedPrinterOutputDevice): self._checkAuthentication() # We don't need authentication for requesting info, so we can go right ahead with requesting this. - self.get("printer", onFinished=self._onGetPrinterDataFinished) - self.get("print_job", onFinished=self._onGetPrintJobFinished) + self.get("printer", on_finished=self._onGetPrinterDataFinished) + self.get("print_job", on_finished=self._onGetPrintJobFinished) def _resetAuthenticationRequestedMessage(self): if self._authentication_requested_message: @@ -404,7 +404,7 @@ class LegacyUM3OutputDevice(NetworkedPrinterOutputDevice): def _verifyAuthentication(self): Logger.log("d", "Attempting to verify authentication") # This will ensure that the "_onAuthenticationRequired" is triggered, which will setup the authenticator. - self.get("auth/verify", onFinished=self._onVerifyAuthenticationCompleted) + self.get("auth/verify", on_finished=self._onVerifyAuthenticationCompleted) def _onVerifyAuthenticationCompleted(self, reply): status_code = reply.attribute(QNetworkRequest.HttpStatusCodeAttribute) @@ -426,7 +426,7 @@ class LegacyUM3OutputDevice(NetworkedPrinterOutputDevice): def _checkAuthentication(self): Logger.log("d", "Checking if authentication is correct for id %s and key %s", self._authentication_id, self._getSafeAuthKey()) - self.get("auth/check/" + str(self._authentication_id), onFinished=self._onCheckAuthenticationFinished) + self.get("auth/check/" + str(self._authentication_id), on_finished=self._onCheckAuthenticationFinished) def _onCheckAuthenticationFinished(self, reply): if str(self._authentication_id) not in reply.url().toString(): @@ -502,7 +502,7 @@ class LegacyUM3OutputDevice(NetworkedPrinterOutputDevice): self.post("auth/request", json.dumps({"application": "Cura-" + CuraApplication.getInstance().getVersion(), "user": self._getUserName()}).encode(), - onFinished=self._onRequestAuthenticationFinished) + on_finished=self._onRequestAuthenticationFinished) self.setAuthenticationState(AuthState.AuthenticationRequested) diff --git a/plugins/UM3NetworkPrinting/LegacyUM3PrinterOutputController.py b/plugins/UM3NetworkPrinting/LegacyUM3PrinterOutputController.py index b12a31b6cf..702b48ce15 100644 --- a/plugins/UM3NetworkPrinting/LegacyUM3PrinterOutputController.py +++ b/plugins/UM3NetworkPrinting/LegacyUM3PrinterOutputController.py @@ -31,11 +31,11 @@ class LegacyUM3PrinterOutputController(PrinterOutputController): def setJobState(self, job: "PrintJobOutputModel", state: str): data = "{\"target\": \"%s\"}" % state - self._output_device.put("print_job/state", data, onFinished=None) + self._output_device.put("print_job/state", data, on_finished=None) def setTargetBedTemperature(self, printer: "PrinterOutputModel", temperature: int): data = str(temperature) - self._output_device.put("printer/bed/temperature/target", data, onFinished=self._onPutBedTemperatureCompleted) + self._output_device.put("printer/bed/temperature/target", data, on_finished=self._onPutBedTemperatureCompleted) def _onPutBedTemperatureCompleted(self, reply): if Version(self._preheat_printer.firmwareVersion) < Version("3.5.92"): @@ -51,10 +51,10 @@ class LegacyUM3PrinterOutputController(PrinterOutputController): new_y = head_pos.y + y new_z = head_pos.z + z data = "{\n\"x\":%s,\n\"y\":%s,\n\"z\":%s\n}" %(new_x, new_y, new_z) - self._output_device.put("printer/heads/0/position", data, onFinished=None) + self._output_device.put("printer/heads/0/position", data, on_finished=None) def homeBed(self, printer): - self._output_device.put("printer/heads/0/position/z", "0", onFinished=None) + self._output_device.put("printer/heads/0/position/z", "0", on_finished=None) def _onPreheatBedTimerFinished(self): self.setTargetBedTemperature(self._preheat_printer, 0) @@ -89,7 +89,7 @@ class LegacyUM3PrinterOutputController(PrinterOutputController): printer.updateIsPreheating(True) return - self._output_device.put("printer/bed/pre_heat", data, onFinished = self._onPutPreheatBedCompleted) + self._output_device.put("printer/bed/pre_heat", data, on_finished = self._onPutPreheatBedCompleted) printer.updateIsPreheating(True) self._preheat_request_in_progress = True From 31d1c9f92cdc06043d008986b5dd917ba4ab64ca Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Fri, 11 May 2018 19:25:55 +0200 Subject: [PATCH 162/174] setting for infill_multiplier --- resources/definitions/fdmprinter.def.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 04b4f34f8b..07fc28354d 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1680,6 +1680,18 @@ "limit_to_extruder": "infill_extruder_nr", "settable_per_mesh": true }, + "infill_multiplier": + { + "label": "Infill Line Multiplier", + "description": "Convert each infill line to this many lines. This makes the ", + "default_value": 1, + "type": "int", + "minimum_value": "1", + "maximum_value_warning": "infill_line_distance / infill_line_width", + "enabled": "infill_sparse_density > 0 and not spaghetti_infill_enabled", + "limit_to_extruder": "infill_extruder_nr", + "settable_per_mesh": true + }, "sub_div_rad_add": { "label": "Cubic Subdivision Shell", From 790321833ba0ac4c29d248d1b6c8da6c83ffede1 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Fri, 11 May 2018 19:40:38 +0200 Subject: [PATCH 163/174] setting description and enabled fixes to infill_multiplier --- resources/definitions/fdmprinter.def.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 07fc28354d..7799276efe 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1683,12 +1683,12 @@ "infill_multiplier": { "label": "Infill Line Multiplier", - "description": "Convert each infill line to this many lines. This makes the ", + "description": "Convert each infill line to this many lines. The extra lines do not cross over each other, but avoid each other. This makes the infill stiffer, but increases print time and material usage.", "default_value": 1, "type": "int", "minimum_value": "1", "maximum_value_warning": "infill_line_distance / infill_line_width", - "enabled": "infill_sparse_density > 0 and not spaghetti_infill_enabled", + "enabled": "infill_sparse_density > 0 and not spaghetti_infill_enabled and infill_pattern != 'zigzag'", "limit_to_extruder": "infill_extruder_nr", "settable_per_mesh": true }, From 3f4aa0abafb7fc816f7a361df644276599fc2c3b Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Fri, 11 May 2018 19:41:02 +0200 Subject: [PATCH 164/174] allow zig_zaggify for linear infill because of infill_multiplier --- resources/definitions/fdmprinter.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 7799276efe..9af56e55b6 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1644,7 +1644,7 @@ "type": "bool", "default_value": false, "value": "infill_pattern == 'cross' or infill_pattern == 'cross_3d'", - "enabled": "infill_pattern == 'grid' or infill_pattern == 'triangles' or infill_pattern == 'trihexagon' or infill_pattern == 'cubic' or infill_pattern == 'tetrahedral' or infill_pattern == 'quarter_cubic' or infill_pattern == 'cross' or infill_pattern == 'cross_3d'", + "enabled": "infill_pattern == 'lines' or infill_pattern == 'grid' or infill_pattern == 'triangles' or infill_pattern == 'trihexagon' or infill_pattern == 'cubic' or infill_pattern == 'tetrahedral' or infill_pattern == 'quarter_cubic' or infill_pattern == 'cross' or infill_pattern == 'cross_3d'", "limit_to_extruder": "infill_extruder_nr", "settable_per_mesh": true }, From 285f1368561f84b1e6ff40dbb88485afcae16ead Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Thu, 17 May 2018 18:02:25 +0200 Subject: [PATCH 165/174] settings: connect_skin_polygons and connect_infill_polygons --- resources/definitions/fdmprinter.def.json | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 9af56e55b6..db40ab2f6a 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1196,6 +1196,16 @@ "limit_to_extruder": "top_bottom_extruder_nr", "settable_per_mesh": true }, + "connect_skin_polygons": + { + "label": "Connect Top/Bottom Polygons", + "description": "Connect top/bottom skin paths where they run next to each other. For the concentric pattern enabling this setting greatly reduces the travel time, but because the connections can happend midway over infill this feature can reduce the top surface quality.", + "type": "bool", + "default_value": false, + "enabled": "top_bottom_pattern == 'concentric'", + "limit_to_extruder": "infill_extruder_nr", + "settable_per_mesh": true + }, "skin_angles": { "label": "Top/Bottom Line Directions", @@ -1648,6 +1658,17 @@ "limit_to_extruder": "infill_extruder_nr", "settable_per_mesh": true }, + "connect_infill_polygons": + { + "label": "Connect Infill Polygons", + "description": "Connect infill paths where they run next to each other. For infill patterns which consist of several closed polygons, enabling this setting greatly reduces the travel time.", + "type": "bool", + "default_value": false, + "value": "infill_pattern == 'cross' or infill_pattern == 'cross_3d'", + "enabled": "infill_pattern == 'concentric_3d' or infill_pattern == 'cross' or infill_pattern == 'cross_3d'", + "limit_to_extruder": "infill_extruder_nr", + "settable_per_mesh": true + }, "infill_angles": { "label": "Infill Line Directions", From 5cb5e63dcc41d887c9e6bfa49832fae110611238 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Thu, 17 May 2018 18:41:50 +0200 Subject: [PATCH 166/174] setting fix: make Connect Infill Polygons available for Multiplied Infill --- resources/definitions/fdmprinter.def.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index db40ab2f6a..947c8c86f3 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1664,8 +1664,8 @@ "description": "Connect infill paths where they run next to each other. For infill patterns which consist of several closed polygons, enabling this setting greatly reduces the travel time.", "type": "bool", "default_value": false, - "value": "infill_pattern == 'cross' or infill_pattern == 'cross_3d'", - "enabled": "infill_pattern == 'concentric_3d' or infill_pattern == 'cross' or infill_pattern == 'cross_3d'", + "value": "infill_pattern == 'cross' or infill_pattern == 'cross_3d' or infill_multiplier % 2 = 0", + "enabled": "infill_pattern == 'concentric_3d' or infill_pattern == 'cross' or infill_pattern == 'cross_3d' or infill_multiplier % 2 == 0", "limit_to_extruder": "infill_extruder_nr", "settable_per_mesh": true }, From 8ccc33d302eac2d3d03d2dc82194210d1a4d593d Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Mon, 23 Jul 2018 14:58:34 +0200 Subject: [PATCH 167/174] make connect_infill_polygons true by default concentric_3d was removed and then the value function is the same as the enabled function, so the default value should be true --- resources/definitions/fdmprinter.def.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 947c8c86f3..10dd0a4171 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1663,9 +1663,9 @@ "label": "Connect Infill Polygons", "description": "Connect infill paths where they run next to each other. For infill patterns which consist of several closed polygons, enabling this setting greatly reduces the travel time.", "type": "bool", - "default_value": false, + "default_value": true, "value": "infill_pattern == 'cross' or infill_pattern == 'cross_3d' or infill_multiplier % 2 = 0", - "enabled": "infill_pattern == 'concentric_3d' or infill_pattern == 'cross' or infill_pattern == 'cross_3d' or infill_multiplier % 2 == 0", + "enabled": "infill_pattern == 'cross' or infill_pattern == 'cross_3d' or infill_multiplier % 2 == 0", "limit_to_extruder": "infill_extruder_nr", "settable_per_mesh": true }, From fca51ac41f916d315e16a5d90af0e4f405016954 Mon Sep 17 00:00:00 2001 From: Aleksei S Date: Wed, 25 Jul 2018 13:44:58 +0200 Subject: [PATCH 168/174] Set relative after getting to line G91 --- plugins/PostProcessingPlugin/scripts/Stretch.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/PostProcessingPlugin/scripts/Stretch.py b/plugins/PostProcessingPlugin/scripts/Stretch.py index 945483c321..377bc4e8da 100644 --- a/plugins/PostProcessingPlugin/scripts/Stretch.py +++ b/plugins/PostProcessingPlugin/scripts/Stretch.py @@ -136,9 +136,11 @@ class Stretcher(): # end of relative movement elif _getValue(line, "G") == 90: in_relative_movement = False + current.setInRelativeMovement(in_relative_movement) # start of relative movement elif _getValue(line, "G") == 91: in_relative_movement = True + current.setInRelativeMovement(in_relative_movement) elif _getValue(line, "G") == 92: current.readStep(line) From 1016564df048077148cf7ec0e729559ebe950e27 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 25 Jul 2018 16:48:32 +0200 Subject: [PATCH 169/174] Fix spelling --- cura/PrintInformation.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cura/PrintInformation.py b/cura/PrintInformation.py index 1b8ba575db..41faa7cef8 100644 --- a/cura/PrintInformation.py +++ b/cura/PrintInformation.py @@ -369,8 +369,9 @@ class PrintInformation(QObject): def baseName(self): return self._base_name - ## Created an acronymn-like abbreviated machine name from the currently active machine name - # Called each time the global stack is switched + ## Created an acronym-like abbreviated machine name from the currently + # active machine name. + # Called each time the global stack is switched. def _setAbbreviatedMachineName(self): global_container_stack = self._application.getGlobalContainerStack() if not global_container_stack: From 30a7132a688748cad47639263d81f22940810904 Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Wed, 25 Jul 2018 17:10:23 +0200 Subject: [PATCH 170/174] Add latest version upgrade plugin to the bundled plugins. --- resources/bundled_packages.json | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/resources/bundled_packages.json b/resources/bundled_packages.json index 6d9b9d1a95..f281d0d01a 100644 --- a/resources/bundled_packages.json +++ b/resources/bundled_packages.json @@ -662,6 +662,23 @@ } } }, + "VersionUpgrade34to40": { + "package_info": { + "package_id": "VersionUpgrade34to40", + "package_type": "plugin", + "display_name": "Version Upgrade 3.4 to 4.0", + "description": "Upgrades configurations from Cura 3.4 to Cura 4.0.", + "package_version": "1.0.0", + "sdk_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", From 9c6b676660bca4d2f8e69afb844f4fc35dbd5b97 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Thu, 26 Jul 2018 10:10:20 +0200 Subject: [PATCH 171/174] fix: typo in setting formula --- resources/definitions/fdmprinter.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 10dd0a4171..ed40b32851 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1664,7 +1664,7 @@ "description": "Connect infill paths where they run next to each other. For infill patterns which consist of several closed polygons, enabling this setting greatly reduces the travel time.", "type": "bool", "default_value": true, - "value": "infill_pattern == 'cross' or infill_pattern == 'cross_3d' or infill_multiplier % 2 = 0", + "value": "infill_pattern == 'cross' or infill_pattern == 'cross_3d' or infill_multiplier % 2 == 0", "enabled": "infill_pattern == 'cross' or infill_pattern == 'cross_3d' or infill_multiplier % 2 == 0", "limit_to_extruder": "infill_extruder_nr", "settable_per_mesh": true From 812816de112bf8b5b7c04a96244e153e53ca4a28 Mon Sep 17 00:00:00 2001 From: Aleksei S Date: Thu, 26 Jul 2018 12:53:12 +0200 Subject: [PATCH 172/174] Show Preparing text after clicking Prepare button CURA-5551 --- resources/qml/SaveButton.qml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/resources/qml/SaveButton.qml b/resources/qml/SaveButton.qml index 0e0eec7277..b06acdb8d5 100644 --- a/resources/qml/SaveButton.qml +++ b/resources/qml/SaveButton.qml @@ -168,6 +168,8 @@ Item { Button { id: prepareButton + property bool showPrepare : false; + tooltip: [1, 5].indexOf(base.backendState) != -1 ? catalog.i18nc("@info:tooltip","Slice current printjob") : catalog.i18nc("@info:tooltip","Cancel slicing process") // 1 = not started, 2 = Processing enabled: base.backendState != "undefined" && ([1, 2].indexOf(base.backendState) != -1) && base.activity @@ -180,9 +182,19 @@ Item { anchors.rightMargin: UM.Theme.getSize("sidebar_margin").width // 1 = not started, 4 = error, 5 = disabled - text: [1, 4, 5].indexOf(base.backendState) != -1 ? catalog.i18nc("@label:Printjob", "Prepare") : catalog.i18nc("@label:Printjob", "Cancel") + text: { + + if (base.backendState == 1 && showPrepare) + { + showPrepare = false + return catalog.i18nc("@label:Printjob", "Preparing") + } + + return [1, 4, 5].indexOf(base.backendState) != -1 ? catalog.i18nc("@label:Printjob", "Prepare") : catalog.i18nc("@label:Printjob", "Cancel") + } onClicked: { + showPrepare = true sliceOrStopSlicing(); } From 9584b8c579c20b1c0ea92a7e015a7237934dd4d3 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Thu, 26 Jul 2018 13:52:51 +0200 Subject: [PATCH 173/174] Bind Top Surface Skin Layers value to Top Surface Skin Extruder CURA-5563 Otherwise, if you set the layers to 2 for extruder 1 and use extruder 2 for Top Surface Skin, it will use the Top Surface Skin Layers value from extruder 2, which is most likely 0, and no top surface skin layers will be printed. --- resources/definitions/fdmprinter.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index ed40b32851..e29e08228b 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1074,7 +1074,7 @@ "maximum_value_warning": "top_layers - 1", "type": "int", "value": "0", - "limit_to_extruder": "roofing_extruder_nr", + "limit_to_extruder": "top_bottom_extruder_nr", "settable_per_mesh": true, "enabled": "top_layers > 0" }, From e50907894394ea0793b9cddef89238f560825102 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 26 Jul 2018 20:12:42 +0200 Subject: [PATCH 174/174] Fix bug with libSavitar not loading due to SIP The same crash as libArcus actually. --- cura_app.py | 1 + 1 file changed, 1 insertion(+) diff --git a/cura_app.py b/cura_app.py index c3c766fdb1..164e32e738 100755 --- a/cura_app.py +++ b/cura_app.py @@ -131,6 +131,7 @@ faulthandler.enable(all_threads = True) # first seems to prevent Sip from going into a state where it # tries to create PyQt objects on a non-main thread. import Arcus #@UnusedImport +import Savitar #@UnusedImport from cura.CuraApplication import CuraApplication app = CuraApplication()