Improve efficiency by pre-calculating dome edges and ensuring edges are unique.