Room Bounding Box Covers other Rooms Bounding Boxes

Hello Pros,

I have a script trying to collect the rooms (and consequently their parameters) by a filled region placed over number of them (the filled region represents a thermal zoning or fire smoke zoning).

the problem I’m facing that if a corridor let say is surrounding a core area or some rooms, the script can’t read the rooms inside, hence the script relies on rooms’ bounding boxes, where the corridor’s bounding box takes maximum and minimum points, therefore covers whatever in the middle of rooms.

any enhancement to the script in solving the issue or another idea in how to get room under a filled region?

attached the script.
Rooms Intersecting With Filled Region.dyn (183.3 KB)

Not sure I follow here. Can you provide a sketch and an indication of what you are trying to achieve?