# I want to get the outside outline of a plane that is doubled up

https://i.imgur.com/rUqIDSU.png I have this flat shape see left side of image

And I want to get just the outside outline of it. On the right side of the image you can see that I was able to get an outline using the following python.

bpy.ops.mesh.remove_doubles()
bpy.ops.mesh.dissolve_faces()


however as you can see there are still intersections within the mesh. I can't seem to figure out how to get only the outside.