From af18019ce027cb3ccc401b2b1a50bd8c8a2ba5a7 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 26 Aug 2015 16:08:00 +0200 Subject: [PATCH] Added exception handling for checking overlap. Fixes Ultimaker/Cura#297 --- cura/PlatformPhysics.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cura/PlatformPhysics.py b/cura/PlatformPhysics.py index 8863081858..6416b83e01 100644 --- a/cura/PlatformPhysics.py +++ b/cura/PlatformPhysics.py @@ -111,8 +111,11 @@ class PlatformPhysics: # continue # 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")) - print("Overlap", overlap) + try: + 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: continue