-
can some one suggest me how do i get the centroid of the particular object in my geometry |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @raj366v - from a generic perspective, this is currently not possible. However, there are workarounds one can try to implement. From a body perspective, if you retrieve the various faces, you can request the Finall call to get the center of a face: center_param = face.shape.box_uv.get_center()
centroid = face.shape.geometry.evaluate_proportion(center_param.u, center_param.v).position Nonetheless, we will take note of this request and try to address it natively |
Beta Was this translation helpful? Give feedback.
Hi @raj366v - from a generic perspective, this is currently not possible. However, there are workarounds one can try to implement. From a body perspective, if you retrieve the various faces, you can request the
face.shape
property for each of them. Now, insideshape
you also have access to thebbox
property (i.e. the bounding box) and finally you could request for the center of that bounding box. Finally, you could approximate by taking all face centers and averaging them.Finall call to get the center of a face:
Nonetheless, we will take note of this r…