From 08391250765dc1a01780421a1db86bf13294b85c Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Thu, 21 Dec 2017 13:31:19 +0100 Subject: [PATCH] Fix platform physics not working across different build plates. CURA-4525 --- cura/PlatformPhysics.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cura/PlatformPhysics.py b/cura/PlatformPhysics.py index 5a57912db6..43118c5d01 100755 --- a/cura/PlatformPhysics.py +++ b/cura/PlatformPhysics.py @@ -57,6 +57,7 @@ class PlatformPhysics: # Only check nodes inside build area. nodes = [node for node in nodes if (hasattr(node, "_outside_buildarea") and not node._outside_buildarea)] + active_build_plate = Application.getInstance().getBuildPlateModel().activeBuildPlate random.shuffle(nodes) for node in nodes: @@ -80,7 +81,7 @@ class PlatformPhysics: # Check for collisions between convex hulls for other_node in BreadthFirstIterator(root): # Ignore root, ourselves and anything that is not a normal SceneNode. - if other_node is root or not issubclass(type(other_node), SceneNode) or other_node is node: + if other_node is root or not issubclass(type(other_node), SceneNode) or other_node is node or other_node.callDecoration("getBuildPlateNumber") != node.callDecoration("getBuildPlateNumber"): continue # Ignore collisions of a group with it's own children