From 71c146f4379c24af2e05ffadd690c3b24e5ed4eb Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 30 Jun 2017 13:04:09 +0200 Subject: [PATCH] Always send not-printed objects to slicer regardless of build volume Objects that aren't printed, such as infill meshes, can simply be sent to the slicer regardless of whether they are inside or outside the build volume, because they don't generate g-code in their own volume. This way you can have a model that is partially outside the build volume that still does its anti-overhang task or whatever. Contributes to issue CURA-3951. --- 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 c83ffb655d..f2e9cb7db2 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.py @@ -44,6 +44,14 @@ class GcodeStartEndFormatter(Formatter): ## Job class that builds up the message of scene data to send to CuraEngine. class StartSliceJob(Job): + ## Meshes that are sent to the engine regardless of being outside of the + # build volume. + # + # If these settings are True for any mesh, the build volume is ignored. + # Note that Support Mesh is not in here because it actually generates + # g-code in the volume of the mesh. + _not_printed_mesh_settings = {"anti_overhang_mesh", "infill_mesh", "cutting_mesh"} + def __init__(self, slice_message): super().__init__() @@ -132,7 +140,8 @@ class StartSliceJob(Job): temp_list = [] 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): + if not getattr(node, "_outside_buildarea", False)\ + or (node.callDecoration("getStack") and any(node.callDecoration("getStack").getProperty(setting, "value") for setting in self._not_printed_mesh_settings)): temp_list.append(node) Job.yieldThread()