Showing results for 
Search instead for 
Do you mean 
Reply

How to get moment of inertia from Assembly and part file in NX through API

I have an part file that has two different entity(ExSmiley Surprisedne rectangle and one triangle).

I need  moment of inertia from Assembly and part file in NX through API.

Currentlythis is what i have tried.

Dim measureBodies2 As MeasureBodies
measureBodies2 = workPart.MeasureManager.NewMassProperties(massUnits2, 0.99, objects2)

 

But dont know API to get MOI from measureBodies2.

 

 

Please help me to get this .

 

Any help would be appreciated.

 

Thanks in advance.

1 REPLY

Re: How to get moment of inertia from Assembly and part file in NX through API

 

Sangeeta,

 

Good morning.  You can get that with the Open C call UF_MODL_ask_mass_props_3d.  This is also wrapped for use in .Net as UFModl.AskMassProps3d.

 

As with most of the wrapped calls, you need to see the details in the Open C Reference Guide.

 

This method provides a great deal of information in a large array of values:

 

double mass_props [ 47 ] Output Mass properties
[0] = Surface Area
[1] = Volume (0.0 For Thin Shell)
[2] = Mass
[3-5] = Center Of Mass (COFM), WCS
[6-8] = First Moments (centroidal)
[9-11] = Moments Of Inertia, WCS
[12-14] = Moments Of Inertia (centroidal)
[15] = Spherical Moment Of Inertia
[16-18] = Inertia Products, WCS
[19-21] = Inertia Products (centroidal)
[22-30] = Principal Axes, WCS
[31-33] = Principal Moments (centroidal)
[34-36] = Radii Of Gyration, WCS
[37-39] = Radii Of Gyration (centroidal)
[40] = Spherical Radius Of Gyration
[41-45] = Unused
[46] = Density

 

Note that these are relative to the WCS, rather than the absolute CSYS,which is a bit unusual in the API.

 

Best regards,

 

Steve