How do i get the centroid coordinate details of the Bodies, faces, and edges

can some one suggest me how do i get the centroid of the particular object in my geometry
like centroid of the particular body, face and edge
i would like to know the x,y,z coordinate points by using PyGeometry module.
any suggestions..
Comments
-
Hello Gopi,
In SpaceClaim, here is how I would go about this. First I would create a selection for the appropriate item. Then I would use the GetCentroid() option out of the _MeasureHelper _to find the location. I would assign this to a dummy variable and then can access this point. You can easily access it components to write it to a file or something.
selection = FaceSelection.Create(GetRootPart().Bodies[0].Face[0])
out = MeasureHelper(selection)
print(out.X, out.Y, outZ)
0 -
@NickFL thanks for your response.
able to create it by using "MeasureHelper.GetCentroid(face)".1 -
@Gopi Raju Velpula said:
@NickFL thanks for your response.
able to create it by using "MeasureHelper.GetCentroid(face)".Yes you are correct, I forgot to include the GetCentroid . :facepalm:
1