Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
-
Connor Stapp
- Posts: 18
- Joined: Tue Jan 31, 2017 1:44 pm
Post
by Connor Stapp » Fri Jun 02, 2017 11:40 am
Hello!
I'm somewhat new to OpenSim and was looking through the code for the arm26.osim model. Within the model under many of the muscles, there are spots where a
PathWrapSet is defined. Under the
PathWrapSet there's a
PathWrap and under there is a
<range>. Here is some code from the arm26.osim code as an example:
Code: Select all
<PathWrapSet>
<objects>
<PathWrap>
<wrap_object>TRI</wrap_object>
<method>hybrid</method>
<range> -1 -1</range>
</PathWrap>
<PathWrap>
<wrap_object>TRIlonghh</wrap_object>
<method>hybrid</method>
<range> -1 -1</range>
</PathWrap>
I've been having troubles understanding what the
<range> -1 -1 </range> function does and do the values necessarily have to be -1 -1?
-
Bryce Killen
- Posts: 104
- Joined: Mon Nov 24, 2014 7:12 pm
Post
by Bryce Killen » Thu Jun 08, 2017 5:25 pm
Hi Connor,
You can find OpenSim API Documentation on PathWrapSet etc on the older version of Opensim (2.4) here
https://simtk.org/api_docs/opensim/api_docs24/
You may have already found you the answer you were looking for with respect to your original question but I will answer it in case you haven't.
The pathWrapSet for each muscle includes the set of wrap objects a specific muscle will wrap around. The range refers to when the muscle can wrap. AS you probably know a muscle can be represented by a number of points including origin, insertion and via points. This "range" tag defined between which points a muscle can wrap on a given object.
For example consider a simple example where a muscle is represented as an origin, a via point and an insertion. Let's also say you have a wrapping surface between the origin and via point. You would only want the muscle to wrap on this surface between these two points. Therefore you can set the range to be from 0 1 so the muscle will only wrap on this object between it's origin and the via point.
Hopefully this answers your question if you haven't already found it. I noticed you are posting a lot of wrapping surfaces so the above doxygen page may also provide you with some other API function documentations for these wrapping surfaces.
Thanks
Bryce Killen
-
Thomas Uchida
- Posts: 1777
- Joined: Wed May 16, 2012 11:40 am
Post
by Thomas Uchida » Fri Jun 09, 2017 2:51 pm
Thanks, Bryce. I think you have correctly described the intent of the property, and there seems to be some code in GeometryPath.cpp that uses it, but I don't think there is any test coverage for a non-default range. I suggest using a simple model to verify that this property is behaving as you expect.