# Room.CenterRoom not working

**URL:** <https://forum.dynamobim.com/t/room-centerroom-not-working/51938>\
**Category:** Uncategorized\
**Tags:** revit, rhythm, dynamo\
**Created:** [June 16, 2020, 1:41pm UTC](https://forum.dynamobim.com/t/room-centerroom-not-working/51938 "2020-06-16T13:41:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Schasfoortyoeri](https://avatars.discourse-cdn.com/v4/letter/s/2bfe46/32.png) [@Schasfoortyoeri](https://forum.dynamobim.com/u/Schasfoortyoeri)\
**Post date:** [June 16, 2020, 1:41pm UTC](https://forum.dynamobim.com/t/room-centerroom-not-working/51938/1 "2020-06-16T13:41:26Z")

</div>

Hi all,

I’m trying to align room center points and room tags to the center of the room.

For some reason the script is not working properly. it doesnt give errors but its just not placing the rooms in the middle.

Any thoughts?

![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/6/56ca6d644f06111c4a059af49d28cf47a7a583da.png)

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/e/6ea74e7019655c8ff18f7e9836702a8ef31a451e.png)

---

<div class="post-metadata">

**Author:** ![Thomas\_Mahon](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/thomas_mahon/32/64209_2.png) [@Thomas\_Mahon](https://forum.dynamobim.com/u/Thomas_Mahon)\
**Post date:** [June 16, 2020, 2:40pm UTC](https://forum.dynamobim.com/t/room-centerroom-not-working/51938/2 "2020-06-16T14:40:16Z")

</div>

It’s probably because it averages out the corner points to get the ‘centre’ of the set and thus the ‘centre’ of the room. Square rooms do not necessarily have four points due to the addition of vertexes where wall junctions bound the room which means the centre point will be weighted to where the extra points are and shift it off-centre from where you would naturally expect it to be.

To find the true centre of the room will require far more complex calculations. Computing the medial axis would be a good start but then you’ll still need to determine your own evaluation as to what would constistute the room centre especially on more complex rooms which might branch, such as corridors or L shaped rooms (which normally result in centre points outside the bounds of the room if only the corner points are averaged!).

---

<div class="post-metadata">

**Author:** ![Schasfoortyoeri](https://avatars.discourse-cdn.com/v4/letter/s/2bfe46/32.png) [@Schasfoortyoeri](https://forum.dynamobim.com/u/Schasfoortyoeri)\
**Post date:** [June 17, 2020, 5:49am UTC](https://forum.dynamobim.com/t/room-centerroom-not-working/51938/3 "2020-06-17T05:49:01Z")

</div>

Hmm, makes sense but that’s not the problem. when i move the centerpoint manualy and run the script it still stays where i moved it.
