Offset within overlapping parallel closed curves?

Hello,
I have an array (about 100) of overlapping curves, but each curve is on a parallel plane with some distance.
what tool can i use to find the perimeter curve of the overlapped area between each step and can i get it to do the same with multiple layers?
example I draw by sketch:

  • A would be the offset perimeter of overlapping blue+red
  • B would be the offset perimeter of overlapping green+blue

overlap curve perimiter offset.3dm (52.8 KB)