Thread: DPKit: determing the centroid of a 'Part' ?

1. DPKit: determing the centroid of a 'Part' ?

How does one determine the 'centroid', if I'm using that correctly, of a DPKit-style 'part'?

2. From a little testing, I'd guess it's the average of the point locations of the part. The attached scene rotates a "part" using DPKit Part Move, but the pivot point for the rotation is clearly NOT either the origin (modeler pivot point) or the center of the bounding box. BTW, as you probably know, you can specify the Pivot in the UI for Part Move.

mTp

3. Monroe, indeed, you can specify it, but locating the proper numbers? That's what I'm trying to determine.

4. Here's the Wikipedia article on the centroid:

https://en.wikipedia.org/wiki/Centroid

including the formulae to calculate the centroid of a polygon:

https://en.wikipedia.org/wiki/Centro...oid_of_polygon

which according to the introduction in the article:

The definition extends to any object in n-dimensional space: its centroid is the mean position of all the points in all of the coordinate directions.

I don't know what algorithm Denis actually uses to calculate it in Part Move, though.

mTp

5. Yeah, that's the problem: what is the bbox of the "part".

It might be there already. Or Denis might add it if he sees this post.

(Which he has done before, merci beaucoup to him.)

6. What problem are you trying to solve? If you need access to specific details or better control on a "part", move it to a different layer and treat it as a different object. Then, you have access to its Pivot Point directly in Layout via Modify => Move Pivot Point.

mTp