ligamentplugin

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Hang Xu
Posts: 26
Joined: Wed Aug 19, 2009 10:55 pm

ligamentplugin

Post by Hang Xu » Mon Sep 19, 2011 2:04 pm

Hi, everyone
I have a question about how to use the ligamentplugin in the OpenSim.
I have already download the plugin from http://wiki.simtk.org/opensim/SamplePlugins and decompression of the file to the path of the folder named "plugins". Is it all the things I should do before I start to create my own ligament in the OpenSim model ?
Thanks!

User avatar
Ayman Habib
Posts: 2242
Joined: Fri Apr 01, 2005 12:24 pm

Re: ligamentplugin

Post by Ayman Habib » Tue Sep 20, 2011 10:46 am

Hi Hang,

The Ligament class has been incorporated in the OpenSim mainstream, if however you want to create your own Ligament class (you'll need to change the name to something like "MyLigament") then feel free to try to use these files as a starting point and let us know how it works or if you run into problems so that we can update it.

Please let us know if you have any questions,
-Ayman

User avatar
Hang Xu
Posts: 26
Joined: Wed Aug 19, 2009 10:55 pm

Re: ligamentplugin

Post by Hang Xu » Wed Sep 21, 2011 11:51 am

Hi, Ayman
Thanks for the reply. so if I understand right, since I put the ligamentplugin file into the the path of the folder named "plugins", and following the form as below:
<Ligament name="pmPCL_r">
<isDisabled> false </isDisabled>
<GeometryPath name="">
<PathPointSet name="">
<objects>
<PathPoint name="pmPCL_r-P1">
<location> -0.00900000 -0.04700000 -0.00200000 </location>
<VisibleObject name="">
<!--Set of geometry files and associated attributes, allow .vtp, .stl,
.obj-->
<GeometrySet name="">
<objects/>
<groups/>
</GeometrySet>
<!--Three scale factors for display purposes: scaleX scaleY scaleZ-->
<scale_factors> 1.00000000 1.00000000 1.00000000 </scale_factors>
<!--transform relative to owner specified as 3 rotations (rad) followed by
3 translations rX rY rZ tx ty tz-->
<transform> -0.00000000 0.00000000 -0.00000000 0.00000000 0.00000000 0.00000000 </transform>
<!--Whether to show a coordinate frame-->
<show_axes> false </show_axes>
<!--Display Pref. 0:Hide 1:Wire 3:Flat 4:Shaded Can be overriden for
individual geometries-->
<display_preference> 4 </display_preference>
</VisibleObject>
<body> tibia_r </body>
</PathPoint>
<PathPoint name="pmPCL_r-P2">
<location> -0.00300000 -0.41000000 -0.00900000 </location>
<VisibleObject name="">
<!--Set of geometry files and associated attributes, allow .vtp, .stl,
.obj-->
<GeometrySet name="">
<objects/>
<groups/>
</GeometrySet>
<!--Three scale factors for display purposes: scaleX scaleY scaleZ-->
<scale_factors> 1.00000000 1.00000000 1.00000000 </scale_factors>
<!--transform relative to owner specified as 3 rotations (rad) followed by
3 translations rX rY rZ tx ty tz-->
<transform> -0.00000000 0.00000000 -0.00000000 0.00000000 0.00000000 0.00000000 </transform>
<!--Whether to show a coordinate frame-->
<show_axes> false </show_axes>
<!--Display Pref. 0:Hide 1:Wire 3:Flat 4:Shaded Can be overriden for
individual geometries-->
<display_preference> 4 </display_preference>
</VisibleObject>
<body> femur_r </body>
</PathPoint>
</objects>
<groups/>
</PathPointSet>
<VisibleObject name="">
<!--Set of geometry files and associated attributes, allow .vtp, .stl,
.obj-->
<GeometrySet name="">
<objects/>
<groups/>
</GeometrySet>
<!--Three scale factors for display purposes: scaleX scaleY scaleZ-->
<scale_factors> 1.00000000 1.00000000 1.00000000 </scale_factors>
<!--transform relative to owner specified as 3 rotations (rad) followed by
3 translations rX rY rZ tx ty tz-->
<transform> -0.00000000 0.00000000 -0.00000000 0.00000000 0.00000000 0.00000000 </transform>
<!--Whether to show a coordinate frame-->
<show_axes> false </show_axes>
<!--Display Pref. 0:Hide 1:Wire 3:Flat 4:Shaded Can be overriden for
individual geometries-->
<display_preference> 4 </display_preference>
</VisibleObject>
<PathWrapSet name="">
<objects/>
<groups/>
</PathWrapSet>
</GeometryPath>
<!--resting length of the ligament-->
<resting_length> 0.03000000 </resting_length>
<!--force magnitude that scales the force-length curve-->
<pcsa_force> 1900.00000000 </pcsa_force>
<!--Function representing the force-length behavior of the ligament-->
<force_length_curve>
<NaturalCubicSpline name="">
<x> -5.00000000 0.99800000 0.99900000 1.00000000 1.03000000 1.06000000 1.07000000 1.10000000 2.00000000 </x>
<y> 0.00000000 0.00000000 0.00000000 0.00000000 0.00750000 0.03000000 0.04000000 0.07000000 0.97000000 </y>
</NaturalCubicSpline>
</force_length_curve>
</Ligament>

I can create my own ligament with the XML code and OpenSim can identify these codes as the ligament, is that right?

POST REPLY