From 461a3fb0d629fc767248a7c9cf401cafde4702a2 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Tue, 12 Jan 2016 10:48:37 +0100 Subject: [PATCH] Don't include origin in boundingbox --- cura/CuraApplication.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 59495bd66a..1c235f9888 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -254,13 +254,19 @@ class CuraApplication(QtApplication): def updatePlatformActivity(self, node = None): count = 0 - scene_boundingbox = AxisAlignedBox() + scene_boundingbox = None for node in DepthFirstIterator(self.getController().getScene().getRoot()): if type(node) is not SceneNode or not node.getMeshData(): continue count += 1 - scene_boundingbox += node.getBoundingBox() + if not scene_boundingbox: + scene_boundingbox = node.getBoundingBox() + else: + scene_boundingbox += node.getBoundingBox() + + if not scene_boundingbox: + scene_boundingbox = AxisAlignedBox() if repr(self._scene_boundingbox) != repr(scene_boundingbox): self._scene_boundingbox = scene_boundingbox