Why can’t I do this? An old tutorial says it works. Insert some conversion in between?
Works for me. Maybe your rectangle is invalid? If the rectangle has radiused corners, PCen (Polygon Center) will fail.
Had you posted your code, we could have looked at it.
So, with rounded corners, how would I extract center?
I guess I could extract center then fillet corners. : ) Thank you!
Area ‘C’ (Centroid) is often used, though it can be slow if there are many of them (hundreds or thousands).
P.S. It should be noted that depending on how the rectangle/polygon was created, you already have the center point upstream as it was used for the Rectangle ‘P’ (Plane) input. No sense in deriving points you already have.
First, in surface edit, shrink the surface. Second, in mass properties find area centroid.
That sounds like a Rhino procedure, not Grasshopper? It can be done in GH using code:
private void RunScript(Brep B, ref object sB)
{
B.Faces.ShrinkFaces();
sB = B;
}
But isn’t necessary in this case, as this experiment shows: