From 4e902046208b2c2a31542ab8b3cce38b873f1443 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Thu, 21 Dec 2017 15:51:24 +0100 Subject: [PATCH] Only push aways other objects if they are printing meshes CURA-4705 --- cura/PlatformPhysics.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cura/PlatformPhysics.py b/cura/PlatformPhysics.py index 23197dac24..471e54dba6 100755 --- a/cura/PlatformPhysics.py +++ b/cura/PlatformPhysics.py @@ -76,7 +76,8 @@ class PlatformPhysics: if not node.getDecorator(ConvexHullDecorator): node.addDecorator(ConvexHullDecorator()) - if Preferences.getInstance().getValue("physics/automatic_push_free"): + # only push away objects if this node is a printing mesh + if not node.callDecoration("isNonPrintingMesh") and Preferences.getInstance().getValue("physics/automatic_push_free"): # Check for collisions between convex hulls for other_node in BreadthFirstIterator(root): # Ignore root, ourselves and anything that is not a normal SceneNode. @@ -98,6 +99,9 @@ class PlatformPhysics: if other_node in transformed_nodes: continue # Other node is already moving, wait for next pass. + if other_node.callDecoration("isNonPrintingMesh"): + continue + overlap = (0, 0) # Start loop with no overlap current_overlap_checks = 0 # Continue to check the overlap until we no longer find one.