Import .vtp file

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Matteo Musso
Posts: 12
Joined: Wed May 23, 2018 3:42 am

Import .vtp file

Post by Matteo Musso » Thu Oct 04, 2018 3:29 am

Hi, I'm trying to learn how to use opensim for a project for my thesis. I'm trying to rewrite the matlab code to make the arm26 model to learn how to write whit this language. I can not create the geometry and load the .vtp files like 'ground_ribs.vtp', which command can i use?

Thanks for your answer!

Tags:

User avatar
jimmy d
Posts: 1375
Joined: Thu Oct 04, 2007 11:51 pm

Re: Import .vtp file

Post by jimmy d » Thu Oct 04, 2018 7:25 am

It is not clear what you want to do, can you further explain?

User avatar
Matteo Musso
Posts: 12
Joined: Wed May 23, 2018 3:42 am

Re: Import .vtp file

Post by Matteo Musso » Thu Oct 04, 2018 8:00 am

In the .osim file there are these line of code:

Code: Select all

<VisibleObject>
<!--Set of geometry files and associated attributes, allow .vtp, .stl, .obj-->
<GeometrySet>
<objects>
<DisplayGeometry>
<!--Name of geometry file .vtp, .stl, .obj-->
<geometry_file>ground_ribs.vtp</geometry_file>
<!--Color used to display the geometry when visible-->
<color> 1 1 1</color>
<!--Name of texture file .jpg, .bmp-->
<texture_file />
<!--in body transform specified as 3 rotations (rad) followed by 3 translations rX rY rZ tx ty tz-->
<transform> -0 0 -0 0 0 0</transform>
<!--Three scale factors for display purposes: scaleX scaleY scaleZ-->
<scale_factors> 1 1 1</scale_factors>
<!--Display Pref. 0:Hide 1:Wire 3:Flat 4:Shaded-->
<display_preference>4</display_preference>
<!--Display opacity between 0.0 and 1.0-->
<opacity>1</opacity>
</DisplayGeometry>
Which matlab commands should I use to get them?

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

Re: Import .vtp file

Post by Thomas Uchida » Thu Oct 04, 2018 8:09 am

I can not create the geometry and load the .vtp files like 'ground_ribs.vtp', which command can i use?
attachGeometry() in the Frame class. Please see the following:
- Doxygen documentation: https://simtk.org/api_docs/opensim/api_ ... 2daa981395
- Example (opensim-core/Bindings/Java/Matlab/examples/OpenSimCreateTugOfWarModel.m, line 52): https://github.com/opensim-org/opensim- ... odel.m#L52

User avatar
Matteo Musso
Posts: 12
Joined: Wed May 23, 2018 3:42 am

Re: Import .vtp file

Post by Matteo Musso » Thu Oct 04, 2018 9:51 am

Ok, I get it, thanks!

POST REPLY