Difference between anyrefnode & anyrefframe

I’m a new Anybody user so… sorry for this probably basic question.
I saw that 2 classes exist to define a node and related frame, namely anyrefnode & anyrefframe.

In fact I don’t understand the differences between both. Can you help about that ?

Thanks !


Hi Lauranne,

First, welcome to AnyBody world~!

I’d like explain the difference between AnyRefFrame and AnyRefNode classes.

  1. AnyRefFrame

When you see the description of ‘AnyRefFrame’ in the AnyScript Reference Manual, there is some description like this:

Type: [b]Abstract[/b]
Base Class: AnyMechObject
This is an abstract class that defines 3-D reference frames.

So this is a kind of parent class for its derived classes.
In AnyBody Modeling System(AMS), we can’t create an instance of an abstract class.
In conclusion, you can’t use this class in your AnyScript code.

  1. AnyRefNode
Type: [b]Creatable[/b]
Base Class: AnyPositionedRefFrame
The reference node is a reference frame rigidly attached to another one.
 Thus, its position and orientation are specified relatively to its owner. 
The node's angular velocity and acceleration are the same as the owner's
 (global representations). 

So you can use this AnyRefNode class in your AnyScript code because this class is ‘creatable’.
Usually, this AnyRefNode can be attached to some instances of AnyFixedRefFrame and AnySeg.
Also you can define additional AnyRefNode instances inside an AnyRefNode instance.

I hope this may help you.

And please don’t hesitate to ask additional questions if you have any other problems during the use of AMS.

Best regards,

P.S) I attached the class tree that shows some parent-child relationship between different classes. You can only create the instances of the classes which are creatable. The creatable classes are colored by blue.

Hi Moonki,
Thank you for your so quick answer ! That’s clearer now : in fact I didn’t understand the difference between abstract and creatable classes.

I’ve another question now : I’m currently working with the Bergmann model and one of my objectives is to add a glenoid implant and to evaluate some displacements of the humeral head relative to a glenoid frame. So I wanna create the latter.

For that I’m looking for having the transform matrix between humerus.gh and another refnode that I created (named Keel : scapula.Keel) . What is not clear is how to retrieve the position and orientation of one, relative to the other. I think I understand pretty well the local and global coordinates notion : I work with it for 2years ; my problem is more how to apply and manipulate it in the ASM language
I think I have to found a 33 rotation matrix and a 13 orientation matrix and input it as ARel and sRel respectively in my new refnode?? How ?

Thank you for your help !

Hi Lauranne,

Please take a look at AnyKinLinear and AnyKinRotational classes. They will give you translations and rotation angles.

To get matrices and vectors you can use global positions Axes and r to compute a relative linear transform between these nodes.

For example, to get a relative rotation you may use:
AnyMat33 A = humerus.gh.Axes*scapula.Keel.Axes’;

Best regards,

Thanks a lot ! Everythings clear now !