diff options
author | Remco Burema <41987080+rburema@users.noreply.github.com> | 2021-06-08 13:37:34 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-08 13:37:34 +0300 |
commit | 58a5323709ec4e48c002523689275a2c268b3829 (patch) | |
tree | 357f64569c4a20949d66e9ea05218e2763258d12 /cura/Scene | |
parent | b971ba20e897146481c19ed52bf37fe239014222 (diff) | |
parent | 7eba38b286b22fb1d14c19bc71d3e8e9b856bc99 (diff) |
Merge pull request #9884 from Ultimaker/CURA-7873_fix_positioning_merged_meshes
Fix positioning of merged transformed meshes
Diffstat (limited to 'cura/Scene')
-rw-r--r-- | cura/Scene/CuraSceneNode.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cura/Scene/CuraSceneNode.py b/cura/Scene/CuraSceneNode.py index ec832b8ec7..5fbaded650 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() |