From d87c7a70cbf5ead35a26b5320be01729925303ca Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Tue, 10 Aug 2021 17:12:09 +0200 Subject: [PATCH 1/3] 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 2/3] 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 3/3] 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.