Visual Center for Rooms

Hi everyone,

I’m trying to get the visual center of rooms for centering them. The scripts I have found are based on the solids.centroid function but this doesn’t work for L-shaped or U-shaped rooms.

Has anyone already found a way to it in Dynamo (a little bit as described here in the mapbox blog

Thank you

Hi @amadeumagalhaes

Is this what you need?

Hi @Kulkul

I’m looking for the visual center and not the centroid…
It would be something like this…

I just found some documentation on a “inner centroid”

And more notably information on SHAPELY, a BSD-licensed Python package for manipulation and analysis of planar geometric objects.

I’m a noob in Python but anyone thinks that it would be possible to use their object.representative_point in dynamo ?

Thanks !!!

Hi Amadeu,

Indeed, the centroids can be outside the polygon:

But the Polylabel algorithm can be used with Revit :

And it’s a good way to tag items :


Merci @Alban_de_Chasteigner !!!

Sincere thanks Alban your posts helps me a lot in many situations :ok_hand:

1 Like