From c4326469085e38899d7195fa650bb0d1a43bd1aa Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Thu, 1 Feb 2018 16:37:16 +0100 Subject: [PATCH] CURA-4425 Avoid adding the center bounding box. Revert some previous changes. --- cura/Snapshot.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cura/Snapshot.py b/cura/Snapshot.py index d646fe8868..88d030267e 100644 --- a/cura/Snapshot.py +++ b/cura/Snapshot.py @@ -24,10 +24,15 @@ class Snapshot: camera = Camera("snapshot", root) # determine zoom and look at - bbox = AxisAlignedBox() + bbox = None for node in DepthFirstIterator(root): if node.callDecoration("isSliceable") and node.getMeshData() and node.isVisible(): - bbox = bbox + node.getBoundingBox() + if bbox is None: + bbox = node.getBoundingBox() + else: + bbox = bbox + node.getBoundingBox() + if bbox is None: + bbox = AxisAlignedBox() look_at = bbox.center size = max(bbox.width, bbox.height, bbox.depth * 0.5)