diff --git a/Mesh/3D_BGMesh.cpp b/Mesh/3D_BGMesh.cpp
index 086daef69f0e2f2c08d6cb0924ec47cf775169df..5467960cbcec931a23e8cd116eb48667c515e6c2 100644
--- a/Mesh/3D_BGMesh.cpp
+++ b/Mesh/3D_BGMesh.cpp
@@ -1,4 +1,4 @@
-// $Id: 3D_BGMesh.cpp,v 1.29 2004-05-08 00:19:47 geuzaine Exp $
+// $Id: 3D_BGMesh.cpp,v 1.30 2004-05-13 00:50:40 geuzaine Exp $
 //
 // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
 //
@@ -48,7 +48,7 @@ void ExportLcFieldOnVolume(Mesh * M, char *filename)
     List_T *ll = Tree2List(vol->Simplexes);
     for(int j = 0; j < List_Nbr(ll); j++) {
       List_Read(ll, j, &simp);
-      simp->ExportLcField(f);
+      simp->ExportLcField(f, 3);
     }
     List_Delete(ll);
   }
@@ -75,7 +75,7 @@ void ExportLcFieldOnSurfaces(Mesh * M, char *filename)
     List_T *ll = Tree2List(surf->Simplexes);
     for(int j = 0; j < List_Nbr(ll); j++) {
       List_Read(ll, j, &simp);
-      simp->ExportLcField(f);
+      simp->ExportLcField(f, 2);
     }
     List_Delete(ll);
   }
diff --git a/Mesh/Simplex.cpp b/Mesh/Simplex.cpp
index 70bec6f985cee689fe491ecefb8584734dd3815d..2e9e9567d0a30d8746eae37634bf71cff9abc7cf 100644
--- a/Mesh/Simplex.cpp
+++ b/Mesh/Simplex.cpp
@@ -1,4 +1,4 @@
-// $Id: Simplex.cpp,v 1.30 2004-05-07 21:13:34 geuzaine Exp $
+// $Id: Simplex.cpp,v 1.31 2004-05-13 00:50:40 geuzaine Exp $
 //
 // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
 //
@@ -589,22 +589,24 @@ int Simplex::Pt_In_Simplex_2D(Vertex * v)
   return 1;
 }
 
-void Simplex::ExportLcField(FILE * f)
+void Simplex::ExportLcField(FILE * f, int dim)
 {
-  if(!V[3]) {
+  if(!V[2])
+    fprintf(f, "SL(%f,%f,%f,%f,%f,%f){%12.5E,%12.5E};\n",
+            V[0]->Pos.X, V[0]->Pos.Y, V[0]->Pos.Z, V[1]->Pos.X, V[1]->Pos.Y,
+            V[1]->Pos.Z, V[0]->lc, V[1]->lc);
+  else if(!V[3])
     fprintf(f, "ST(%f,%f,%f,%f,%f,%f,%f,%f,%f){%12.5E,%12.5E,%12.5E};\n",
             V[0]->Pos.X, V[0]->Pos.Y, V[0]->Pos.Z, V[1]->Pos.X, V[1]->Pos.Y,
             V[1]->Pos.Z, V[2]->Pos.X, V[2]->Pos.Y, V[2]->Pos.Z, V[0]->lc,
             V[1]->lc, V[2]->lc);
-  }
-  else {
+  else
     fprintf(f,
-            "SS(%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f){%12.5E,%12.5E,%12.5E,%12.5E};\n",
-            V[0]->Pos.X, V[0]->Pos.Y, V[0]->Pos.Z, V[1]->Pos.X, V[1]->Pos.Y,
-            V[1]->Pos.Z, V[2]->Pos.X, V[2]->Pos.Y, V[2]->Pos.Z, V[3]->Pos.X,
-            V[3]->Pos.Y, V[3]->Pos.Z, V[0]->lc, V[1]->lc, V[2]->lc, V[3]->lc);
-  }
-
+	    "%s(%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f){%12.5E,%12.5E,%12.5E,%12.5E};\n",
+	    (dim == 3) ? "SS" : "SQ",
+	    V[0]->Pos.X, V[0]->Pos.Y, V[0]->Pos.Z, V[1]->Pos.X, V[1]->Pos.Y,
+	    V[1]->Pos.Z, V[2]->Pos.X, V[2]->Pos.Y, V[2]->Pos.Z, V[3]->Pos.X,
+	    V[3]->Pos.Y, V[3]->Pos.Z, V[0]->lc, V[1]->lc, V[2]->lc, V[3]->lc);
 }
 
 double Simplex::AireFace(Vertex * V[3])
diff --git a/Mesh/Simplex.h b/Mesh/Simplex.h
index 2eb71a5b6191697a6fef8c80856577731647dfda..d4b67fa3476c51c287b90ae23337df6b036ea7c1 100644
--- a/Mesh/Simplex.h
+++ b/Mesh/Simplex.h
@@ -60,7 +60,7 @@ class Simplex : public Element {
   bool SwapEdge (int iFac);
   bool SwapFace (int iFac, List_T *newsimp, List_T *delsimp);
   bool ExtractOppositeEdges ( int iFac, Vertex *p[2], Vertex *q[2]);
-  void ExportLcField (FILE *f);
+  void ExportLcField (FILE *f, int dim=3);
   void Center_Ellipsum_3D (double m[3][3]);
   double GammaShapeMeasure ();
   double RhoShapeMeasure ();