Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to create a construction entity (point or line) thru. centroid

Status
Not open for further replies.

rgrayclamps

Mechanical
Joined
Aug 6, 2004
Messages
376
Location
US
Hi,

For a closed geometries in a sketch, there is a centroid. I need to create a point or construcion line through this centroid. Is there a way to reference cordinates of the centroid via either equations or even API function?

Best regards,

Alex
 
The following threads reference code for putting points at the center of mass of a body. If you cannot find anything better, you might be able to create a bidirectional extrude from the sketch and use those to place your point. This would be a sub optimal and non-parametric solution.

thread559-263826
thread559-130417

Eric
 
Hi, Eric:

Thanks for your quick reply! It is good, but no good enough as it is not parametric. It would be nice if we could build an equation to access cordinates of centroid (sketch) so than we use dimensions to locate point/line at the centroid.

The following command line is for a solid model:

Set Point = ModelDoc.CreatePoint2(MassProp(0), MassProp(1), MassProp(2))

Does anyone know what is the equivalent for a sketch (centroid)?

Best regards,

Alex
 
Could you make the sketch a surface and then find the centroid of that?

--
Hardie "Crashj" Johnson
SW 2010 SP 4.0
HP Pavillion Elite HPE
W7 Pro, Nvidia Quaddro FX580

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top