Removing a body from model using Python
Removing a body from model using Python
I have a full body model that I would like to edit via python. I can get handles to bodysets, muscles, etc but can't figure out how to remove a component from the model...I'd like to remove the body's/joints/muscles etc for the left leg. Ofc, It's possible to edit the xml file but I'd like to do everything via Python.
- Dimitar Stanev
- Posts: 1096
- Joined: Fri Jan 31, 2014 5:14 am
Re: Removing a body from model using Python
You can use the remove function. But you will need to remove the corresponding joints, constraints and other model elements that refer to the body. For example, may be muscles that are attached to the removed body.
https://simtk.org/api_docs/opensim/api_ ... 294b032d55
https://simtk.org/api_docs/opensim/api_ ... 294b032d55