diff options
author | Simon Edwards <s.edwards@ultimaker.com> | 2016-05-23 14:47:21 +0300 |
---|---|---|
committer | Simon Edwards <s.edwards@ultimaker.com> | 2016-05-23 18:21:52 +0300 |
commit | d7127b800c24f85b7da9f9904d9f4e1eb74c7d97 (patch) | |
tree | 41266373bfd5246f412644d7ffc59a822f3b180d /cura/PlatformPhysics.py | |
parent | 0b858f38781847f79dc85181d27addf3e9365212 (diff) |
Finally, use the new convex hull code to compute the object 'shadow' and exclusion zones.
Contributes to CURA-1504
Diffstat (limited to 'cura/PlatformPhysics.py')
-rw-r--r-- | cura/PlatformPhysics.py | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/cura/PlatformPhysics.py b/cura/PlatformPhysics.py index 57d8f4e0ba..b0863ccfd7 100644 --- a/cura/PlatformPhysics.py +++ b/cura/PlatformPhysics.py @@ -45,7 +45,7 @@ class PlatformPhysics: root = self._controller.getScene().getRoot() for node in BreadthFirstIterator(root): - if node is root or type(node) is not SceneNode: + if node is root or type(node) is not SceneNode or node.getBoundingBox() is None: continue bbox = node.getBoundingBox() @@ -73,14 +73,9 @@ class PlatformPhysics: # If there is no convex hull for the node, start calculating it and continue. if not node.getDecorator(ConvexHullDecorator): node.addDecorator(ConvexHullDecorator()) - - if not node.callDecoration("getConvexHull"): - if not node.callDecoration("getConvexHullJob"): - job = ConvexHullJob.ConvexHullJob(node) - job.start() - node.callDecoration("setConvexHullJob", job) - - elif Preferences.getInstance().getValue("physics/automatic_push_free"): + node.callDecoration("recomputeConvexHull") + + if 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. |