From 6e053e0bb66e5fda8fba8574488586573531bd62 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 5 Jun 2019 13:25:43 +0200 Subject: [PATCH] Mark objects that are completely below the buildplate as outside of the buildvolume CURA-6545 --- cura/BuildVolume.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cura/BuildVolume.py b/cura/BuildVolume.py index a07c56ac6c..8e74a81842 100755 --- a/cura/BuildVolume.py +++ b/cura/BuildVolume.py @@ -226,6 +226,8 @@ class BuildVolume(SceneNode): build_volume_bounding_box = self.getBoundingBox() if build_volume_bounding_box: # It's over 9000! + # We set this to a very low number, as we do allow models to intersect the build plate. + # This means the model gets cut off at the build plate. build_volume_bounding_box = build_volume_bounding_box.set(bottom=-9001) else: # No bounding box. This is triggered when running Cura from command line with a model for the first time @@ -245,7 +247,11 @@ class BuildVolume(SceneNode): if node.collidesWithArea(self.getDisallowedAreas()): node.setOutsideBuildArea(True) continue - + # If the entire node is below the build plate, still mark it as outside. + node_bounding_box = node.getBoundingBox() + if node_bounding_box and node_bounding_box.top < 0: + node.setOutsideBuildArea(True) + continue # Mark the node as outside build volume if the set extruder is disabled extruder_position = node.callDecoration("getActiveExtruderPosition") if extruder_position not in self._global_container_stack.extruders: