From 9941c2d8f41fe6496fd74c52b8f68eac7852b145 Mon Sep 17 00:00:00 2001 From: Mark Burton Date: Sun, 22 Apr 2018 10:13:51 +0100 Subject: [PATCH 01/38] 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 c2600786315a148490876c5998c8325fff03699d Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Tue, 3 Jul 2018 09:40:42 +0200 Subject: [PATCH 02/38] 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 03/38] 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 04/38] 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 bc05839940b4166dca3c4f45591620bd78638acd Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Tue, 3 Jul 2018 15:54:20 +0200 Subject: [PATCH 05/38] CURA-5537 improve styling of toolbox --- .../resources/qml/ToolboxDownloadsGrid.qml | 6 +- .../resources/qml/ToolboxDownloadsPage.qml | 11 +--- .../qml/ToolboxDownloadsShowcase.qml | 61 ++++++++++-------- .../qml/ToolboxDownloadsShowcaseTile.qml | 63 ++++++++++--------- resources/themes/cura-light/theme.json | 2 +- 5 files changed, 75 insertions(+), 68 deletions(-) diff --git a/plugins/Toolbox/resources/qml/ToolboxDownloadsGrid.qml b/plugins/Toolbox/resources/qml/ToolboxDownloadsGrid.qml index cf67466514..06a6ba30fb 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDownloadsGrid.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDownloadsGrid.qml @@ -1,7 +1,7 @@ // Copyright (c) 2018 Ultimaker B.V. // Toolbox is released under the terms of the LGPLv3 or higher. -import QtQuick 2.2 +import QtQuick 2.7 import QtQuick.Controls 1.4 import QtQuick.Controls.Styles 1.4 import QtQuick.Layouts 1.3 @@ -9,10 +9,10 @@ import UM 1.1 as UM Column { - height: childrenRect.height + height: childrenRect.height + 2 * padding width: parent.width spacing: UM.Theme.getSize("default_margin").height - + padding: UM.Theme.getSize("wide_margin").height Label { id: heading diff --git a/plugins/Toolbox/resources/qml/ToolboxDownloadsPage.qml b/plugins/Toolbox/resources/qml/ToolboxDownloadsPage.qml index d52bd48d39..9dd64aacfe 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDownloadsPage.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDownloadsPage.qml @@ -15,22 +15,15 @@ ScrollView flickableItem.flickableDirection: Flickable.VerticalFlick Column { - width: parent.width - 2 * padding + width: base.width spacing: UM.Theme.getSize("default_margin").height - padding: UM.Theme.getSize("wide_margin").height - height: childrenRect.height + 2 * padding + height: childrenRect.height ToolboxDownloadsShowcase { id: showcase width: parent.width } - Rectangle - { - color: UM.Theme.getColor("lining") - width: parent.width - height: UM.Theme.getSize("default_lining").height - } ToolboxDownloadsGrid { diff --git a/plugins/Toolbox/resources/qml/ToolboxDownloadsShowcase.qml b/plugins/Toolbox/resources/qml/ToolboxDownloadsShowcase.qml index 5a8128b51e..46f5debfdd 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDownloadsShowcase.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDownloadsShowcase.qml @@ -1,46 +1,53 @@ // Copyright (c) 2018 Ultimaker B.V. // Toolbox is released under the terms of the LGPLv3 or higher. -import QtQuick 2.2 +import QtQuick 2.7 import QtQuick.Controls 1.4 import QtQuick.Controls.Styles 1.4 import UM 1.1 as UM -Column +Rectangle { + color: UM.Theme.getColor("secondary") height: childrenRect.height - spacing: UM.Theme.getSize("toolbox_showcase_spacing").width width: parent.width - Label + Column { - id: heading - text: catalog.i18nc("@label", "Featured") + height: childrenRect.height + 2 * padding + spacing: UM.Theme.getSize("toolbox_showcase_spacing").width width: parent.width - color: UM.Theme.getColor("text_medium") - font: UM.Theme.getFont("medium") - } - Grid - { - height: childrenRect.height - spacing: UM.Theme.getSize("wide_margin").width - columns: 3 - anchors + padding: UM.Theme.getSize("wide_margin").height + Label { - horizontalCenter: parent.horizontalCenter + id: heading + text: catalog.i18nc("@label", "Featured") + width: parent.width + color: UM.Theme.getColor("text_medium") + font: UM.Theme.getFont("medium") } - Repeater + Grid { - model: { - if ( toolbox.viewCategory == "plugin" ) - { - return toolbox.pluginsShowcaseModel - } - if ( toolbox.viewCategory == "material" ) - { - return toolbox.materialsShowcaseModel - } + height: childrenRect.height + spacing: UM.Theme.getSize("wide_margin").width + columns: 3 + anchors + { + horizontalCenter: parent.horizontalCenter + } + Repeater + { + model: { + if ( toolbox.viewCategory == "plugin" ) + { + return toolbox.pluginsShowcaseModel + } + if ( toolbox.viewCategory == "material" ) + { + return toolbox.materialsShowcaseModel + } + } + delegate: ToolboxDownloadsShowcaseTile {} } - delegate: ToolboxDownloadsShowcaseTile {} } } } diff --git a/plugins/Toolbox/resources/qml/ToolboxDownloadsShowcaseTile.qml b/plugins/Toolbox/resources/qml/ToolboxDownloadsShowcaseTile.qml index f665404df7..561b2b4046 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDownloadsShowcaseTile.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDownloadsShowcaseTile.qml @@ -1,37 +1,31 @@ // Copyright (c) 2018 Ultimaker B.V. // Toolbox is released under the terms of the LGPLv3 or higher. -import QtQuick 2.3 +import QtQuick 2.7 import QtQuick.Controls 1.4 import QtQuick.Controls.Styles 1.4 +import QtGraphicalEffects 1.0 import UM 1.1 as UM -Item +Rectangle { - width: UM.Theme.getSize("toolbox_thumbnail_large").width - height: thumbnail.height + packageName.height - Rectangle - { - id: highlight - anchors.fill: parent - opacity: 0.0 - color: UM.Theme.getColor("primary") - } + 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) + border.width: UM.Theme.getSize("default_lining").width + border.color: UM.Theme.getColor("lining") + color: "transparent" Rectangle { id: thumbnail color: "white" width: UM.Theme.getSize("toolbox_thumbnail_large").width height: UM.Theme.getSize("toolbox_thumbnail_large").height - border - { - width: UM.Theme.getSize("default_lining").width - color: UM.Theme.getColor("lining") - } anchors { top: parent.top horizontalCenter: parent.horizontalCenter + topMargin: UM.Theme.getSize("default_lining").width } Image { @@ -43,22 +37,33 @@ Item mipmap: true } } - Label + Rectangle { - id: packageName - text: model.name + id: packageNameBackground + color: UM.Theme.getColor("primary") anchors { top: thumbnail.bottom horizontalCenter: parent.horizontalCenter } - verticalAlignment: Text.AlignVCenter - horizontalAlignment: Text.AlignHCenter height: UM.Theme.getSize("toolbox_heading_label").height width: parent.width - wrapMode: Text.WordWrap - color: UM.Theme.getColor("text") - font: UM.Theme.getFont("medium_bold") + Label + { + id: packageName + text: model.name + anchors + { + horizontalCenter: parent.horizontalCenter + } + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignHCenter + height: UM.Theme.getSize("toolbox_heading_label").height + width: parent.width + wrapMode: Text.WordWrap + color: UM.Theme.getColor("button_text") + font: UM.Theme.getFont("medium_bold") + } } MouseArea { @@ -66,13 +71,15 @@ Item hoverEnabled: true onEntered: { - thumbnail.border.color = UM.Theme.getColor("primary") - highlight.opacity = 0.1 + packageName.color = UM.Theme.getColor("button_text_hover") + packageNameBackground.color = UM.Theme.getColor("primary_hover") + tileBase.border.color = UM.Theme.getColor("primary_hover") } onExited: { - thumbnail.border.color = UM.Theme.getColor("lining") - highlight.opacity = 0.0 + packageName.color = UM.Theme.getColor("button_text") + packageNameBackground.color = UM.Theme.getColor("primary") + tileBase.border.color = UM.Theme.getColor("lining") } onClicked: { diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index 4d75ecc1f1..a087a489eb 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -443,7 +443,7 @@ "toolbox_thumbnail_small": [6.0, 6.0], "toolbox_thumbnail_medium": [8.0, 8.0], - "toolbox_thumbnail_large": [12.0, 12.0], + "toolbox_thumbnail_large": [12.0, 10.0], "toolbox_footer": [1.0, 4.5], "toolbox_footer_button": [8.0, 2.5], "toolbox_showcase_spacing": [1.0, 1.0], From 2e3528d9b25b7b3a76cdbb145de955b5d1826bd2 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Tue, 3 Jul 2018 15:58:53 +0200 Subject: [PATCH 06/38] Add dummy details for when there is no selection CURA-5521 --- .../Toolbox/resources/qml/ToolboxAuthorPage.qml | 11 ++++++++++- .../Toolbox/resources/qml/ToolboxDetailPage.qml | 14 +++++++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml b/plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml index 04b055ed66..d2f75936d1 100644 --- a/plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml +++ b/plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml @@ -9,8 +9,17 @@ import UM 1.1 as UM Item { id: page - property var details: base.selection || {} + property var details: base.selection || dummy_details anchors.fill: parent + + property var dummy_details: new Object({ + name: "", + description: "", + email: "", + website: "", + icon_url: "" + }) + ToolboxBackColumn { id: sidebar diff --git a/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml b/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml index 4c6c8c6ba4..f7c329a67b 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml @@ -9,9 +9,21 @@ import UM 1.1 as UM Item { id: page - property var details: base.selection + property var details: base.selection || dummy_details anchors.fill: parent width: parent.width + + property var dummy_details: new Object({ + name: '', + version: '', + last_updated: '', + author_email: '', + author_name: '', + website: '', + icon_url: '', + download_count: '' + }) + ToolboxBackColumn { id: sidebar From f91b6faeccbe8fa17441332d1ad7d0fb2ca19d26 Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Tue, 3 Jul 2018 17:57:30 +0200 Subject: [PATCH 07/38] Fix code-styling --- cura/CuraApplication.py | 4 +++- cura/Settings/CuraContainerStack.py | 2 +- cura/SingleInstance.py | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 8f738d8937..845ed0325f 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -1518,7 +1518,9 @@ class CuraApplication(QtApplication): @pyqtSlot("QSize") def setMinimumWindowSize(self, size): - self.getMainWindow().setMinimumSize(size) + main_window = self.getMainWindow() + if main_window: + main_window.setMinimumSize(size) def getBuildVolume(self): return self._volume diff --git a/cura/Settings/CuraContainerStack.py b/cura/Settings/CuraContainerStack.py index 4b1ab7c19a..667b468bc0 100755 --- a/cura/Settings/CuraContainerStack.py +++ b/cura/Settings/CuraContainerStack.py @@ -48,7 +48,7 @@ class CuraContainerStack(ContainerStack): self._empty_material = self._container_registry.findInstanceContainers(id = "empty_material")[0] #type: InstanceContainer self._empty_variant = self._container_registry.findInstanceContainers(id = "empty_variant")[0] #type: InstanceContainer - self._containers = [self._empty_instance_container for i in range(len(_ContainerIndexes.IndexTypeMap))] #type: List[Union[InstanceContainer, DefinitionContainer]] + self._containers = [self._empty_instance_container for i in range(len(_ContainerIndexes.IndexTypeMap))] #type: List[ContainerInterface] self._containers[_ContainerIndexes.QualityChanges] = self._empty_quality_changes self._containers[_ContainerIndexes.Quality] = self._empty_quality self._containers[_ContainerIndexes.Material] = self._empty_material diff --git a/cura/SingleInstance.py b/cura/SingleInstance.py index 8109123df5..cf07b143c6 100644 --- a/cura/SingleInstance.py +++ b/cura/SingleInstance.py @@ -95,7 +95,9 @@ class SingleInstance: elif command == "focus": # Operating systems these days prevent windows from moving around by themselves. # 'alert' or flashing the icon in the taskbar is the best thing we do now. - self._application.callLater(lambda: self._application.getMainWindow().alert(0)) + main_window = self._application.getMainWindow() + if main_window is not None: + self._application.callLater(lambda: main_window.alert(0)) # type: ignore # I don't know why MyPy complains here # Command: Close the socket connection. We're done. elif command == "close-connection": From 7d30cee205e60a54aad86f0aeb7289a0b3096a82 Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Wed, 4 Jul 2018 11:36:56 +0200 Subject: [PATCH 08/38] Revert "Add dummy details for when there is no selection" This reverts commit 2e3528d9b25b7b3a76cdbb145de955b5d1826bd2. --- .../Toolbox/resources/qml/ToolboxAuthorPage.qml | 11 +---------- .../Toolbox/resources/qml/ToolboxDetailPage.qml | 14 +------------- 2 files changed, 2 insertions(+), 23 deletions(-) diff --git a/plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml b/plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml index d2f75936d1..04b055ed66 100644 --- a/plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml +++ b/plugins/Toolbox/resources/qml/ToolboxAuthorPage.qml @@ -9,17 +9,8 @@ import UM 1.1 as UM Item { id: page - property var details: base.selection || dummy_details + property var details: base.selection || {} anchors.fill: parent - - property var dummy_details: new Object({ - name: "", - description: "", - email: "", - website: "", - icon_url: "" - }) - ToolboxBackColumn { id: sidebar diff --git a/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml b/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml index f7c329a67b..4c6c8c6ba4 100644 --- a/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml +++ b/plugins/Toolbox/resources/qml/ToolboxDetailPage.qml @@ -9,21 +9,9 @@ import UM 1.1 as UM Item { id: page - property var details: base.selection || dummy_details + property var details: base.selection anchors.fill: parent width: parent.width - - property var dummy_details: new Object({ - name: '', - version: '', - last_updated: '', - author_email: '', - author_name: '', - website: '', - icon_url: '', - download_count: '' - }) - ToolboxBackColumn { id: sidebar From 5b251fc6dc57f68bf0ad439955d7589852b30cf2 Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Wed, 4 Jul 2018 12:00:38 +0200 Subject: [PATCH 09/38] 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 10/38] 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 11/38] 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 12/38] 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 13/38] 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 14/38] 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 15/38] 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 16/38] 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 17/38] 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 9e18bb8b4cec211b33be3684ee7efa42d45d82c9 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 4 Jul 2018 17:31:58 +0200 Subject: [PATCH 18/38] 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 19/38] 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 20/38] 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 21/38] 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 22/38] 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 23/38] 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 24/38] 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 25/38] 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 ef2250b88934fde2f9450ed0c984e23cc131b229 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 5 Jul 2018 12:31:42 +0200 Subject: [PATCH 26/38] 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 27/38] 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 28/38] 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 29/38] 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 30/38] 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 31/38] 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 32/38] 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 7b284355fb5939e40d0fdf3226a6a9b29390cee3 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 5 Jul 2018 15:24:55 +0200 Subject: [PATCH 33/38] 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 c0985bec2ae0c32f2c55e51e5ced6b28a0d2c060 Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Thu, 5 Jul 2018 15:32:43 +0200 Subject: [PATCH 34/38] 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 96896088c365b3e97cffcb0e2bb5f563da7097c1 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 5 Jul 2018 16:27:30 +0200 Subject: [PATCH 35/38] 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 afd3ce205a093ef3cecbf96edff70f2143ef0337 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 5 Jul 2018 20:19:40 +0200 Subject: [PATCH 36/38] 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 6977b8de6e39d8bd7feab8b10d23ffd755f4b76e Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 9 Jul 2018 09:01:52 +0200 Subject: [PATCH 37/38] 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 38/38] 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"