Disabled bounding box intersection for physics

Fixes Ultimaker/Cura#294
This commit is contained in:
Jaime van Kessel 2015-08-26 15:24:10 +02:00
parent a49ce21fbe
commit a8afb9045f

View file

@ -107,11 +107,12 @@ class PlatformPhysics:
continue continue
# Check to see if the bounding boxes intersect. If not, we can ignore the node as there is no way the hull intersects. # Check to see if the bounding boxes intersect. If not, we can ignore the node as there is no way the hull intersects.
if node.getBoundingBox().intersectsBox(other_node.getBoundingBox()) == AxisAlignedBox.IntersectionResult.NoIntersection: #if node.getBoundingBox().intersectsBox(other_node.getBoundingBox()) == AxisAlignedBox.IntersectionResult.NoIntersection:
continue # continue
# Get the overlap distance for both convex hulls. If this returns None, there is no intersection. # 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")) overlap = node.callDecoration("getConvexHull").intersectsPolygon(other_node.callDecoration("getConvexHull"))
print("Overlap", overlap)
if overlap is None: if overlap is None:
continue continue