Read/write mesh file
Posted: Fri Jan 17, 2025 9:35 pm
Hi, I need to read/write the points and normals from/to mesh files (e.g. vtp, stl), and am currently using XML parsing methods (I prefer not to use external libraries). I wonder if such method already exists in OpenSim API. I tested PolygonalMesh(), but the output is empty.
Any help would be greatly appreciated.
Mohammadreza
Code: Select all
>>> import opensim as osim
>>> mesh = osim.PolygonalMesh().loadFile("l_femur.vtp")
>>> type(mesh)
<class 'NoneType'>
Mohammadreza