Box Center point?

Hi all,

How do i get the center of the boxes?

I would try deconstructing points a,b & c and subtract their x and y values from one another then divide these values by 2. See file attached, perhaps not the most elegant solution but it works.

SquareCentrePoint.dyn (20.9 KB)

Hope it helps!


@interactiverendering I had to solve a similar problem. The input of this script takes a grid of model or detail lines. It triangulates like a topo surface and getting the mid point of the hypotenuse. You are going to need MeshToolkit. It does not work if the grid is rotated.

I hope it helps, too
GetCenterPointofGrid.dyn (30.8 KB)

Here are some other thoughts:
Polygon.Center will use points, or if as it seems you are selecting elements, you can get that geometry and create a dynamo solid to pass into the Solid.Centroid node. Although, gathering the four corners and using Polygon.Center should get you were you are going.

1 Like