mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-20 21:19:15 +08:00
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.
This commit is contained in:
parent
d3e5f9ec93
commit
765004cd68
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user