From ab22611ecfb4f74146afc49f78ee1065373447c9 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Mon, 11 Sep 2023 15:44:07 +0200 Subject: [PATCH 1/3] Remove convex hull computation when not required ConvexHullDecorator is setup at node creation, so I can't see a way that this part of code is called. Moreover, it would add a decorator for a layer plan node, which actually leads to a crash. CURA-10004 --- cura/PlatformPhysics.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/cura/PlatformPhysics.py b/cura/PlatformPhysics.py index 402b9fe2509..9a86223db9d 100755 --- a/cura/PlatformPhysics.py +++ b/cura/PlatformPhysics.py @@ -84,10 +84,6 @@ def _onChangeTimerFinished(self): z_offset = node.callDecoration("getZOffset") if node.getDecorator(ZOffsetDecorator.ZOffsetDecorator) else 0 move_vector = move_vector.set(y = -bbox.bottom + z_offset) - # If there is no convex hull for the node, start calculating it and continue. - if not node.getDecorator(ConvexHullDecorator) and not node.callDecoration("isNonPrintingMesh"): - node.addDecorator(ConvexHullDecorator()) - # only push away objects if this node is a printing mesh if not node.callDecoration("isNonPrintingMesh") and app_automatic_push_free: # Do not move locked nodes From e4a6b8dd911ddfac576749d07a9d0a5e158818e7 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Mon, 18 Sep 2023 14:57:55 +0200 Subject: [PATCH 2/3] Revert "Remove convex hull computation when not required" This reverts commit ab22611ecfb4f74146afc49f78ee1065373447c9. --- cura/PlatformPhysics.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cura/PlatformPhysics.py b/cura/PlatformPhysics.py index 9a86223db9d..402b9fe2509 100755 --- a/cura/PlatformPhysics.py +++ b/cura/PlatformPhysics.py @@ -84,6 +84,10 @@ def _onChangeTimerFinished(self): z_offset = node.callDecoration("getZOffset") if node.getDecorator(ZOffsetDecorator.ZOffsetDecorator) else 0 move_vector = move_vector.set(y = -bbox.bottom + z_offset) + # If there is no convex hull for the node, start calculating it and continue. + if not node.getDecorator(ConvexHullDecorator) and not node.callDecoration("isNonPrintingMesh"): + node.addDecorator(ConvexHullDecorator()) + # only push away objects if this node is a printing mesh if not node.callDecoration("isNonPrintingMesh") and app_automatic_push_free: # Do not move locked nodes From 9334447972cc20fb61bf69261a14c30fdfc6bad0 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Mon, 18 Sep 2023 15:16:04 +0200 Subject: [PATCH 3/3] Do not compute a convex hull for layer data nodes CURA-10004 --- cura/PlatformPhysics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/PlatformPhysics.py b/cura/PlatformPhysics.py index 402b9fe2509..1ef39de80d6 100755 --- a/cura/PlatformPhysics.py +++ b/cura/PlatformPhysics.py @@ -85,7 +85,7 @@ def _onChangeTimerFinished(self): move_vector = move_vector.set(y = -bbox.bottom + z_offset) # If there is no convex hull for the node, start calculating it and continue. - if not node.getDecorator(ConvexHullDecorator) and not node.callDecoration("isNonPrintingMesh"): + if not node.getDecorator(ConvexHullDecorator) and not node.callDecoration("isNonPrintingMesh") and node.callDecoration("getLayerData") is None: node.addDecorator(ConvexHullDecorator()) # only push away objects if this node is a printing mesh