How to calculate Centroid/Center of Gravity of a Body

How to calculate Centroid/Center of Gravity of a Body

Anonymous
Not applicable
998 Views
3 Replies
Message 1 of 4

How to calculate Centroid/Center of Gravity of a Body

Anonymous
Not applicable

I have couple of bodies in a Component Definition.

I wish to calculate Centroid (or Center of Gravity) of an individual body. How?

I found RegionProperties having Centroid as a field, but thats avialable for Profile, but not for the Body. Any clues?

0 Likes
999 Views
3 Replies
Replies (3)
Message 2 of 4

adam.nagy
Autodesk Support
Autodesk Support

Hi,

 

You could simply copy the solid into a temp document and check things there as done in this blog post:

http://adndevblog.typepad.com/manufacturing/2015/09/slicing-a-part-and-getting-mass-section-properti...

 

Cheers,



Adam Nagy
Autodesk Platform Services
0 Likes
Message 3 of 4

Anonymous
Not applicable

Is there any programmatic (API) way to get centroid (CG) of a Body?

0 Likes
Message 4 of 4

adam.nagy
Autodesk Support
Autodesk Support

Only MassProperties has such info and that is for all the SurfaceBodies in the document.

 

In the Object Browser (in VBA or Visual Studio) or in the help file you can look for MassProperties to see all the objects that have that property.



Adam Nagy
Autodesk Platform Services
0 Likes