I was thinking to use comp with the = operator to get the end faces in a single shape. You could do this by assigning NIL to all the other sides, and then using all= to get the end faces. And, you don't have to worry about normals. Then, you can use inside() to test if both of the faces are inside a building. Then, you can "recreate" the bridge by inserting a primitive cube into the scope, which replaces the two end faces with a cube.
Of course, there are multiple ways which you could create the bridge, and I imagine, maybe, you found another way.