mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 07:03:56 -06:00
Remove references to Shapely
This has been replaced with PyClipper so we don't need to import Shapely any more. Clipper doesn't give any exceptions as far as I know. Contributes to issue CURA-8592.
This commit is contained in:
parent
58c9522d78
commit
770eb03d62
1 changed files with 1 additions and 6 deletions
|
@ -2,7 +2,6 @@
|
|||
# Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
from PyQt5.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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue