Express GHReactions Global ResultantForce into Local RefFrame

Hi there,

I’m working with the shoulder model (AMS 4.0.2). I want to express the global resultant force of GHReactions into a plane aligned with the glenoid fossa, also aligned with the plane used to create the EdgeNodes/EdgeMuscles (let’s call it MyLocalRefFrame). I use the following code to do it :

AnyVec3 FTotalGlobal=F1+F2+F3+F4+F5+F6+F7+F8;

AnyVec3 ResForceLocal = (…’*…Jnt.GHReactions.ResultanForce.FTotalGlobal’)’;


AnyDrawVector DrawFTotal = {

  AnyRefFrame &;
  Vec =Main.DrawSettings.DrawSettingsSupport.Lin.ScaleFactor*.FTotalGlobal;
  GlobalCoord = On;
  PointAway = On;
  DrawCoord = Off;
  Line.RGB = {0,1,1};//Main.DrawSettings.DrawSettingsSupport.Lin.RGB;
  Line.Thickness = 0.5*Main.DrawSettings.DrawSettingsSupport.Lin.Thickness;
  Line.End.Thickness = 1*Main.DrawSettings.DrawSettingsSupport.Lin.Thickness;  
  Line.End.Length = 2*Main.DrawSettings.DrawSettingsSupport.Lin.Thickness;


AnyDrawVector ResForceLocalVec = {

AnyRefFrame &ref=;

Vec =Main.DrawSettings.DrawSettingsSupport.Lin.ScaleFactor*.ResForceLocal;

GlobalCoord = Off;

PointAway = Off;
DrawCoord = Off;

Line.RGB = {0,0,1};
Line.Thickness = 0.5Main.DrawSettings.DrawSettingsSupport.Lin.Thickness;
Line.End.Thickness = 1
Line.End.Length = 2*Main.DrawSettings.DrawSettingsSupport.Lin.Thickness;

However, when I look (see attached snapshot) at both global (cyan) and local resultant forces (blue), I do not get the exact same vectors, but rather a slight difference in orientation, and this difference do not change over time.

Can you help me with that ?


Hi Pierre

Please try to check the numbers of the vectors… if these are similar

At some point there was an update problem with the AnyDrawVector… it was visually one time-step behind in some cases…

I think AMS 4.0.2 had this issue and i just want to rule this possibility out as the cause of the problem

Best regards

Hi Soren,

How can I do this check ? I have a set of coordinates that is global and another one that is local. The XYZ coordinates will be different for sure. If you say that this is a visualization issue, there is no problem for me. I just wanted to be sure that the values were valid.

Thank you


Hi Pierre

Please try to convert the coordinates into the same coordinate system, then compare the numbers.

I can not guarantee that it is just a visible issue, but the numbers will confirm this or not.

Best regards