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>2021-05-21 14:53:55 +0300
committerGhostkeeper <rubend@tutanota.com>2021-05-21 14:53:55 +0300
commit7eba38b286b22fb1d14c19bc71d3e8e9b856bc99 (patch)
treebf4e4e470caecfacae8dd80cbbc1308cdff4ffa5 /cura/Scene
parent48d1715c2db871af2a10a66fdcb3f2dc2f5aeadc (diff)
Check if child bounding box is None before checking if it's degenerate.
Contributes to issue CURA-7873.
Diffstat (limited to 'cura/Scene')
-rw-r--r--cura/Scene/CuraSceneNode.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/cura/Scene/CuraSceneNode.py b/cura/Scene/CuraSceneNode.py
index 9b5c432b36..e3d0b30dd3 100644
--- a/cura/Scene/CuraSceneNode.py
+++ b/cura/Scene/CuraSceneNode.py
@@ -124,13 +124,14 @@ class CuraSceneNode(SceneNode):
if child.callDecoration("isNonPrintingMesh"):
# Non-printing-meshes inside a group should not affect push apart or drop to build plate
continue
- if child.getBoundingBox().minimum == child.getBoundingBox().maximum:
+ child_bb = child.getBoundingBox()
+ if child_bb is None or child_bb.minimum == child_bb.maximum:
# Child had a degenerate bounding box, such as an empty group. Don't count it along.
continue
if self._aabb is None:
- self._aabb = child.getBoundingBox()
+ self._aabb = child_bb
else:
- self._aabb = self._aabb + child.getBoundingBox()
+ self._aabb = self._aabb + child_bb
if self._aabb is None: # No children that should be included? Just use your own position then, but it's an invalid AABB.
position = self.getWorldPosition()