diff --git a/Graphics/Entity.cpp b/Graphics/Entity.cpp
index 232754a3adff07dbe241c232d03a1d0455c6ba8b..7b2d2ed2bb122f7d418704d1dc5d77fa0a6b200d 100644
--- a/Graphics/Entity.cpp
+++ b/Graphics/Entity.cpp
@@ -1,4 +1,4 @@
-// $Id: Entity.cpp,v 1.49 2005-01-01 19:35:29 geuzaine Exp $
+// $Id: Entity.cpp,v 1.50 2005-01-09 02:18:59 geuzaine Exp $
 //
 // Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
 //
@@ -110,7 +110,6 @@ void Draw_PlaneInBoundingBox(double xmin, double ymin, double zmin,
 	p[nb++] = edge[face[i][j]];
     }
     if(nb > 1){
-      glColor3d(1.,0.,0.);
       glBegin(GL_LINE_STRIP);
       for(int j = 0; j < nb; j++)
 	glVertex3d(p[j].x, p[j].y, p[j].z);	
diff --git a/Graphics/Mesh.cpp b/Graphics/Mesh.cpp
index d92f8b6ca194a5175d1e8bbeefbc0ec3448492a7..11367aa6554d99caf3bfc2aeb31086028f3ebae3 100644
--- a/Graphics/Mesh.cpp
+++ b/Graphics/Mesh.cpp
@@ -1,4 +1,4 @@
-// $Id: Mesh.cpp,v 1.119 2005-01-08 20:15:12 geuzaine Exp $
+// $Id: Mesh.cpp,v 1.120 2005-01-09 02:18:59 geuzaine Exp $
 //
 // Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
 //
@@ -184,6 +184,7 @@ void Draw_Mesh(Mesh * M)
     sprintf(label, "(%g,%g,%g)", CTX.max[0], CTX.max[1], CTX.max[2]);
     Draw_String(label);
 
+    glColor3d(1.,0.,0.);
     for(int i = 0; i < 6; i++)
       if(CTX.clip[i] & 1 || CTX.clip[i] & 2)
 	Draw_PlaneInBoundingBox(CTX.min[0], CTX.min[1], CTX.min[2],
diff --git a/Graphics/Post.cpp b/Graphics/Post.cpp
index 6bee6ff56a2b4e18aa8d5dfebcc2c7d821c0654d..95291d2ae4dac736ea192ff5992ace469a81af75 100644
--- a/Graphics/Post.cpp
+++ b/Graphics/Post.cpp
@@ -1,4 +1,4 @@
-// $Id: Post.cpp,v 1.91 2005-01-01 19:35:29 geuzaine Exp $
+// $Id: Post.cpp,v 1.92 2005-01-09 02:18:59 geuzaine Exp $
 //
 // Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
 //
@@ -441,6 +441,7 @@ void Draw_Post(void)
 	sprintf(label, "(%g,%g,%g)", v->BBox[1], v->BBox[3], v->BBox[5]);
 	Draw_String(label);
 
+	glColor3d(1.,0.,0.);
 	for(int i = 0; i < 6; i++)
 	  if(CTX.clip[i] & (1<<(2+iView)))
 	    Draw_PlaneInBoundingBox(v->BBox[0], v->BBox[2], v->BBox[4],
diff --git a/Plugin/CutGrid.cpp b/Plugin/CutGrid.cpp
index 38673c8f2e7bc489eb24cefcc3ed898a5ea4f8d3..c600a59460d2a63668828815b245e572cb2ccf08 100644
--- a/Plugin/CutGrid.cpp
+++ b/Plugin/CutGrid.cpp
@@ -1,4 +1,4 @@
-// $Id: CutGrid.cpp,v 1.14 2005-01-01 19:35:37 geuzaine Exp $
+// $Id: CutGrid.cpp,v 1.15 2005-01-09 02:18:59 geuzaine Exp $
 //
 // Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
 //
@@ -43,6 +43,7 @@ StringXNumber CutGridOptions_Number[] = {
   {GMSH_FULLRC, "Z2", GMSH_CutGridPlugin::callbackZ2, 0.},
   {GMSH_FULLRC, "nPointsU", GMSH_CutGridPlugin::callbackU, 20},
   {GMSH_FULLRC, "nPointsV", GMSH_CutGridPlugin::callbackV, 20},
+  {GMSH_FULLRC, "ConnectPoints", GMSH_CutGridPlugin::callbackConnect, 1},
   {GMSH_FULLRC, "iView", NULL, -1.}
 };
 
@@ -64,20 +65,31 @@ void GMSH_CutGridPlugin::draw()
 #if defined(HAVE_FLTK)
   glColor4ubv((GLubyte *) & CTX.color.fg);
   double p[3];
-  glBegin(GL_LINES);
-  for(int i = 0; i < getNbU(); ++i){
-    getPoint(i, 0, p);
-    glVertex3d(p[0], p[1], p[2]);
-    getPoint(i, getNbV()-1, p);
-    glVertex3d(p[0], p[1], p[2]);
+
+  if(CutGridOptions_Number[11].def){
+    glBegin(GL_LINES);
+    for(int i = 0; i < getNbU(); ++i){
+      getPoint(i, 0, p);
+      glVertex3d(p[0], p[1], p[2]);
+      getPoint(i, getNbV()-1, p);
+      glVertex3d(p[0], p[1], p[2]);
+    }
+    for(int i = 0; i < getNbV(); ++i){
+      getPoint(0, i, p);
+      glVertex3d(p[0], p[1], p[2]);
+      getPoint(getNbU()-1, i, p);
+      glVertex3d(p[0], p[1], p[2]);
+    }
+    glEnd();
   }
-  for(int i = 0; i < getNbV(); ++i){
-    getPoint(0, i, p);
-    glVertex3d(p[0], p[1], p[2]);
-    getPoint(getNbU()-1, i, p);
-    glVertex3d(p[0], p[1], p[2]);
+  else{
+    for(int i = 0; i < getNbU(); ++i){
+      for(int j = 0; j < getNbV(); ++j){
+	getPoint(i, j, p);
+	Draw_Point(1, CTX.point_size, &p[0], &p[1], &p[2], 1);
+      }
+    }
   }
-  glEnd();
 #endif
 }
 
@@ -100,67 +112,73 @@ double GMSH_CutGridPlugin::callback(int num, int action, double value, double *o
 double GMSH_CutGridPlugin::callbackX0(int num, int action, double value)
 {
   return callback(num, action, value, &CutGridOptions_Number[0].def,
-		  CTX.lc/200., -CTX.lc, CTX.lc);
+		  CTX.lc/100., -2*CTX.lc, 2*CTX.lc);
 }
 
 double GMSH_CutGridPlugin::callbackY0(int num, int action, double value)
 {
   return callback(num, action, value, &CutGridOptions_Number[1].def,
-		  CTX.lc/200., -CTX.lc, CTX.lc);
+		  CTX.lc/100., -2*CTX.lc, 2*CTX.lc);
 }
 
 double GMSH_CutGridPlugin::callbackZ0(int num, int action, double value)
 {
   return callback(num, action, value, &CutGridOptions_Number[2].def,
-		  CTX.lc/200., -CTX.lc, CTX.lc);
+		  CTX.lc/100., -2*CTX.lc, 2*CTX.lc);
 }
 
 double GMSH_CutGridPlugin::callbackX1(int num, int action, double value)
 {
   return callback(num, action, value, &CutGridOptions_Number[3].def,
-		  CTX.lc/200., -CTX.lc, CTX.lc);
+		  CTX.lc/100., -2*CTX.lc, 2*CTX.lc);
 }
 
 double GMSH_CutGridPlugin::callbackY1(int num, int action, double value)
 {
   return callback(num, action, value, &CutGridOptions_Number[4].def,
-		  CTX.lc/200., -CTX.lc, CTX.lc);
+		  CTX.lc/100., -2*CTX.lc, 2*CTX.lc);
 }
 
 double GMSH_CutGridPlugin::callbackZ1(int num, int action, double value)
 {
   return callback(num, action, value, &CutGridOptions_Number[5].def,
-		  CTX.lc/200., -CTX.lc, CTX.lc);
+		  CTX.lc/100., -2*CTX.lc, 2*CTX.lc);
 }
 
 double GMSH_CutGridPlugin::callbackX2(int num, int action, double value)
 {
   return callback(num, action, value, &CutGridOptions_Number[6].def,
-		  CTX.lc/200., -CTX.lc, CTX.lc);
+		  CTX.lc/100., -2*CTX.lc, 2*CTX.lc);
 }
 
 double GMSH_CutGridPlugin::callbackY2(int num, int action, double value)
 {
   return callback(num, action, value, &CutGridOptions_Number[7].def,
-		  CTX.lc/200., -CTX.lc, CTX.lc);
+		  CTX.lc/100., -2*CTX.lc, 2*CTX.lc);
 }
 
 double GMSH_CutGridPlugin::callbackZ2(int num, int action, double value)
 {
   return callback(num, action, value, &CutGridOptions_Number[8].def,
-		  CTX.lc/200., -CTX.lc, CTX.lc);
+		  CTX.lc/100., -2*CTX.lc, 2*CTX.lc);
 }
 
 double GMSH_CutGridPlugin::callbackU(int num, int action, double value)
 {
   return callback(num, action, value, &CutGridOptions_Number[9].def,
-		  1, 2, 100);
+		  1, 1, 100);
 }
 
 double GMSH_CutGridPlugin::callbackV(int num, int action, double value)
 {
   return callback(num, action, value, &CutGridOptions_Number[10].def,
-		  1, 2, 100);
+		  1, 1, 100);
+}
+
+double GMSH_CutGridPlugin::callbackConnect(int num, int action, double value)
+{
+  return callback(num, action, value, &CutGridOptions_Number[11].def,
+		  1, 0, 1);
 }
 
 void GMSH_CutGridPlugin::getName(char *name) const
@@ -174,12 +192,17 @@ void GMSH_CutGridPlugin::getInfos(char *author, char *copyright,
   strcpy(author, "J.-F. Remacle (remacle@scorec.rpi.edu)");
   strcpy(copyright, "DGR (www.multiphysics.com)");
   strcpy(help_text,
-         "Plugin(CutGrid) cuts a tetrahedron view with a\n"
-	 "rectangular grid defined by the 3 points (`X0',`Y0',`Z0')\n"
-	 "(origin), (`X1',`Y1',`Z1') (axis of U) and (`X2',`Y2',`Z2')\n"
-	 "(axis of V). The number of points along U and V is set\n"
-	 "with the options `nPointsU' and `nPointsV'. If\n"
-	 "`iView' < 0, the plugin is run on the current view.\n"
+         "Plugin(CutGrid) cuts a triangle/tetrahedron view\n"
+	 "with a rectangular grid defined by the 3 points\n"
+	 "(`X0',`Y0',`Z0') (origin), (`X1',`Y1',`Z1') (axis of U)\n"
+	 "and (`X2',`Y2',`Z2') (axis of V). The number of points\n"
+	 "along U and V is set with the options `nPointsU'\n"
+	 "and `nPointsV'. If `ConnectPoints' is zero, the\n"
+	 "plugin creates scalar or vector points; otherwise,\n"
+	 "the plugin generates scalar or vector quadrangles,\n"
+	 "lines or points depending on the values of `nPointsU'\n"
+	 "and `nPointsV'. If `iView' < 0, the plugin is run on\n"
+	 "the current view.\n"
 	 "\n"
 	 "Plugin(CutGrid) creates one new view.\n");
 }
@@ -224,102 +247,231 @@ void GMSH_CutGridPlugin::getPoint(int iU, int iV, double *X)
     v  * (CutGridOptions_Number[8].def-CutGridOptions_Number[2].def) ;
 }
 
-Post_View * GMSH_CutGridPlugin::GenerateView(Post_View * v) const 
+Post_View * GMSH_CutGridPlugin::GenerateView(Post_View * v, int connect) const 
 {
-  Post_View * View = BeginView(1);
+  if(getNbU() <= 0 || getNbV() <= 0)
+    return v;
 
-  double X1[3],X2[3],X3[3],X4[3];
-  double *VALUES1 = new double [9*v->NbTimeStep];
-  double *VALUES2 = new double [9*v->NbTimeStep];
-  double *VALUES3 = new double [9*v->NbTimeStep];
-  double *VALUES4 = new double [9*v->NbTimeStep];
+  Post_View * View = BeginView(1);
 
   OctreePost o(v);
 
-  for(int i = 0; i < getNbU()-1; ++i){
-    for(int j = 0; j < getNbV()-1; ++j){
-      getPoint(i  , j  , X1);
-      getPoint(i+1, j  , X2);
-      getPoint(i+1, j+1, X3);
-      getPoint(i  , j+1, X4);
-      if(v->NbSS){
-	List_Add(View->SQ, &X1[0]);
-	List_Add(View->SQ, &X2[0]);
-	List_Add(View->SQ, &X3[0]);
-	List_Add(View->SQ, &X4[0]);
-	List_Add(View->SQ, &X1[1]);
-	List_Add(View->SQ, &X2[1]);
-	List_Add(View->SQ, &X3[1]);
-	List_Add(View->SQ, &X4[1]);
-	List_Add(View->SQ, &X1[2]);
-	List_Add(View->SQ, &X2[2]);
-	List_Add(View->SQ, &X3[2]);
-	List_Add(View->SQ, &X4[2]);
-	View->NbSQ ++;
-	o.searchScalar(X1[0], X1[1], X1[2], VALUES1);
-	o.searchScalar(X2[0], X2[1], X2[2], VALUES2);
-	o.searchScalar(X3[0], X3[1], X3[2], VALUES3);
-	o.searchScalar(X4[0], X4[1], X4[2], VALUES4);
+  double ***pnts = new double** [getNbU()];
+  double ***vals = new double** [getNbU()];
+  for(int i = 0; i < getNbU(); i++){
+    pnts[i] = new double* [getNbV()];
+    vals[i] = new double* [getNbV()];
+    for(int j = 0; j < getNbV(); j++){
+      pnts[i][j] = new double[3];
+      vals[i][j] = new double[3 * v->NbTimeStep]; // change to 9 for tensors
+      getPoint(i, j, pnts[i][j]);
+    }
+  }
+  
+  if(v->NbST || v->NbSS){
+
+    for(int i = 0; i < getNbU(); i++)
+      for(int j = 0; j < getNbV(); j++)
+	o.searchScalar(pnts[i][j][0], pnts[i][j][1], pnts[i][j][2], 
+		       vals[i][j]);
+    
+    if(!connect){ // generate points
+
+      for(int i = 0; i < getNbU(); ++i){
+	for(int j = 0; j < getNbV(); ++j){
+	  List_Add(View->SP, &pnts[i][j][0]);
+	  List_Add(View->SP, &pnts[i][j][1]);
+	  List_Add(View->SP, &pnts[i][j][2]);
+	  View->NbSP ++;
+	  for(int k = 0; k < v->NbTimeStep; ++k){
+	    List_Add(View->SP, &vals[i][j][k]);
+	  }
+	}
+      }
+
+    }
+    else{
+
+      if(getNbU() == 1 && getNbV() == 1){
+	List_Add(View->SP, &pnts[0][0][0]);
+	List_Add(View->SP, &pnts[0][0][1]);
+	List_Add(View->SP, &pnts[0][0][2]);
+	View->NbSP ++;
 	for(int k = 0; k < v->NbTimeStep; ++k){
-	  List_Add(View->SQ, &VALUES1[k]);	      
-	  List_Add(View->SQ, &VALUES2[k]);	      
-	  List_Add(View->SQ, &VALUES3[k]);	      
-	  List_Add(View->SQ, &VALUES4[k]);	      
+	  List_Add(View->SP, &vals[0][0][k]);
+	}
+      }
+      else if(getNbU() == 1){
+	for(int i = 0; i < getNbV()-1; ++i){
+	  List_Add(View->SL, &pnts[0][i][0]); List_Add(View->SL, &pnts[0][i+1][0]);
+	  List_Add(View->SL, &pnts[0][i][1]); List_Add(View->SL, &pnts[0][i+1][1]);
+	  List_Add(View->SL, &pnts[0][i][2]); List_Add(View->SL, &pnts[0][i+1][2]);
+	  View->NbSL ++;
+	  for(int k = 0; k < v->NbTimeStep; ++k){
+	    List_Add(View->SL, &vals[0][i  ][k]);
+	    List_Add(View->SL, &vals[0][i+1][k]);
+	  }
+	}
+      }
+      else if(getNbV() == 1){
+	for(int i = 0; i < getNbU()-1; ++i){
+	  List_Add(View->SL, &pnts[i][0][0]); List_Add(View->SL, &pnts[i+1][0][0]);
+	  List_Add(View->SL, &pnts[i][0][1]); List_Add(View->SL, &pnts[i+1][0][1]);
+	  List_Add(View->SL, &pnts[i][0][2]); List_Add(View->SL, &pnts[i+1][0][2]);
+	  View->NbSL ++;
+	  for(int k = 0; k < v->NbTimeStep; ++k){
+	    List_Add(View->SL, &vals[i  ][0][k]);
+	    List_Add(View->SL, &vals[i+1][0][k]);
+	  }
+	}
+      }
+      else{
+	for(int i = 0; i < getNbU()-1; ++i){
+	  for(int j = 0; j < getNbV()-1; ++j){
+	    List_Add(View->SQ, &pnts[i  ][j  ][0]); List_Add(View->SQ, &pnts[i+1][j  ][0]);
+	    List_Add(View->SQ, &pnts[i+1][j+1][0]); List_Add(View->SQ, &pnts[i  ][j+1][0]);
+	    List_Add(View->SQ, &pnts[i  ][j  ][1]); List_Add(View->SQ, &pnts[i+1][j  ][1]);
+	    List_Add(View->SQ, &pnts[i+1][j+1][1]); List_Add(View->SQ, &pnts[i  ][j+1][1]);
+	    List_Add(View->SQ, &pnts[i  ][j  ][2]); List_Add(View->SQ, &pnts[i+1][j  ][2]);
+	    List_Add(View->SQ, &pnts[i+1][j+1][2]); List_Add(View->SQ, &pnts[i  ][j+1][2]);
+	    View->NbSQ ++;
+	    for(int k = 0; k < v->NbTimeStep; ++k){
+	      List_Add(View->SQ, &vals[i  ][j  ][k]);
+	      List_Add(View->SQ, &vals[i+1][j  ][k]);
+	      List_Add(View->SQ, &vals[i+1][j+1][k]);
+	      List_Add(View->SQ, &vals[i  ][j+1][k]);
+	    }
+	  }
 	}
       }
-      if(v->NbVS){
-	List_Add(View->VQ, &X1[0]);
-	List_Add(View->VQ, &X2[0]);
-	List_Add(View->VQ, &X3[0]);
-	List_Add(View->VQ, &X4[0]);
-	List_Add(View->VQ, &X1[1]);
-	List_Add(View->VQ, &X2[1]);
-	List_Add(View->VQ, &X3[1]);
-	List_Add(View->VQ, &X4[1]);
-	List_Add(View->VQ, &X1[2]);
-	List_Add(View->VQ, &X2[2]);
-	List_Add(View->VQ, &X3[2]);
-	List_Add(View->VQ, &X4[2]);
-	View->NbVQ ++;
-	double sizeElem;
-	o.searchVector(X1[0],X1[1],X1[2], &sizeElem, VALUES1);
-	o.searchVector(X2[0],X2[1],X2[2], &sizeElem, VALUES2);
-	o.searchVector(X3[0],X3[1],X3[2], &sizeElem, VALUES3);
-	o.searchVector(X4[0],X4[1],X4[2], &sizeElem, VALUES4);
+    }	
+
+  }
+
+  if(v->NbVT || v->NbVS){
+
+    double sizeElem;
+    for(int i = 0; i < getNbU(); i++)
+      for(int j = 0; j < getNbV(); j++)
+	o.searchVector(pnts[i][j][0], pnts[i][j][1], pnts[i][j][2], 
+		       vals[i][j], &sizeElem);
+    
+    if(!connect){ // generate points
+
+      for(int i = 0; i < getNbU(); ++i){
+	for(int j = 0; j < getNbV(); ++j){
+	  List_Add(View->VP, &pnts[i][j][0]);
+	  List_Add(View->VP, &pnts[i][j][1]);
+	  List_Add(View->VP, &pnts[i][j][2]);
+	  View->NbVP ++;
+	  for(int k = 0; k < v->NbTimeStep; ++k){
+	    List_Add(View->VP, &vals[i][j][3*k]);
+	    List_Add(View->VP, &vals[i][j][3*k+1]);
+	    List_Add(View->VP, &vals[i][j][3*k+2]);
+	  }
+	}
+      }
+
+    }
+    else{
+
+      if(getNbU() == 1 && getNbV() == 1){
+	List_Add(View->VP, &pnts[0][0][0]);
+	List_Add(View->VP, &pnts[0][0][1]);
+	List_Add(View->VP, &pnts[0][0][2]);
+	View->NbVP ++;
 	for(int k = 0; k < v->NbTimeStep; ++k){
-	  List_Add(View->VQ, &VALUES1[3*i]);	      
-	  List_Add(View->VQ, &VALUES1[3*i+1]);	      
-	  List_Add(View->VQ, &VALUES1[3*i+2]);	      
-	  List_Add(View->VQ, &VALUES2[3*i]);	      
-	  List_Add(View->VQ, &VALUES2[3*i+1]);	      
-	  List_Add(View->VQ, &VALUES2[3*i+2]);	      
-	  List_Add(View->VQ, &VALUES3[3*i]);	      
-	  List_Add(View->VQ, &VALUES3[3*i+1]);	      
-	  List_Add(View->VQ, &VALUES3[3*i+2]);	      
-	  List_Add(View->VQ, &VALUES4[3*i]);	      
-	  List_Add(View->VQ, &VALUES4[3*i+1]);	      
-	  List_Add(View->VQ, &VALUES4[3*i+2]);	      
+	  List_Add(View->VP, &vals[0][0][3*k]);
+	  List_Add(View->VP, &vals[0][0][3*k+1]);
+	  List_Add(View->VP, &vals[0][0][3*k+2]);
 	}
       }
+      else if(getNbU() == 1){
+	for(int i = 0; i < getNbV()-1; ++i){
+	  List_Add(View->VL, &pnts[0][i][0]); List_Add(View->VL, &pnts[0][i+1][0]);
+	  List_Add(View->VL, &pnts[0][i][1]); List_Add(View->VL, &pnts[0][i+1][1]);
+	  List_Add(View->VL, &pnts[0][i][2]); List_Add(View->VL, &pnts[0][i+1][2]);
+	  View->NbVL ++;
+	  for(int k = 0; k < v->NbTimeStep; ++k){
+	    List_Add(View->VL, &vals[0][i  ][3*k]);
+	    List_Add(View->VL, &vals[0][i  ][3*k+1]);
+	    List_Add(View->VL, &vals[0][i  ][3*k+2]);
+	    List_Add(View->VL, &vals[0][i+1][3*k]);
+	    List_Add(View->VL, &vals[0][i+1][3*k+1]);
+	    List_Add(View->VL, &vals[0][i+1][3*k+2]);
+	  }
+	}
+      }
+      else if(getNbV() == 1){
+	for(int i = 0; i < getNbU()-1; ++i){
+	  List_Add(View->VL, &pnts[i][0][0]); List_Add(View->VL, &pnts[i+1][0][0]);
+	  List_Add(View->VL, &pnts[i][0][1]); List_Add(View->VL, &pnts[i+1][0][1]);
+	  List_Add(View->VL, &pnts[i][0][2]); List_Add(View->VL, &pnts[i+1][0][2]);
+	  View->NbVL ++;
+	  for(int k = 0; k < v->NbTimeStep; ++k){
+	    List_Add(View->VL, &vals[i  ][0][3*k]);
+	    List_Add(View->VL, &vals[i  ][0][3*k+1]);
+	    List_Add(View->VL, &vals[i  ][0][3*k+2]);
+	    List_Add(View->VL, &vals[i+1][0][3*k]);
+	    List_Add(View->VL, &vals[i+1][0][3*k+1]);
+	    List_Add(View->VL, &vals[i+1][0][3*k+2]);
+	  }
+	}
+      }
+      else{
+	for(int i = 0; i < getNbU()-1; ++i){
+	  for(int j = 0; j < getNbV()-1; ++j){
+	    List_Add(View->VQ, &pnts[i  ][j  ][0]); List_Add(View->VQ, &pnts[i+1][j  ][0]);
+	    List_Add(View->VQ, &pnts[i+1][j+1][0]); List_Add(View->VQ, &pnts[i  ][j+1][0]);
+	    List_Add(View->VQ, &pnts[i  ][j  ][1]); List_Add(View->VQ, &pnts[i+1][j  ][1]);
+	    List_Add(View->VQ, &pnts[i+1][j+1][1]); List_Add(View->VQ, &pnts[i  ][j+1][1]);
+	    List_Add(View->VQ, &pnts[i  ][j  ][2]); List_Add(View->VQ, &pnts[i+1][j  ][2]);
+	    List_Add(View->VQ, &pnts[i+1][j+1][2]); List_Add(View->VQ, &pnts[i  ][j+1][2]);
+	    View->NbVQ ++;
+	    for(int k = 0; k < v->NbTimeStep; ++k){
+	      List_Add(View->VQ, &vals[i  ][j  ][3*k]);
+	      List_Add(View->VQ, &vals[i  ][j  ][3*k+1]);
+	      List_Add(View->VQ, &vals[i  ][j  ][3*k+2]);
+	      List_Add(View->VQ, &vals[i+1][j  ][3*k]);
+	      List_Add(View->VQ, &vals[i+1][j  ][3*k+1]);
+	      List_Add(View->VQ, &vals[i+1][j  ][3*k+2]);
+	      List_Add(View->VQ, &vals[i+1][j+1][3*k]);
+	      List_Add(View->VQ, &vals[i+1][j+1][3*k+1]);
+	      List_Add(View->VQ, &vals[i+1][j+1][3*k+2]);
+	      List_Add(View->VQ, &vals[i  ][j+1][3*k]);
+	      List_Add(View->VQ, &vals[i  ][j+1][3*k+1]);
+	      List_Add(View->VQ, &vals[i  ][j+1][3*k+2]);
+	    }
+	  }
+	}
+      }
+    }	
+
+  }
+
+  for(int i = 0; i < getNbU(); i++){
+    for(int j = 0; j < getNbV(); j++){
+      delete [] pnts[i][j];
+      delete [] vals[i][j];
     }
+    delete [] pnts[i];
+    delete [] vals[i];
   }
+  delete [] pnts;
+  delete [] vals;
 
   char name[1024], filename[1024];
   sprintf(name, "%s_CutGrid", v->Name);
   sprintf(filename, "%s_CutGrid.pos", v->Name);
   EndView(View, v->NbTimeStep, filename, name);
 
-  delete [] VALUES1;
-  delete [] VALUES2;
-  delete [] VALUES3;
-  delete [] VALUES4;
-
   return View;
 }
 
 Post_View *GMSH_CutGridPlugin::execute(Post_View * v)
 {
-  int iView = (int)CutGridOptions_Number[11].def;
+  int connectPoints = (int)CutGridOptions_Number[11].def;
+  int iView = (int)CutGridOptions_Number[12].def;
 
   if(iView < 0)
     iView = v ? v->Index : 0;
@@ -331,5 +483,5 @@ Post_View *GMSH_CutGridPlugin::execute(Post_View * v)
 
   Post_View *v1 = *(Post_View **)List_Pointer(CTX.post.list, iView);
 
-  return GenerateView(v1);
+  return GenerateView(v1, connectPoints);
 }
diff --git a/Plugin/CutGrid.h b/Plugin/CutGrid.h
index dab9e9ffab543377c7a79ccf31baf77cf26c2454..2f9b90721391c3dab21e0c645a720d8e53b19112 100644
--- a/Plugin/CutGrid.h
+++ b/Plugin/CutGrid.h
@@ -41,7 +41,7 @@ public:
   int getNbOptions() const;
   StringXNumber *getOption (int iopt);  
   Post_View *execute (Post_View *);
-  virtual Post_View * GenerateView (Post_View * v) const ;
+  virtual Post_View * GenerateView (Post_View * v, int connectPoints) const ;
 
   static int getNbU ();
   static int getNbV ();
@@ -58,6 +58,7 @@ public:
   static double callbackZ2(int, int, double);
   static double callbackU(int, int, double);
   static double callbackV(int, int, double);
+  static double callbackConnect(int, int, double);
   static void draw();
 };
 
diff --git a/Plugin/CutParametric.cpp b/Plugin/CutParametric.cpp
index e93e47fb83f9ce90abbf75a1390e2789a53b3245..dfd618da718a9b6c36b883a44c78bff8a5e0cfc2 100644
--- a/Plugin/CutParametric.cpp
+++ b/Plugin/CutParametric.cpp
@@ -1,4 +1,4 @@
-// $Id: CutParametric.cpp,v 1.9 2005-01-08 20:15:18 geuzaine Exp $
+// $Id: CutParametric.cpp,v 1.10 2005-01-09 02:18:59 geuzaine Exp $
 //
 // Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
 //
@@ -76,8 +76,8 @@ void GMSH_CutParametricPlugin::getInfos(char *author, char *copyright,
   strcpy(author, "C. Geuzaine (geuzaine@acm.caltech.edu)");
   strcpy(copyright, "DGR (www.multiphysics.com)");
   strcpy(help_text,
-         "Plugin(CutParametric) cuts a triangle/tetrahedron\n"
-	 "scalar view `iView' with the parametric function\n"
+         "Plugin(CutParametric) cuts a scalar triangle/\n"
+	 "tetrahedron view `iView' with the parametric function\n"
 	 "(`X'(u), `Y'(u), `Z'(u)), using `nPointsU' values of\n"
 	 "the parameter u in [`MinU', `MaxU']. If\n"
 	 "`ConnectPoints' is set, the plugin creates scalar\n"
diff --git a/Plugin/CutPlane.cpp b/Plugin/CutPlane.cpp
index 3d1122c9ff758226f53f277fe53b407c2a4333ad..c048c8acdb43efbae31f1d2778d7b06953aac601 100644
--- a/Plugin/CutPlane.cpp
+++ b/Plugin/CutPlane.cpp
@@ -1,4 +1,4 @@
-// $Id: CutPlane.cpp,v 1.46 2005-01-08 20:15:18 geuzaine Exp $
+// $Id: CutPlane.cpp,v 1.47 2005-01-09 02:18:59 geuzaine Exp $
 //
 // Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
 //
@@ -63,6 +63,7 @@ void GMSH_CutPlanePlugin::draw()
   if(num < 0) num = iview;
   Post_View **vv = (Post_View **)List_Pointer_Test(CTX.post.list, num);
   if(!vv) return;
+  glColor4ubv((GLubyte *) & CTX.color.fg);
   glLineWidth(CTX.line_width);
   Draw_PlaneInBoundingBox((*vv)->BBox[0], (*vv)->BBox[2], (*vv)->BBox[4],
 			  (*vv)->BBox[1], (*vv)->BBox[3], (*vv)->BBox[5],
diff --git a/Plugin/CutSphere.cpp b/Plugin/CutSphere.cpp
index 15b78b8b7db4f9a08a0e28c67258ec225473acaa..26bcef355fb8304d50d83e0911602fbc6132e366 100644
--- a/Plugin/CutSphere.cpp
+++ b/Plugin/CutSphere.cpp
@@ -1,4 +1,4 @@
-// $Id: CutSphere.cpp,v 1.43 2005-01-08 20:15:19 geuzaine Exp $
+// $Id: CutSphere.cpp,v 1.44 2005-01-09 02:18:59 geuzaine Exp $
 //
 // Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
 //
@@ -97,25 +97,25 @@ double GMSH_CutSpherePlugin::callback(int num, int action, double value, double
 double GMSH_CutSpherePlugin::callbackX(int num, int action, double value)
 {
   return callback(num, action, value, &CutSphereOptions_Number[0].def,
-		  CTX.lc/200., -CTX.lc, CTX.lc);
+		  CTX.lc/100., -2*CTX.lc, 2*CTX.lc);
 }
 
 double GMSH_CutSpherePlugin::callbackY(int num, int action, double value)
 {
   return callback(num, action, value, &CutSphereOptions_Number[1].def,
-		  CTX.lc/200., -CTX.lc, CTX.lc);
+		  CTX.lc/100., -2*CTX.lc, 2*CTX.lc);
 }
 
 double GMSH_CutSpherePlugin::callbackZ(int num, int action, double value)
 {
   return callback(num, action, value, &CutSphereOptions_Number[2].def,
-		  CTX.lc/200., -CTX.lc, CTX.lc);
+		  CTX.lc/100., -2*CTX.lc, 2*CTX.lc);
 }
 
 double GMSH_CutSpherePlugin::callbackR(int num, int action, double value)
 {
   return callback(num, action, value, &CutSphereOptions_Number[3].def,
-		  CTX.lc/200., 0., 2 * CTX.lc);
+		  CTX.lc/100., 0., 2*CTX.lc);
 }
 
 double GMSH_CutSpherePlugin::callbackVol(int num, int action, double value)
diff --git a/Plugin/Eigenvalues.cpp b/Plugin/Eigenvalues.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..4663db670d5f24c1a19ccef7be779383bd6dee3f
--- /dev/null
+++ b/Plugin/Eigenvalues.cpp
@@ -0,0 +1,170 @@
+// $Id: Eigenvalues.cpp,v 1.1 2005-01-09 02:18:59 geuzaine Exp $
+//
+// Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+// USA.
+// 
+// Please report all bugs and problems to <gmsh@geuz.org>.
+
+#include "Plugin.h"
+#include "Eigenvalues.h"
+#include "List.h"
+#include "Views.h"
+#include "Context.h"
+#include "Malloc.h"
+#include "Numeric.h"
+
+extern Context_T CTX;
+
+StringXNumber EigenvaluesOptions_Number[] = {
+  {GMSH_FULLRC, "iView", NULL, -1.}
+};
+
+extern "C"
+{
+  GMSH_Plugin *GMSH_RegisterEigenvaluesPlugin()
+  {
+    return new GMSH_EigenvaluesPlugin();
+  }
+}
+
+GMSH_EigenvaluesPlugin::GMSH_EigenvaluesPlugin()
+{
+  ;
+}
+
+void GMSH_EigenvaluesPlugin::getName(char *name) const
+{
+  strcpy(name, "Eigenvalues");
+}
+
+void GMSH_EigenvaluesPlugin::getInfos(char *author, char *copyright, char *help_text) const
+{
+  strcpy(author, "C. Geuzaine (geuz@geuz.org)");
+  strcpy(copyright, "DGR (www.multiphysics.com)");
+  strcpy(help_text,
+         "Plugin(Eigenvalues) computes the three real\n"
+	 "eigenvalues of each tensor in the view `iView'.\n"
+	 "If `iView' < 0, the plugin is run on the current view.\n"
+	 "\n"
+	 "Plugin(Eigenvalues) creates three new scalar views.\n");
+}
+
+int GMSH_EigenvaluesPlugin::getNbOptions() const
+{
+  return sizeof(EigenvaluesOptions_Number) / sizeof(StringXNumber);
+}
+
+StringXNumber *GMSH_EigenvaluesPlugin::getOption(int iopt)
+{
+  return &EigenvaluesOptions_Number[iopt];
+}
+
+void GMSH_EigenvaluesPlugin::catchErrorMessage(char *errorMessage) const
+{
+  strcpy(errorMessage, "Eigenvalues failed...");
+}
+
+static void eigenvalues(List_T *inList, int inNb, 
+			int nbNod, int nbTime,
+			List_T *minList, int *minNb, 
+			List_T *midList, int *midNb, 
+			List_T *maxList, int *maxNb)
+{
+  if(!inNb) return;
+
+  int nb = List_Nbr(inList) / inNb;
+  for(int i = 0; i < List_Nbr(inList); i += nb) {
+    for(int j = 0; j < 3 * nbNod; j++){
+      List_Add(minList, List_Pointer_Fast(inList, i + j));
+      List_Add(midList, List_Pointer_Fast(inList, i + j));
+      List_Add(maxList, List_Pointer_Fast(inList, i + j));
+    }
+    for(int j = 0; j < nbTime; j++){
+      for(int k = 0; k < nbNod; k++){
+	double *v = (double *)List_Pointer_Fast(inList, i + 3 * nbNod + 
+						nbNod * 9 * j + 9 * k);
+	double w[3], A[3][3] = { {v[0], v[1], v[2]},
+				 {v[3], v[4], v[5]},
+				 {v[6], v[7], v[8]} };
+	eigenvalue(A, w);
+	for(int l = 0; l < 3; l++){
+	  List_Add(minList, &w[2]);
+	  List_Add(midList, &w[1]);
+	  List_Add(maxList, &w[0]);
+	}
+      }
+    }
+    (*minNb)++;
+    (*midNb)++;
+    (*maxNb)++;
+  }
+}
+
+Post_View *GMSH_EigenvaluesPlugin::execute(Post_View * v)
+{
+  int iView = (int)EigenvaluesOptions_Number[0].def;
+
+  if(iView < 0)
+    iView = v ? v->Index : 0;
+
+  if(!List_Pointer_Test(CTX.post.list, iView)) {
+    Msg(GERROR, "View[%d] does not exist", iView);
+    return v;
+  }
+
+  Post_View *v1 = *(Post_View **)List_Pointer(CTX.post.list, iView);
+  Post_View *min = BeginView(1);
+  Post_View *mid = BeginView(1);
+  Post_View *max = BeginView(1);
+
+  eigenvalues(v1->TP, v1->NbTP, 1, v1->NbTimeStep,
+	      min->SP, &min->NbSP, mid->SP, &mid->NbSP, max->SP, &max->NbSP);
+  eigenvalues(v1->TL, v1->NbTL, 2, v1->NbTimeStep,
+	      min->SL, &min->NbSL, mid->SL, &mid->NbSL, max->SL, &max->NbSL);
+  eigenvalues(v1->TT, v1->NbTT, 3, v1->NbTimeStep,
+	      min->ST, &min->NbST, mid->ST, &mid->NbST, max->ST, &max->NbST);
+  eigenvalues(v1->TQ, v1->NbTQ, 4, v1->NbTimeStep,
+	      min->SQ, &min->NbSQ, mid->SQ, &mid->NbSQ, max->SQ, &max->NbSQ);
+  eigenvalues(v1->TS, v1->NbTS, 4, v1->NbTimeStep,
+	      min->SS, &min->NbSS, mid->SS, &mid->NbSS, max->SS, &max->NbSS);
+  eigenvalues(v1->TH, v1->NbTH, 8, v1->NbTimeStep,
+	      min->SH, &min->NbSH, mid->SH, &mid->NbSH, max->SH, &max->NbSH);
+  eigenvalues(v1->TI, v1->NbTI, 6, v1->NbTimeStep,
+	      min->SI, &min->NbSI, mid->SI, &mid->NbSI, max->SI, &max->NbSI);
+  eigenvalues(v1->TY, v1->NbTY, 5, v1->NbTimeStep,
+	      min->SY, &min->NbSY, mid->SY, &mid->NbSY, max->SY, &max->NbSY);
+
+  // copy time data
+  for(int i = 0; i < List_Nbr(v1->Time); i++){
+    List_Add(min->Time, List_Pointer(v1->Time, i));
+    List_Add(mid->Time, List_Pointer(v1->Time, i));
+    List_Add(max->Time, List_Pointer(v1->Time, i));
+  }
+  // finalize
+  char name[1024], filename[1024];
+  sprintf(name, "%s_MinEigenvalues", v1->Name);
+  sprintf(filename, "%s_MinEigenvalues.pos", v1->Name);
+  EndView(min, 1, filename, name);
+  sprintf(name, "%s_MidEigenvalue", v1->Name);
+  sprintf(filename, "%s_MidEigenvalues.pos", v1->Name);
+  EndView(mid, 1, filename, name);
+  sprintf(name, "%s_MaxEigenvalue", v1->Name);
+  sprintf(filename, "%s_MaxEigenvalues.pos", v1->Name);
+  EndView(max, 1, filename, name);
+
+  return NULL;
+}
diff --git a/Plugin/Eigenvalues.h b/Plugin/Eigenvalues.h
new file mode 100644
index 0000000000000000000000000000000000000000..4000b974b5ab8a50f2e328baf724bd8948ab83d2
--- /dev/null
+++ b/Plugin/Eigenvalues.h
@@ -0,0 +1,43 @@
+#ifndef _EIGENVALUES_H_
+#define _EIGENVALUES_H_
+
+// Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+// USA.
+// 
+// Please report all bugs and problems to <gmsh@geuz.org>.
+
+#include "Plugin.h"
+#include "List.h"
+
+extern "C"
+{
+  GMSH_Plugin *GMSH_RegisterEigenvaluesPlugin();
+}
+
+class GMSH_EigenvaluesPlugin : public GMSH_Post_Plugin
+{
+ public:
+  GMSH_EigenvaluesPlugin();
+  void getName(char *name) const;
+  void getInfos(char *author, char *copyright, char *helpText) const;
+  void catchErrorMessage(char *errorMessage) const;
+  int getNbOptions() const;
+  StringXNumber* getOption(int iopt);  
+  Post_View *execute(Post_View *);
+};
+
+#endif
diff --git a/Plugin/Eigenvectors.h b/Plugin/Eigenvectors.h
index 8b87f0f634840ccc4f033760149628ccd91aeb7f..8b4155659a1c15e8bc4e81e880758374cadde06d 100644
--- a/Plugin/Eigenvectors.h
+++ b/Plugin/Eigenvectors.h
@@ -1,5 +1,5 @@
-#ifndef _EIGEN_VECTORS_H_
-#define _EIGEN_VECTORS_H_
+#ifndef _EIGENVECTORS_H_
+#define _EIGENVECTORS_H_
 
 // Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
 //
diff --git a/Plugin/Makefile b/Plugin/Makefile
index 6da6084d3e4d18a240188d723beab3b3e8029e2f..752746ad1c6d3404539c5a18c0c7d68d23abc8f4 100644
--- a/Plugin/Makefile
+++ b/Plugin/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.77 2005-01-08 20:15:19 geuzaine Exp $
+# $Id: Makefile,v 1.78 2005-01-09 02:18:59 geuzaine Exp $
 #
 # Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
 #
@@ -31,7 +31,7 @@ SRC = Plugin.cpp\
           CutPlane.cpp CutSphere.cpp CutMap.cpp \
         Smooth.cpp CutParametric.cpp\
         Lambda2.cpp\
-        Eigenvectors.cpp\
+        Eigenvectors.cpp Eigenvalues.cpp\
 	Octree.cpp OctreeInternals.cpp OctreePost.cpp\
           StreamLines.cpp CutGrid.cpp\
         Transform.cpp\
@@ -82,9 +82,9 @@ Plugin.o: Plugin.cpp Plugin.h ../Common/Options.h ../Common/Message.h \
   StructuralSolver.h ../Geo/Geo.h ../Mesh/Mesh.h ../Mesh/Vertex.h \
   ../Mesh/Element.h ../Mesh/Simplex.h ../Mesh/Face.h ../Mesh/Edge.h \
   ../Geo/ExtrudeParams.h ../Mesh/DiscreteSurface.h ../Mesh/Metric.h \
-  ../Mesh/Matrix.h ../Common/GmshUI.h Eigenvectors.h Lambda2.h \
-  ../Numeric/Numeric.h Evaluate.h OctreePost.h Octree.h OctreeInternals.h \
-  Probe.h ../Common/Context.h
+  ../Mesh/Matrix.h ../Common/GmshUI.h Eigenvectors.h Eigenvalues.h \
+  Lambda2.h ../Numeric/Numeric.h Evaluate.h OctreePost.h Octree.h \
+  OctreeInternals.h Probe.h ../Common/Context.h
 Levelset.o: Levelset.cpp Levelset.h Plugin.h ../Common/Options.h \
   ../Common/Message.h ../Common/Views.h ../Common/ColorTable.h \
   ../DataStr/List.h ../Common/VertexArray.h ../Common/SmoothNormals.h \
@@ -134,6 +134,11 @@ Eigenvectors.o: Eigenvectors.cpp Plugin.h ../Common/Options.h \
   ../Common/GmshMatrix.h ../Common/AdaptiveViews.h Eigenvectors.h \
   ../Common/Context.h ../DataStr/Malloc.h ../Numeric/Numeric.h \
   ../Numeric/EigSolve.h
+Eigenvalues.o: Eigenvalues.cpp Plugin.h ../Common/Options.h \
+  ../Common/Message.h ../Common/Views.h ../Common/ColorTable.h \
+  ../DataStr/List.h ../Common/VertexArray.h ../Common/SmoothNormals.h \
+  ../Common/GmshMatrix.h ../Common/AdaptiveViews.h Eigenvalues.h \
+  ../Common/Context.h ../DataStr/Malloc.h ../Numeric/Numeric.h
 Octree.o: Octree.cpp Octree.h OctreeInternals.h
 OctreeInternals.o: OctreeInternals.cpp ../Common/Message.h \
   OctreeInternals.h
diff --git a/Plugin/Plugin.cpp b/Plugin/Plugin.cpp
index 3a2311bf0baae8125104bdc5b4746be59326ac4f..05d62797158870b1a3be62b110461a747092a7a4 100644
--- a/Plugin/Plugin.cpp
+++ b/Plugin/Plugin.cpp
@@ -1,4 +1,4 @@
-// $Id: Plugin.cpp,v 1.71 2005-01-01 19:35:39 geuzaine Exp $
+// $Id: Plugin.cpp,v 1.72 2005-01-09 02:19:00 geuzaine Exp $
 //
 // Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
 //
@@ -52,6 +52,7 @@
 #include "DisplacementRaise.h"
 #include "StructuralSolver.h"
 #include "Eigenvectors.h"
+#include "Eigenvalues.h"
 #include "Lambda2.h"
 #include "Evaluate.h"
 #include "Probe.h"
@@ -205,6 +206,8 @@ void GMSH_PluginManager::registerDefaultPlugins()
 		      ("Remove", GMSH_RegisterRemovePlugin()));
     allPlugins.insert(std::pair < char *, GMSH_Plugin * >
 		      ("Eigenvectors", GMSH_RegisterEigenvectorsPlugin()));
+    allPlugins.insert(std::pair < char *, GMSH_Plugin * >
+		      ("Eigenvalues", GMSH_RegisterEigenvaluesPlugin()));
     allPlugins.insert(std::pair < char *, GMSH_Plugin * >
 		      ("Lambda2", GMSH_RegisterLambda2Plugin()));
     allPlugins.insert(std::pair < char *, GMSH_Plugin * >
diff --git a/Plugin/Probe.cpp b/Plugin/Probe.cpp
index e7707fc501d9bb6cff532b883d1907702eba6d8d..c11ae9a637e05c169fce881b0ed67b06063d6b25 100644
--- a/Plugin/Probe.cpp
+++ b/Plugin/Probe.cpp
@@ -1,4 +1,4 @@
-// $Id: Probe.cpp,v 1.6 2005-01-01 19:35:39 geuzaine Exp $
+// $Id: Probe.cpp,v 1.7 2005-01-09 02:19:00 geuzaine Exp $
 //
 // Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
 //
@@ -93,9 +93,9 @@ double GMSH_ProbePlugin::callback(int num, int action, double value, double *opt
 {
   if(action > 0) iview = num;
   switch(action){ // configure the input field
-  case 1: return CTX.lc/200.;
-  case 2: return -CTX.lc;
-  case 3: return CTX.lc;
+  case 1: return CTX.lc/100.;
+  case 2: return -2*CTX.lc;
+  case 3: return 2*CTX.lc;
   default: break;
   }
   *opt = value;
diff --git a/Plugin/StreamLines.cpp b/Plugin/StreamLines.cpp
index 454f5e2856209f26ec884dcbb18a6269ccc2c71f..1f6d67fff91e8f54845aff434453c8a0c7844677 100644
--- a/Plugin/StreamLines.cpp
+++ b/Plugin/StreamLines.cpp
@@ -1,4 +1,4 @@
-// $Id: StreamLines.cpp,v 1.19 2005-01-01 19:35:39 geuzaine Exp $
+// $Id: StreamLines.cpp,v 1.20 2005-01-09 02:19:00 geuzaine Exp $
 //
 // Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
 //
@@ -96,55 +96,55 @@ double GMSH_StreamLinesPlugin::callback(int num, int action, double value, doubl
 double GMSH_StreamLinesPlugin::callbackX0(int num, int action, double value)
 {
   return callback(num, action, value, &StreamLinesOptions_Number[0].def,
-		  CTX.lc/200., -CTX.lc, CTX.lc);
+		  CTX.lc/100., -2*CTX.lc, 2*CTX.lc);
 }
 
 double GMSH_StreamLinesPlugin::callbackY0(int num, int action, double value)
 {
   return callback(num, action, value, &StreamLinesOptions_Number[1].def,
-		  CTX.lc/200., -CTX.lc, CTX.lc);
+		  CTX.lc/100., -2*CTX.lc, 2*CTX.lc);
 }
 
 double GMSH_StreamLinesPlugin::callbackZ0(int num, int action, double value)
 {
   return callback(num, action, value, &StreamLinesOptions_Number[2].def,
-		  CTX.lc/200., -CTX.lc, CTX.lc);
+		  CTX.lc/100., -2*CTX.lc, 2*CTX.lc);
 }
 
 double GMSH_StreamLinesPlugin::callbackX1(int num, int action, double value)
 {
   return callback(num, action, value, &StreamLinesOptions_Number[3].def,
-		  CTX.lc/200., -CTX.lc, CTX.lc);
+		  CTX.lc/100., -2*CTX.lc, 2*CTX.lc);
 }
 
 double GMSH_StreamLinesPlugin::callbackY1(int num, int action, double value)
 {
   return callback(num, action, value, &StreamLinesOptions_Number[4].def,
-		  CTX.lc/200., -CTX.lc, CTX.lc);
+		  CTX.lc/100., -2*CTX.lc, 2*CTX.lc);
 }
 
 double GMSH_StreamLinesPlugin::callbackZ1(int num, int action, double value)
 {
   return callback(num, action, value, &StreamLinesOptions_Number[5].def,
-		  CTX.lc/200., -CTX.lc, CTX.lc);
+		  CTX.lc/100., -2*CTX.lc, 2*CTX.lc);
 }
 
 double GMSH_StreamLinesPlugin::callbackX2(int num, int action, double value)
 {
   return callback(num, action, value, &StreamLinesOptions_Number[6].def,
-		  CTX.lc/200., -CTX.lc, CTX.lc);
+		  CTX.lc/100., -2*CTX.lc, 2*CTX.lc);
 }
 
 double GMSH_StreamLinesPlugin::callbackY2(int num, int action, double value)
 {
   return callback(num, action, value, &StreamLinesOptions_Number[7].def,
-		  CTX.lc/200., -CTX.lc, CTX.lc);
+		  CTX.lc/100., -2*CTX.lc, 2*CTX.lc);
 }
 
 double GMSH_StreamLinesPlugin::callbackZ2(int num, int action, double value)
 {
   return callback(num, action, value, &StreamLinesOptions_Number[8].def,
-		  CTX.lc/200., -CTX.lc, CTX.lc);
+		  CTX.lc/100., -2*CTX.lc, 2*CTX.lc);
 }
 
 double GMSH_StreamLinesPlugin::callbackU(int num, int action, double value)
diff --git a/TODO b/TODO
index 279244d53ff62287ca0ab4b52fab15307066ebe4..016f94d6668f7e2e344be2c2ecb0191ea9be879b 100644
--- a/TODO
+++ b/TODO
@@ -1,4 +1,4 @@
-$Id: TODO,v 1.74 2005-01-08 20:15:10 geuzaine Exp $
+$Id: TODO,v 1.75 2005-01-09 02:18:59 geuzaine Exp $
 
 create Gradient, Curl and Divergence plugins (based on
 Plugins/ShapeFunctions.h)
@@ -12,11 +12,6 @@ disable all replacements)
 
 ********************************************************************
 
-generalize CutGrid to generate Lines (and provide an option
-"connectPoints" to generate points) if nbV==1 or nbU==1
-
-********************************************************************
-
 change handling of x,y position of graphs so that -x means "from the
 right", etc.  also, val>99999 == center
 
diff --git a/doc/VERSIONS b/doc/VERSIONS
index 096cb704691cd1c704a412c99ce8e12d38c321fc..ccbff717c54a587245a6547617e963589cdc3c9c 100644
--- a/doc/VERSIONS
+++ b/doc/VERSIONS
@@ -1,12 +1,13 @@
-$Id: VERSIONS,v 1.297 2005-01-08 20:15:21 geuzaine Exp $
+$Id: VERSIONS,v 1.298 2005-01-09 02:19:00 geuzaine Exp $
 
 New since 1.58: added support for discrete (triangulated) surfaces,
 either in STL format or with the new "Discrete Surface" command; added
 STL and Text output format post-processing views and STL output format
 for surface meshes; all levelset-based plugins can now also compute
 isovolumes; generalized Plugin(Evaluate) to handle external view data
-(based on the same or on a different mesh); changed default colormap
-to match Matlab's "Jet" colormap;
+(based on the same or on a different mesh); generalized
+Plugin(CutGrid); new plugin (Eigenvalues); changed default colormap to
+match Matlab's "Jet" colormap; fixed small bugs.
 
 New in 1.58: fixed UNIX socket interface on Windows (broken by the TCP
 solver patch in 1.57); bumped version number of default
diff --git a/doc/texinfo/opt_plugin.texi b/doc/texinfo/opt_plugin.texi
index 9ba20cbc8ff29566872c515dde35785f6bff6ada..1e0c8585c528e46cd2159a0e0e4b2e57f32e1097 100644
--- a/doc/texinfo/opt_plugin.texi
+++ b/doc/texinfo/opt_plugin.texi
@@ -37,12 +37,17 @@ Default value: @code{-1}
 @end table
 
 @item Plugin(CutGrid)
-Plugin(CutGrid) cuts a tetrahedron view with a
-rectangular grid defined by the 3 points (`X0',`Y0',`Z0')
-(origin), (`X1',`Y1',`Z1') (axis of U) and (`X2',`Y2',`Z2')
-(axis of V). The number of points along U and V is set
-with the options `nPointsU' and `nPointsV'. If
-`iView' < 0, the plugin is run on the current view.
+Plugin(CutGrid) cuts a triangle/tetrahedron view
+with a rectangular grid defined by the 3 points
+(`X0',`Y0',`Z0') (origin), (`X1',`Y1',`Z1') (axis of U)
+and (`X2',`Y2',`Z2') (axis of V). The number of points
+along U and V is set with the options `nPointsU'
+and `nPointsV'. If `ConnectPoints' is zero, the
+plugin creates scalar or vector points; otherwise,
+the plugin generates scalar or vector quadrangles,
+lines or points depending on the values of `nPointsU'
+and `nPointsV'. If `iView' < 0, the plugin is run on
+the current view.
 
 Plugin(CutGrid) creates one new view.
 
@@ -70,6 +75,8 @@ Default value: @code{0}
 Default value: @code{20}
 @item nPointsV
 Default value: @code{20}
+@item ConnectPoints
+Default value: @code{1}
 @item iView
 Default value: @code{-1}
 @end table
@@ -110,8 +117,8 @@ Default value: @code{-1}
 @end table
 
 @item Plugin(CutParametric)
-Plugin(CutParametric) cuts a triangle/tetrahedron
-scalar view `iView' with the parametric function
+Plugin(CutParametric) cuts a scalar triangle/
+tetrahedron view `iView' with the parametric function
 (`X'(u), `Y'(u), `Z'(u)), using `nPointsU' values of
 the parameter u in [`MinU', `MaxU']. If
 `ConnectPoints' is set, the plugin creates scalar
@@ -242,6 +249,19 @@ Default value: @code{-1}
 Default value: @code{-1}
 @end table
 
+@item Plugin(Eigenvalues)
+Plugin(Eigenvalues) computes the three real
+eigenvalues of each tensor in the view `iView'.
+If `iView' < 0, the plugin is run on the current view.
+
+Plugin(Eigenvalues) creates three new scalar views.
+
+Numeric options:
+@table @code
+@item iView
+Default value: @code{-1}
+@end table
+
 @item Plugin(Eigenvectors)
 Plugin(Eigenvectors) computes the three (right)
 eigenvectors of each tensor in the view `iView'
diff --git a/doc/texinfo/opt_post.texi b/doc/texinfo/opt_post.texi
index db7f72e9189975818b2453642da043d3cf2cf8b1..a5328d0323bbaaca2aa151fae04b73ea0f890a3d 100644
--- a/doc/texinfo/opt_post.texi
+++ b/doc/texinfo/opt_post.texi
@@ -15,7 +15,7 @@ Default value: @code{1}@*
 Saved in: @code{General.OptionsFileName}
 
 @item PostProcessing.Format
-Default file format for post-processing views (0=ASCII view, 1=binary view, 2=parsed view, 3=STL triangulation, 4=list of points)@*
+Default file format for post-processing views (0=ASCII view, 1=binary view, 2=parsed view, 3=STL triangulation, 4=text)@*
 Default value: @code{0}@*
 Saved in: @code{General.OptionsFileName}