Add A Comment:
Hi, Ayman. No, there aren't any special properties of .obj that I know of, and in fact .vtp is also supported currently. We impose various requirements on the mesh after it has been read in. I'm not familiar with .stl but I assume it would work too if the SimTK::PolygonalMesh class had a loadStlFile() method in addition to loadObjFile() and loadVtpFile(). It would also be possible to construct an SimTK::PolygonalMesh directly from the in-memory representation of a .stl file after it had been read in by OpenSim; the "load" methods are just there for convenience. There are no current plans for adding any additional file formats to PolygonalMesh. However, we do have plans to rework the entire contact system in OpenSim to use newer Simbody features. We should consider how to support more contact mesh formats then. In the meanwhile, conversion to .vtp or .obj is required. Usually it is a good idea to process the mesh anyway before using it for contact because a mesh originally designed for display is likely to be much more dense than needed. Regards, Sherm
Sherm, Is there a reason for using obj exclusively? Does it guarantee water tight volume or require normals that are not necessarily available in stl? If so please feel free to close. Thanks,