def __init__(self, similarity_surface, editor=None, name=None):
        r"""
        INPUT:

        - ``name`` - a name for the surface (a string)

        - ``editor`` - the identification of the edges. A list of pairs
          ((p0,e0),(p1,e1)) or
        """
        if name is None:
            #SimilaritySurfaceBundle.count = SimilaritySurfaceBundle.count + 1
            #name = "Similarity Surface #"+ str(SimilaritySurfaceBundle.count)
            name=repr(similarity_surface)
        if editor is None:
            from surface_manipulator import SurfaceManipulator
            editor = SurfaceManipulator.launch()
        SurfaceBundle.__init__(self, name, editor, field=similarity_surface.base_ring() )
        EditorRenderer.__init__(self, editor)
        self._ss = similarity_surface
        # matrices which act affinely on the polygons:
        self._gl = defaultdict(self._default_gl)
        # translation vectors for the polygons:
        self._t = defaultdict(self._default_t)
        # List of visible polygons
        self._visible = set()
        self._visible.add(self._ss.base_label())
        # cache for transformed vertices
        self._polygon_cache = {}
        # handles for the polygons in the canvas
        self._polygon_to_handle = {}
        self._handle_to_polygon = {}
        # stores labels:
        self._edge_labels = SurfaceLabels(self._ss)
    def __init__(self, similarity_surface, editor=None, name=None):
        r"""
        INPUT:

        - ``name`` - a name for the surface (a string)

        - ``editor`` - the identification of the edges. A list of pairs
          ((p0,e0),(p1,e1)) or
        """
        if name is None:
            #SimilaritySurfaceBundle.count = SimilaritySurfaceBundle.count + 1
            #name = "Similarity Surface #"+ str(SimilaritySurfaceBundle.count)
            name = repr(similarity_surface)
        if editor is None:
            from surface_manipulator import SurfaceManipulator
            editor = SurfaceManipulator.launch()
        SurfaceBundle.__init__(self,
                               name,
                               editor,
                               field=similarity_surface.base_ring())
        EditorRenderer.__init__(self, editor)
        self._ss = similarity_surface
        # matrices which act affinely on the polygons:
        self._gl = defaultdict(self._default_gl)
        # translation vectors for the polygons:
        self._t = defaultdict(self._default_t)
        # List of visible polygons
        self._visible = set()
        self._visible.add(self._ss.base_label())
        # cache for transformed vertices
        self._polygon_cache = {}
        # handles for the polygons in the canvas
        self._polygon_to_handle = {}
        self._handle_to_polygon = {}
        # stores labels:
        self._edge_labels = SurfaceLabels(self._ss)
from surface_manipulator import SurfaceManipulator
SurfaceManipulator.launch()