mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-06-04 11:14:21 +08:00
Merge pull request #9884 from Ultimaker/CURA-7873_fix_positioning_merged_meshes
Fix positioning of merged transformed meshes
This commit is contained in:
commit
58a5323709
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user