Get adjacent spaces with no walls between them

I am trying to make a script to get all the groups of spaces that are adjacent with no wall in between them (those spaces are basically touching each other). I am getting strange results with geometry.doesintersect.

One way I could image this working would be to scale each room by some very small number from the centroid (like 1%) and see what kind of results it gives you. This would require very accurate modeling, and would also be dependent upon the size and shape of each room.

Maybe another method would be to offste the outline curve of each room (joined lines) by 45% of the minimum wall thickness in the project and see what kinds of collisions you get.

Otherwise, you cold also try drawing a line from area centroid to area centroid, and see if it collides with a wall.

Obviously very rough ideas. I’m sure there are better, more experienced minds here who could come up with something more efficient. :slight_smile:

You should be able to just get the bounding elements. That will tell you whether each face is bound by a physical object or a bounding curve.