For the model that I'm creating, I needed to create a contact mesh for a cylinder and a sphere. When I tried to load the model into OpenSim I got the following error:
java.lang.RuntimeException: SimTK Exception thrown at ContactGeometry_TriangleMesh.cpp:447:
Bad call to Simbody API method ContactGeometry::TriangleMesh::Impl::TriangleMesh::Impl(): Multiple faces have an edge between vertices 1 and 2 in the same order.
How would I fix this error?
Contact Geometry Error
- Connor Stapp
- Posts: 18
- Joined: Tue Jan 31, 2017 1:44 pm
- Thomas Uchida
- Posts: 1792
- Joined: Wed May 16, 2012 11:40 am
Re: Contact Geometry Error
It sounds like there are faces in your mesh that share an edge but have defined it in the same direction (i.e., the vertices are specified in the same order). This situation is inadmissible because you will end up with either (i) overlapping faces with outward-facing normals or (ii) faces whose normals are pointed in the wrong direction. Here's the code: https://github.com/simbody/simbody/blob ... h.cpp#L402.