diff options
author | Ghostkeeper <rubend@tutanota.com> | 2022-02-21 13:52:28 +0300 |
---|---|---|
committer | Ghostkeeper <rubend@tutanota.com> | 2022-02-21 13:52:28 +0300 |
commit | c7d7dd11d143c804d0c1b3ff67fc6f89ed5171e6 (patch) | |
tree | db5f78d4f88e85e01c408c03d3298c95cd14ebb9 /cura/PlatformPhysics.py | |
parent | 28924a1c87032e29306d0fca067bb39abc2accf2 (diff) | |
parent | 614fe6fd4f0b6370b731c11d3cf5395f788b9ad4 (diff) |
Merge branch 'master' into PyQt6_upgrade
Conflicts:
cura/PlatformPhysics.py -> Removed shapely on master, while QTimer import got updated to Qt6.
plugins/Toolbox -> Entire folder is deleted in master, but it was updated to Qt6 here. This can all be removed.
Diffstat (limited to 'cura/PlatformPhysics.py')
-rwxr-xr-x | cura/PlatformPhysics.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/cura/PlatformPhysics.py b/cura/PlatformPhysics.py index 1cd5c1844c..e054528c42 100755 --- a/cura/PlatformPhysics.py +++ b/cura/PlatformPhysics.py @@ -1,8 +1,7 @@ -# Copyright (c) 2020 Ultimaker B.V. +# Copyright (c) 2022 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. from PyQt6.QtCore import QTimer -from shapely.errors import TopologicalError # To capture errors if Shapely messes up. from UM.Application import Application from UM.Logger import Logger @@ -138,11 +137,7 @@ class PlatformPhysics: own_convex_hull = node.callDecoration("getConvexHull") other_convex_hull = other_node.callDecoration("getConvexHull") if own_convex_hull and other_convex_hull: - try: - overlap = own_convex_hull.translate(move_vector.x, move_vector.z).intersectsPolygon(other_convex_hull) - except TopologicalError as e: # Can happen if the convex hull is degenerate? - Logger.warning("Got a topological error when calculating convex hull intersection: {err}".format(err = str(e))) - overlap = False + overlap = own_convex_hull.translate(move_vector.x, move_vector.z).intersectsPolygon(other_convex_hull) if overlap: # Moving ensured that overlap was still there. Try anew! temp_move_vector = move_vector.set(x = move_vector.x + overlap[0] * self._move_factor, z = move_vector.z + overlap[1] * self._move_factor) |