Index: anuga_core/source/anuga/pmesh/mesh.py
===================================================================
--- anuga_core/source/anuga/pmesh/mesh.py	(revision 4139)
+++ anuga_core/source/anuga/pmesh/mesh.py	(revision 4142)
@@ -5,5 +5,5 @@
    Note: A .index attribute is added to objects such as vertices and
    segments, often when reading and writing to files.  This information
-   should not be used as persistant information.  It is not the 'index' of
+   should not be used as percistant information.  It is not the 'index' of
    an element in a list.
 
@@ -16,4 +16,5 @@
 import sys
 import math
+import anuga.mesh_engine.triang as triang
 import re
 import os
@@ -22,16 +23,11 @@
 import types
 import exceptions
-from Numeric import array, Float, Int
-
-
-#import load_mesh
+
+import load_mesh
 from anuga.coordinate_transforms.geo_reference import Geo_reference,DEFAULT_ZONE
 from anuga.utilities.polygon import point_in_polygon 
 import load_mesh.loadASCII
 import anuga.alpha_shape.alpha_shape
-from anuga.geospatial_data.geospatial_data import Geospatial_data, ensure_geospatial, ensure_absolute, ensure_numeric
-from anuga.mesh_engine.mesh_engine import generate_mesh
-
-#import anuga.mesh_engine_b.mesh_engine as triang
+from anuga.geospatial_data.geospatial_data import Geospatial_data, ensure_geospatial, ensure_absolute
 
 try:  
@@ -471,55 +467,4 @@
 Segment.set_default_tag("")       
 
-class Rigid_triangulation:
-    """ 
-    This is a triangulation that can't have triangles added or taken away.
-
-    It just represents the triangulation, not the mesh outline needed to
-    build the triangulation.
-
-      This is the guts of the data structure;
-        generated vertex list: [(x1,y1),(x2,y2),...] (Tuples of doubles)
-        generated segment list: [(point1,point2),(p3,p4),...]
-            (Tuples of integers) 
-        generated segment tag list: [tag,tag,...] list of strings
-
-        generated triangle list: [(p1,p2,p3), (p4,p5,p6),....] tuple of points
-
-        generated triangle attribute list: [s1,s2,...] list of strings
-
-        generated triangle neighbor list: [(t1,t2,t3), (t4,t5,t6),....]
-            tuple of triangles
-
-            Should I do the basic structure like triangle, general
-            mesh or something else? How about like triangle, since
-            that's where the info is from, and it'll fit easier into
-            this file..
-
-             Removing the loners is difficult, since all the vert's
-             after it must be removed.
-
-             This happens in set_triangulation.
-            
-    """
-
-    def __init__(self,
-                 triangles,
-                 segments,
-                 vertices,
-                 triangle_tags,
-                 triangle_neighbor,
-                 segment_tags,
-                 ):
-       
-        self.triangles=ensure_numeric(triangles) 
-        self.triangle_neighbor=ensure_numeric(triangle_neighbor)
-        self.triangle_tags=triangle_tags
-        self.segments=ensure_numeric(segments) 
-        
-        self.segment_tags=segment_tags # string
-        self.vertices=ensure_numeric(vertices)
-
-        
-        
 class Mesh:
     """
@@ -1109,7 +1054,4 @@
         #print "mesh#generateMesh# self.mode",self.mode  
         meshDict = self.Mesh2triangList()
-
-        #FIXME (DSG-DSG)  move below section into generate_mesh.py
-        #                  & 4 functions eg segment_strings2ints
         #print "*************************!@!@ This is going to triangle   !@!@"
         #print meshDict
@@ -1125,5 +1067,5 @@
         #print "%%%%%%%%%%%%%%%%%%%%%%%%%%%regionlist",meshDict['regionlist']
         #print "meshDict['segmenttaglist']", meshDict['segmenttaglist'
-        generatedMesh = generate_mesh(
+        generatedMesh = triang.genMesh(
                               meshDict['pointlist'],
                               meshDict['segmentlist'],
@@ -1132,6 +1074,6 @@
                               meshDict['pointattributelist'],
                               meshDict['segmenttaglist'],
-                              self.mode,
-                              meshDict['pointlist'])
+                              [],  # since the trianglelist isn't used
+                              self.mode)
         #print "%%%%%%%%%%%%%%%%%%%%%%%%%%%generated",generatedMesh
         generatedMesh['generatedsegmentmarkerlist'] = \
@@ -1139,10 +1081,8 @@
                                   segconverter)
         #print "processed gen",generatedMesh['generatedsegmentmarkerlist']
-        #print "generatedtriangleattributelist",generatedMesh['generatedtriangleattributelist']
         generatedMesh['generatedtriangleattributelist'] = \
          region_ints2strings(generatedMesh['generatedtriangleattributelist'],
                                   regionconverter)
 
-        #FIXME (DSG-DSG)  move above section into generate_mesh.py
 
         if len(generatedMesh['generatedpointattributelist'][0])==0:
@@ -1460,6 +1400,4 @@
             -1 means there's no triangle neighbor
         triangle attribute list: [(T1att), (T2att), ...]
-
-
             (list of a list of strings)
         lone point list:[point1, ...] (list of integers)
Index: anuga_core/source/anuga/pmesh/test_mesh.py
===================================================================
--- anuga_core/source/anuga/pmesh/test_mesh.py	(revision 4139)
+++ anuga_core/source/anuga/pmesh/test_mesh.py	(revision 4142)
@@ -1068,66 +1068,5 @@
                         ,
                         'exported Ascii xya file is wrong')
-     
-    def test_lone_vert_in_mesh_gen_c_layer(self):
-        # currently just a copy of the above test
-        a = Vertex (0,0)
-        b = Vertex (0,3)
-        c = Vertex (3,3)
-        d = Vertex (1,2)
-        e = Vertex (3,1)
-        #f = Vertex (3,1)
-      
-        s1 = Segment(a,b, tag = 50)
-        s2 = Segment(b,c, tag = 40)
-        s3 = Segment(c,a, tag = 30)
-     
-        r1 = Region(2, 1,tag = 1.3)
-        h1 = Hole(1,4)
-        # Warning mesh can't produce this type of data structure its self
-        m = Mesh(userVertices=[a,b,c,d,e],
-                 userSegments=[s1,s2,s3],
-                 regions=[r1],
-                 holes = [h1])
-        
-        fileName = tempfile.mktemp(".xya")
-        #fileName = 't.xya'
-        #os.remove(fileName)
-        m.exportPointsFile(fileName)
-        file = open(fileName)
-        lFile = file.read().split('\n')
-        file.close()
-
-        os.remove(fileName)
-        self.failUnless(lFile[0] == "" and
-                        lFile[1] == "0,0" and
-                        lFile[2] == "0,3" and
-                        lFile[3] == "3,3" 
-                        ,
-                        'exported Ascii xya file is wrong')
-        self.failUnless(lFile[4] == "1,2" and
-                        lFile[5] == "3,1" 
-                        ,
-                        'exported Ascii xya file is wrong')
-        
-        # vertex e is outside of the outline, so
-        # it is a loner and it is removed.
-        m.generateMesh("Q", maxArea = 2.1)
-        fileName = tempfile.mktemp(".xya")
-        #fileName = 't.xya'
-        #m.export_mesh_file('m.tsh')
-        m.exportPointsFile(fileName)
-        file = open(fileName)
-        lFile = file.read().split('\n')
-        file.close()
-        os.remove(fileName)
-        
-        self.failUnless(lFile[0] == "" and
-                        lFile[1] == "0.0,0.0" and
-                        lFile[2] == "0.0,3.0" and
-                        lFile[3] == "3.0,3.0" and
-                        lFile[4] == "1.0,2.0"
-                        ,
-                        'exported Ascii xya file is wrong')
-        
+           
     def test_exportPointsFilefile2(self):
         m = Mesh()
@@ -2337,6 +2276,5 @@
 if __name__ == "__main__":
     suite = unittest.makeSuite(meshTestCase,'test')
-    #suite = unittest.makeSuite(meshTestCase,'test_exportASCIIsegmentoutlinefile')
-    #suite = unittest.makeSuite(meshTestCase,'test_e')
+    #suite = unittest.makeSuite(meshTestCase,'test_add_points_and_segments')
     runner = unittest.TextTestRunner() #verbosity=2)
     runner.run(suite)
