Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGhostkeeper <rubend@tutanota.com>2020-09-08 18:54:09 +0300
committerGhostkeeper <rubend@tutanota.com>2020-09-08 18:54:09 +0300
commit765004cd6818c4df51cb0696cde67298f5c6d471 (patch)
tree2bd849a63b76c7b1ec89428a161bb3e8a40b2877 /cura/Scene
parentd3e5f9ec93214f2ebbf51855647211736c3c588c (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.py3
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()