Hiding linked files elements in specified area

Hello community,

My task is to keep MEP elements that are located in some specific zone (let it be made with massing instrument) visible and to hide other elements. I started to compose the script and got stuck at some point in the beginning:

I’d really appreciate if you could help me finishing this or simply give me a hint how to make it the right way.

Cheers anyway!

1 - you don’t need the Element.Geometry nodes
2 - Run the intersection between the masses and the pipes
3 - Extract all the true values
4 - Use a FilterByBoolean to sort