Hi,
In the ‘\AMMRV1.2\Body\AAUHuman\ToolBox\JointReactions’ folder there is the ‘DrawJointReactions.any’ file.
I attach the code:
AnyFolder DrawJointReactions={
AnyForceMomentMeasure ForceMomentMeasure={
AnyForceBase &ref1=..Constraints.Reaction;
AnyRefFrame &ref2=..ref1;
};
AnyDrawVector DrawFX = {
AnyRefFrame &ref = ..ref1;
AnyVec3 F=.ForceMomentMeasure.F*..ref1.Axes;
Vec = ..DrawRef.DrawSettingsJointReactions.Lin.ScaleFactor*{-1,0,0}*F[0];
GlobalCoord = Off;
PointAway = Off;
DrawCoord = Off;
Line.RGB = {0,1,0};//DrawRef.DrawSettingsJointReactions.Lin.RGB;
Line.Thickness = ..DrawRef.DrawSettingsJointReactions.Lin.Thickness;
Line.End.Thickness = 4*..DrawRef.DrawSettingsJointReactions.Lin.Thickness;
Line.End.Length = 2*..DrawRef.DrawSettingsJointReactions.Lin.Thickness;
};
AnyDrawVector DrawFY = {
AnyRefFrame &ref = ..ref1;
AnyVec3 F=.ForceMomentMeasure.F*..ref1.Axes;
Vec = ..DrawRef.DrawSettingsJointReactions.Lin.ScaleFactor*{0,-1,0}*F[1];
GlobalCoord = Off;
PointAway = Off;
DrawCoord = Off;
Line.RGB = {0,1,0};//DrawRef.DrawSettingsJointReactions.Lin.RGB;
Line.Thickness = ..DrawRef.DrawSettingsJointReactions.Lin.Thickness;
Line.End.Thickness = 4*..DrawRef.DrawSettingsJointReactions.Lin.Thickness;
Line.End.Length = 2*..DrawRef.DrawSettingsJointReactions.Lin.Thickness;
};
AnyDrawVector DrawFZ = {
AnyRefFrame &ref = ..ref1;
AnyVec3 F=.ForceMomentMeasure.F*..ref1.Axes;
Vec = ..DrawRef.DrawSettingsJointReactions.Lin.ScaleFactor*{0,0,-1}*F[2];
GlobalCoord = Off;
PointAway = Off;
DrawCoord = Off;
Line.RGB = {0,1,0};//.DrawRef.DrawSettingsJointReactions.Lin.RGB;
Line.Thickness = ..DrawRef.DrawSettingsJointReactions.Lin.Thickness;
Line.End.Thickness = 4*..DrawRef.DrawSettingsJointReactions.Lin.Thickness;
Line.End.Length = 2*..DrawRef.DrawSettingsJointReactions.Lin.Thickness;
};
AnyDrawVector DrawMX = {
AnyRefFrame &ref = ..ref1;
AnyVec3 M=.ForceMomentMeasure.M*..ref1.Axes;
Vec = ..DrawRef.DrawSettingsJointReactions.Rot.ScaleFactor*{-1,0,0}*M[0];
GlobalCoord = Off;
PointAway = Off;
DrawCoord = Off;
Line.RGB = ..DrawRef.DrawSettingsJointReactions.Rot.RGB;
Line.Thickness = ..DrawRef.DrawSettingsJointReactions.Rot.Thickness;
Line.End.Thickness = 4*..DrawRef.DrawSettingsJointReactions.Rot.Thickness;
Line.End.Length = 2*..DrawRef.DrawSettingsJointReactions.Rot.Thickness;
};
AnyDrawVector DrawMY = {
AnyRefFrame &ref = ..ref1;
AnyVec3 M=.ForceMomentMeasure.M*..ref1.Axes;
Vec = ..DrawRef.DrawSettingsJointReactions.Rot.ScaleFactor*{0,-1,0}*M[1];
GlobalCoord = Off;
PointAway = Off;
DrawCoord = Off;
Line.RGB = ..DrawRef.DrawSettingsJointReactions.Rot.RGB;
Line.Thickness = ..DrawRef.DrawSettingsJointReactions.Rot.Thickness;
Line.End.Thickness = 4*..DrawRef.DrawSettingsJointReactions.Rot.Thickness;
Line.End.Length = 2*..DrawRef.DrawSettingsJointReactions.Rot.Thickness;
};
AnyDrawVector DrawMZ = {
AnyRefFrame &ref = ..ref1;
AnyVec3 M=.ForceMomentMeasure.M*..ref1.Axes;
Vec = ..DrawRef.DrawSettingsJointReactions.Rot.ScaleFactor*{0,0,-1}*M[2];
GlobalCoord = Off;
PointAway = Off;
DrawCoord = Off;
Line.RGB = ..DrawRef.DrawSettingsJointReactions.Rot.RGB;
Line.Thickness = ..DrawRef.DrawSettingsJointReactions.Rot.Thickness;
Line.End.Thickness = 4*..DrawRef.DrawSettingsJointReactions.Rot.Thickness;
Line.End.Length = 2*..DrawRef.DrawSettingsJointReactions.Rot.Thickness;
};
};
I guess that ‘…ref1’ in the AnyForceMomentMeasure is the point of interest.
Let’s see a portion of above code:
AnyDrawVector DrawFX = {
AnyRefFrame &ref = ..ref1;
AnyVec3 F=.ForceMomentMeasure.F*..ref1.Axes;
Vec = ..DrawRef.DrawSettingsJointReactions.Lin.ScaleFactor*{-1,0,0}*F[0];
GlobalCoord = Off;
PointAway = Off;
DrawCoord = Off;
Line.RGB = {0,1,0};//DrawRef.DrawSettingsJointReactions.Lin.RGB;
Line.Thickness = ..DrawRef.DrawSettingsJointReactions.Lin.Thickness;
Line.End.Thickness = 4*..DrawRef.DrawSettingsJointReactions.Lin.Thickness;
Line.End.Length = 2*..DrawRef.DrawSettingsJointReactions.Lin.Thickness;
};
I’d like to ask why the ‘Vec’ has the opposite direction by multiplying {-1,0,0}.
Best regards and thanks in advance,
Moonki