API: Access Moment of Inertia Properties About the Centre of Mass and from Different Coordinate Systems

API: Access Moment of Inertia Properties About the Centre of Mass and from Different Coordinate Systems

Anonymous
Not applicable
1,031 Views
3 Replies
Message 1 of 4

API: Access Moment of Inertia Properties About the Centre of Mass and from Different Coordinate Systems

Anonymous
Not applicable

Hi, 

 

I am trying to access moment of inertia (MOI) properties of components in an assembly through the Fusion 360 API with Python. The following command provides MOI tensor about the origin of the world coordinate system for a given occurrence:

 

physicalProperties.getXYZMomentsOfInertia()

 

Question 1

However, I would like to get the MOI tensor about the Centre of Mass (CoM) of the component/body as is shown in the properties menu of the GUI (see image below). Clearly Fusion 360 is calculating this somewhere. How can I access this through the API? I can convert the MOI tensor to the CoM myself if necessary, but I would prefer it if the information was already available through the API.

 

image.png

 

Question 2

Fusion 360 calculates the MOI tensor in world coordinates. Does the API also provide calculations in component coordinates (i.e. when the component coordinate axes are not oriented with the world coordinate axes)? I can perform the coordinate transformations myself using the transformation matrix provided by the "Matrix3D" object if necessary, but I'd like to know if it is already available through the API.

0 Likes
Accepted solutions (1)
1,032 Views
3 Replies
Replies (3)
Message 2 of 4

BrianEkins
Mentor
Mentor
Accepted solution

For Question 1, this isn't currently available through the API.  I'm fairly certain this wasn't reported in the UI when the API for physical properties was originally implemented and the API hasn't been updated to provide this.

 

For Question 2, this is possible now.  It all depends on where you get the PhysicalProperties object from.  When you create a new component in an assembly, you are creating a component (which is invisible) and an occurrence that references that component.  It's the occurrence that you see in the UI.  If I get the PhysicalProperties object from the occurrence, the information is returned with respect to the root component.  However, if I get the referenced component from the occurrence and get the PhysicalProperties object from it, the results will be returned with respect to that component, independent of where the occurrence is positioned in the assembly.   

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
0 Likes
Message 3 of 4

Anonymous
Not applicable

Thank you Brian. Much appreciated. This provides me with all the information I needed.

0 Likes
Message 4 of 4

steveNX7V5
Explorer
Explorer

Re: Question 1
I just tried to access that info too.I haven't tried this yet, but I think you could apply the parallel axis theorem to calculate the MOI about the COM.

https://en.wikipedia.org/wiki/Parallel_axis_theorem

I assume you can do this in multiple axes simultaneously with vector/matrix math, but I'm a little rusty so I'll have to brush up on it before I try. When/if I get around to trying it, I'll update with results.

0 Likes