Fixed bug that caused crash when object was entirely below platform

This commit is contained in:
Jaime van Kessel 2015-08-13 13:35:51 +02:00
parent a63d08288a
commit ddc34eaa3a
3 changed files with 9 additions and 8 deletions

View file

@ -38,7 +38,6 @@ class ConvexHullJob(Job):
vertex_data = mesh.getTransformed(self._node.getWorldTransformation()).getVertices()
# Don't use data below 0. TODO; We need a better check for this as this gives poor results for meshes with long edges.
vertex_data = vertex_data[vertex_data[:,1]>0]
hull = Polygon(numpy.rint(vertex_data[:, [0, 2]]).astype(int))
# First, calculate the normal convex hull around the points
@ -59,7 +58,7 @@ class ConvexHullJob(Job):
self._node.callDecoration("setConvexHullNode", hull_node)
self._node.callDecoration("setConvexHull", hull)
self._node.callDecoration("setConvexHullJob", None)
if self._node.getParent().callDecoration("isGroup"):
job = self._node.getParent().callDecoration("getConvexHullJob")
if job: