I have a general question:
How do I select a coordinate system for a translation of a node?
I am interested in the rotated coordinate system of another node which I have previously defined, however, it always picks the std coordinate system orientation. Besides the example below I have also tried:
sRel=.GHReactionCenterNodeRotated1.sRel+{0,-0.015,0}*.GHReactionCenterNodeRotated1.ARel;
but also there I don't get a translation in the desired y-direction only.
Thank you for your help!
Best,
Johanna
AnyRefNode GHReactionCenterNodeRotated1 = {
sRel=.GHReactionCenterNode.sRel;
AnyDrawRefFrame drw={ScaleXYZ={0.05,0.05,0.05};};
AnyDrawNode drw2 = {ScaleXYZ={0.001,0.001,0.001}*2;};
//Calculate rot matrix for cylinder using three points
AnyMat33 Mat = RotMat(sRel,.EdgeNode1.sRel,.EdgeNode2.sRel);
ARel= Mat;
};
//achieve rotation of glenoid around point on inferior glenoid rim
AnyRefNode GHReactionTestNode = {
//sRel=.GHReactionCenterNode.sRel;
// JO: change location of rotated node
sRel=.GHReactionCenterNodeRotated1.sRel+{0,0.03,0}*.GHReactionCenterNodeRotated1.ARel;
AnyDrawRefFrame drw={RGB = {1,0,0}; ScaleXYZ={0.05,0.05,0.05};};
AnyDrawNode drw2 = {RGB = {1,0,0}; ScaleXYZ={0.001,0.001,0.001}*2;};
//Johanna: glenoid inclination - using axis and angle
AnyMat33 Mat2 = RotMat(30*pi/180, x);
ARel=.GHReactionCenterNodeRotated1.ARel*Mat2;
};
Thank you for your reply!
I hope the image on the right is illustrating what is happening and what I want to achieve
The green coordinate system is the initial orientation of the GHReactionCenterNodeRotated1 and the yellow one after the rotation according to the rotation matrix "Mat".
I would like to translate the red node ( GHReactionTestNode) along the yellow coordinate system and not along the green one.
Thank you and best regards
Johanna
PS: the image is based on the following defintion of the GHReaction Test Node
//achieve rotation of glenoid around point on inferior glenoid rim
AnyRefNode GHReactionTestNode = {
//sRel=.GHReactionCenterNode.sRel;
// JO: change location of rotated node
sRel=.GHReactionCenterNodeRotated1.sRel+{0,0.03,0};
AnyDrawRefFrame drw={RGB = {1,0,0}; ScaleXYZ={0.05,0.05,0.05};};
AnyDrawNode drw2 = {RGB = {1,0,0}; ScaleXYZ={0.001,0.001,0.001}*2;};
//Johanna: glenoid inclination - using axis and angle
AnyMat33 Mat2 = RotMat(30*pi/180, x);
ARel=.GHReactionCenterNodeRotated1.ARel*Mat2;
};