Coordinates of muscle points with wrapping surfaces
- Simao Brito da Luz
- Posts: 8
- Joined: Tue Nov 27, 2012 7:10 pm
Coordinates of muscle points with wrapping surfaces
Hi
Been trying to figure out how to determine the coordinates of muscle points whose trajectory changes due to wrapping surfaces.
Basically would like to know the coordinates of multiple points in the muscle path.
Is PathWrapPoint or getCurrentDisplayPath unavailable in OpenSim 3.3?
Cheers
Been trying to figure out how to determine the coordinates of muscle points whose trajectory changes due to wrapping surfaces.
Basically would like to know the coordinates of multiple points in the muscle path.
Is PathWrapPoint or getCurrentDisplayPath unavailable in OpenSim 3.3?
Cheers
- Thomas Uchida
- Posts: 1792
- Joined: Wed May 16, 2012 11:40 am
Re: Coordinates of muscle points with wrapping surfaces
A similar question was asked and answered on this Forum thread: viewtopicPhpbb.php?f=91&t=7723.
- Simao Brito da Luz
- Posts: 8
- Joined: Tue Nov 27, 2012 7:10 pm
Re: Coordinates of muscle points with wrapping surfaces
Thanks Tom
So basically the answer is no. Was this possible in previous OpenSim versions?
Cheers
So basically the answer is no. Was this possible in previous OpenSim versions?
Cheers
- Thomas Uchida
- Posts: 1792
- Joined: Wed May 16, 2012 11:40 am
Re: Coordinates of muscle points with wrapping surfaces
If you're seeking an answer to the question "Is PathWrapPoint or getCurrentDisplayPath unavailable in OpenSim 3.3?" [emphasis added], then I believe you are correct and the answer is "no". To clarify, if you're trying to extract points along a muscle's path, I believe the scripts (written in both 3.3 and 4.0) posted to topic 7723 (viewtopicPhpbb.php?f=91&t=7723) do that. Please provide more detail if that isn't what you're trying to do.
- Simao Brito da Luz
- Posts: 8
- Joined: Tue Nov 27, 2012 7:10 pm
Re: Coordinates of muscle points with wrapping surfaces
Thanks for your reply Tom
Sorry if i havent been clear.
I would like to determine the coordinates of multiple points along a path that intercepts a wrapping surface. Or the points along the "arc" that is created due to the interception between muscle path and a wrap object.
Cheers
Sorry if i havent been clear.
I would like to determine the coordinates of multiple points along a path that intercepts a wrapping surface. Or the points along the "arc" that is created due to the interception between muscle path and a wrap object.
Cheers
- Thomas Uchida
- Posts: 1792
- Joined: Wed May 16, 2012 11:40 am
Re: Coordinates of muscle points with wrapping surfaces
Thanks for clarifying. Not sure you can access the path points that lie on the surface of the wrap object in 3.3, but I think you can at least access the endpoints of the arc via getCurrentPath():
The following is displayed in the MATLAB Command Window:
Code: Select all
import org.opensim.modeling.*
% Load model and create underlying computational system.
model = Model('arm26.osim');
state = model.initSystem();
% References to points defining muscle path.
BRA = model.getMuscles().get('BRA');
pathPointSet = BRA.getGeometryPath().getPathPointSet();
currentPath = BRA.getGeometryPath().getCurrentPath(state);
% Inspect pathPointSet.
for i = 0:pathPointSet.getSize()-1
fprintf('pathPointSet[%d]: %s\n', i, ...
char(pathPointSet.get(i).getLocation()));
end
% Inspect currentPath.
for i = 0:currentPath.getSize()-1
fprintf('currentPath[%d]: %s\n', i, ...
char(currentPath.get(i).getLocation()));
end
Code: Select all
pathPointSet[0]: ~[0.0068,-0.1739,-0.0036]
pathPointSet[1]: ~[-0.0032,-0.0239,0.0009]
currentPath[0]: ~[0.0068,-0.1739,-0.0036]
currentPath[1]: ~[0.018729,-0.290559,-0.00910357]
currentPath[2]: ~[0.0135788,-0.304312,-0.0100326]
currentPath[3]: ~[-0.0032,-0.0239,0.0009]
- Simao Brito da Luz
- Posts: 8
- Joined: Tue Nov 27, 2012 7:10 pm
Re: Coordinates of muscle points with wrapping surfaces
Thats a start for sure
What about with older versions?
Cheers
What about with older versions?
Cheers
- Thomas Uchida
- Posts: 1792
- Joined: Wed May 16, 2012 11:40 am
Re: Coordinates of muscle points with wrapping surfaces
MATLAB scripting wasn't introduced until 3.0. I believe functionality has strictly increased with newer versions.What about with older versions?
- Simao Brito da Luz
- Posts: 8
- Joined: Tue Nov 27, 2012 7:10 pm
Re: Coordinates of muscle points with wrapping surfaces
Sure
I think I will try and replicate (in Matlab) a similar method OpenSim uses to recreate the wrapping points around cylinder:
https://github.com/opensim-org/opensim- ... r.cpp#L164
Is the above link the correct one?
Cheers
I think I will try and replicate (in Matlab) a similar method OpenSim uses to recreate the wrapping points around cylinder:
https://github.com/opensim-org/opensim- ... r.cpp#L164
Is the above link the correct one?
Cheers
- Thomas Uchida
- Posts: 1792
- Joined: Wed May 16, 2012 11:40 am
Re: Coordinates of muscle points with wrapping surfaces
Yes, it looks like that's where the points are calculated.Is the above link the correct one?