Keep exterior of one mesh relative to another one

I have the following model:


But I would like to only keep the “exterior” of the red mesh relative to the green one. Kind of like this:

Boolean doesn’t help, and the green mesh isn’t “filled” on the inside, this is how it looks:

How would I go about doing this? Thanks!

You can duplicate edges of exterior base of green mesh and separate them as another mesh to obtain a cutting line.

  • Isolate only this cutting line and red mesh.
  • show Top View.
  • Select red mesh and enter edit mode
  • In Outliner, press B to select Cutting Line Mesh without changing active object.
  • In Mesh menu, choose Knife Project.

Now, red mesh has an edge line corresponding to contour of green building.
You just have to select and delete faces below that line.