diff --git a/Geo/CAD.cpp b/Geo/CAD.cpp
index 22e2defdf370198cbc6c65fa741e911ab7936f08..550830e0984feb62677c14daeb9eeeecb0c9d02f 100644
--- a/Geo/CAD.cpp
+++ b/Geo/CAD.cpp
@@ -1,4 +1,4 @@
-// $Id: CAD.cpp,v 1.60 2003-03-04 02:35:30 geuzaine Exp $
+// $Id: CAD.cpp,v 1.61 2003-03-11 05:57:06 geuzaine Exp $
 //
 // Copyright (C) 1997 - 2003 C. Geuzaine, J.-F. Remacle
 //
@@ -603,8 +603,6 @@ Curve *CreateReversedCurve(Mesh * M, Curve * c)
   return newc;
 }
 
-
-
 void ModifyLcPoint(int ip, double lc)
 {
   Vertex *v = FindPoint(ip, THEM);
@@ -612,7 +610,6 @@ void ModifyLcPoint(int ip, double lc)
     v->lc = lc;
 }
 
-
 int recognize_seg(int typ, List_T * liste, int *seg)
 {
   int i, beg, end;
@@ -633,8 +630,6 @@ int recognize_seg(int typ, List_T * liste, int *seg)
   return 0;
 }
 
-
-
 int recognize_loop(List_T * liste, int *loop)
 {
   int i, res;
@@ -958,7 +953,7 @@ void ApplicationOnShapes(double matrix[4][4], List_T * ListShapes)
 }
 
 void TranslateShapes(double X, double Y, double Z,
-                     List_T * ListShapes, int isFinal)
+                     List_T * ListShapes, int final)
 {
   double T[3], matrix[4][4];
 
@@ -968,12 +963,12 @@ void TranslateShapes(double X, double Y, double Z,
   SetTranslationMatrix(matrix, T);
   ApplicationOnShapes(matrix, ListShapes);
 
-  if(CTX.geom.auto_coherence && isFinal)
+  if(CTX.geom.auto_coherence && final)
     ReplaceAllDuplicates(THEM);
 }
 
 void DilatShapes(double X, double Y, double Z, double A,
-                 List_T * ListShapes, int isFinal)
+                 List_T * ListShapes, int final)
 {
   double T[3], matrix[4][4];
 
@@ -983,14 +978,14 @@ void DilatShapes(double X, double Y, double Z, double A,
   SetDilatationMatrix(matrix, T, A);
   ApplicationOnShapes(matrix, ListShapes);
 
-  if(CTX.geom.auto_coherence)
+  if(CTX.geom.auto_coherence && final)
     ReplaceAllDuplicates(THEM);
 }
 
 
 void RotateShapes(double Ax, double Ay, double Az,
                   double Px, double Py, double Pz,
-                  double alpha, List_T * ListShapes)
+                  double alpha, List_T * ListShapes, int final)
 {
   double A[3], T[3], matrix[4][4];
 
@@ -1012,19 +1007,19 @@ void RotateShapes(double Ax, double Ay, double Az,
   SetTranslationMatrix(matrix, T);
   ApplicationOnShapes(matrix, ListShapes);
 
-  if(CTX.geom.auto_coherence)
+  if(CTX.geom.auto_coherence && final)
     ReplaceAllDuplicates(THEM);
 }
 
 void SymmetryShapes(double A, double B, double C,
-                    double D, List_T * ListShapes, int x)
+                    double D, List_T * ListShapes, int final)
 {
   double matrix[4][4];
 
   SetSymmetryMatrix(matrix, A, B, C, D);
   ApplicationOnShapes(matrix, ListShapes);
 
-  if(CTX.geom.auto_coherence)
+  if(CTX.geom.auto_coherence && final)
     ReplaceAllDuplicates(THEM);
 }
 
@@ -1062,12 +1057,12 @@ void ProtudeXYZ(double &x, double &y, double &z, ExtrudeParams * e)
   List_Reset(ListOfTransformedPoints);
 }
 
-
 void Extrude_ProtudePoint(int type, int ip,
                           double T0, double T1, double T2,
                           double A0, double A1, double A2,
                           double X0, double X1, double X2, double alpha,
-                          Curve ** pc, Curve ** prc, ExtrudeParams * e)
+                          Curve ** pc, Curve ** prc, int final, 
+			  ExtrudeParams * e)
 {
   double xnew, ynew, znew, matrix[4][4], T[3], Ax[3], d;
   Vertex V, *pv, *newp, *chapeau;
@@ -1215,6 +1210,9 @@ void Extrude_ProtudePoint(int type, int ip,
   *prc = FindCurve(-c->Num, THEM);
 
   List_Reset(ListOfTransformedPoints);
+
+  if(CTX.geom.auto_coherence && final)
+    ReplaceAllDuplicates(THEM);
 }
 
 Surface *Extrude_ProtudeCurve(int type, int ic,
@@ -1312,10 +1310,10 @@ Surface *Extrude_ProtudeCurve(int type, int ic,
 
   Extrude_ProtudePoint(type, pc->beg->Num, T0, T1, T2,
                        A0, A1, A2, X0, X1, X2, alpha,
-                       &CurveBeg, &ReverseBeg, e);
+                       &CurveBeg, &ReverseBeg, 0, e);
   Extrude_ProtudePoint(type, pc->end->Num, T0, T1, T2,
                        A0, A1, A2, X0, X1, X2, alpha,
-                       &CurveEnd, &ReverseEnd, e);
+                       &CurveEnd, &ReverseEnd, 0, e);
 
   if(!CurveBeg && !CurveEnd)
     return NULL;
@@ -1356,7 +1354,7 @@ Surface *Extrude_ProtudeCurve(int type, int ic,
 
   List_Reset(ListOfTransformedPoints);
 
-  if(final && CTX.geom.auto_coherence) {
+  if(CTX.geom.auto_coherence && final) {
     ReplaceAllDuplicates(THEM);
     return NULL;
   }
diff --git a/Geo/CAD.h b/Geo/CAD.h
index 208919c4fabf2cf945ba1d0648e6f075bc91964b..8110325c68fd0c801a90bc7f1d1a09d71b3036ae 100644
--- a/Geo/CAD.h
+++ b/Geo/CAD.h
@@ -49,14 +49,14 @@ void ModifyLcPoint(int ip, double lc);
 
 
 void TranslateShapes(double X,double Y,double Z,
-                     List_T *ListShapes, int isFinal);
+                     List_T *ListShapes, int final);
 void DilatShapes(double X,double Y,double Z, double A,
-                 List_T *ListShapes, int isFinal);
+                 List_T *ListShapes, int final);
 void RotateShapes(double Ax,double Ay,double Az,
 		  double Px,double Py, double Pz,
-		  double alpha, List_T *ListShapes);
+		  double alpha, List_T *ListShapes, int final);
 void SymmetryShapes(double A,double B,double C,
-		    double D, List_T *ListShapes, int x);
+		    double D, List_T *ListShapes, int final);
 void CopyShape(int Type, int Num, int *New);
 void DeleteShape(int Type, int Num);
 void ColorShape(int Type, int Num, unsigned int Color);
@@ -67,7 +67,7 @@ void Extrude_ProtudePoint(int type, int ip,
 			  double T0, double T1, double T2,
 			  double A0, double A1, double A2,
                           double X0, double X1, double X2, double alpha,
-                          Curve **pc, Curve **prc, 
+                          Curve **pc, Curve **prc, int final,
 			  ExtrudeParams *e);
 Surface *Extrude_ProtudeCurve(int type, int ic,
 			      double T0, double T1, double T2,
diff --git a/Mesh/3D_Extrude.cpp b/Mesh/3D_Extrude.cpp
index 25f4c738d41e978bf6a8137a03e38428f8d03df7..93c4014641b69f6484c2d10eba7b99a7a4bbb1aa 100644
--- a/Mesh/3D_Extrude.cpp
+++ b/Mesh/3D_Extrude.cpp
@@ -1,4 +1,4 @@
-// $Id: 3D_Extrude.cpp,v 1.60 2003-03-01 22:36:41 geuzaine Exp $
+// $Id: 3D_Extrude.cpp,v 1.61 2003-03-11 05:57:06 geuzaine Exp $
 //
 // Copyright (C) 1997 - 2003 C. Geuzaine, J.-F. Remacle
 //
@@ -32,15 +32,17 @@ extern Mesh *THEM;
 
 static int DIM, NUM;            // current dimension of parent entity
 static int TEST_IS_ALL_OK;
-static Tree_T *Tree_Ares = NULL, *Tree_Swaps = NULL, *Vertex_Bound = NULL;
+static Tree_T *Tree_Ares = NULL, *Tree_Swaps = NULL;
 static Curve *THEC = NULL;
 static Surface *THES = NULL;
 static Volume *THEV = NULL;
 static ExtrudeParams *ep;
 
-// Vertex_Bound contains the vertices on the boundary (on the curves
-// for extrude_mesh(surface) and on the surfaces for
-// extrude_mesh(volume))
+// Point_Bound and Vertex_Bound contain the points and vertices on the
+// "boundaries". We cannot check for duplicates in THEM->Points and
+// THEM->Vertices directly since the comparison function for these
+// trees are on the point/vertex numbers, not the position.
+static Tree_T *Point_Bound = NULL, *Vertex_Bound = NULL;
 
 typedef struct
 {
@@ -176,14 +178,14 @@ static int compnxn(const void *a, const void *b)
 
 void ReplaceInVertexBound(void *a, void *b)
 {
-  //Warning! We must do a 'replace', and not an 'add'/'insert'!
-  //Otherwise, we get 'Points' mixed up with 'Vertices'. The old
-  //extrusion (applied to a 2D extruded mesh) would then crash since
-  //only the Vertices are extruded and correctly handled (e.g. for
-  //beg/end curves).
   Tree_Replace(Vertex_Bound, a);
 }
 
+void ReplaceInPointBound(void *a, void *b)
+{
+  Tree_Replace(Point_Bound, a);
+}
+
 void InitExtrude()
 {
   if(!Tree_Ares)
@@ -191,14 +193,15 @@ void InitExtrude()
   if(!Tree_Swaps)
     Tree_Swaps = Tree_Create(sizeof(nxn), compnxn);
 
+  if(Point_Bound)
+    Tree_Delete(Point_Bound);
+  Point_Bound = Tree_Create(sizeof(Vertex *), comparePosition);
+
   if(Vertex_Bound)
     Tree_Delete(Vertex_Bound);
   Vertex_Bound = Tree_Create(sizeof(Vertex *), comparePosition);
 
-  //ceci doit etre enleve: ca fout le boxon si des points du maillage
-  //correspondent a des points de controle de la geometrie, lors du Free.
-  //Tree_Action(THEM->Points, ReplaceInVertexBound);
-
+  Tree_Action(THEM->Points, ReplaceInPointBound);
   Tree_Action(THEM->Vertices, ReplaceInVertexBound);
 }
 
@@ -208,9 +211,11 @@ void ExitExtrude()
     Tree_Delete(Tree_Ares);
   if(Tree_Swaps)
     Tree_Delete(Tree_Swaps);
+  if(Point_Bound)
+    Tree_Delete(Point_Bound);
   if(Vertex_Bound)
     Tree_Delete(Vertex_Bound);
-  Tree_Ares = Tree_Swaps = Vertex_Bound = NULL;
+  Tree_Ares = Tree_Swaps = Point_Bound = Vertex_Bound = NULL;
 }
 
 int are_exist(Vertex * v1, Vertex * v2, Tree_T * t)
@@ -589,7 +594,7 @@ void Extrude_Simplex_Phase2(void *data, void *dum)
 
 void Extrude_Vertex(void *data, void *dum)
 {
-  Vertex **pV, *v, *newv;
+  Vertex **vexist, *v, *newv;
   int i, j;
   nxl NXL;
 
@@ -612,12 +617,16 @@ void Extrude_Vertex(void *data, void *dum)
       newv = Create_Vertex(++THEM->MaxPointNum, v->Pos.X,
                            v->Pos.Y, v->Pos.Z, v->lc, v->u);
       ep->Extrude(i, j + 1, newv->Pos.X, newv->Pos.Y, newv->Pos.Z);
-
-      if(Vertex_Bound && (pV = (Vertex **) Tree_PQuery(Vertex_Bound, &newv))) {
+      if(Vertex_Bound && (vexist = (Vertex **) Tree_PQuery(Vertex_Bound, &newv))) {
         Free_Vertex(&newv, 0);
-        List_Add(NXL.List, pV);
+        List_Add(NXL.List, vexist);
       }
-      else {
+      else{
+	if(Point_Bound && (vexist = (Vertex **) Tree_PQuery(Point_Bound, &newv))) {
+	  // keep the new one: we cannot have points and vertices
+	  // pointing to the same memory location
+	  newv->Num = (*vexist)->Num;
+	}
         List_Add(NXL.List, &newv);
         Tree_Insert(THEM->Vertices, &newv);
         Tree_Insert(Vertex_Bound, &newv);
@@ -735,7 +744,7 @@ void Extrude_Curve(void *data, void *dum)
 void copy_mesh(Curve * from, Curve * to, int direction)
 {
   List_T *list = from->Vertices;
-  Vertex *vi, *v, **vexist;
+  Vertex **vexist, *v, *newv;
 
   int nb = List_Nbr(to->Vertices);
   if(nb) {
@@ -755,11 +764,11 @@ void copy_mesh(Curve * from, Curve * to, int direction)
     List_Add(to->Vertices, vexist);
   }
   else {
-    vi = Create_Vertex(v->Num, v->Pos.X, v->Pos.Y, v->Pos.Z, v->lc, to->ubeg);
-    Tree_Insert(THEM->Vertices, &vi);
-    vi->ListCurves = List_Create(1, 1, sizeof(Curve *));
-    List_Add(vi->ListCurves, &to);
-    List_Add(to->Vertices, &vi);
+    newv = Create_Vertex(v->Num, v->Pos.X, v->Pos.Y, v->Pos.Z, v->lc, to->ubeg);
+    Tree_Insert(THEM->Vertices, &newv);
+    newv->ListCurves = List_Create(1, 1, sizeof(Curve *));
+    List_Add(newv->ListCurves, &to);
+    List_Add(to->Vertices, &newv);
   }
 
   for(int i = 1; i < List_Nbr(list) - 1; i++) {
@@ -767,21 +776,33 @@ void copy_mesh(Curve * from, Curve * to, int direction)
       List_Read(list, List_Nbr(list) - 1 - i, &v);
     else
       List_Read(list, i, &v);
-    vi = Create_Vertex(++THEM->MaxPointNum, v->Pos.X,
-                       v->Pos.Y, v->Pos.Z, v->lc,
-                       (direction > 0) ? v->u : (1. - v->u));
+    newv = Create_Vertex(++THEM->MaxPointNum, v->Pos.X,
+			 v->Pos.Y, v->Pos.Z, v->lc,
+			 (direction > 0) ? v->u : (1. - v->u));
     ep->Extrude(ep->mesh.NbLayer - 1,
-                ep->mesh.NbElmLayer[ep->mesh.NbLayer - 1], vi->Pos.X,
-                vi->Pos.Y, vi->Pos.Z);
-    if(!comparePosition(&vi, &v)) {
-      Free_Vertex(&vi, 0);
-      vi = v;
+                ep->mesh.NbElmLayer[ep->mesh.NbLayer - 1], newv->Pos.X,
+                newv->Pos.Y, newv->Pos.Z);
+    if(!comparePosition(&newv, &v)) {
+      Free_Vertex(&newv, 0);
+      newv = v;
+    }
+    else if(Vertex_Bound && (vexist = (Vertex **) Tree_PQuery(Vertex_Bound, &newv))) {
+      Free_Vertex(&newv, 0);
+      newv = *vexist;
+    }
+    else {
+      if(Point_Bound && (vexist = (Vertex **) Tree_PQuery(Point_Bound, &newv))) {
+	// keep the new one: we cannot have points and vertices
+	// pointing to the same memory location
+	newv->Num = (*vexist)->Num;
+      }
+      Tree_Insert(THEM->Vertices, &newv);
+      Tree_Insert(Vertex_Bound, &newv);
     }
-    Tree_Insert(THEM->Vertices, &vi);
-    if(!vi->ListCurves)
-      vi->ListCurves = List_Create(1, 1, sizeof(Curve *));
-    List_Add(vi->ListCurves, &to);
-    List_Add(to->Vertices, &vi);
+    if(!newv->ListCurves)
+      newv->ListCurves = List_Create(1, 1, sizeof(Curve *));
+    List_Add(newv->ListCurves, &to);
+    List_Add(to->Vertices, &newv);
   }
 
   v = to->end;
@@ -792,11 +813,11 @@ void copy_mesh(Curve * from, Curve * to, int direction)
     List_Add(to->Vertices, vexist);
   }
   else {
-    vi = Create_Vertex(v->Num, v->Pos.X, v->Pos.Y, v->Pos.Z, v->lc, to->uend);
-    Tree_Insert(THEM->Vertices, &vi);
-    vi->ListCurves = List_Create(1, 1, sizeof(Curve *));
-    List_Add(vi->ListCurves, &to);
-    List_Add(to->Vertices, &vi);
+    newv = Create_Vertex(v->Num, v->Pos.X, v->Pos.Y, v->Pos.Z, v->lc, to->uend);
+    Tree_Insert(THEM->Vertices, &newv);
+    newv->ListCurves = List_Create(1, 1, sizeof(Curve *));
+    List_Add(newv->ListCurves, &to);
+    List_Add(to->Vertices, &newv);
   }
 
 }
@@ -804,7 +825,7 @@ void copy_mesh(Curve * from, Curve * to, int direction)
 int Extrude_Mesh(Curve * c)
 {
   int i;
-  Vertex *v, *pV, **vexist;
+  Vertex **vexist, *v, *newv;
   List_T *L;
 
   if(!c->Extrude || !c->Extrude->mesh.ExtrudeMesh)
@@ -829,11 +850,11 @@ int Extrude_Mesh(Curve * c)
       List_Add(c->Vertices, vexist);
     }
     else {
-      pV = Create_Vertex(v->Num, v->Pos.X, v->Pos.Y, v->Pos.Z, v->lc, 0.0);
-      pV->ListCurves = List_Create(1, 1, sizeof(Curve *));
-      List_Add(pV->ListCurves, &c);
-      Tree_Insert(THEM->Vertices, &pV);
-      List_Add(c->Vertices, &pV);
+      newv = Create_Vertex(v->Num, v->Pos.X, v->Pos.Y, v->Pos.Z, v->lc, 0.0);
+      newv->ListCurves = List_Create(1, 1, sizeof(Curve *));
+      List_Add(newv->ListCurves, &c);
+      Tree_Insert(THEM->Vertices, &newv);
+      List_Add(c->Vertices, &newv);
     }
 
     for(i = 1; i < List_Nbr(L) - 1; i++) {
@@ -854,11 +875,11 @@ int Extrude_Mesh(Curve * c)
       List_Add(c->Vertices, vexist);
     }
     else {
-      pV = Create_Vertex(v->Num, v->Pos.X, v->Pos.Y, v->Pos.Z, v->lc, 0.0);
-      pV->ListCurves = List_Create(1, 1, sizeof(Curve *));
-      List_Add(pV->ListCurves, &c);
-      Tree_Insert(THEM->Vertices, &pV);
-      List_Add(c->Vertices, &pV);
+      newv = Create_Vertex(v->Num, v->Pos.X, v->Pos.Y, v->Pos.Z, v->lc, 0.0);
+      newv->ListCurves = List_Create(1, 1, sizeof(Curve *));
+      List_Add(newv->ListCurves, &c);
+      Tree_Insert(THEM->Vertices, &newv);
+      List_Add(c->Vertices, &newv);
     }
     return true;
   }
@@ -875,7 +896,7 @@ void copy_mesh(Surface * from, Surface * to)
 {
   List_T *list = Tree2List(from->Simplexes);
   Simplex *s, *news;
-  Vertex **pV, *vi[4], *v;
+  Vertex **vexist, *v, *newv[4];
 
   int nb = Tree_Nbr(to->Simplexes);
   if(nb) {
@@ -890,32 +911,36 @@ void copy_mesh(Surface * from, Surface * to)
     for(int j = 0; j < 4; j++) {
       if(s->V[j]) {
         v = s->V[j];
-        vi[j] = Create_Vertex(++THEM->MaxPointNum, v->Pos.X,
-                              v->Pos.Y, v->Pos.Z, v->lc, v->u);
+        newv[j] = Create_Vertex(++THEM->MaxPointNum, v->Pos.X,
+				v->Pos.Y, v->Pos.Z, v->lc, v->u);
         ep->Extrude(ep->mesh.NbLayer - 1,
-                    ep->mesh.NbElmLayer[ep->mesh.NbLayer - 1], vi[j]->Pos.X,
-                    vi[j]->Pos.Y, vi[j]->Pos.Z);
-        if(Vertex_Bound
-           && (pV = (Vertex **) Tree_PQuery(Vertex_Bound, &vi[j]))) {
-          Free_Vertex(&vi[j], 0);
-          vi[j] = *pV;
+                    ep->mesh.NbElmLayer[ep->mesh.NbLayer - 1], newv[j]->Pos.X,
+                    newv[j]->Pos.Y, newv[j]->Pos.Z);
+        if(Vertex_Bound && (vexist = (Vertex **) Tree_PQuery(Vertex_Bound, &newv[j]))) {
+          Free_Vertex(&newv[j], 0);
+          newv[j] = *vexist;
         }
         else {
-          Tree_Insert(THEM->Vertices, &vi[j]);
-          Tree_Insert(Vertex_Bound, &vi[j]);
+	  if(Point_Bound && (vexist = (Vertex **) Tree_PQuery(Point_Bound, &newv[j]))) {
+	    // keep the new one: we cannot have points and vertices
+	    // pointing to the same memory location
+	    newv[j]->Num = (*vexist)->Num;
+	  }
+          Tree_Insert(THEM->Vertices, &newv[j]);
+          Tree_Insert(Vertex_Bound, &newv[j]);
         }
       }
       else {
-        vi[j] = NULL;
+        newv[j] = NULL;
       }
     }
-    if(vi[3]) {
-      news = Create_Quadrangle(vi[0], vi[1], vi[2], vi[3]);
+    if(newv[3]) {
+      news = Create_Quadrangle(newv[0], newv[1], newv[2], newv[3]);
       // This is horrible
       THEM->Statistics[8] += 1;
     }
     else
-      news = Create_Simplex(vi[0], vi[1], vi[2], NULL);
+      news = Create_Simplex(newv[0], newv[1], newv[2], NULL);
     news->iEnt = to->Num;
     Tree_Add(to->Simplexes, &news);
   }
diff --git a/Mesh/Generator.cpp b/Mesh/Generator.cpp
index 2fe8ff3e72296d8c64ab837857356bbecc9989fc..3ee82755482f159b21d52bcb50e2b97d6f859901 100644
--- a/Mesh/Generator.cpp
+++ b/Mesh/Generator.cpp
@@ -1,4 +1,4 @@
-// $Id: Generator.cpp,v 1.40 2003-03-10 04:26:32 geuzaine Exp $
+// $Id: Generator.cpp,v 1.41 2003-03-11 05:57:06 geuzaine Exp $
 //
 // Copyright (C) 1997 - 2003 C. Geuzaine, J.-F. Remacle
 //
@@ -185,15 +185,17 @@ void Init_Mesh(Mesh * M, int all)
 
   ExitExtrude();
 
+  // During extrusion, 
+
   Tree_Action(M->Vertices, Free_Vertex);  
   Tree_Delete(M->Vertices);
 
-  Tree_Action(M->VertexEdges, Free_Vertex);
-  Tree_Delete(M->VertexEdges);
-
   Tree_Action(M->Points, Free_Vertex);  
   Tree_Delete(M->Points);
 
+  Tree_Action(M->VertexEdges, Free_Vertex);
+  Tree_Delete(M->VertexEdges);
+
   // Note: don't free the simplices here (with 
   // Tree_Action (M->Simplexes, Free_Simplex)): we free them 
   // in each curve, surface, volume
diff --git a/Parser/Gmsh.tab.cpp b/Parser/Gmsh.tab.cpp
index f5f4a993bbbd7eac42c80575a62964e30593dde2..2d0a6b6ce4126a4b95ead0a96ae0e6182c0f51b0 100644
--- a/Parser/Gmsh.tab.cpp
+++ b/Parser/Gmsh.tab.cpp
@@ -188,7 +188,7 @@
 #line 1 "Gmsh.y"
  
 
-// $Id: Gmsh.tab.cpp,v 1.152 2003-03-11 03:47:06 geuzaine Exp $
+// $Id: Gmsh.tab.cpp,v 1.153 2003-03-11 05:57:06 geuzaine Exp $
 //
 // Copyright (C) 1997 - 2003 C. Geuzaine, J.-F. Remacle
 //
@@ -6398,7 +6398,7 @@ case 254:
 case 255:
 #line 1815 "Gmsh.y"
 {
-      RotateShapes(yyvsp[-8].v[0],yyvsp[-8].v[1],yyvsp[-8].v[2],yyvsp[-6].v[0],yyvsp[-6].v[1],yyvsp[-6].v[2],yyvsp[-4].d,yyvsp[-1].l);
+      RotateShapes(yyvsp[-8].v[0],yyvsp[-8].v[1],yyvsp[-8].v[2],yyvsp[-6].v[0],yyvsp[-6].v[1],yyvsp[-6].v[2],yyvsp[-4].d,yyvsp[-1].l,1);
       yyval.l = yyvsp[-1].l;
     ;
     break;}
@@ -6801,7 +6801,7 @@ case 287:
       Curve *pc, *prc;
       Extrude_ProtudePoint(TRANSLATE,(int)yyvsp[-4].d,yyvsp[-2].v[0],yyvsp[-2].v[1],yyvsp[-2].v[2],
 			   0.,0.,0.,0.,0.,0.,0.,
-			   &pc,&prc,NULL);
+			   &pc,&prc,1,NULL);
     ;
     break;}
 case 288:
@@ -6810,7 +6810,7 @@ case 288:
       Curve *pc, *prc;
       Extrude_ProtudePoint(ROTATE,(int)yyvsp[-8].d,0.,0.,0.,
 			   yyvsp[-6].v[0],yyvsp[-6].v[1],yyvsp[-6].v[2],yyvsp[-4].v[0],yyvsp[-4].v[1],yyvsp[-4].v[2],yyvsp[-2].d,
-			   &pc,&prc,NULL);
+			   &pc,&prc,1,NULL);
     ;
     break;}
 case 289:
@@ -6819,7 +6819,7 @@ case 289:
       Curve *pc, *prc;
       Extrude_ProtudePoint(TRANSLATE_ROTATE,(int)yyvsp[-10].d,yyvsp[-8].v[0],yyvsp[-8].v[1],yyvsp[-8].v[2],
 			   yyvsp[-6].v[0],yyvsp[-6].v[1],yyvsp[-6].v[2],yyvsp[-4].v[0],yyvsp[-4].v[1],yyvsp[-4].v[2],yyvsp[-2].d,
-			   &pc,&prc,NULL);
+			   &pc,&prc,1,NULL);
     ;
     break;}
 case 290:
@@ -6835,7 +6835,7 @@ case 291:
       Curve *pc, *prc;
       Extrude_ProtudePoint(TRANSLATE,(int)yyvsp[-8].d,yyvsp[-6].v[0],yyvsp[-6].v[1],yyvsp[-6].v[2],
 			   0.,0.,0.,0.,0.,0.,0.,
-			   &pc,&prc,&extr);
+			   &pc,&prc,1,&extr);
     ;
     break;}
 case 292:
@@ -6851,7 +6851,7 @@ case 293:
       Curve *pc, *prc;
       Extrude_ProtudePoint(ROTATE,(int)yyvsp[-12].d,0.,0.,0.,
 			   yyvsp[-10].v[0],yyvsp[-10].v[1],yyvsp[-10].v[2],yyvsp[-8].v[0],yyvsp[-8].v[1],yyvsp[-8].v[2],yyvsp[-6].d,
-			   &pc,&prc,&extr);
+			   &pc,&prc,1,&extr);
     ;
     break;}
 case 294:
@@ -6867,7 +6867,7 @@ case 295:
       Curve *pc, *prc;
       Extrude_ProtudePoint(TRANSLATE_ROTATE,(int)yyvsp[-14].d,yyvsp[-12].v[0],yyvsp[-12].v[1],yyvsp[-12].v[2],
 			   yyvsp[-10].v[0],yyvsp[-10].v[1],yyvsp[-10].v[2],yyvsp[-8].v[0],yyvsp[-8].v[1],yyvsp[-8].v[2],yyvsp[-6].d,
-			   &pc,&prc,&extr);
+			   &pc,&prc,1,&extr);
     ;
     break;}
 case 296:
diff --git a/Parser/Gmsh.y b/Parser/Gmsh.y
index 7af52634a6c48df37c0f8f5671ba9192b7c6320f..b58bec8beba650fbaa1635fbbc578964a1d40d02 100644
--- a/Parser/Gmsh.y
+++ b/Parser/Gmsh.y
@@ -1,6 +1,6 @@
 %{ 
 
-// $Id: Gmsh.y,v 1.133 2003-03-11 03:47:06 geuzaine Exp $
+// $Id: Gmsh.y,v 1.134 2003-03-11 05:57:07 geuzaine Exp $
 //
 // Copyright (C) 1997 - 2003 C. Geuzaine, J.-F. Remacle
 //
@@ -1813,7 +1813,7 @@ Transform :
     }
   | tRotate '{' VExpr ',' VExpr ',' FExpr '}' '{' MultipleShape '}'
     {
-      RotateShapes($3[0],$3[1],$3[2],$5[0],$5[1],$5[2],$7,$10);
+      RotateShapes($3[0],$3[1],$3[2],$5[0],$5[1],$5[2],$7,$10,1);
       $$ = $10;
     }
   | tSymmetry  VExpr   '{' MultipleShape '}'
@@ -2191,21 +2191,21 @@ Extrude :
       Curve *pc, *prc;
       Extrude_ProtudePoint(TRANSLATE,(int)$4,$6[0],$6[1],$6[2],
 			   0.,0.,0.,0.,0.,0.,0.,
-			   &pc,&prc,NULL);
+			   &pc,&prc,1,NULL);
     }
   | tExtrude tPoint '{' FExpr ',' VExpr ',' VExpr ',' FExpr '}' tEND
     {
       Curve *pc, *prc;
       Extrude_ProtudePoint(ROTATE,(int)$4,0.,0.,0.,
 			   $6[0],$6[1],$6[2],$8[0],$8[1],$8[2],$10,
-			   &pc,&prc,NULL);
+			   &pc,&prc,1,NULL);
     }
   | tExtrude tPoint '{' FExpr ',' VExpr ',' VExpr ',' VExpr ',' FExpr'}' tEND
     {
       Curve *pc, *prc;
       Extrude_ProtudePoint(TRANSLATE_ROTATE,(int)$4,$6[0],$6[1],$6[2],
 			   $8[0],$8[1],$8[2],$10[0],$10[1],$10[2],$12,
-			   &pc,&prc,NULL);
+			   &pc,&prc,1,NULL);
     }
   | tExtrude tPoint '{' FExpr ',' VExpr '}'
     {
@@ -2217,7 +2217,7 @@ Extrude :
       Curve *pc, *prc;
       Extrude_ProtudePoint(TRANSLATE,(int)$4,$6[0],$6[1],$6[2],
 			   0.,0.,0.,0.,0.,0.,0.,
-			   &pc,&prc,&extr);
+			   &pc,&prc,1,&extr);
     }
   | tExtrude tPoint '{' FExpr ',' VExpr ',' VExpr ',' FExpr '}'
     {
@@ -2229,7 +2229,7 @@ Extrude :
       Curve *pc, *prc;
       Extrude_ProtudePoint(ROTATE,(int)$4,0.,0.,0.,
 			   $6[0],$6[1],$6[2],$8[0],$8[1],$8[2],$10,
-			   &pc,&prc,&extr);
+			   &pc,&prc,1,&extr);
     }
   | tExtrude tPoint '{' FExpr ',' VExpr ',' VExpr ',' VExpr ',' FExpr'}'
     {
@@ -2241,7 +2241,7 @@ Extrude :
       Curve *pc, *prc;
       Extrude_ProtudePoint(TRANSLATE_ROTATE,(int)$4,$6[0],$6[1],$6[2],
 			   $8[0],$8[1],$8[2],$10[0],$10[1],$10[2],$12,
-			   &pc,&prc,&extr);
+			   &pc,&prc,1,&extr);
     }
 
   // Lines
diff --git a/Parser/Gmsh.yy.cpp b/Parser/Gmsh.yy.cpp
index 73d3b49c916e275d8e9a89ff576e9e52e4af92b4..9dea53bc686f8b7199b8fdbcb0657fae4c44babe 100644
--- a/Parser/Gmsh.yy.cpp
+++ b/Parser/Gmsh.yy.cpp
@@ -2,7 +2,7 @@
 /* A lexical scanner generated by flex */
 
 /* Scanner skeleton version:
- * $Header: /cvsroot/gmsh/Parser/Gmsh.yy.cpp,v 1.151 2003-03-11 03:47:07 geuzaine Exp $
+ * $Header: /cvsroot/gmsh/Parser/Gmsh.yy.cpp,v 1.152 2003-03-11 05:57:08 geuzaine Exp $
  */
 
 #define FLEX_SCANNER
@@ -1007,7 +1007,7 @@ char *yytext;
 #define INITIAL 0
 #line 2 "Gmsh.l"
 
-// $Id: Gmsh.yy.cpp,v 1.151 2003-03-11 03:47:07 geuzaine Exp $
+// $Id: Gmsh.yy.cpp,v 1.152 2003-03-11 05:57:08 geuzaine Exp $
 //
 // Copyright (C) 1997 - 2003 C. Geuzaine, J.-F. Remacle
 //
diff --git a/benchmarks/extrude/point.geo b/benchmarks/extrude/point.geo
index ffef71fc91060d990e18ee39ecee87f57bfd9926..d9b80ae883725cf04b0f4076668c1586b65732f1 100644
--- a/benchmarks/extrude/point.geo
+++ b/benchmarks/extrude/point.geo
@@ -1,10 +1,25 @@
-L = 0.25;
-lclev = L / 4;
-
-Point(1) = {0.0*L, 0.0*L,   0.0, lclev};
-
-Extrude Point {1, {L,0,0}}{ Layers { {5,10}, {1,1}, {0.7,1} } ; Recombine; };
-Extrude Line {1, {0,L/2,0}}{ Layers { {5,10}, {2,2}, {0.7,1} } ; Recombine;  };
-Extrude Surface {5, {0,0,L}}{ Layers { {5,10}, {3,3}, {0.7,1} } ; Recombine; };
-
-Physical Volume(111) = {3};
+L = 0.25;
+lclev = L / 4;
+
+Point(1) = {0.0*L, 0.0*L,   0.0, lclev};
+
+Extrude Point {1, {L,0,0}}{ Layers { {5,10}, {1,1}, {0.7,1} } ; Recombine; };
+Extrude Line {1, {0,L/2,0}}{ Layers { {5,10}, {2,2}, {0.7,1} } ; Recombine;  };
+Extrude Surface {5, {0,0,L}}{ Layers { {5,10}, {3,3}, {0.7,1} } ; Recombine; };
+
+Point(1000) = {1, 0, 0, lclev};
+Extrude Point {1000, {0,0,1} , {0.85,0,0} , -2*Pi/3 }{
+  Layers { {5,10}, {1,1}, {0.7,1} } ; Recombine; 
+};
+Extrude Point {1001, {0,0,1} , {0.85,0,0} , -2*Pi/3 }{
+  Layers { {5,10}, {1,1}, {0.7,1} } ; Recombine; 
+};
+Extrude Point {1003, {0,0,1} , {0.85,0,0} , -2*Pi/3 }{
+  Layers { {5,10}, {1,1}, {0.7,1} } ; Recombine; 
+};
+
+Line Loop(31) = {29,30,28};
+Plane Surface(32) = {31};
+Extrude Surface {32, {0,0,L/2}}{
+  Layers { {5,10}, {1,1}, {0.7,1} } ; Recombine; 
+};