mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-24 19:31:16 -07: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
1 changed files with 1 additions and 2 deletions
|
|
@ -5,7 +5,6 @@ from PyQt5.QtCore import QTimer
|
||||||
|
|
||||||
from UM.Application import Application
|
from UM.Application import Application
|
||||||
from UM.Math.Polygon import Polygon
|
from UM.Math.Polygon import Polygon
|
||||||
|
|
||||||
from UM.Scene.SceneNodeDecorator import SceneNodeDecorator
|
from UM.Scene.SceneNodeDecorator import SceneNodeDecorator
|
||||||
from UM.Settings.ContainerRegistry import ContainerRegistry
|
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.
|
# Find the bounding box of the entire scene, which is all one mesh group then.
|
||||||
aabb = None
|
aabb = None
|
||||||
for printed_node in self._root.getChildren():
|
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.
|
continue # Not a printed node.
|
||||||
if aabb is None:
|
if aabb is None:
|
||||||
aabb = printed_node.getBoundingBox()
|
aabb = printed_node.getBoundingBox()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue