# Relative position of 2 components

Hello !
I’m currently working on a shoulder model, based on the Bergmann model in the repository. In fact I’m integrating a total shoulder arthroplasty into the model.

I’d like to know the relative rotation between two nodes of the 2 prosthetic components of a TSA : Scapula.GlenPos (fixed to the scapula) and Humerus.HumerusBoneGeometryNode.HumProthNode (fixed to the humerus). My objective is to position the two components in ProEngineer(PTC), using their position obtained in Anybody at several abduction angles. For that, I need to express the rotation of each axis of the humeral coordinate system (CS) relative to the position of the glenoid CS. In clear :
rotation of the x-humeral CS relative to the x-glenoid CS in degrees
rotation of the y-humeral CS relative to the y-glenoid CS in degrees
rotation of the z-humeral CS relative to the z-glenoid CS in degrees

I used 2 different methods, as described in the wiki page :

1. AnyKinLinear and AnyKinRotational with Type = RotAxesAngle ; Axis 1= x ; Axis 2= y ; Axis 3= z ;
I understood that the rotations are described by the Pos variable. What I guessed was that we should obtain a rotation matrix ; i.e. maybe a 33 matrix, what is not the case since Pos is a 31 vector.
I also understood that successive rotations follow a mobile sequence (rather than a fixed sequence). So using a (x-y-z)mobile sequence in anybody, it should correspond to a (z-y-x)fixed sequence to use in ProEngineer.
But, visual CS positions do not correspond between Anybody and ProEngineer.
So, am I wrong somewhere ? Did I a mistake in my sequence understanding ?

2. For the second method I decided to use the global position of my 2 components CS to calculate their relative position : AnyMatrix ScapHum = .Seg.Scapula.GlenPos.Axes’.Seg.Humerus.HumerusBoneGeometryNode.HumProthNode.Axes’;
I obtain a 3
3 matrix what make sense for me.
I then tried to get angles using a (z-y-x)fixed sequence using matlab. I’m pretty sure my problem does not come from my matlab function since it has been validated with other data.
As for the first method, visual CS positions do not correspond between Anybody and ProEngineer.

I really don’t know where is (are) my mistake(s) and your help will be greatfully appreciated !
Thanks,
Lauranne

Hey Lauranne,

have you looked at this example in the Wiki?

You also write: Type = RotAxesAngle ; Axis 1= x ; Axis 2= y ; Axis 3= z ;

When you look into the ref manual:
Axis1 Const First axis of rotation for RotAxesAngles. z
Axis2 Const Second axis of rotation for RotAxesAngles. y
Axis3 Const Third axis of rotation for RotAxesAngles. x

so it is z, y, x

Sorry,

clicked the button too early.

the Z, Y , X is by default. What I wanted to say is did you change that to X, Y, Z?

Hey Amir !

I looked on your example in the wiki and finally was able to found the relative rotations between my two components. Nevertheless, I wanted to ensure my well understanding of the system. What I wanted to check was that I still was able to get the “right” angle if I changed the sequence.

So, to answer your question, yes, I explicitly specified the rotation sequence. My method was as following:

1. Default : Axis 1=z ; Axis 2= y ; Axis 3= x ;
Corresponds to a x-y-z fixed sequence (i.e. all rotations described relative to the fixed frame)

2. Modified : Axis 1=x ; Axis 2= y ; Axis 3= z ;
Corresponds to a z-y-x fixed sequence.

So, comparing first and third components of my 2 sequences should give the same result, isn’t it ? It’s unfortunately not my case. So either I don’t understand well something, or, some references in my model are wrong. Would you have any explanation ?

Moreover, regarding my second method described in my previous post, I’m note sure of the possibility to get solution for my objective : I only have axes of glenoid component relative to scapula (.Scapula.GlenePos) and Humerus component relative to another node fixed on humerus (Humerus.HumerusBoneGeometryNode.HumProthNode). So I don’t know really the position of these component relative to a globalrefframe, rigth ? Or, if I turn my question differently : how to create nodes (or a frames) at the same position than the components but relative to a globalrefframe (to obtain “axes” parameter relative to the globalrefframe)

Thank a lot for your answers !
Lauranne

Dear Lauranne,

unfortunately it is very tough understanding those rotations. I think everybody is struggling there.
I don’t think you can compare rotations a fixed and a rotating ref frame at all.
Regarding method 2. do you have a ’ at the second Axes as well? I think that is wrong.

I think I need to do little more thinking about that.

PS: A little advice, you can export STLs in global at a specific posture, so you can import them into ProE and see their position there as well.

Amir,
In fact, yes, there are correspondances between fixed and mobile rotation sequences. Reason can be found by mathematical demonstration : to obtain the final CS by a mobile sequence of 2 rotations, in fact you express it as 2 succesives fixed rotations with change of coordinate. For example for the second rotation with change of coordinate :
V’’(Ri) = [P(Ri R’)] [2nd Rotation (R’)]. [P(R’ Ri )]. V’(Ri)
(I’m not sure I’m clear enough ; let me know if you would like more explanation about that!)

Regarding method 2, I’m thinking it’s not so easy : of what I understood, a node and its axes refer to its parents and no to the global system. Am I right ? So to correctly use this method I would need to describe all the chain by successive matrix transformations. Right ?

Thank you for your advice about the idea to export STL in a global posture. In fact I did think to such a solution but I found at least 2 major drawbacks for my application :

1. STL is only a surface object ; So, I lost lots information regarding the volume and will need to reconstruct the part in ProE while I already have the solid part as a CAD file.
2. I would prefer using transform matrix because I want to automate the procedure for several positions

Thank you for your help and advices about that topic !
Lauranne

Lauranne,

method 2: Axes is global (ARel is not), so using Axes is correct.

(about the STL export, I understand that it will not give all the info, but I do that often to check if it is correct.)