From 0bf6b457ddd4214efaf3e4fc96f942e239e2a28c Mon Sep 17 00:00:00 2001 From: Dan Podhola Date: Sat, 18 Apr 2020 13:20:07 -0700 Subject: [PATCH 01/22] Changed M420 to G29 to stop the machine from auto-homing and inadvertantly drawing a triangle --- resources/definitions/creality_cr10spro.def.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/definitions/creality_cr10spro.def.json b/resources/definitions/creality_cr10spro.def.json index 28c8dda0a5..62557f3823 100644 --- a/resources/definitions/creality_cr10spro.def.json +++ b/resources/definitions/creality_cr10spro.def.json @@ -4,7 +4,7 @@ "inherits": "creality_cr10", "overrides": { "machine_name": { "default_value": "Creality CR-10S Pro" }, - "machine_start_gcode": { "default_value": "M201 X500.00 Y500.00 Z100.00 E5000.00 ;Setup machine max acceleration\nM203 X500.00 Y500.00 Z10.00 E50.00 ;Setup machine max feedrate\nM204 P500.00 R1000.00 T500.00 ;Setup Print/Retract/Travel acceleration\nM205 X8.00 Y8.00 Z0.40 E5.00 ;Setup Jerk\nM220 S100 ;Reset Feedrate\nM221 S100 ;Reset Flowrate\n\nG28 ;Home\nM420 S1 Z2 ;Enable ABL using saved Mesh and Fade Height\n\nG92 E0 ;Reset Extruder\nG1 Z2.0 F3000 ;Move Z Axis up\nG1 X10.1 Y20 Z0.28 F5000.0 ;Move to start position\nG1 X10.1 Y200.0 Z0.28 F1500.0 E15 ;Draw the first line\nG1 X10.4 Y200.0 Z0.28 F5000.0 ;Move to side a little\nG1 X10.4 Y20 Z0.28 F1500.0 E30 ;Draw the second line\nG92 E0 ;Reset Extruder\nG1 Z2.0 F3000 ;Move Z Axis up\n"}, + "machine_start_gcode": { "default_value": "M201 X500.00 Y500.00 Z100.00 E5000.00 ;Setup machine max acceleration\nM203 X500.00 Y500.00 Z10.00 E50.00 ;Setup machine max feedrate\nM204 P500.00 R1000.00 T500.00 ;Setup Print/Retract/Travel acceleration\nM205 X8.00 Y8.00 Z0.40 E5.00 ;Setup Jerk\nM220 S100 ;Reset Feedrate\nM221 S100 ;Reset Flowrate\n\nG28 ;Home\nG29 ;Auto bed Level\n\nG92 E0 ;Reset Extruder\nG1 Z2.0 F3000 ;Move Z Axis up\nG1 X10.1 Y20 Z0.28 F5000.0 ;Move to start position\nG1 X10.1 Y200.0 Z0.28 F1500.0 E15 ;Draw the first line\nG1 X10.4 Y200.0 Z0.28 F5000.0 ;Move to side a little\nG1 X10.4 Y20 Z0.28 F1500.0 E30 ;Draw the second line\nG92 E0 ;Reset Extruder\nG1 Z2.0 F3000 ;Move Z Axis up\n"}, "machine_head_with_fans_polygon": { "default_value": [ [-44, 34], [-44, -34], @@ -21,4 +21,4 @@ "platform": "creality_cr10spro.stl", "platform_offset": [ -150, 0, 150] } -} \ No newline at end of file +} From 7377dd551c6ac3f7fd21468a3b0cbe978c5d2f89 Mon Sep 17 00:00:00 2001 From: Kostas Karmas Date: Mon, 20 Apr 2020 15:04:53 +0200 Subject: [PATCH 02/22] Rearrange welcome pages in first run wizard Sign in to Ultimaker Cloud page will now appear before the add printer page. CURA-7019 --- cura/UI/WelcomePagesModel.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cura/UI/WelcomePagesModel.py b/cura/UI/WelcomePagesModel.py index c16ec3763e..429e8b2665 100644 --- a/cura/UI/WelcomePagesModel.py +++ b/cura/UI/WelcomePagesModel.py @@ -243,6 +243,9 @@ class WelcomePagesModel(ListModel): {"id": "data_collections", "page_url": self._getBuiltinWelcomePagePath("DataCollectionsContent.qml"), }, + {"id": "cloud", + "page_url": self._getBuiltinWelcomePagePath("CloudContent.qml"), + }, {"id": "add_network_or_local_printer", "page_url": self._getBuiltinWelcomePagePath("AddNetworkOrLocalPrinterContent.qml"), "next_page_id": "machine_actions", @@ -253,12 +256,8 @@ class WelcomePagesModel(ListModel): }, {"id": "machine_actions", "page_url": self._getBuiltinWelcomePagePath("FirstStartMachineActionsContent.qml"), - "next_page_id": "cloud", "should_show_function": self.shouldShowMachineActions, }, - {"id": "cloud", - "page_url": self._getBuiltinWelcomePagePath("CloudContent.qml"), - }, ] pages_to_show = all_pages_list From 7b464e5550b08d3e88da417ae638f00ca38c4bb4 Mon Sep 17 00:00:00 2001 From: Kostas Karmas Date: Mon, 20 Apr 2020 15:06:31 +0200 Subject: [PATCH 03/22] Close welcome wizard when user has cloud printers If the user signs in during the welcome process, if he/she has cloud printers connected to his/her account, then the welcome wizard will close so that the user will not be asked to add local printers. CURA-7019 --- .../src/Cloud/CloudOutputDeviceManager.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py b/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py index ccc64f8073..61506693a9 100644 --- a/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py +++ b/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py @@ -88,6 +88,14 @@ class CloudOutputDeviceManager: ## Callback for when the request for getting the clusters is finished. def _onGetRemoteClustersFinished(self, clusters: List[CloudClusterResponse]) -> None: online_clusters = {c.cluster_id: c for c in clusters if c.is_online} # type: Dict[str, CloudClusterResponse] + + # If the user signs in from the welcome dialog, then we will search for cloud printers and if any of them are + # found, the welcome screen will close. This way we avoid prompting the user to add printers if he/she already + # has cloud printers + welcome_pages_model = CuraApplication.getInstance().getWelcomePagesModel() + cloud_page_idx = welcome_pages_model.getPageIndexById("cloud") + if welcome_pages_model.currentPageIndex == cloud_page_idx and online_clusters: + CuraApplication.getWelcomePagesModel().atEnd() for device_id, cluster_data in online_clusters.items(): if device_id not in self._remote_clusters: self._onDeviceDiscovered(cluster_data) From cac834b101bd5d1e5e39c9c543884310f4130dc3 Mon Sep 17 00:00:00 2001 From: Kostas Karmas Date: Mon, 20 Apr 2020 15:12:40 +0200 Subject: [PATCH 04/22] Refactor "Ultimaker Cloud" page in welcome wizard The following changes have been done: - Text content changed - "Sign in" and "Create an account" buttons moved in the middle, under the main text - "Sign in" button changed to PrimaryButton format - "Finish" button changed to "Skip" - "Skip" button format changed CURA-7019 --- resources/qml/WelcomePages/CloudContent.qml | 72 ++++++++++++--------- 1 file changed, 42 insertions(+), 30 deletions(-) diff --git a/resources/qml/WelcomePages/CloudContent.qml b/resources/qml/WelcomePages/CloudContent.qml index b127dbfb3c..9f262c50ed 100644 --- a/resources/qml/WelcomePages/CloudContent.qml +++ b/resources/qml/WelcomePages/CloudContent.qml @@ -33,7 +33,7 @@ Item anchors.top: parent.top anchors.horizontalCenter: parent.horizontalCenter horizontalAlignment: Text.AlignHCenter - text: catalog.i18nc("@label", "Ultimaker Account") + text: catalog.i18nc("@label", "Sign in to Ultimaker Cloud") color: UM.Theme.getColor("primary_button") font: UM.Theme.getFont("huge") renderType: Text.NativeRendering @@ -46,7 +46,7 @@ Item anchors { top: titleLabel.bottom - bottom: finishButton.top + bottom: nextButton.top left: parent.left right: parent.right topMargin: UM.Theme.getSize("default_margin").height @@ -74,7 +74,7 @@ Item id: highlightTextLabel anchors.horizontalCenter: parent.horizontalCenter horizontalAlignment: Text.AlignHCenter - text: catalog.i18nc("@text", "Your key to connected 3D printing") + text: catalog.i18nc("@text", "The next generation 3D printing workflow") textFormat: Text.RichText color: UM.Theme.getColor("primary") font: UM.Theme.getFont("medium") @@ -91,13 +91,13 @@ Item var full_text = "" var t = "" - t = catalog.i18nc("@text", "- Customize your experience with more print profiles and plugins") + t = catalog.i18nc("@text", "- Send print jobs to Ultimaker printers outside of your local network") full_text += "

" + t + "

" - t = catalog.i18nc("@text", "- Stay flexible by syncing your setup and loading it anywhere") + t = catalog.i18nc("@text", "- Store your Ultimaker Cura settings in the cloud to use anywhere") full_text += "

" + t + "

" - t = catalog.i18nc("@text", "- Increase efficiency with a remote workflow on Ultimaker printers") + t = catalog.i18nc("@text", "- Get exclusive access to material profiles from leading brands") full_text += "

" + t + "

" return full_text @@ -107,35 +107,47 @@ Item color: UM.Theme.getColor("text") renderType: Text.NativeRendering } + + // "Sign in" and "Create an account" exist inside the column + Cura.PrimaryButton + { + id: signInButton + height: createAccountButton.height + width: createAccountButton.width + anchors.horizontalCenter: parent.horizontalCenter + text: catalog.i18nc("@button", "Sign in") + onClicked: Cura.API.account.login() + // Content Item is used in order to align the text inside the button. Without it, when resizing the + // button, the text will be aligned on the left + contentItem: Text { + text: signInButton.text + font: UM.Theme.getFont("medium") + color: UM.Theme.getColor("primary_text") + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + } + } + + Cura.SecondaryButton + { + id: createAccountButton + anchors.horizontalCenter: parent.horizontalCenter + text: catalog.i18nc("@button","Create an account") + onClicked: Qt.openUrlExternally(CuraApplication.ultimakerCloudAccountRootUrl + "/app/create") + } } + + } - // Bottom buttons go here - Cura.PrimaryButton - { - id: finishButton - anchors.right: parent.right - anchors.bottom: parent.bottom - text: catalog.i18nc("@button", "Finish") - onClicked: base.showNextPage() - } - - Cura.SecondaryButton - { - id: createAccountButton - anchors.left: parent.left - anchors.verticalCenter: finishButton.verticalCenter - text: catalog.i18nc("@button", "Create an account") - onClicked: Qt.openUrlExternally(CuraApplication.ultimakerCloudAccountRootUrl + "/app/create") - } - + // The "Next" button exists on the bottom right Label { - id: signInButton - anchors.left: createAccountButton.right - anchors.verticalCenter: finishButton.verticalCenter + id: nextButton + anchors.right: parent.right + anchors.bottom: parent.bottom anchors.leftMargin: UM.Theme.getSize("default_margin").width - text: catalog.i18nc("@button", "Sign in") + text: catalog.i18nc("@button", "Skip") color: UM.Theme.getColor("secondary_button_text") font: UM.Theme.getFont("medium") renderType: Text.NativeRendering @@ -144,7 +156,7 @@ Item { anchors.fill: parent hoverEnabled: true - onClicked: Cura.API.account.login() + onClicked: base.showNextPage() onEntered: parent.font.underline = true onExited: parent.font.underline = false } From ca2962aa123e554622396fe77a5c831ddfc701b5 Mon Sep 17 00:00:00 2001 From: Kostas Karmas Date: Tue, 21 Apr 2020 09:46:22 +0200 Subject: [PATCH 05/22] Revert text to the correct one CURA-7019 --- resources/qml/WelcomePages/CloudContent.qml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/resources/qml/WelcomePages/CloudContent.qml b/resources/qml/WelcomePages/CloudContent.qml index 9f262c50ed..f0eadea9ff 100644 --- a/resources/qml/WelcomePages/CloudContent.qml +++ b/resources/qml/WelcomePages/CloudContent.qml @@ -33,7 +33,7 @@ Item anchors.top: parent.top anchors.horizontalCenter: parent.horizontalCenter horizontalAlignment: Text.AlignHCenter - text: catalog.i18nc("@label", "Sign in to Ultimaker Cloud") + text: catalog.i18nc("@label", "Ultimaker Account") color: UM.Theme.getColor("primary_button") font: UM.Theme.getFont("huge") renderType: Text.NativeRendering @@ -74,7 +74,7 @@ Item id: highlightTextLabel anchors.horizontalCenter: parent.horizontalCenter horizontalAlignment: Text.AlignHCenter - text: catalog.i18nc("@text", "The next generation 3D printing workflow") + text: catalog.i18nc("@text", "Your key to connected 3D printing") textFormat: Text.RichText color: UM.Theme.getColor("primary") font: UM.Theme.getFont("medium") @@ -91,13 +91,13 @@ Item var full_text = "" var t = "" - t = catalog.i18nc("@text", "- Send print jobs to Ultimaker printers outside of your local network") + t = catalog.i18nc("@text", "- Customize your experience with more print profiles and plugins") full_text += "

" + t + "

" - t = catalog.i18nc("@text", "- Store your Ultimaker Cura settings in the cloud to use anywhere") + t = catalog.i18nc("@text", "- Stay flexible by syncing your setup and loading it anywhere") full_text += "

" + t + "

" - t = catalog.i18nc("@text", "- Get exclusive access to material profiles from leading brands") + t = catalog.i18nc("@text", "- Increase efficiency with a remote workflow on Ultimaker printers") full_text += "

" + t + "

" return full_text @@ -132,7 +132,7 @@ Item { id: createAccountButton anchors.horizontalCenter: parent.horizontalCenter - text: catalog.i18nc("@button","Create an account") + text: catalog.i18nc("@button","Create account") onClicked: Qt.openUrlExternally(CuraApplication.ultimakerCloudAccountRootUrl + "/app/create") } } From b4909e88ef6f06b2766a26619a82225353f26f81 Mon Sep 17 00:00:00 2001 From: Kostas Karmas Date: Tue, 21 Apr 2020 10:34:54 +0200 Subject: [PATCH 06/22] Rename "Next" button to "Skip" CURA-7019 --- resources/qml/WelcomePages/CloudContent.qml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/qml/WelcomePages/CloudContent.qml b/resources/qml/WelcomePages/CloudContent.qml index f0eadea9ff..cc24fdd7b4 100644 --- a/resources/qml/WelcomePages/CloudContent.qml +++ b/resources/qml/WelcomePages/CloudContent.qml @@ -46,7 +46,7 @@ Item anchors { top: titleLabel.bottom - bottom: nextButton.top + bottom: skipButton.top left: parent.left right: parent.right topMargin: UM.Theme.getSize("default_margin").height @@ -140,10 +140,10 @@ Item } - // The "Next" button exists on the bottom right + // The "Skip" button exists on the bottom right Label { - id: nextButton + id: skipButton anchors.right: parent.right anchors.bottom: parent.bottom anchors.leftMargin: UM.Theme.getSize("default_margin").width From 1b1c00699876ce6d96359be4595bc98ac722152c Mon Sep 17 00:00:00 2001 From: Kostas Karmas Date: Tue, 21 Apr 2020 11:23:42 +0200 Subject: [PATCH 07/22] Skip the Cloud page if the user is logged in If the user goes through the welcome wizard, arrives at the login page, logs in and then closes Cura, he/she will be logged in the next time. In this case, he/she will go through the welcome page again but will not see the sign in page at all. CURA-7019 --- cura/UI/WelcomePagesModel.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/cura/UI/WelcomePagesModel.py b/cura/UI/WelcomePagesModel.py index 429e8b2665..611e62cfd6 100644 --- a/cura/UI/WelcomePagesModel.py +++ b/cura/UI/WelcomePagesModel.py @@ -245,6 +245,7 @@ class WelcomePagesModel(ListModel): }, {"id": "cloud", "page_url": self._getBuiltinWelcomePagePath("CloudContent.qml"), + "should_show_function": self.shouldShowCloudPage, }, {"id": "add_network_or_local_printer", "page_url": self._getBuiltinWelcomePagePath("AddNetworkOrLocalPrinterContent.qml"), @@ -286,6 +287,17 @@ class WelcomePagesModel(ListModel): first_start_actions = self._application.getMachineActionManager().getFirstStartActions(definition_id) return len([action for action in first_start_actions if action.needsUserInteraction()]) > 0 + def shouldShowCloudPage(self) -> bool: + """ + The cloud page should be shown only if the user is not logged in + + :return: True if the user is not logged in, False if he/she is + """ + # Import CuraApplication locally or else it fails + from cura.CuraApplication import CuraApplication + api = CuraApplication.getInstance().getCuraAPI() + return not api.account.isLoggedIn + def addPage(self) -> None: pass From 967488095b83b6fb24b152f0f42bec7eecc3443e Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 22 Apr 2020 15:43:38 +0200 Subject: [PATCH 08/22] Fix weird wording. Whoops. It's only been there for a year... --- resources/qml/WelcomePages/AddPrinterByIpContent.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/WelcomePages/AddPrinterByIpContent.qml b/resources/qml/WelcomePages/AddPrinterByIpContent.qml index c73aa3958e..97c71b37a4 100644 --- a/resources/qml/WelcomePages/AddPrinterByIpContent.qml +++ b/resources/qml/WelcomePages/AddPrinterByIpContent.qml @@ -130,7 +130,7 @@ Item onTextEdited: invalidInputLabel.visible = false - placeholderText: catalog.i18nc("@text", "Place enter your printer's IP address.") + placeholderText: catalog.i18nc("@text", "Enter your printer's IP address.") enabled: { ! (addPrinterByIpScreen.hasRequestInProgress || addPrinterByIpScreen.isPrinterDiscovered) } onAccepted: addPrinterButton.clicked() From 3d26b6886fef2bfdf485cf5e6676728f0f30c8a3 Mon Sep 17 00:00:00 2001 From: Kostas Karmas Date: Wed, 22 Apr 2020 18:22:42 +0200 Subject: [PATCH 09/22] Fix the welcome dialog not closing when cloud printers detected The welcome dialog was not closing because when pressing the "Sign up" button in the cloud page, a signal is emitted that is forcing the welcome wizard to move to the next page. Therefore the currentPageIdx was detected as cloud_page_idx+1. This commit fixes the check by checking whether the welcome dialog is in the page after the Cloud page. CURA-7019 --- .../src/Cloud/CloudOutputDeviceManager.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py b/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py index c5c583dcf7..60ec98acc0 100644 --- a/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py +++ b/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py @@ -104,9 +104,9 @@ class CloudOutputDeviceManager: # found, the welcome screen will close. This way we avoid prompting the user to add printers if he/she already # has cloud printers welcome_pages_model = CuraApplication.getInstance().getWelcomePagesModel() - cloud_page_idx = welcome_pages_model.getPageIndexById("cloud") - if welcome_pages_model.currentPageIndex == cloud_page_idx and online_clusters: - CuraApplication.getWelcomePagesModel().atEnd() + cloud_page_idx = welcome_pages_model.getPageIndexById("cloud") + 1 + if welcome_pages_model.currentPageIndex == cloud_page_idx and len(online_clusters) > 0: + welcome_pages_model.atEnd() for device_id, cluster_data in online_clusters.items(): if device_id not in self._remote_clusters: new_clusters.append(cluster_data) From 1262d1f641d02e26b424869b129f789bc5a62ac9 Mon Sep 17 00:00:00 2001 From: Kostas Karmas Date: Wed, 22 Apr 2020 18:31:04 +0200 Subject: [PATCH 10/22] Activate the first available Cloud printer if the activeMachine is empty CURA-7019 --- .../UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py b/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py index 60ec98acc0..d4355b2637 100644 --- a/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py +++ b/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py @@ -180,7 +180,10 @@ class CloudOutputDeviceManager: message.setProgress((idx / len(new_devices)) * 100) CuraApplication.getInstance().processEvents() self._remote_clusters[device.getId()] = device - self._createMachineFromDiscoveredDevice(device.getId(), activate = False) + + # If there is no active machine, activate the first available cloud printer + activate = not CuraApplication.getInstance().getMachineManager().activeMachine + self._createMachineFromDiscoveredDevice(device.getId(), activate = activate) message.setProgress(None) From 83adb98a5f3c9a51ec71bf3a8bdd41c27273fbc5 Mon Sep 17 00:00:00 2001 From: Strahler85 Date: Thu, 23 Apr 2020 00:30:01 +0200 Subject: [PATCH 11/22] Add nozzle profiles for Ender 3 pro These profiles were posted as solution for #7550 by Strahler85. I'm committing this in his name. Fixes #7550. --- resources/variants/creality_ender3pro_0.2.inst.cfg | 12 ++++++++++++ resources/variants/creality_ender3pro_0.3.inst.cfg | 12 ++++++++++++ resources/variants/creality_ender3pro_0.4.inst.cfg | 12 ++++++++++++ resources/variants/creality_ender3pro_0.5.inst.cfg | 12 ++++++++++++ resources/variants/creality_ender3pro_0.6.inst.cfg | 12 ++++++++++++ resources/variants/creality_ender3pro_0.8.inst.cfg | 12 ++++++++++++ resources/variants/creality_ender3pro_1.0.inst.cfg | 12 ++++++++++++ 7 files changed, 84 insertions(+) create mode 100644 resources/variants/creality_ender3pro_0.2.inst.cfg create mode 100644 resources/variants/creality_ender3pro_0.3.inst.cfg create mode 100644 resources/variants/creality_ender3pro_0.4.inst.cfg create mode 100644 resources/variants/creality_ender3pro_0.5.inst.cfg create mode 100644 resources/variants/creality_ender3pro_0.6.inst.cfg create mode 100644 resources/variants/creality_ender3pro_0.8.inst.cfg create mode 100644 resources/variants/creality_ender3pro_1.0.inst.cfg diff --git a/resources/variants/creality_ender3pro_0.2.inst.cfg b/resources/variants/creality_ender3pro_0.2.inst.cfg new file mode 100644 index 0000000000..b3dde4563b --- /dev/null +++ b/resources/variants/creality_ender3pro_0.2.inst.cfg @@ -0,0 +1,12 @@ +[general] +name = 0.2mm Nozzle +version = 4 +definition = creality_ender3pro + +[metadata] +setting_version = 13 +type = variant +hardware_type = nozzle + +[values] +machine_nozzle_size = 0.2 diff --git a/resources/variants/creality_ender3pro_0.3.inst.cfg b/resources/variants/creality_ender3pro_0.3.inst.cfg new file mode 100644 index 0000000000..a4c4c3c0f3 --- /dev/null +++ b/resources/variants/creality_ender3pro_0.3.inst.cfg @@ -0,0 +1,12 @@ +[general] +name = 0.3mm Nozzle +version = 4 +definition = creality_ender3pro + +[metadata] +setting_version = 13 +type = variant +hardware_type = nozzle + +[values] +machine_nozzle_size = 0.3 diff --git a/resources/variants/creality_ender3pro_0.4.inst.cfg b/resources/variants/creality_ender3pro_0.4.inst.cfg new file mode 100644 index 0000000000..90b6260954 --- /dev/null +++ b/resources/variants/creality_ender3pro_0.4.inst.cfg @@ -0,0 +1,12 @@ +[general] +name = 0.4mm Nozzle +version = 4 +definition = creality_ender3pro + +[metadata] +setting_version = 13 +type = variant +hardware_type = nozzle + +[values] +machine_nozzle_size = 0.4 diff --git a/resources/variants/creality_ender3pro_0.5.inst.cfg b/resources/variants/creality_ender3pro_0.5.inst.cfg new file mode 100644 index 0000000000..de12442da1 --- /dev/null +++ b/resources/variants/creality_ender3pro_0.5.inst.cfg @@ -0,0 +1,12 @@ +[general] +name = 0.5mm Nozzle +version = 4 +definition = creality_ender3pro + +[metadata] +setting_version = 13 +type = variant +hardware_type = nozzle + +[values] +machine_nozzle_size = 0.5 diff --git a/resources/variants/creality_ender3pro_0.6.inst.cfg b/resources/variants/creality_ender3pro_0.6.inst.cfg new file mode 100644 index 0000000000..4bc4757ced --- /dev/null +++ b/resources/variants/creality_ender3pro_0.6.inst.cfg @@ -0,0 +1,12 @@ +[general] +name = 0.6mm Nozzle +version = 4 +definition = creality_ender3pro + +[metadata] +setting_version = 13 +type = variant +hardware_type = nozzle + +[values] +machine_nozzle_size = 0.6 diff --git a/resources/variants/creality_ender3pro_0.8.inst.cfg b/resources/variants/creality_ender3pro_0.8.inst.cfg new file mode 100644 index 0000000000..b881e6b680 --- /dev/null +++ b/resources/variants/creality_ender3pro_0.8.inst.cfg @@ -0,0 +1,12 @@ +[general] +name = 0.8mm Nozzle +version = 4 +definition = creality_ender3pro + +[metadata] +setting_version = 13 +type = variant +hardware_type = nozzle + +[values] +machine_nozzle_size = 0.8 diff --git a/resources/variants/creality_ender3pro_1.0.inst.cfg b/resources/variants/creality_ender3pro_1.0.inst.cfg new file mode 100644 index 0000000000..6bd7eca50f --- /dev/null +++ b/resources/variants/creality_ender3pro_1.0.inst.cfg @@ -0,0 +1,12 @@ +[general] +name = 1.0mm Nozzle +version = 4 +definition = creality_ender3pro + +[metadata] +setting_version = 13 +type = variant +hardware_type = nozzle + +[values] +machine_nozzle_size = 1.0 From 1602b71841723fb7c69b24447821a6e5b056080e Mon Sep 17 00:00:00 2001 From: Kostas Karmas Date: Thu, 23 Apr 2020 09:59:32 +0200 Subject: [PATCH 12/22] Inform the Cloud page about new cloud printers Properly close the welcome screen if the user has signed in and has cloud printers linked to his/her account. If he doesn't have any, move to the next page of the welcome wizard. CURA-7019 --- cura/API/Account.py | 6 ++++++ .../src/Cloud/CloudOutputDeviceManager.py | 11 ++++------- resources/qml/WelcomePages/CloudContent.qml | 14 +++++++++----- 3 files changed, 19 insertions(+), 12 deletions(-) diff --git a/cura/API/Account.py b/cura/API/Account.py index 4391f730e5..9864de1aaa 100644 --- a/cura/API/Account.py +++ b/cura/API/Account.py @@ -29,10 +29,12 @@ class Account(QObject): # Signal emitted when user logged in or out. loginStateChanged = pyqtSignal(bool) accessTokenChanged = pyqtSignal() + cloudPrintersDetectedChanged = pyqtSignal(bool) def __init__(self, application: "CuraApplication", parent = None) -> None: super().__init__(parent) self._application = application + self._new_cloud_printers_detected = False self._error_message = None # type: Optional[Message] self._logged_in = False @@ -74,6 +76,10 @@ class Account(QObject): def isLoggedIn(self) -> bool: return self._logged_in + @pyqtProperty(bool, notify=cloudPrintersDetectedChanged) + def newCloudPrintersDetected(self) -> bool: + return self._new_cloud_printers_detected + def _onLoginStateChanged(self, logged_in: bool = False, error_message: Optional[str] = None) -> None: if error_message: if self._error_message: diff --git a/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py b/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py index d4355b2637..210f4ad13a 100644 --- a/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py +++ b/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py @@ -100,13 +100,6 @@ class CloudOutputDeviceManager: new_clusters = [] online_clusters = {c.cluster_id: c for c in clusters if c.is_online} # type: Dict[str, CloudClusterResponse] - # If the user signs in from the welcome dialog, then we will search for cloud printers and if any of them are - # found, the welcome screen will close. This way we avoid prompting the user to add printers if he/she already - # has cloud printers - welcome_pages_model = CuraApplication.getInstance().getWelcomePagesModel() - cloud_page_idx = welcome_pages_model.getPageIndexById("cloud") + 1 - if welcome_pages_model.currentPageIndex == cloud_page_idx and len(online_clusters) > 0: - welcome_pages_model.atEnd() for device_id, cluster_data in online_clusters.items(): if device_id not in self._remote_clusters: new_clusters.append(cluster_data) @@ -115,6 +108,10 @@ class CloudOutputDeviceManager: self._onDevicesDiscovered(new_clusters) + # Inform whether new cloud printers have been detected. If they have, the welcome wizard can close. + self._account._new_cloud_printers_detected = len(new_clusters) > 0 + self._account.cloudPrintersDetectedChanged.emit(len(new_clusters) > 0) + removed_device_keys = set(self._remote_clusters.keys()) - set(online_clusters.keys()) for device_id in removed_device_keys: self._onDiscoveredDeviceRemoved(device_id) diff --git a/resources/qml/WelcomePages/CloudContent.qml b/resources/qml/WelcomePages/CloudContent.qml index cc24fdd7b4..a14c6600cd 100644 --- a/resources/qml/WelcomePages/CloudContent.qml +++ b/resources/qml/WelcomePages/CloudContent.qml @@ -15,14 +15,18 @@ Item { UM.I18nCatalog { id: catalog; name: "cura" } - property bool isLoggedIn: Cura.API.account.isLoggedIn + property bool newCloudPrintersDetected: Cura.API.account.newCloudPrintersDetected - onIsLoggedInChanged: + onNewCloudPrintersDetectedChanged: { - if(isLoggedIn) + // When the user signs in successfully, it will be checked whether he/she has cloud printers connected to + // the account. If he/she does, then the welcome wizard can close. If not, then proceed to the next page (if any) + if(newCloudPrintersDetected) + { + base.endWizard() + } + else { - // If the user created an account or logged in by pressing any button on this page, all the actions that - // need / can be done by this page are completed, so we can just go to the next (if any). base.showNextPage() } } From 7c7c1ad96cfd9f9a2eea1b1b31d2863147ea5ffb Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 23 Apr 2020 10:58:16 +0200 Subject: [PATCH 13/22] Fix remote_clusters not being added in second boot CURA-7055 --- .../UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py | 2 ++ .../src/UltimakerNetworkedPrinterOutputDevice.py | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py b/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py index 0b65f55cfd..031e7378bf 100644 --- a/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py +++ b/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py @@ -137,6 +137,8 @@ class CloudOutputDeviceManager: if machine_manager.getMachine(device.printerType, {self.META_CLUSTER_ID: device.key}) is None \ and machine_manager.getMachine(device.printerType, {self.META_NETWORK_KEY: cluster_data.host_name + "*"}) is None: # The host name is part of the network key. new_devices.append(device) + elif device.getId() not in self._remote_clusters: + self._remote_clusters[device.getId()] = device if not new_devices: return diff --git a/plugins/UM3NetworkPrinting/src/UltimakerNetworkedPrinterOutputDevice.py b/plugins/UM3NetworkPrinting/src/UltimakerNetworkedPrinterOutputDevice.py index 9cecf8ad58..f50bab8a1f 100644 --- a/plugins/UM3NetworkPrinting/src/UltimakerNetworkedPrinterOutputDevice.py +++ b/plugins/UM3NetworkPrinting/src/UltimakerNetworkedPrinterOutputDevice.py @@ -52,7 +52,6 @@ class UltimakerNetworkedPrinterOutputDevice(NetworkedPrinterOutputDevice): super().__init__(device_id=device_id, address=address, properties=properties, connection_type=connection_type, parent=parent) - # Trigger the printersChanged signal when the private signal is triggered. self.printersChanged.connect(self._clusterPrintersChanged) From 6746106608bee45a27f01de633b28ec870a8396e Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 23 Apr 2020 11:07:21 +0200 Subject: [PATCH 14/22] Also connect with cloudOutput device if it was added CURA-7055 --- .../UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py b/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py index 031e7378bf..e7f5e95874 100644 --- a/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py +++ b/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py @@ -128,6 +128,7 @@ class CloudOutputDeviceManager: Shows a Message informing the user of progress. """ new_devices = [] + remote_clusters_added = False for cluster_data in clusters: device = CloudOutputDevice(self._api, cluster_data) # Create a machine if we don't already have it. Do not make it the active machine. @@ -139,8 +140,11 @@ class CloudOutputDeviceManager: new_devices.append(device) elif device.getId() not in self._remote_clusters: self._remote_clusters[device.getId()] = device + remote_clusters_added = True if not new_devices: + if remote_clusters_added: + self._connectToActiveMachine() return new_devices.sort(key = lambda x: x.name.lower()) From d9cdea9496f340095861eb406e33f9442a53a2d2 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 23 Apr 2020 11:08:32 +0200 Subject: [PATCH 15/22] Don't crash when material file is missing This could happen because a material is deleted right at that moment, since the SendMaterialJob is done on a separate thread. Fixes Sentry issue CURA-JZ. --- .../UM3NetworkPrinting/src/Network/SendMaterialJob.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/plugins/UM3NetworkPrinting/src/Network/SendMaterialJob.py b/plugins/UM3NetworkPrinting/src/Network/SendMaterialJob.py index 5abc3cfde4..49e088100d 100644 --- a/plugins/UM3NetworkPrinting/src/Network/SendMaterialJob.py +++ b/plugins/UM3NetworkPrinting/src/Network/SendMaterialJob.py @@ -92,9 +92,13 @@ class SendMaterialJob(Job): parts = [] # Add the material file. - with open(file_path, "rb") as f: - parts.append(self.device.createFormPart("name=\"file\"; filename=\"{file_name}\"" - .format(file_name = file_name), f.read())) + try: + with open(file_path, "rb") as f: + parts.append(self.device.createFormPart("name=\"file\"; filename=\"{file_name}\"" + .format(file_name = file_name), f.read())) + except FileNotFoundError: + Logger.error("Unable to send material {material_id}, since it has been deleted in the meanwhile.".format(material_id = material_id)) + return # Add the material signature file if needed. signature_file_path = "{}.sig".format(file_path) From add9be387ba27fab3f5b23effc29b6ccd2158e55 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 23 Apr 2020 11:38:27 +0200 Subject: [PATCH 16/22] Fix crash when creating a socket before the plug-in is fully registered The plug-in ID is set once the register function is completed, so after initialisation. If the _createSocket function is called in between, Cura would crash. I don't know why the _createSocket function would be called in between, but possibly another plug-in causes an event that calls it since it's being called on many events (everything that would initiate a reslice). Fixes Sentry issue CURA-K4. --- plugins/CuraEngineBackend/CuraEngineBackend.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index 3dd0589865..6a8a4a7347 100755 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -720,9 +720,12 @@ class CuraEngineBackend(QObject, Backend): ## Creates a new socket connection. def _createSocket(self, protocol_file: str = None) -> None: if not protocol_file: + if not self.getPluginId(): + Logger.error("Can't create socket before CuraEngineBackend plug-in is registered.") + return plugin_path = PluginRegistry.getInstance().getPluginPath(self.getPluginId()) if not plugin_path: - Logger.log("e", "Could not get plugin path!", self.getPluginId()) + Logger.error("Could not get plugin path!", self.getPluginId()) return protocol_file = os.path.abspath(os.path.join(plugin_path, "Cura.proto")) super()._createSocket(protocol_file) From 45dc8bcc687148c84cd4c19360959ad78cb209c7 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 23 Apr 2020 11:38:34 +0200 Subject: [PATCH 17/22] Fix warnings about output device not being detected CURA-7055 --- .../src/Cloud/CloudOutputDeviceManager.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py b/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py index e7f5e95874..1eebc46d64 100644 --- a/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py +++ b/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py @@ -102,8 +102,6 @@ class CloudOutputDeviceManager: for device_id, cluster_data in online_clusters.items(): if device_id not in self._remote_clusters: new_clusters.append(cluster_data) - else: - self._onDiscoveredDeviceUpdated(cluster_data) self._onDevicesDiscovered(new_clusters) @@ -198,17 +196,6 @@ class CloudOutputDeviceManager: ) message.setText(message_text) - def _onDiscoveredDeviceUpdated(self, cluster_data: CloudClusterResponse) -> None: - device = self._remote_clusters.get(cluster_data.cluster_id) - if not device: - return - CuraApplication.getInstance().getDiscoveredPrintersModel().updateDiscoveredPrinter( - ip_address=device.key, - name=cluster_data.friendly_name, - machine_type=device.printerType - ) - self.discoveredDevicesChanged.emit() - def _onDiscoveredDeviceRemoved(self, device_id: str) -> None: device = self._remote_clusters.pop(device_id, None) # type: Optional[CloudOutputDevice] if not device: From 971d8cd8e2713be3a69463f065baca2c69c3fbb7 Mon Sep 17 00:00:00 2001 From: Nino van Hooff Date: Thu, 23 Apr 2020 11:48:50 +0200 Subject: [PATCH 18/22] Remove leftover debug code from ChangeAtZ.py CURA-7146 --- .../PostProcessingPlugin/scripts/ChangeAtZ.py | 90 ------------------- 1 file changed, 90 deletions(-) diff --git a/plugins/PostProcessingPlugin/scripts/ChangeAtZ.py b/plugins/PostProcessingPlugin/scripts/ChangeAtZ.py index 239463bca4..f4041b8650 100644 --- a/plugins/PostProcessingPlugin/scripts/ChangeAtZ.py +++ b/plugins/PostProcessingPlugin/scripts/ChangeAtZ.py @@ -1429,93 +1429,3 @@ class ChangeAtZProcessor: # move to the next command return - - -def debug(): - # get our input file - file = r"C:\Users\Wes\Desktop\Archive\gcode test\emit + single layer\AC_Retraction.gcode" - - # read the whole thing - f = open(file, "r") - gcode = f.read() - f.close() - - # boot up change - caz_instance = ChangeAtZProcessor() - caz_instance.IsTargetByLayer = False - caz_instance.TargetZ = 5 - caz_instance.TargetValues["printspeed"] = 100 - caz_instance.TargetValues["retractfeedrate"] = 60 - - # process gcode - gcode = debug_iteration(gcode, caz_instance) - - # write our file - debug_write(gcode, file + ".1.modified") - - caz_instance.reset() - caz_instance.IsTargetByLayer = False - caz_instance.IsDisplayingChangesToLcd = True - caz_instance.IsApplyToSingleLayer = False - caz_instance.TargetZ = 10.6 - caz_instance.TargetValues["bedTemp"] = 75.111 - caz_instance.TargetValues["printspeed"] = 150 - caz_instance.TargetValues["retractfeedrate"] = 40.555 - caz_instance.TargetValues["retractlength"] = 10.3333 - - # and again - gcode = debug_iteration(gcode, caz_instance) - - # write our file - debug_write(gcode, file + ".2.modified") - - caz_instance.reset() - caz_instance.IsTargetByLayer = False - caz_instance.TargetZ = 15 - caz_instance.IsApplyToSingleLayer = True - caz_instance.TargetValues["bedTemp"] = 80 - caz_instance.TargetValues["printspeed"] = 100 - caz_instance.TargetValues["retractfeedrate"] = 10 - caz_instance.TargetValues["retractlength"] = 0 - caz_instance.TargetValues["extruderOne"] = 100 - caz_instance.TargetValues["extruderTwo"] = 200 - - # and again - gcode = debug_iteration(gcode, caz_instance) - - # write our file - debug_write(gcode, file + ".3.modified") - - -def debug_write(gcode, file): - # write our file - f = open(file, "w") - f.write(gcode) - f.close() - - -def debug_iteration(gcode, caz_instance): - index = 0 - - # break apart the GCODE like cura - layers = re.split(r"^;LAYER:\d+\n", gcode) - - # add the layer numbers back - for layer in layers: - - # if this is the first layer, skip it, basically - if index == 0: - # leave our first layer as is - layers[index] = layer - - # move the cursor - index += 1 - - # skip to the next layer - continue - - layers[index] = ";LAYER:" + str(index - 1) + ";\n" + layer - - return "".join(caz_instance.execute(layers)) - -# debug() From 29d2e5c92112737f371b066a42c02228cb4267ae Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 23 Apr 2020 11:43:25 +0200 Subject: [PATCH 19/22] Don't crash if USB device is taken over by other applications or breaks If it happens at just the wrong moment, Cura could crash. Hopefully no longer, though I fear that now it would maybe crash somewhere else with the same error then. We'll find out through new error reports, I hope. Fixes Sentry issue CURA-K8. --- plugins/USBPrinting/USBPrinterOutputDevice.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/USBPrinting/USBPrinterOutputDevice.py b/plugins/USBPrinting/USBPrinterOutputDevice.py index adb3b03700..cf07b98ca1 100644 --- a/plugins/USBPrinting/USBPrinterOutputDevice.py +++ b/plugins/USBPrinting/USBPrinterOutputDevice.py @@ -191,7 +191,10 @@ class USBPrinterOutputDevice(PrinterOutputDevice): try: self._serial = Serial(str(self._serial_port), self._baud_rate, timeout=self._timeout, writeTimeout=self._timeout) except SerialException: - Logger.log("w", "An exception occurred while trying to create serial connection") + Logger.warning("An exception occurred while trying to create serial connection.") + return + except OSError as e: + Logger.warning("The serial device is suddenly unavailable while trying to create a serial connection: {err}".format(err = str(e))) return CuraApplication.getInstance().globalContainerStackChanged.connect(self._onGlobalContainerStackChanged) self._onGlobalContainerStackChanged() From 75aafa1e5cd593b97feac7cea14eeafd01dc3df6 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 23 Apr 2020 13:41:06 +0200 Subject: [PATCH 20/22] Don't crash if rendering without any window Probably it'll still crash somewhere else then, but we'll rely on Sentry to find that for us. Fixes Sentry issue CURA-KW. --- plugins/SolidView/SolidView.py | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/plugins/SolidView/SolidView.py b/plugins/SolidView/SolidView.py index bd8215aba5..09d27859b5 100644 --- a/plugins/SolidView/SolidView.py +++ b/plugins/SolidView/SolidView.py @@ -267,13 +267,23 @@ class SolidView(View): Class that ducktypes to be a Numpy ndarray. """ def __init__(self, qimage): - self.__array_interface__ = { - "shape": (qimage.height(), qimage.width()), - "typestr": "|u4", # Use 4 bytes per pixel rather than 3, since Numpy doesn't support 3. - "data": (int(qimage.bits()), False), - "strides": (qimage.bytesPerLine(), 3), # This does the magic: For each line, skip the correct number of bytes. Bytes per pixel is always 3 due to QImage.Format.Format_RGB888. - "version": 3 - } + bits_pointer = qimage.bits() + if bits_pointer is None: # If this happens before there is a window. + self.__array_interface__ = { + "shape": (0, 0), + "typestr": "|u4", + "data": (0, False), + "strides": (1, 3), + "version": 3 + } + else: + self.__array_interface__ = { + "shape": (qimage.height(), qimage.width()), + "typestr": "|u4", # Use 4 bytes per pixel rather than 3, since Numpy doesn't support 3. + "data": (int(bits_pointer), False), + "strides": (qimage.bytesPerLine(), 3), # This does the magic: For each line, skip the correct number of bytes. Bytes per pixel is always 3 due to QImage.Format.Format_RGB888. + "version": 3 + } array = np.asarray(QImageArrayView(xray_img)).view(np.dtype({ "r": (np.uint8, 0, "red"), "g": (np.uint8, 1, "green"), From 52b4e98056c559daaf3bd576e72453606b8d45fe Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 23 Apr 2020 13:48:05 +0200 Subject: [PATCH 21/22] Prevent crash when unable to write to storage location for container manager Or the temp directory. Fixes Sentry issue CURA-KY. --- cura/Settings/ContainerManager.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cura/Settings/ContainerManager.py b/cura/Settings/ContainerManager.py index 9514f80e34..4d972ba87e 100644 --- a/cura/Settings/ContainerManager.py +++ b/cura/Settings/ContainerManager.py @@ -1,4 +1,4 @@ -# Copyright (c) 2019 Ultimaker B.V. +# Copyright (c) 2020 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. import os @@ -206,8 +206,11 @@ class ContainerManager(QObject): if contents is None: return {"status": "error", "message": "Serialization returned None. Unable to write to file"} - with SaveFile(file_url, "w") as f: - f.write(contents) + try: + with SaveFile(file_url, "w") as f: + f.write(contents) + except OSError: + return {"status": "error", "message": "Unable to write to this location.", "path": file_url} return {"status": "success", "message": "Successfully exported container", "path": file_url} From 09ee9660eafddbf84d23302ab128cc89f39957b8 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 23 Apr 2020 14:42:36 +0200 Subject: [PATCH 22/22] Don't crash if the build volume is smaller than one arrange cell Fixes Sentry issue CURA-M6. --- cura/Arranging/Arrange.py | 1 + 1 file changed, 1 insertion(+) diff --git a/cura/Arranging/Arrange.py b/cura/Arranging/Arrange.py index a70ccb9f0c..35f155f4cf 100644 --- a/cura/Arranging/Arrange.py +++ b/cura/Arranging/Arrange.py @@ -196,6 +196,7 @@ class Arrange: start_idx = 0 else: start_idx = 0 + priority = 0 for priority in self._priority_unique_values[start_idx::step]: tryout_idx = numpy.where(self._priority == priority) for idx in range(len(tryout_idx[0])):