mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Only add center to list for merge if there is one
This commit is contained in:
parent
a0f841e8eb
commit
ecbf0e1e28
1 changed files with 3 additions and 1 deletions
|
@ -1031,7 +1031,9 @@ class CuraApplication(QtApplication):
|
|||
transformation.setTranslation(zero_translation)
|
||||
transformed_mesh = mesh.getTransformed(transformation)
|
||||
center = transformed_mesh.getCenterPosition()
|
||||
if center is not None:
|
||||
object_centers.append(center)
|
||||
|
||||
if object_centers and len(object_centers) > 0:
|
||||
middle_x = sum([v.x for v in object_centers]) / len(object_centers)
|
||||
middle_y = sum([v.y for v in object_centers]) / len(object_centers)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue