Page 1 of 1

Exporting from OpenSim

Posted: Tue Jul 19, 2022 3:45 am
by tak1989
Hi.

I'm trying to export the OpenSIM model in the gait2392_simbody.osim file that comes with the installation.
There is no easy-to-use export option for some reason, nor one for import. How old is OpenSIM?

I found this for exporting: https://github.com/prnthp/opensim-stl-export

But I have trouble, though maybe that's just me since I don't know Python.
I put in the codes/CMD-commands as stated on GitHub, but then I get this error when actually attempting the conversion:

Code: Select all

(opensin) C:\Users\<name>\opensim-stl-export-master>python exportSTL.py gait2392_simbody.osim -o C:\Users\<name>
Traceback (most recent call last):
  File "exportSTL.py", line 1, in <module>
    import opensim as osim
ImportError: No module named opensim
Would appreciate any help.

EDIT: I'm fully aware the .OSIM files don't actually have any 3D data in there, and just tell the program how and what to draw.

Re: Exporting from OpenSim

Posted: Tue Jul 19, 2022 6:33 pm
by tkuchida
I'm trying to export the OpenSIM model in the gait2392_simbody.osim file that comes with the installation.
What specifically are you trying to export? If you're looking for the geometry files, you can find them in the Geometry directory.
How old is OpenSIM?
OpenSim was first released about 15 years ago (see Delp et al. (2007) "OpenSim: Open-Source Software to Create and Analyze Dynamic Simulations of Movement", https://nmbl.stanford.edu/publications/pdf/Delp2007.pdf). However, SIMM had been around for a while before that.
ImportError: No module named opensim
It looks like OpenSim might not be connected to Python. You can find some instructions on the "Scripting in Python" page in the documentation: https://simtk-confluence.stanford.edu:8 ... +in+Python.