diff --git a/src/mesh/pe/rigid_body/ConvexPolyhedron.cpp b/src/mesh/pe/rigid_body/ConvexPolyhedron.cpp index aa6eb1c8a862199bb9e5d9a9321d437cb6cfcfe1..85dab4d29ff4ec6ad359a463cb801e6d592ec301 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;