Find edge perimeter of polygons

I need to somehow calculate the edge perimeter of polygons. (If you are familiar with Maya, you can select a number of polygon faces, then select the “edge perimeter” - see image below)

I need to find the points along the “perimeter edges” so that I can use LineRenderers to draw this edge perimeter.

(please note, I need to support holes in the polygons, as pictured)

(right click - open in new window to get a better view)

Thanks for any help or ideas!

so I got some sleep and this is pretty simple: finding the edge perimeter is just a matter of finding the edges that are not shared with any other polygons.

as long as there are no duplicate edges, I think that should do it. In my case, this works great.