From af7f8f03984409e52d8e7ad0844f1258250c3d34 Mon Sep 17 00:00:00 2001
From: Sebastian Eibl <sebastian.eibl@fau.de>
Date: Fri, 19 Jan 2018 15:30:42 +0100
Subject: [PATCH] [BUGFIX] support function of ConvexPolyhedron

---
 src/mesh/pe/rigid_body/ConvexPolyhedron.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/mesh/pe/rigid_body/ConvexPolyhedron.cpp b/src/mesh/pe/rigid_body/ConvexPolyhedron.cpp
index aa6eb1c8a..85dab4d29 100644
--- a/src/mesh/pe/rigid_body/ConvexPolyhedron.cpp
+++ b/src/mesh/pe/rigid_body/ConvexPolyhedron.cpp
@@ -193,6 +193,8 @@ real_t ConvexPolyhedron::getSurfaceArea() const
  */
 Vec3 ConvexPolyhedron::support( const Vec3& d ) const
 {
+   if (math::equal(d.length(), real_t(0))) return Vec3(0,0,0);
+
    TriangleMesh::Normal d_loc = toOpenMesh( vectorFromWFtoBF(d) );
    
    TriangleMesh::VertexHandle startVertex;
-- 
GitLab