mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 02:29:02 +08:00
Added exception handling for checking overlap.
Fixes Ultimaker/Cura#297
This commit is contained in:
parent
4fb577b893
commit
af18019ce0
@ -111,8 +111,11 @@ class PlatformPhysics:
|
|||||||
# continue
|
# continue
|
||||||
|
|
||||||
# Get the overlap distance for both convex hulls. If this returns None, there is no intersection.
|
# Get the overlap distance for both convex hulls. If this returns None, there is no intersection.
|
||||||
overlap = node.callDecoration("getConvexHull").intersectsPolygon(other_node.callDecoration("getConvexHull"))
|
try:
|
||||||
print("Overlap", overlap)
|
overlap = node.callDecoration("getConvexHull").intersectsPolygon(other_node.callDecoration("getConvexHull"))
|
||||||
|
except:
|
||||||
|
overlap = None #It can sometimes occur that the caclulated convex hull has no size, in which case there is no overlap.
|
||||||
|
|
||||||
if overlap is None:
|
if overlap is None:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user