delete or modify force after addforce

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
barak ostraich
Posts: 42
Joined: Thu Apr 12, 2018 12:17 am

delete or modify force after addforce

Post by barak ostraich » Fri Jun 22, 2018 11:50 pm

how do i delete force added with model.addforce?
how do i modify it?

Tags:

User avatar
Thomas Uchida
Posts: 1793
Joined: Wed May 16, 2012 11:40 am

Re: delete or modify force after addforce

Post by Thomas Uchida » Sat Jun 23, 2018 2:47 pm

how do i delete force added with model.addforce? how do i modify it?
You can retrieve/remove the item from the Model's ForceSet.

Code: Select all

myForce = myModel.updForceSet().get(index);
myModel.updForceSet().remove(index);
See https://simtk.org/api_docs/opensim/api_ ... ceSet.html.

POST REPLY