I want to use an AnyInertiaSolid to calculate the Jmatrix, JmatrixCoM,and the center of mass (CoM) from an STL of a vertebra. The origin an orientation of the ellipsoid that represents the inertia object appears satisfactory.
Now, I would like to create a RefFrame aligned with the main axes of this ellipsoid and centered its origin (aka the sCoM)
As the sRel I want to use the sCoM. --> this is working.
Could you advise me how I can get the Arel for this RefFrame?
Apologies for the delayed reply. I needed some help from my colleague, who was on vacation. We finally have a solution now.
This is a really interesting use case and something that will be very useful for all our users. We decided to make a class template out of this and that will be available in the next AMMR. So, thanks a lot for bringing it up.
Meanwhile, I can give you a solution already. The class template (2.1 KB) is in the attached file. Please include it in your model. After you have included it, please use the class template inside your segment. For example:
This will do all the calculations, which you can see in the class template, and create a reference node at the centre of mass with the axes aligned with the principal axes of inertia of the segment.
There is a small update to the class template. With some testing we noticed that the center of mass axes can't be uniquely defined if the moment of inertia is symmetric about 2 or 3 axes. This results in duplicate eigen values and non-unique principal axes. We updated the class template to include a check for such cases.
Here is the updated class template (4.2 KB) that will be available in the AMMR in the future.
thank you so much for creating this class!
Its really helpfull!
I calculated everything external and added the final values, but this build in solution its way nicer