Extracting the common edge of two touching surfaces

I am trying to find the common edge of two touching, neighboring surfaces. More specifically, I want to identify that, for example, curve 3 on surface 1 is “the same” as curve 1 on surface 2. This also needs to be scalable, so I can use it for an entire structure. See attached image.

Do you know any good way to do this?

I would join the surfaces together and use Brep Topology:


Brep Topology.gh (13.9 KB)

the Branch indicates the index of the edge we are speaking about, and the integers in the list indicates the index of the faces of the polysurface

Thank you! I realize that what I was looking for is a bit more complicated than I initially thought - I will have to map the information I need back and forth - but this takes me a long way.