Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Centroid

4 REPLIES 4
Reply
Message 1 of 5
Anonymous
269 Views, 4 Replies

Centroid

How to calculate Centroid of a SurfaceBody? I could not finf "RegionProperties" there.

Tags (1)
4 REPLIES 4
Message 2 of 5
Vladimir.Ananyev
in reply to: Anonymous

You may use PartComponentDefinition.MassProperties.CenterOfMass property.

Related DevBlog post:

http://adndevblog.typepad.com/manufacturing/2012/06/how-to-retrieve-the-barycenter-of-a-part.html


Vladimir Ananyev
Developer Technical Services
Autodesk Developer Network

Message 3 of 5

The following thread could be useful as well:/inventor-customization/surfacebody-properties-via-api/td-p/4853851


Vladimir Ananyev
Developer Technical Services
Autodesk Developer Network

Message 4 of 5
Anonymous
in reply to: Vladimir.Ananyev

The workarounds suggested are bit awkward for me. So as an approximate solution. I got RangeBox of the body and then found midpoint of the Min and Max.
Message 5 of 5
Vladimir.Ananyev
in reply to: Anonymous

The choice is up to you.  Using RangeBox to approximate centroid position could give too rough estimates.  Personally I would prefer to get the centroid from the transient single-body model.

Cheers,


Vladimir Ananyev
Developer Technical Services
Autodesk Developer Network

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report