diff options
author | Jaime van Kessel <nallath@gmail.com> | 2019-05-29 16:53:23 +0300 |
---|---|---|
committer | Jaime van Kessel <nallath@gmail.com> | 2019-05-29 16:53:23 +0300 |
commit | 07ff08f6bbba692abca59044357d3f6a296ee949 (patch) | |
tree | 65e2e4cd85fb815ed6092a09d195457f72d9af07 /cura/Snapshot.py | |
parent | f6627daa49ecde38df115a88c8bfc61c834518e8 (diff) |
Ensure that objects outside build volume are not added to thumbnail
CURA-6545
Diffstat (limited to 'cura/Snapshot.py')
-rw-r--r-- | cura/Snapshot.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cura/Snapshot.py b/cura/Snapshot.py index b730c1fdcf..0410d8670d 100644 --- a/cura/Snapshot.py +++ b/cura/Snapshot.py @@ -48,12 +48,12 @@ class Snapshot: # determine zoom and look at bbox = None for node in DepthFirstIterator(root): - if node.callDecoration("isSliceable") and node.getMeshData() and node.isVisible() and not node.callDecoration("isNonThumbnailVisibleMesh"): - if bbox is None: - bbox = node.getBoundingBox() - else: - bbox = bbox + node.getBoundingBox() - + if hasattr(node, "_outside_buildarea") and not node._outside_buildarea: + if node.callDecoration("isSliceable") and node.getMeshData() and node.isVisible() and not node.callDecoration("isNonThumbnailVisibleMesh"): + if bbox is None: + bbox = node.getBoundingBox() + else: + bbox = bbox + node.getBoundingBox() # If there is no bounding box, it means that there is no model in the buildplate if bbox is None: return None |