diff options
author | Ghostkeeper <rubend@tutanota.com> | 2020-09-08 18:54:09 +0300 |
---|---|---|
committer | Ghostkeeper <rubend@tutanota.com> | 2020-09-08 18:54:09 +0300 |
commit | 765004cd6818c4df51cb0696cde67298f5c6d471 (patch) | |
tree | 2bd849a63b76c7b1ec89428a161bb3e8a40b2877 /cura/Scene | |
parent | d3e5f9ec93214f2ebbf51855647211736c3c588c (diff) |
Take node groups into account when computing the centre of the mesh group
These groups were not considered because they are not sliceable. Their children are sliceable, so I could just use a DepthFirstIterator. However their group computes the AABB correctly also, so taking the AABB of the group is more efficient.
Contributes to issue CURA-7118.
Diffstat (limited to 'cura/Scene')
-rw-r--r-- | cura/Scene/ConvexHullDecorator.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/cura/Scene/ConvexHullDecorator.py b/cura/Scene/ConvexHullDecorator.py index 5e025a504f..a4228ce422 100644 --- a/cura/Scene/ConvexHullDecorator.py +++ b/cura/Scene/ConvexHullDecorator.py @@ -5,7 +5,6 @@ from PyQt5.QtCore import QTimer from UM.Application import Application from UM.Math.Polygon import Polygon - from UM.Scene.SceneNodeDecorator import SceneNodeDecorator from UM.Settings.ContainerRegistry import ContainerRegistry @@ -398,7 +397,7 @@ class ConvexHullDecorator(SceneNodeDecorator): # Find the bounding box of the entire scene, which is all one mesh group then. aabb = None for printed_node in self._root.getChildren(): - if not printed_node.callDecoration("isSliceable"): + if not printed_node.callDecoration("isSliceable") and not printed_node.callDecoration("isGroup"): continue # Not a printed node. if aabb is None: aabb = printed_node.getBoundingBox() |