From 5c5f08e9ca3bdf84f04a7e9c6d31c73c52d3f93b Mon Sep 17 00:00:00 2001 From: Aleksei S Date: Wed, 13 Dec 2017 11:58:59 +0100 Subject: [PATCH] Do not slice a model if it is only one on a build plane and has setting from non_printing_mesh CURA-4703 --- plugins/CuraEngineBackend/StartSliceJob.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py index 876b4685cc..7cfccb2b1f 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.py @@ -131,12 +131,21 @@ class StartSliceJob(Job): Logger.log("w", "No objects suitable for one at a time found, or no correct order found") else: temp_list = [] + is_non_printing_mesh = False for node in DepthFirstIterator(self._scene.getRoot()): if type(node) is SceneNode and node.getMeshData() and node.getMeshData().getVertices() is not None: - if not getattr(node, "_outside_buildarea", False) or getattr(node, "_non_printing_mesh", False): + _non_printing_mesh = getattr(node, "_non_printing_mesh", False) + if not getattr(node, "_outside_buildarea", False) or _non_printing_mesh: temp_list.append(node) + if _non_printing_mesh: + is_non_printing_mesh = True Job.yieldThread() + #If list has one node and it has non printing settings then remove it from list + # otherwise CuraEngine will crash + if len(temp_list) == 1 and is_non_printing_mesh: + temp_list.clear() + if temp_list: object_groups.append(temp_list)