Index: /anuga_core/source/anuga/pmesh/mesh.py
===================================================================
--- /anuga_core/source/anuga/pmesh/mesh.py	(revision 3540)
+++ /anuga_core/source/anuga/pmesh/mesh.py	(revision 3541)
@@ -29,5 +29,5 @@
 import load_mesh.loadASCII
 import anuga.alpha_shape.alpha_shape
-from anuga.geospatial_data.geospatial_data import Geospatial_data, ensure_geospatial
+from anuga.geospatial_data.geospatial_data import Geospatial_data, ensure_geospatial, ensure_absolute
 
 try:  
@@ -743,17 +743,6 @@
             segments.append( [lo, hi] ) 
         region_dict['segments'] = segments
-
-
-        #Create tags
-        #E.g. ['wall', 'wall', 'ocean', 'wall']
-        # from a dic
-        #{'wall':[0,1,3],'ocean':[2]}
-        segment_tags = ['']*N
-        if tags is not None:
-            for key in tags:
-                indices = tags[key]
-                for i in indices:
-                    segment_tags[i] = key
-        region_dict['segment_tags'] = segment_tags
+        region_dict['segment_tags'] = self._tag_dict2list(tags, N)
+       
     
         self.addVertsSegs(region_dict) #this is passing absolute values
@@ -774,4 +763,27 @@
         return inner
 
+    def _tag_dict2list(self, tags, number_of_segs):
+        """
+        Convert a tag dictionary from this sort of format;
+        #{'wall':[0,3],'ocean':[2]}
+
+        To a list format
+        # ['wall', '', 'ocean', 'wall']
+
+        Note: '' is a default value of nothing
+        """
+        # FIXME (DSG-DSG): Using '' as a default isn't good.
+        #Try None.
+        # Due to this default this method is too connected to
+        # _add_area_from_polygon
+        
+        segment_tags = ['']*number_of_segs
+        if tags is not None:
+            for key in tags:
+                indices = tags[key]
+                for i in indices:
+                    segment_tags[i] = key
+        return segment_tags
+        
     def add_circle(self, center, radius, segment_count=100,
                    center_geo_reference=None, tag = None,
@@ -788,8 +800,5 @@
            
         """
-        pass
         # convert center and radius to a polygon
-        ### pi = math.pi
-        ### num_of_cuts = 100
         cuts = []
         factor = 2* math.pi/segment_count
@@ -845,4 +854,41 @@
         #not a list of lists.
         # add a method to the points class to fix this up.
+     
+    def add_segment(self, v1, v2, tag):
+        """
+        Don't do this function.
+        what will the v's be objects?  How is the user suppost to get them?
+
+        Indexes?  If add vertstosegs or add_region_from_polygon is called
+        more than once then the actual index is not obvious.  Making this
+        function confusing.
+        """
+        pass
+
+
+    def add_points_and_segments(self, points,
+                                  segments, segment_tags = None):
+        """
+        Add an outline of the mesh.
+        Vertices is a list of points/ a standard representation of points.
+        Segments is a list of tuples of integers.  Each tuple defines the
+           start and end of the segment by it's vertex index, in relation to
+           the list of vertices.
+        segment_tags is an optional dictionary which is used to add tags to
+           the segments.  The key is the tag name, value is the list of segment
+           indexes the tag will apply to.
+           eg. {'wall':[0,3],'ocean':[2]}
+           
+        """
+        #make sure the points are absolute
+        points = ensure_absolute(points)
+        
+        #create points, segs and tags
+        region_dict = {}
+        region_dict['points'] = points
+        region_dict['segments'] = segments
+        region_dict['segment_tags'] = self._tag_dict2list(segment_tags,
+                                                          len(segments))
+        self.addVertsSegs(region_dict)
         
     def addVertsSegs(self, outlineDict):
@@ -864,25 +910,20 @@
         #print "outlineDict['segments']",outlineDict['segments']
         
-        localUserVertices = []
-        #index = 0
+        i_offset = len(self.userVertices)
+        #print "self.userVertices",self.userVertices 
+        #print "index_offset",index_offset 
         for point in outlineDict['points']:
             v=Vertex(point[0]-self.geo_reference.xllcorner,
                      point[1]-self.geo_reference.yllcorner)
-            #v.index = index
-            #index +=1
             self.userVertices.append(v)
-            localUserVertices.append(v)
             
-        #index = 0
         for seg,seg_tag in map(None,outlineDict['segments'],
                        outlineDict['segment_tags']):
-            segObject = Segment( localUserVertices[int(seg[0])],
-                           localUserVertices[int(seg[1])] )
+            segObject = Segment(self.userVertices[int(seg[0])+i_offset],
+                           self.userVertices[int(seg[1])+i_offset] )
             if not seg_tag == '':
                 segObject.set_tag(seg_tag)
-            #segObject.index = index
-            #index +=1
             self.userSegments.append(segObject)
-            #DSG!!!
+            
         
     def get_triangle_count(self):
Index: /anuga_core/source/anuga/pmesh/mesh_interface.py
===================================================================
--- /anuga_core/source/anuga/pmesh/mesh_interface.py	(revision 3540)
+++ /anuga_core/source/anuga/pmesh/mesh_interface.py	(revision 3541)
@@ -69,5 +69,6 @@
     #(DSG) Yes!
 
-    # First check that interior polygons are fully contained in bounding polygon
+    # First check that interior polygons are fully contained in bounding
+    # polygon
     #Note, Both poly's have the same geo_ref, therefore don't take into account
     # geo_ref
Index: /anuga_core/source/anuga/pmesh/test_mesh.py
===================================================================
--- /anuga_core/source/anuga/pmesh/test_mesh.py	(revision 3540)
+++ /anuga_core/source/anuga/pmesh/test_mesh.py	(revision 3541)
@@ -1354,4 +1354,46 @@
         m.addVertsSegs(dict)
 
+    def test_addVertsSegs_done_twice(self):
+        m = Mesh()
+        dict = {}
+        dict['points'] = [[0.0, 0.0], [5.0, 0.0], [5.0, 5.0]]
+        dict['segments'] = [[0, 1], [1, 2], [2,0]]
+        dict['segment_tags'] = ['0','1','2']
+        m.addVertsSegs(dict)
+        
+        dict = {}
+        dict['points'] = [[2.0, 1.0], [4.0, 1.0], [4.0, 3.0]]
+        dict['segments'] = [[0, 1], [1, 2], [2,0]]
+        dict['segment_tags'] = ['3','4','5']
+        m.addVertsSegs(dict)
+
+        
+        self.failUnless(m.userSegments[5].vertices[0].y == 3,
+                        'Wrong vertex connected.')
+        self.failUnless(m.userSegments[5].vertices[1].y == 1,
+                        'Wrong vertex connected.')
+            
+    def test_add_points_and_segments(self):
+        m = Mesh()
+        Segment.set_default_tag("food")
+        dict = {}
+        points =  [[0.0, 0.0], [1.0, 0.0], [1.0, 1.0]]
+        segments = [[0, 1], [1, 2]]
+        segment_tags = {'do-op':[1]}
+        m.add_points_and_segments(points,
+                                    segments, segment_tags)
+        # have to reset this , since it's a class attribute
+        Segment.set_default_tag("")
+
+        
+        self.failUnless(len(m.userSegments) ==2,
+                        'Wrong segment list length.')
+        self.failUnless(len(m.userVertices) == 3,
+                        'Wrong vertex list length.')
+        self.failUnless(m.userSegments[0].tag =='food',
+                        'Wrong segment tag length.')
+        self.failUnless(m.userSegments[1].tag =='do-op',
+                        'Wrong segment tag.')
+        
     def test_exportASCIImeshfile(self):
     
@@ -2234,5 +2276,5 @@
 if __name__ == "__main__":
     suite = unittest.makeSuite(meshTestCase,'test')
-    #suite = unittest.makeSuite(meshTestCase,'test_generate_mesh')
+    #suite = unittest.makeSuite(meshTestCase,'test_add_points_and_segments')
     runner = unittest.TextTestRunner() #verbosity=2)
     runner.run(suite)
Index: /development/dam_2006/create_mesh.py
===================================================================
--- /development/dam_2006/create_mesh.py	(revision 3540)
+++ /development/dam_2006/create_mesh.py	(revision 3541)
@@ -29,29 +29,19 @@
 
     #Boundary
-    # FIXME (DSG-DSG): Update this to use new interface.
-    dict = {}
-    dict['points'] = [point_sw,   #se
-                      point_nw,
-                      point_dam_top,
-                      point_ne, 
-                      point_se, 
-                      point_dam_bottom
-                      ]
-    #if False:
+    points = [point_sw,   #se
+              point_nw,
+              point_dam_top,
+              point_ne, 
+              point_se, 
+              point_dam_bottom
+              ]
     
-    dict['segments'] = [[0,1], [1,2], [2,3],
+    segments = [[0,1], [1,2], [2,3],
                         [3,4 ],[4,5], [5,0],  #The outer border
                         [2,5]]         #dam Separator
     
-    dict['segment_tags'] = ['wall',
-                            'wall',
-                            'wall',
-                            'edge',
-                            'wall',
-                            'wall',          
-                            '']           #Interior
-
+    segment_tags = {'wall':[0,1,2,4,5],'edge':[3]} # '':[6]
         
-    m.addVertsSegs(dict)
+    m.add_points_and_segments(points, segments, segment_tags)
     
     dam = m.add_region(-0.0000001,(ytop - ybottom)/2)
Index: /documentation/user_manual/anuga_user_manual.tex
===================================================================
--- /documentation/user_manual/anuga_user_manual.tex	(revision 3540)
+++ /documentation/user_manual/anuga_user_manual.tex	(revision 3541)
@@ -1211,4 +1211,14 @@
 \end{methoddesc}
 
+
+\begin{methoddesc}  {add\_points_and_segments}{self, points, segments,
+    segment\_tags=None}
+Module: \module{pmesh.mesh},  Class: \class{Mesh}
+
+This method is used to build the mesh outline. It adds some points and
+segments connecting some points.  A tag for each point can optionally
+be added.
+
+\end{methoddesc}
 
 \begin{methoddesc} {add\_region}{x,y, geo_reference=None}
