From a1243421275da295542e05c6f21a2ad5d3dd708f Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 16 Aug 2021 11:15:30 +0200 Subject: [PATCH 1/6] Fix Pause at height issue Fixes #8575 Thanks to @EGOiST1991 for suggesting the fix! --- plugins/PostProcessingPlugin/scripts/PauseAtHeight.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py index 5c28073fb1..e6ca36730a 100644 --- a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py +++ b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py @@ -491,7 +491,7 @@ class PauseAtHeight(Script): # Move the head back if current_z < 15: - prepend_gcode += self.putValue(G = 1, Z = current_z + 1, F = 300) + "\n" + prepend_gcode += self.putValue(G = 1, Z = current_z, 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, F = 300) + " ; move back down to resume height\n" if retraction_amount != 0: From e0e4a3f2c0f41d118dfba22ea04580d94a082863 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Mon, 16 Aug 2021 16:57:57 +0200 Subject: [PATCH 2/6] Add shadow behind the what's new pages As discussed during the eCCB. --- resources/qml/WelcomePages/WhatsNewContent.qml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/resources/qml/WelcomePages/WhatsNewContent.qml b/resources/qml/WelcomePages/WhatsNewContent.qml index 65989ee536..f5ce72997f 100644 --- a/resources/qml/WelcomePages/WhatsNewContent.qml +++ b/resources/qml/WelcomePages/WhatsNewContent.qml @@ -4,6 +4,7 @@ import QtQuick 2.10 import QtQuick.Controls 2.3 import QtQuick.Layouts 1.3 +import QtGraphicalEffects 1.12 // For the DropShadow import UM 1.3 as UM import Cura 1.1 as Cura @@ -91,6 +92,13 @@ Item source: manager.getSubpageImageSource(index) } + DropShadow { + anchors.fill: subpageImage + radius: UM.Theme.getSize("monitor_shadow_radius").width + color: UM.Theme.getColor("first_run_shadow") + source: subpageImage + } + Cura.ScrollableTextArea { id: subpageText From 33edc4a8c90c03a681b2b0eb3c495d257c9a9c42 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 17 Aug 2021 13:34:43 +0200 Subject: [PATCH 3/6] Fix display of unlinking button It was not being displayed with Qt 5.15 due to the following error: MaterialsView.qml:34:5: Unable to assign QStringList to QString This is correct. And it should not just concatenate all of these material names; it should add a comma between them for human-readable display in the text label above the button. Fixes #10235. --- resources/qml/Preferences/Materials/MaterialsView.qml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/qml/Preferences/Materials/MaterialsView.qml b/resources/qml/Preferences/Materials/MaterialsView.qml index 489ff1f33e..2c68973e55 100644 --- a/resources/qml/Preferences/Materials/MaterialsView.qml +++ b/resources/qml/Preferences/Materials/MaterialsView.qml @@ -39,14 +39,14 @@ TabView } if (!base.containerId || !base.editingEnabled || !base.currentMaterialNode) { - return "" + return ""; } var linkedMaterials = Cura.ContainerManager.getLinkedMaterials(base.currentMaterialNode, true); if (linkedMaterials.length == 0) { - return "" + return ""; } - return linkedMaterials; + return linkedMaterials.join(", "); } function getApproximateDiameter(diameter) From d87c7a70cbf5ead35a26b5320be01729925303ca Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 10 Aug 2021 17:12:09 +0200 Subject: [PATCH 4/6] Switch return order for Repetier pauseAtHeight While testing I noticed that the movement after the pause will first move the head down and then move to the position before the pause. This could result in noticeable artifacts or accidentally push thin towers from the bed.) See the code below. ```gcode ;TYPE:CUSTOM ;added code by post processing ;script: PauseAtHeight.py ;current z: 5 ;current height: 5.0 M83 ; switch to relative E values for any needed retraction G1 F300 Z6 ; move up a millimeter to get out of the way G1 F9000 X190 Y190 G1 F300 Z20.0 M84 E0 @pause now change filament and press ; Do the actual pause G1 F300 Z5 G1 F9000 X30.759 Y30.759 G1 F1800 ; restore extrusion feedrate ``` I have switched the lines in the script such that it will first move to the correct X, Y and then move down ```python prepend_gcode += self.putValue(G = 1, X = x, Y = y, F = 9000) + "\n" prepend_gcode += self.putValue(G = 1, Z = current_z, F = 300) + "\n" ``` As shown in the code below ```gcode ;TYPE:CUSTOM ;added code by post processing ;script: PauseAtHeight.py ;current z: 5 ;current height: 5.0 M83 ; switch to relative E values for any needed retraction G1 F300 Z6 ; move up a millimeter to get out of the way G1 F9000 X190 Y190 G1 F300 Z20.0 M84 E0 @pause now change filament and press ; Do the actual pause G1 F9000 X30.759 Y30.759 G1 F300 Z5 G1 F1800 ; restore extrusion feedrate ``` --- plugins/PostProcessingPlugin/scripts/PauseAtHeight.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py index e6ca36730a..f034a7b53d 100644 --- a/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py +++ b/plugins/PostProcessingPlugin/scripts/PauseAtHeight.py @@ -456,8 +456,8 @@ class PauseAtHeight(Script): prepend_gcode += self.putValue(G = 1, E = -retraction_amount, F = 6000) + "\n" #Move the head back - prepend_gcode += self.putValue(G = 1, Z = current_z, 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, F = 300) + "\n" if retraction_amount != 0: prepend_gcode += self.putValue(G = 1, E = retraction_amount, F = 6000) + "\n" From bbb1f0f0f3d3bd9ccd5138a0015e5062d45d1d0f Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Tue, 17 Aug 2021 15:32:21 +0200 Subject: [PATCH 5/6] Fix wrong icon mapping The deprecated icon "pencil" was being mapped to the new icon "Pencil" which is actually called "Pen". This commit also replaces tabs with spaces in the deprecated_icons.json. Fixes CURA-8488 --- .../cura-light/icons/deprecated_icons.json | 608 +++++++++--------- 1 file changed, 304 insertions(+), 304 deletions(-) diff --git a/resources/themes/cura-light/icons/deprecated_icons.json b/resources/themes/cura-light/icons/deprecated_icons.json index df286cffc7..8b71e063de 100644 --- a/resources/themes/cura-light/icons/deprecated_icons.json +++ b/resources/themes/cura-light/icons/deprecated_icons.json @@ -1,306 +1,306 @@ { - "notice": { - "new_icon": "Information", - "size": "default" - }, - "info": { - "new_icon": "Information", - "size": "default" - }, - "plus": { - "new_icon": "Plus", - "size": "default" - }, - "cross1": { - "new_icon": "Cancel", - "size": "default" - }, - "application": { - "new_icon": "UltimakerCura", - "size": "default" - }, - "printer_single": { - "new_icon": "Printer", - "size": "default" - }, - "category_material": { - "new_icon": "Spool", - "size": "default" - }, - "settings": { - "new_icon": "Sliders", - "size": "default" - }, - "plugin": { - "new_icon": "Plugin", - "size": "default" - }, - "external_link": { - "new_icon": "LinkExternal", - "size": "default" - }, - "arrow_top": { - "new_icon": "ChevronSingleUp", - "size": "default" - }, - "arrow_bottom": { - "new_icon": "ChevronSingleDown", - "size": "default" - }, - "arrow_right": { - "new_icon": "ChevronSingleRight", - "size": "default" - }, - "pos_normal": { - "new_icon": "Infill0", - "size": "default" - }, - "pos_print_as_support": { - "new_icon": "MeshTypeSupport", - "size": "default" - }, - "pos_modify_overlaps": { - "new_icon": "MeshTypeIntersect", - "size": "default" - }, - "pos_modify_dont_support_overlap": { - "new_icon": "BlockSupportOverlaps", - "size": "default" - }, - "minus": { - "new_icon": "Minus", - "size": "default" - }, - "load": { - "new_icon": "Folder", - "size": "default" - }, - "extruder_button": { - "new_icon": "Extruder", - "size": "medium" - }, - "category_adhesion": { - "new_icon": "Adhesion", - "size": "default" - }, - "category_machine": { - "new_icon": "Printer", - "size": "default" - }, - "category_layer_height": { - "new_icon": "PrintQuality", - "size": "default" - }, - "category_shell": { - "new_icon": "PrintShell", - "size": "default" - }, - "category_topbottom": { - "new_icon": "PrintTopBottom", - "size": "default" - }, - "category_infill": { - "new_icon": "Infill1", - "size": "default" - }, - "category_speed": { - "new_icon": "SpeedOMeter", - "size": "default" - }, - "category_travel": { - "new_icon": "PrintTravel", - "size": "default" - }, - "category_cool": { - "new_icon": "Fan", - "size": "default" - }, - "category_support": { - "new_icon": "Support", - "size": "default" - }, - "category_dual": { - "new_icon": "DualExtrusion", - "size": "default" - }, - "category_fixes": { - "new_icon": "Bandage", - "size": "default" - }, - "category_blackmagic": { - "new_icon": "BlackMagic", - "size": "default" - }, - "category_experimental": { - "new_icon": "Experiment", - "size": "default" - }, - "circle_outline": { - "new_icon": "CircleOutline", - "size": "default" - }, - "update": { - "new_icon": "ArrowDoubleCircleRight", - "size": "default" - }, - "checked": { - "new_icon": "CheckCircle", - "size": "default" - }, - "warning_light": { - "new_icon": "Warning", - "size": "default" - }, - "clock": { - "new_icon": "Clock", - "size": "default" - }, - "spool": { - "new_icon": "Spool", - "size": "default" - }, - "warning": { - "new_icon": "Warning", - "size": "default" - }, - "check": { - "new_icon": "Check", - "size": "default" - }, - "pencil": { - "new_icon": "Pencil", - "size": "default" - }, - "printing_guideline": { - "new_icon": "Guide", - "size": "default" - }, - "favorites_star_full": { - "new_icon": "StarFilled", - "size": "default" - }, - "favorites_star_empty": { - "new_icon": "Star", - "size": "default" - }, - "resize": { - "new_icon": "ThreeDots", - "size": "default" - }, - "gradual": { - "new_icon": "InfillGradual", - "size": "default" - }, - "hollow": { - "new_icon": "Infill0", - "size": "default" - }, - "sparse": { - "new_icon": "Infill3", - "size": "default" - }, - "dense": { - "new_icon": "Infill2", - "size": "default" - }, - "solid": { - "new_icon": "Solid", - "size": "default" - }, - "reset": { - "new_icon": "ArrowReset", - "size": "default" - }, - "arrow_left": { - "new_icon": "ChevronSingleLeft", - "size": "default" - }, - "home": { - "new_icon": "House", - "size": "default" - }, - "printer_group": { - "new_icon": "PrinterTriple", - "size": "medium" - }, - "formula": { - "new_icon": "Function", - "size": "default" - }, - "search": { - "new_icon": "Magnifier", - "size": "default" - }, - "menu": { - "new_icon": "Hamburger", - "size": "default" - }, - "view_3d": { - "new_icon": "View3D", - "size": "default" - }, - "view_layer": { - "new_icon": "Layers", - "size": "default" - }, - "view_front": { - "new_icon": "ViewFront", - "size": "default" - }, - "view_top": { - "new_icon": "ViewTop", - "size": "default" - }, - "view_left": { - "new_icon": "ViewLeft", - "size": "default" - }, - "view_right": { - "new_icon": "ViewRight", - "size": "default" - }, - "package": { - "new_icon": "Plugin", - "size": "default" - }, - "material_spool": { - "new_icon": "Spool", - "size": "default" - }, - "dot": { - "new_icon": "Dot", - "size": "low" - }, - "mirror": { - "new_icon": "Mirror", - "size": "default" - }, - "rotate_reset": { - "new_icon": "ArrowReset", - "size": "default" - }, - "rotate_layflat": { - "new_icon": "LayFlat", - "size": "default" - }, - "rotate_face_layflat": { - "new_icon": "LayFlatOnFace", - "size": "default" - }, - "rotate": { - "new_icon": "Rotate", - "size": "default" - }, - "scale_reset": { - "new_icon": "ArrowReset", - "size": "default" - }, - "scale": { - "new_icon": "Scale", - "size": "default" - }, - "translate": { - "new_icon": "ArrowFourWay", - "size": "default" - } + "notice": { + "new_icon": "Information", + "size": "default" + }, + "info": { + "new_icon": "Information", + "size": "default" + }, + "plus": { + "new_icon": "Plus", + "size": "default" + }, + "cross1": { + "new_icon": "Cancel", + "size": "default" + }, + "application": { + "new_icon": "UltimakerCura", + "size": "default" + }, + "printer_single": { + "new_icon": "Printer", + "size": "default" + }, + "category_material": { + "new_icon": "Spool", + "size": "default" + }, + "settings": { + "new_icon": "Sliders", + "size": "default" + }, + "plugin": { + "new_icon": "Plugin", + "size": "default" + }, + "external_link": { + "new_icon": "LinkExternal", + "size": "default" + }, + "arrow_top": { + "new_icon": "ChevronSingleUp", + "size": "default" + }, + "arrow_bottom": { + "new_icon": "ChevronSingleDown", + "size": "default" + }, + "arrow_right": { + "new_icon": "ChevronSingleRight", + "size": "default" + }, + "pos_normal": { + "new_icon": "Infill0", + "size": "default" + }, + "pos_print_as_support": { + "new_icon": "MeshTypeSupport", + "size": "default" + }, + "pos_modify_overlaps": { + "new_icon": "MeshTypeIntersect", + "size": "default" + }, + "pos_modify_dont_support_overlap": { + "new_icon": "BlockSupportOverlaps", + "size": "default" + }, + "minus": { + "new_icon": "Minus", + "size": "default" + }, + "load": { + "new_icon": "Folder", + "size": "default" + }, + "extruder_button": { + "new_icon": "Extruder", + "size": "medium" + }, + "category_adhesion": { + "new_icon": "Adhesion", + "size": "default" + }, + "category_machine": { + "new_icon": "Printer", + "size": "default" + }, + "category_layer_height": { + "new_icon": "PrintQuality", + "size": "default" + }, + "category_shell": { + "new_icon": "PrintShell", + "size": "default" + }, + "category_topbottom": { + "new_icon": "PrintTopBottom", + "size": "default" + }, + "category_infill": { + "new_icon": "Infill1", + "size": "default" + }, + "category_speed": { + "new_icon": "SpeedOMeter", + "size": "default" + }, + "category_travel": { + "new_icon": "PrintTravel", + "size": "default" + }, + "category_cool": { + "new_icon": "Fan", + "size": "default" + }, + "category_support": { + "new_icon": "Support", + "size": "default" + }, + "category_dual": { + "new_icon": "DualExtrusion", + "size": "default" + }, + "category_fixes": { + "new_icon": "Bandage", + "size": "default" + }, + "category_blackmagic": { + "new_icon": "BlackMagic", + "size": "default" + }, + "category_experimental": { + "new_icon": "Experiment", + "size": "default" + }, + "circle_outline": { + "new_icon": "CircleOutline", + "size": "default" + }, + "update": { + "new_icon": "ArrowDoubleCircleRight", + "size": "default" + }, + "checked": { + "new_icon": "CheckCircle", + "size": "default" + }, + "warning_light": { + "new_icon": "Warning", + "size": "default" + }, + "clock": { + "new_icon": "Clock", + "size": "default" + }, + "spool": { + "new_icon": "Spool", + "size": "default" + }, + "warning": { + "new_icon": "Warning", + "size": "default" + }, + "check": { + "new_icon": "Check", + "size": "default" + }, + "pencil": { + "new_icon": "Pen", + "size": "default" + }, + "printing_guideline": { + "new_icon": "Guide", + "size": "default" + }, + "favorites_star_full": { + "new_icon": "StarFilled", + "size": "default" + }, + "favorites_star_empty": { + "new_icon": "Star", + "size": "default" + }, + "resize": { + "new_icon": "ThreeDots", + "size": "default" + }, + "gradual": { + "new_icon": "InfillGradual", + "size": "default" + }, + "hollow": { + "new_icon": "Infill0", + "size": "default" + }, + "sparse": { + "new_icon": "Infill3", + "size": "default" + }, + "dense": { + "new_icon": "Infill2", + "size": "default" + }, + "solid": { + "new_icon": "Solid", + "size": "default" + }, + "reset": { + "new_icon": "ArrowReset", + "size": "default" + }, + "arrow_left": { + "new_icon": "ChevronSingleLeft", + "size": "default" + }, + "home": { + "new_icon": "House", + "size": "default" + }, + "printer_group": { + "new_icon": "PrinterTriple", + "size": "medium" + }, + "formula": { + "new_icon": "Function", + "size": "default" + }, + "search": { + "new_icon": "Magnifier", + "size": "default" + }, + "menu": { + "new_icon": "Hamburger", + "size": "default" + }, + "view_3d": { + "new_icon": "View3D", + "size": "default" + }, + "view_layer": { + "new_icon": "Layers", + "size": "default" + }, + "view_front": { + "new_icon": "ViewFront", + "size": "default" + }, + "view_top": { + "new_icon": "ViewTop", + "size": "default" + }, + "view_left": { + "new_icon": "ViewLeft", + "size": "default" + }, + "view_right": { + "new_icon": "ViewRight", + "size": "default" + }, + "package": { + "new_icon": "Plugin", + "size": "default" + }, + "material_spool": { + "new_icon": "Spool", + "size": "default" + }, + "dot": { + "new_icon": "Dot", + "size": "low" + }, + "mirror": { + "new_icon": "Mirror", + "size": "default" + }, + "rotate_reset": { + "new_icon": "ArrowReset", + "size": "default" + }, + "rotate_layflat": { + "new_icon": "LayFlat", + "size": "default" + }, + "rotate_face_layflat": { + "new_icon": "LayFlatOnFace", + "size": "default" + }, + "rotate": { + "new_icon": "Rotate", + "size": "default" + }, + "scale_reset": { + "new_icon": "ArrowReset", + "size": "default" + }, + "scale": { + "new_icon": "Scale", + "size": "default" + }, + "translate": { + "new_icon": "ArrowFourWay", + "size": "default" + } } \ No newline at end of file From e5856bf6bc0abe3f79b94558302b2018906ab682 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Tue, 17 Aug 2021 15:52:12 +0200 Subject: [PATCH 6/6] Log the connection error message produced by the request --- cura/OAuth2/AuthorizationHelpers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cura/OAuth2/AuthorizationHelpers.py b/cura/OAuth2/AuthorizationHelpers.py index 5b95b3a3bb..df3fc366ba 100644 --- a/cura/OAuth2/AuthorizationHelpers.py +++ b/cura/OAuth2/AuthorizationHelpers.py @@ -48,8 +48,8 @@ class AuthorizationHelpers: } try: return self.parseTokenResponse(requests.post(self._token_url, data = data)) # type: ignore - except requests.exceptions.ConnectionError: - return AuthenticationResponse(success=False, err_message="Unable to connect to remote server") + except requests.exceptions.ConnectionError as connection_error: + return AuthenticationResponse(success = False, err_message = f"Unable to connect to remote server: {connection_error}") def getAccessTokenUsingRefreshToken(self, refresh_token: str) -> "AuthenticationResponse": """Request the access token from the authorization server using a refresh token.