Select intersection border of space

i cant imagine the method for an algorythm to select points that touches the outher space that have been touched by detail line …

after finding solution to this i guess i need to think about an other algorythm to search distance… maybe i 'll combine both of them and that will give me a solution…

any advice will be appritiated… thnx alot and pls Help ! :slight_smile: