code: def _get_edge_set(self, tol=0.1):
          
          edges = []
          for surface in self.surfaces:
              if isinstance(surface, GriddedSurface):
                  return edges.append(surface.mesh)
              elif isinstance(surface, PlanarSurface):
                  # Top edge determined from two end points
                  edge = []
                  for pnt in [surface.top_left, surface.top_right]:
                      edge.append([pnt.longitude, pnt.latitude, pnt.depth])
                  edges.append(numpy.array(edge))
              elif isinstance(surface,
                              (ComplexFaultSurface, SimpleFaultSurface)):
                  # Rectangular meshes are downsampled to reduce their
                  # overall size
                  edges.append(downsample_trace(surface.mesh, tol))
              else:
                  raise ValueError("Surface %s not recognised" % str(surface))
          return edges
docs: Retrieve set of top edges from all of the individual surfaces,
          downsampling the upper edge based on the specified tolerance