# Box Center point?

**URL:** <https://forum.dynamobim.com/t/box-center-point/18244>\
**Category:** Revit\
**Tags:** dynamo\
**Created:** [January 17, 2018, 7:13pm UTC](https://forum.dynamobim.com/t/box-center-point/18244 "2018-01-17T19:13:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![interactiverendering](https://avatars.discourse-cdn.com/v4/letter/i/db5fbb/32.png) [@interactiverendering](https://forum.dynamobim.com/u/interactiverendering)\
**Post date:** [January 17, 2018, 7:13pm UTC](https://forum.dynamobim.com/t/box-center-point/18244/1 "2018-01-17T19:13:45Z")

</div>

Hi all,

How do i get the center of the boxes?

 ![Center of Boxes](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/2/1260cbc7fdcefc5fa38a49bd8c7c8d88862fe409.JPG)

---

<div class="post-metadata">

**Author:** ![Renzoj14](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/renzoj14/32/49196_2.png) [@Renzoj14](https://forum.dynamobim.com/u/Renzoj14)\
**Post date:** [January 17, 2018, 10:23pm UTC](https://forum.dynamobim.com/t/box-center-point/18244/2 "2018-01-17T22:23:02Z")

</div>

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.

 ![Center of Boxes](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/4/c40dcc088ae904e513f0d30a25b4c438cb5cbbb9.jpg)

[SquareCentrePoint.dyn](https://forum.dynamobim.com/uploads/short-url/2d3aHSmKg7EjRt6JAMp5sFYRB85.dyn) (20.9 KB)

Hope it helps!

---

<div class="post-metadata">

**Author:** ![xavier.loayza](https://avatars.discourse-cdn.com/v4/letter/x/ee59a6/32.png) [@xavier.loayza](https://forum.dynamobim.com/u/xavier.loayza)\
**Post date:** [January 22, 2018, 4:00pm UTC](https://forum.dynamobim.com/t/box-center-point/18244/3 "2018-01-22T16:00:03Z")

</div>

@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](https://forum.dynamobim.com/uploads/short-url/rtMn63NaJyJI3NvhsV8nsewzqQk.dyn) (30.8 KB)  
 ![BoxcenterRvt](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/a/da3b8f10efbe0afa849e618dcdb507f99f434637.JPG) ![Boxcenter](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/7/17784dfae0d0f7e122bc786a1f58abb94f3441dd.JPG)

 ![Capture](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/6/06f0b4975ef6053a2613e0bab6f21875aa33d8a9.png)

---

<div class="post-metadata">

**Author:** ![Ren\_Rainville](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ren_rainville/32/13298_2.png) [@Ren\_Rainville](https://forum.dynamobim.com/u/Ren_Rainville)\
**Post date:** [January 22, 2018, 4:08pm UTC](https://forum.dynamobim.com/t/box-center-point/18244/4 "2018-01-22T16:08:33Z")

</div>

Here are some other thoughts:  
 ![Center](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/7/87199c882c93397959f7ff50fe543a6863a5c11d.PNG)  
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.
