From cb65cb868e20d54882c976eb1d11f4256f019e45 Mon Sep 17 00:00:00 2001 From: SAMSECTOR Date: Mon, 2 Sep 2019 22:20:20 +0300 Subject: [PATCH 1/4] Update printrbot_simple.def.json manufacturer name changed from "PrintrBot" to "Printrbot" to allow the profile under the "Add a printer" menu not appearing in version 4.2.1 --- resources/definitions/printrbot_simple.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/definitions/printrbot_simple.def.json b/resources/definitions/printrbot_simple.def.json index 4d1f368b6d..760ff383d1 100644 --- a/resources/definitions/printrbot_simple.def.json +++ b/resources/definitions/printrbot_simple.def.json @@ -5,7 +5,7 @@ "metadata": { "visible": true, "author": "Calvindog717", - "manufacturer": "PrintrBot", + "manufacturer": "Printrbot", "platform": "printrbot_simple_metal_platform.stl", "platform_offset": [0, -3.45, 0], "file_formats": "text/x-gcode", From 669fb39f40a85eac8f3b739903c3a3c4f30f22c6 Mon Sep 17 00:00:00 2001 From: ChrisTerBeke Date: Mon, 9 Sep 2019 10:44:17 +0200 Subject: [PATCH 2/4] Catch type errors when trying to populate models from API response --- plugins/UM3NetworkPrinting/src/Network/ClusterApiClient.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/UM3NetworkPrinting/src/Network/ClusterApiClient.py b/plugins/UM3NetworkPrinting/src/Network/ClusterApiClient.py index 951b69977d..f61982b9a8 100644 --- a/plugins/UM3NetworkPrinting/src/Network/ClusterApiClient.py +++ b/plugins/UM3NetworkPrinting/src/Network/ClusterApiClient.py @@ -135,7 +135,7 @@ class ClusterApiClient: result = model_class(**response) # type: ClusterApiClientModel on_finished_item = cast(Callable[[ClusterApiClientModel], Any], on_finished) on_finished_item(result) - except JSONDecodeError: + except (JSONDecodeError, TypeError): Logger.log("e", "Could not parse response from network: %s", str(response)) ## Creates a callback function so that it includes the parsing of the response into the correct model. From ea8b7ebd0216bffcc5a01c2aad125c86e82bcf93 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Mon, 9 Sep 2019 11:49:14 +0200 Subject: [PATCH 3/4] Fix remove all nodes for loaded gcode Fixes the problem caused in UM commit 69057b48a1fc3df7c5c6f3e754a3beb285a94678 --- cura/CuraApplication.py | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index bb64d7fd8e..ef85bf7457 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -1821,3 +1821,40 @@ class CuraApplication(QtApplication): return main_window.height() else: return 0 + + @pyqtSlot() + def deleteAll(self, only_selectable: bool = True) -> None: + super().deleteAll(only_selectable = only_selectable) + + # Also remove nodes with LayerData + self._removeNodesWithLayerData(only_selectable = only_selectable) + + def _removeNodesWithLayerData(self, only_selectable: bool = True) -> None: + Logger.log("i", "Clearing scene") + nodes = [] + for node in DepthFirstIterator(self.getController().getScene().getRoot()): + if not isinstance(node, SceneNode): + continue + if not node.isEnabled(): + continue + if (not node.getMeshData() and not node.callDecoration("getLayerData")) and not node.callDecoration("isGroup"): + continue # Node that doesnt have a mesh and is not a group. + if only_selectable and not node.isSelectable(): + continue # Only remove nodes that are selectable. + if not node.callDecoration("isSliceable") and not node.callDecoration("getLayerData") and not node.callDecoration("isGroup"): + continue # Grouped nodes don't need resetting as their parent (the group) is resetted) + nodes.append(node) + if nodes: + from UM.Operations.GroupedOperation import GroupedOperation + op = GroupedOperation() + + for node in nodes: + from UM.Operations.RemoveSceneNodeOperation import RemoveSceneNodeOperation + op.addOperation(RemoveSceneNodeOperation(node)) + + # Reset the print information + self.getController().getScene().sceneChanged.emit(node) + + op.push() + from UM.Scene.Selection import Selection + Selection.clear() From 8c817e041ee1ca9a98ac4a6dfe6274ee8b5893cd Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 9 Sep 2019 17:36:14 +0200 Subject: [PATCH 4/4] Reduce size of print head without fans for one-at-a-time mode This allows you to place models more compactly. According to the discussion at #5590, this was tested to work well. Fixes #5590. --- resources/definitions/creality_ender3.def.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/definitions/creality_ender3.def.json b/resources/definitions/creality_ender3.def.json index 4b7da65e4e..645be52bc8 100644 --- a/resources/definitions/creality_ender3.def.json +++ b/resources/definitions/creality_ender3.def.json @@ -13,10 +13,10 @@ "machine_depth": { "default_value": 220 }, "machine_height": { "default_value": 250 }, "machine_head_polygon": { "default_value": [ - [-26, 34], - [-26, -32], - [22, -32], - [22, 34] + [-1, 1], + [-1, -1], + [1, -1], + [1, 1] ] }, "machine_head_with_fans_polygon": { "default_value": [