Page 1 of 1

Insert stl file into opensim model

Posted: Fri May 08, 2020 12:35 am
by hustdonald
Hi,
I want add an extra load into arm26.osim. I have learnt that editing .osim file by notepad++ is able insert stl file into arm model.
Now, I already built my extra load model through solideworks and export them into several stl files and an xml file which indicates mass, inertia information.
But i failed to add my model into arm26.osim.
Does support documention provide any tutorial about add customized model into opensim model?

Thanks a lot,
Donald

Re: Insert stl file into opensim model

Posted: Fri May 08, 2020 2:05 am
by brycekillen05
Hi Donald,

It depends a little on what exact you're trying to do.

If you want to add the stl simply as a display geometry it can be added to the existing bodies under attached_geometry, if you are wanting to add a new body and use your stl as a display, doing it in notepad++ is very tedious, I would suggest using the API through either Matlab or Python, as you need to add a body, a joint, and coordinates for it to be implemented in OpenSim.

Some information on using scripting can be found here:
https://simtk-confluence.stanford.edu:8 ... pleScripts

Bryce

Re: Insert stl file into opensim model

Posted: Fri May 08, 2020 5:11 am
by hustdonald
Thank you, Bryce!
Actually, i want to insert my load model and then apply CMC to learn the change of muscle activation if there were a load attached to arm26.
Is this possible to realize?

Re: Insert stl file into opensim model

Posted: Fri May 08, 2020 6:56 am
by brycekillen05
If I am interpreting correctly, you want to add a load to the arms and see what happens compared to the model without right ? So in this case you want to add a body with mass to the model right ?

Following the API link I sent will give you an idea of how to do this.

Bryce

Re: Insert stl file into opensim model

Posted: Sun May 10, 2020 6:51 pm
by hustdonald
Thank you, Bryce.
I have solved this problem under your guidance and api link you offered.