diff --git a/Common/Context.h b/Common/Context.h
index 94425d4096b341b8f5677cb6039c17ed502e11ad..957e52fca9409626e8cab8b6aedd3f1db046b03a 100644
--- a/Common/Context.h
+++ b/Common/Context.h
@@ -184,7 +184,7 @@ public :
     int oldxtrude, oldxtrude_recombine;
     int allow_degenerated_extrude, save_all;
     char *triangle_options;
-    int smooth_normals;
+    int smooth_normals, reverse_all_normals;
     double angle_smooth_normals;
     double stl_distance_tol, dihedral_angle_tol;
     int edge_prolongation_threshold, do_not_coarsen;
diff --git a/Common/DefaultOptions.h b/Common/DefaultOptions.h
index 1741fb1837d465b70b19c6429953ddb7f76fe9d3..381230b240faef3a27757a81b4539dc5244261d5 100644
--- a/Common/DefaultOptions.h
+++ b/Common/DefaultOptions.h
@@ -976,6 +976,8 @@ StringXNumber MeshOptions_Number[] = {
     "Random factor used in 2D and 3D meshing algorithm (test other values when the algorithm fails)" },
   { F|O, "RecombineAlgo" , opt_mesh_recombine_algo , 1 ,
     "Recombine algorithm (1=mixed triangles-quadrangles, 2=all quadrangles)" }, 
+  { F|O, "ReverseAllNormals" , opt_mesh_reverse_all_normals , 0. , 
+    "Reverse all the mesh normals (for display)" },
 
   { F,   "SaveAll" , opt_mesh_save_all , 0. , 
     "Ignore Physical definitions and save all elements" },
diff --git a/Common/Makefile b/Common/Makefile
index ae9f8f2f2e74654a7cca7c8dd21bbcc0ea4af2a3..0e8dad21b26c7c6c38cd491f99dfcc8515d5c578 100644
--- a/Common/Makefile
+++ b/Common/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.104 2006-08-16 17:14:56 geuzaine Exp $
+# $Id: Makefile,v 1.105 2006-08-17 21:28:34 geuzaine Exp $
 #
 # Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
 #
@@ -127,10 +127,11 @@ CommandLine.o: CommandLine.cpp Gmsh.h Message.h ../DataStr/Malloc.h \
   ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \
   ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/MElement.h ../Geo/MVertex.h \
   ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h \
-  ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/GFace.h ../Geo/GPoint.h \
-  ../Geo/GEntity.h ../Geo/MElement.h ../Geo/SPoint2.h ../Geo/SVector3.h \
-  ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/MElement.h \
-  ../Geo/SBoundingBox3d.h ../Common/SmoothNormals.h OS.h
+  ../Geo/MVertex.h ../Geo/SVector3.h ../Common/Context.h ../Geo/GFace.h \
+  ../Geo/GPoint.h ../Geo/GEntity.h ../Geo/MElement.h ../Geo/SPoint2.h \
+  ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h \
+  ../Geo/MElement.h ../Geo/SBoundingBox3d.h ../Common/SmoothNormals.h \
+  OS.h
 # 1 "/Users/geuzaine/.gmsh/Common//"
 OS.o: OS.cpp Message.h
 # 1 "/Users/geuzaine/.gmsh/Common//"
@@ -146,13 +147,13 @@ Visibility.o: Visibility.cpp Visibility.h GmshDefines.h ../Geo/GVertex.h \
   ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \
   ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/MElement.h ../Geo/MVertex.h \
   ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h \
-  ../Geo/MVertex.h ../Geo/SVector3.h ../Numeric/Numeric.h ../Geo/GFace.h \
-  ../Geo/GPoint.h ../Geo/GEntity.h ../Geo/MElement.h ../Geo/SPoint2.h \
-  ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h \
-  ../Geo/MElement.h ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEdge.h \
-  ../Geo/GFace.h ../Geo/GRegion.h ../Geo/SBoundingBox3d.h \
-  ../Common/SmoothNormals.h ../Parser/Parser.h ../DataStr/List.h \
-  ../DataStr/Tree.h ../DataStr/avl.h
+  ../Geo/MVertex.h ../Geo/SVector3.h ../Numeric/Numeric.h \
+  ../Common/Context.h ../DataStr/List.h ../Geo/GFace.h ../Geo/GPoint.h \
+  ../Geo/GEntity.h ../Geo/MElement.h ../Geo/SPoint2.h ../Geo/SVector3.h \
+  ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/MElement.h \
+  ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEdge.h ../Geo/GFace.h \
+  ../Geo/GRegion.h ../Geo/SBoundingBox3d.h ../Common/SmoothNormals.h \
+  ../Parser/Parser.h ../DataStr/Tree.h ../DataStr/avl.h
 # 1 "/Users/geuzaine/.gmsh/Common//"
 Trackball.o: Trackball.cpp Trackball.h
 # 1 "/Users/geuzaine/.gmsh/Common//"
diff --git a/Common/Options.cpp b/Common/Options.cpp
index 43ce921ff5ab0232585267d4fb739004ab487e7b..d2b651efd1f3b313cf568b53b647ee4428ab9fa4 100644
--- a/Common/Options.cpp
+++ b/Common/Options.cpp
@@ -1,4 +1,4 @@
-// $Id: Options.cpp,v 1.297 2006-08-17 18:15:39 geuzaine Exp $
+// $Id: Options.cpp,v 1.298 2006-08-17 21:28:34 geuzaine Exp $
 //
 // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
 //
@@ -4461,6 +4461,19 @@ double opt_mesh_line_type(OPT_ARGS_NUM)
   return CTX.mesh.line_type;
 }
 
+double opt_mesh_reverse_all_normals(OPT_ARGS_NUM)
+{
+  if(action & GMSH_SET) {
+    if(CTX.mesh.reverse_all_normals != val) CTX.mesh.changed = 1;
+    CTX.mesh.reverse_all_normals = (int)val;
+  }
+#if defined(HAVE_FLTK)
+  if(WID && (action & GMSH_GUI))
+    WID->mesh_butt[0]->value(CTX.mesh.reverse_all_normals);
+#endif
+  return CTX.mesh.reverse_all_normals;
+}
+
 double opt_mesh_smooth_normals(OPT_ARGS_NUM)
 {
   if(action & GMSH_SET) {
diff --git a/Common/Options.h b/Common/Options.h
index 556d38fdf80463ebfc566ee2c56db72bfea9fb7d..0ed6ff759259f18b33c8c9cb457c4fa02eabc1b0 100644
--- a/Common/Options.h
+++ b/Common/Options.h
@@ -439,6 +439,7 @@ double opt_mesh_point_type(OPT_ARGS_NUM);
 double opt_mesh_line_width(OPT_ARGS_NUM);
 double opt_mesh_line_type(OPT_ARGS_NUM);
 double opt_mesh_vertex_arrays(OPT_ARGS_NUM);
+double opt_mesh_reverse_all_normals(OPT_ARGS_NUM);
 double opt_mesh_smooth_normals(OPT_ARGS_NUM);
 double opt_mesh_angle_smooth_normals(OPT_ARGS_NUM);
 double opt_mesh_light(OPT_ARGS_NUM);
diff --git a/Fltk/Callbacks.cpp b/Fltk/Callbacks.cpp
index 08fa3431bc0cd6439ac595a32c6b2813adb11229..e0464f9f4460d46913cdad4a5afa28a1e75af213 100644
--- a/Fltk/Callbacks.cpp
+++ b/Fltk/Callbacks.cpp
@@ -1,4 +1,4 @@
-// $Id: Callbacks.cpp,v 1.437 2006-08-17 18:15:39 geuzaine Exp $
+// $Id: Callbacks.cpp,v 1.438 2006-08-17 21:28:34 geuzaine Exp $
 //
 // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
 //
@@ -1132,6 +1132,7 @@ void mesh_options_ok_cb(CALLBACK_ARGS)
   opt_mesh_cut_plane_only_volume(0, GMSH_SET, WID->mesh_butt[23]->value());
   opt_mesh_light(0, GMSH_SET, WID->mesh_butt[17]->value());
   opt_mesh_light_two_side(0, GMSH_SET, WID->mesh_butt[18]->value());
+  opt_mesh_reverse_all_normals(0, GMSH_SET, WID->mesh_butt[0]->value());
   opt_mesh_smooth_normals(0, GMSH_SET, WID->mesh_butt[19]->value());
   opt_mesh_light_lines(0, GMSH_SET, WID->mesh_butt[20]->value());
 
@@ -1672,6 +1673,7 @@ void help_short_cb(CALLBACK_ARGS)
   Msg(DIRECT, "  Alt+Shift+p   Hide/show mesh points");
   Msg(DIRECT, "  Alt+Shift+s   Hide/show mesh surface edges");
   Msg(DIRECT, "  Alt+Shift+v   Hide/show mesh volume edges");
+  Msg(DIRECT, "  Alt+Shift+w   Reverse all mesh normals");
   Msg(DIRECT, "  Alt+Shift+x   Set -X view"); 
   Msg(DIRECT, "  Alt+Shift+y   Set -Y view"); 
   Msg(DIRECT, "  Alt+Shift+z   Set -Z view"); 
diff --git a/Fltk/GUI.cpp b/Fltk/GUI.cpp
index 0cd138dbb2990d5554db4b7ae567ded69d334986..35f54c1823148c48fc36dc29cb4c4e33ca8d8921 100644
--- a/Fltk/GUI.cpp
+++ b/Fltk/GUI.cpp
@@ -1,4 +1,4 @@
-// $Id: GUI.cpp,v 1.526 2006-08-17 19:45:54 geuzaine Exp $
+// $Id: GUI.cpp,v 1.527 2006-08-17 21:28:34 geuzaine Exp $
 //
 // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
 //
@@ -658,6 +658,12 @@ int GUI::global_shortcuts(int event)
     redraw_opengl();
     return 1;
   }
+  else if(Fl::test_shortcut(FL_ALT + FL_SHIFT + 'w')) {
+    opt_mesh_reverse_all_normals(0, GMSH_SET | GMSH_GUI,
+				 !opt_mesh_reverse_all_normals(0, GMSH_GET, 0));
+    redraw_opengl();
+    return 1;
+  }
   else if(Fl::test_shortcut(FL_ALT + 'x') || 
 	  Fl::test_shortcut(FL_ALT + FL_SHIFT + 'x')) {
     status_xyz1p_cb(0, (void *)"x");
@@ -2587,12 +2593,17 @@ void GUI::create_option_window()
       mesh_butt[18]->down_box(GMSH_TOGGLE_BOX);
       mesh_butt[18]->selection_color(GMSH_TOGGLE_COLOR);
 
-      mesh_butt[19] = new Fl_Check_Button(L + 2 * WB, 2 * WB + 4 * BH, BW, BH, "Smooth normals");
+      mesh_butt[0] = new Fl_Check_Button(L + 2 * WB, 2 * WB + 4 * BH, BW, BH, "Reverse all normals");
+      mesh_butt[0]->type(FL_TOGGLE_BUTTON);
+      mesh_butt[0]->down_box(GMSH_TOGGLE_BOX);
+      mesh_butt[0]->selection_color(GMSH_TOGGLE_COLOR);
+
+      mesh_butt[19] = new Fl_Check_Button(L + 2 * WB, 2 * WB + 5 * BH, BW, BH, "Smooth normals");
       mesh_butt[19]->type(FL_TOGGLE_BUTTON);
       mesh_butt[19]->down_box(GMSH_TOGGLE_BOX);
       mesh_butt[19]->selection_color(GMSH_TOGGLE_COLOR);
 
-      mesh_value[18] = new Fl_Value_Input(L + 2 * WB, 2 * WB + 5 * BH, IW, BH, "Smoothing threshold angle");
+      mesh_value[18] = new Fl_Value_Input(L + 2 * WB, 2 * WB + 6 * BH, IW, BH, "Smoothing threshold angle");
       mesh_value[18]->minimum(0.);
       mesh_value[18]->maximum(180.);
       mesh_value[18]->step(1.);
diff --git a/Geo/MFace.h b/Geo/MFace.h
index 39844abdbb4916297ec19196a01ae82c0d1500cc..8e66da502b22097017ff3043827ea59eb7056e23 100644
--- a/Geo/MFace.h
+++ b/Geo/MFace.h
@@ -23,6 +23,9 @@
 #include "MVertex.h"
 #include "SVector3.h"
 #include "Numeric.h"
+#include "Context.h"
+
+extern Context_T CTX;
 
 class MFace {
  private:
@@ -30,7 +33,20 @@ class MFace {
  public:
   MFace(MVertex *v0, MVertex *v1, MVertex *v2, MVertex *v3=0) 
   {
-    _v[0] = v0; _v[1] = v1; _v[2] = v2; _v[3] = v3;
+    if(CTX.mesh.reverse_all_normals){
+      // Note that we cannot simply change the normal computation,
+      // since OpenGL wants the normal to a polygon to be coherent
+      // with the ordering of its vertices
+      if(v3){
+	_v[0] = v0; _v[1] = v3; _v[2] = v2; _v[3] = v1;
+      }
+      else{
+	_v[0] = v0; _v[1] = v2; _v[2] = v1; _v[3] = v3;
+      }
+    }
+    else{
+      _v[0] = v0; _v[1] = v1; _v[2] = v2; _v[3] = v3;
+    }
   }
   inline int getNumVertices() const { return _v[3] ? 4 : 3; }
   inline MVertex *getVertex(int i) const { return _v[i]; }
diff --git a/Geo/Makefile b/Geo/Makefile
index 17341776c2ada0bed747b2266ef4530c2da51fc7..c7c41a5a9d7ece37ee69284a3f4f0824c7250dc3 100644
--- a/Geo/Makefile
+++ b/Geo/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.94 2006-08-16 17:14:57 geuzaine Exp $
+# $Id: Makefile,v 1.95 2006-08-17 21:28:34 geuzaine Exp $
 #
 # Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
 #
@@ -125,8 +125,8 @@ GeoUtils.o: GeoUtils.cpp ../Common/Gmsh.h ../Common/Message.h \
 GEntity.o: GEntity.cpp GEntity.h Range.h SPoint3.h SBoundingBox3d.h \
   ../Common/GmshDefines.h MRep.h GEdge.h GVertex.h MVertex.h GPoint.h \
   SVector3.h SPoint2.h MElement.h MEdge.h MFace.h ../Numeric/Numeric.h \
-  GFace.h Pair.h GRegion.h ../Common/VertexArray.h ../DataStr/List.h \
-  ../Common/Message.h ../Common/OS.h ../Common/Context.h
+  ../Common/Context.h ../DataStr/List.h GFace.h Pair.h GRegion.h \
+  ../Common/VertexArray.h ../Common/Message.h ../Common/OS.h
 # 1 "/Users/geuzaine/.gmsh/Geo//"
 GVertex.o: GVertex.cpp GVertex.h GEntity.h Range.h SPoint3.h \
   SBoundingBox3d.h ../Common/GmshDefines.h MVertex.h GPoint.h
@@ -134,22 +134,26 @@ GVertex.o: GVertex.cpp GVertex.h GEntity.h Range.h SPoint3.h \
 GEdge.o: GEdge.cpp GModel.h GVertex.h GEntity.h Range.h SPoint3.h \
   SBoundingBox3d.h ../Common/GmshDefines.h MVertex.h GPoint.h GEdge.h \
   SVector3.h SPoint2.h MElement.h MEdge.h MFace.h ../Numeric/Numeric.h \
-  GFace.h Pair.h GRegion.h ../Common/SmoothNormals.h
+  ../Common/Context.h ../DataStr/List.h GFace.h Pair.h GRegion.h \
+  ../Common/SmoothNormals.h
 # 1 "/Users/geuzaine/.gmsh/Geo//"
 GFace.o: GFace.cpp GModel.h GVertex.h GEntity.h Range.h SPoint3.h \
   SBoundingBox3d.h ../Common/GmshDefines.h MVertex.h GPoint.h GEdge.h \
   SVector3.h SPoint2.h MElement.h MEdge.h MFace.h ../Numeric/Numeric.h \
-  GFace.h Pair.h GRegion.h ../Common/SmoothNormals.h ../Common/Message.h
+  ../Common/Context.h ../DataStr/List.h GFace.h Pair.h GRegion.h \
+  ../Common/SmoothNormals.h ../Common/Message.h
 # 1 "/Users/geuzaine/.gmsh/Geo//"
 GRegion.o: GRegion.cpp GModel.h GVertex.h GEntity.h Range.h SPoint3.h \
   SBoundingBox3d.h ../Common/GmshDefines.h MVertex.h GPoint.h GEdge.h \
   SVector3.h SPoint2.h MElement.h MEdge.h MFace.h ../Numeric/Numeric.h \
-  GFace.h Pair.h GRegion.h ../Common/SmoothNormals.h
+  ../Common/Context.h ../DataStr/List.h GFace.h Pair.h GRegion.h \
+  ../Common/SmoothNormals.h
 # 1 "/Users/geuzaine/.gmsh/Geo//"
 GModel.o: GModel.cpp GModel.h GVertex.h GEntity.h Range.h SPoint3.h \
   SBoundingBox3d.h ../Common/GmshDefines.h MVertex.h GPoint.h GEdge.h \
   SVector3.h SPoint2.h MElement.h MEdge.h MFace.h ../Numeric/Numeric.h \
-  GFace.h Pair.h GRegion.h ../Common/SmoothNormals.h
+  ../Common/Context.h ../DataStr/List.h GFace.h Pair.h GRegion.h \
+  ../Common/SmoothNormals.h
 # 1 "/Users/geuzaine/.gmsh/Geo//"
 GModelIO.o: GModelIO.cpp ../Common/Message.h ../Common/GmshDefines.h \
   gmshRegion.h ../Mesh/Mesh.h ../DataStr/List.h ../DataStr/Tree.h \
@@ -160,69 +164,72 @@ GModelIO.o: GModelIO.cpp ../Common/Message.h ../Common/GmshDefines.h \
   ../Mesh/Vertex.h ../Mesh/Simplex.h ../Mesh/Mesh.h ../Mesh/Matrix.h \
   gmshModel.h GModel.h GVertex.h GEntity.h Range.h SPoint3.h \
   SBoundingBox3d.h MVertex.h GPoint.h GEdge.h SVector3.h SPoint2.h \
-  MElement.h MEdge.h MFace.h ../Numeric/Numeric.h GFace.h Pair.h \
-  GRegion.h ../Common/SmoothNormals.h gmshFace.h gmshVertex.h gmshEdge.h
+  MElement.h MEdge.h MFace.h ../Numeric/Numeric.h ../Common/Context.h \
+  GFace.h Pair.h GRegion.h ../Common/SmoothNormals.h gmshFace.h \
+  gmshVertex.h gmshEdge.h
 # 1 "/Users/geuzaine/.gmsh/Geo//"
 MVertex.o: MVertex.cpp MVertex.h SPoint3.h
 # 1 "/Users/geuzaine/.gmsh/Geo//"
 MElement.o: MElement.cpp MElement.h ../Common/GmshDefines.h MVertex.h \
-  SPoint3.h MEdge.h SVector3.h MFace.h ../Numeric/Numeric.h GEntity.h \
-  Range.h SBoundingBox3d.h
+  SPoint3.h MEdge.h SVector3.h MFace.h ../Numeric/Numeric.h \
+  ../Common/Context.h ../DataStr/List.h GEntity.h Range.h \
+  SBoundingBox3d.h
 # 1 "/Users/geuzaine/.gmsh/Geo//"
 gmshModel.o: gmshModel.cpp gmshModel.h GModel.h GVertex.h GEntity.h \
   Range.h SPoint3.h SBoundingBox3d.h ../Common/GmshDefines.h MVertex.h \
   GPoint.h GEdge.h SVector3.h SPoint2.h MElement.h MEdge.h MFace.h \
-  ../Numeric/Numeric.h GFace.h Pair.h GRegion.h ../Common/SmoothNormals.h \
-  ../Mesh/Mesh.h ../DataStr/List.h ../DataStr/Tree.h ../DataStr/avl.h \
-  ../Mesh/Vertex.h ../Mesh/Element.h ../Mesh/Vertex.h ../Mesh/Simplex.h \
-  ../Mesh/Vertex.h ../Mesh/Element.h ../Mesh/Face.h ../Mesh/Vertex.h \
-  ../Mesh/Element.h ../Mesh/Edge.h ../Mesh/Vertex.h ../Mesh/Simplex.h \
-  ../Geo/ExtrudeParams.h ../Mesh/Metric.h ../Mesh/Vertex.h \
-  ../Mesh/Simplex.h ../Mesh/Mesh.h ../Mesh/Matrix.h Geo.h \
-  ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h \
-  ../Common/Message.h gmshVertex.h gmshFace.h gmshEdge.h gmshRegion.h
-# 1 "/Users/geuzaine/.gmsh/Geo//"
-gmshEdge.o: gmshEdge.cpp gmshModel.h GModel.h GVertex.h GEntity.h Range.h \
-  SPoint3.h SBoundingBox3d.h ../Common/GmshDefines.h MVertex.h GPoint.h \
-  GEdge.h SVector3.h SPoint2.h MElement.h MEdge.h MFace.h \
-  ../Numeric/Numeric.h GFace.h Pair.h GRegion.h ../Common/SmoothNormals.h \
-  gmshEdge.h gmshVertex.h ../Mesh/Mesh.h ../DataStr/List.h \
+  ../Numeric/Numeric.h ../Common/Context.h ../DataStr/List.h GFace.h \
+  Pair.h GRegion.h ../Common/SmoothNormals.h ../Mesh/Mesh.h \
   ../DataStr/Tree.h ../DataStr/avl.h ../Mesh/Vertex.h ../Mesh/Element.h \
   ../Mesh/Vertex.h ../Mesh/Simplex.h ../Mesh/Vertex.h ../Mesh/Element.h \
   ../Mesh/Face.h ../Mesh/Vertex.h ../Mesh/Element.h ../Mesh/Edge.h \
   ../Mesh/Vertex.h ../Mesh/Simplex.h ../Geo/ExtrudeParams.h \
   ../Mesh/Metric.h ../Mesh/Vertex.h ../Mesh/Simplex.h ../Mesh/Mesh.h \
-  ../Mesh/Matrix.h ../Mesh/Interpolation.h ../Mesh/Vertex.h \
-  ../Mesh/Mesh.h CAD.h ExtrudeParams.h Geo.h ../Mesh/Create.h \
-  ../Mesh/Vertex.h ../Mesh/Mesh.h ../Common/Context.h
+  ../Mesh/Matrix.h Geo.h ../DataStr/Tools.h ../DataStr/List.h \
+  ../DataStr/Tree.h ../Common/Message.h gmshVertex.h gmshFace.h \
+  gmshEdge.h gmshRegion.h
+# 1 "/Users/geuzaine/.gmsh/Geo//"
+gmshEdge.o: gmshEdge.cpp gmshModel.h GModel.h GVertex.h GEntity.h Range.h \
+  SPoint3.h SBoundingBox3d.h ../Common/GmshDefines.h MVertex.h GPoint.h \
+  GEdge.h SVector3.h SPoint2.h MElement.h MEdge.h MFace.h \
+  ../Numeric/Numeric.h ../Common/Context.h ../DataStr/List.h GFace.h \
+  Pair.h GRegion.h ../Common/SmoothNormals.h gmshEdge.h gmshVertex.h \
+  ../Mesh/Mesh.h ../DataStr/Tree.h ../DataStr/avl.h ../Mesh/Vertex.h \
+  ../Mesh/Element.h ../Mesh/Vertex.h ../Mesh/Simplex.h ../Mesh/Vertex.h \
+  ../Mesh/Element.h ../Mesh/Face.h ../Mesh/Vertex.h ../Mesh/Element.h \
+  ../Mesh/Edge.h ../Mesh/Vertex.h ../Mesh/Simplex.h \
+  ../Geo/ExtrudeParams.h ../Mesh/Metric.h ../Mesh/Vertex.h \
+  ../Mesh/Simplex.h ../Mesh/Mesh.h ../Mesh/Matrix.h \
+  ../Mesh/Interpolation.h ../Mesh/Vertex.h ../Mesh/Mesh.h CAD.h \
+  ExtrudeParams.h Geo.h ../Mesh/Create.h ../Mesh/Vertex.h ../Mesh/Mesh.h
 # 1 "/Users/geuzaine/.gmsh/Geo//"
 gmshFace.o: gmshFace.cpp gmshModel.h GModel.h GVertex.h GEntity.h Range.h \
   SPoint3.h SBoundingBox3d.h ../Common/GmshDefines.h MVertex.h GPoint.h \
   GEdge.h SVector3.h SPoint2.h MElement.h MEdge.h MFace.h \
-  ../Numeric/Numeric.h GFace.h Pair.h GRegion.h ../Common/SmoothNormals.h \
-  gmshEdge.h gmshVertex.h ../Mesh/Mesh.h ../DataStr/List.h \
-  ../DataStr/Tree.h ../DataStr/avl.h ../Mesh/Vertex.h ../Mesh/Element.h \
-  ../Mesh/Vertex.h ../Mesh/Simplex.h ../Mesh/Vertex.h ../Mesh/Element.h \
-  ../Mesh/Face.h ../Mesh/Vertex.h ../Mesh/Element.h ../Mesh/Edge.h \
-  ../Mesh/Vertex.h ../Mesh/Simplex.h ../Geo/ExtrudeParams.h \
-  ../Mesh/Metric.h ../Mesh/Vertex.h ../Mesh/Simplex.h ../Mesh/Mesh.h \
-  ../Mesh/Matrix.h gmshFace.h ../Mesh/Interpolation.h ../Mesh/Vertex.h \
-  ../Mesh/Mesh.h CAD.h ExtrudeParams.h Geo.h ../Mesh/Create.h \
-  ../Mesh/Vertex.h ../Mesh/Mesh.h ../Mesh/Utils.h ../Mesh/Vertex.h \
-  ../Mesh/Mesh.h ../Common/Message.h
+  ../Numeric/Numeric.h ../Common/Context.h ../DataStr/List.h GFace.h \
+  Pair.h GRegion.h ../Common/SmoothNormals.h gmshEdge.h gmshVertex.h \
+  ../Mesh/Mesh.h ../DataStr/Tree.h ../DataStr/avl.h ../Mesh/Vertex.h \
+  ../Mesh/Element.h ../Mesh/Vertex.h ../Mesh/Simplex.h ../Mesh/Vertex.h \
+  ../Mesh/Element.h ../Mesh/Face.h ../Mesh/Vertex.h ../Mesh/Element.h \
+  ../Mesh/Edge.h ../Mesh/Vertex.h ../Mesh/Simplex.h \
+  ../Geo/ExtrudeParams.h ../Mesh/Metric.h ../Mesh/Vertex.h \
+  ../Mesh/Simplex.h ../Mesh/Mesh.h ../Mesh/Matrix.h gmshFace.h \
+  ../Mesh/Interpolation.h ../Mesh/Vertex.h ../Mesh/Mesh.h CAD.h \
+  ExtrudeParams.h Geo.h ../Mesh/Create.h ../Mesh/Vertex.h ../Mesh/Mesh.h \
+  ../Mesh/Utils.h ../Mesh/Vertex.h ../Mesh/Mesh.h ../Common/Message.h
 # 1 "/Users/geuzaine/.gmsh/Geo//"
 gmshRegion.o: gmshRegion.cpp gmshModel.h GModel.h GVertex.h GEntity.h \
   Range.h SPoint3.h SBoundingBox3d.h ../Common/GmshDefines.h MVertex.h \
   GPoint.h GEdge.h SVector3.h SPoint2.h MElement.h MEdge.h MFace.h \
-  ../Numeric/Numeric.h GFace.h Pair.h GRegion.h ../Common/SmoothNormals.h \
-  gmshFace.h gmshVertex.h ../Mesh/Mesh.h ../DataStr/List.h \
-  ../DataStr/Tree.h ../DataStr/avl.h ../Mesh/Vertex.h ../Mesh/Element.h \
-  ../Mesh/Vertex.h ../Mesh/Simplex.h ../Mesh/Vertex.h ../Mesh/Element.h \
-  ../Mesh/Face.h ../Mesh/Vertex.h ../Mesh/Element.h ../Mesh/Edge.h \
-  ../Mesh/Vertex.h ../Mesh/Simplex.h ../Geo/ExtrudeParams.h \
-  ../Mesh/Metric.h ../Mesh/Vertex.h ../Mesh/Simplex.h ../Mesh/Mesh.h \
-  ../Mesh/Matrix.h gmshRegion.h Geo.h ../Mesh/Create.h ../Mesh/Vertex.h \
-  ../Mesh/Mesh.h
+  ../Numeric/Numeric.h ../Common/Context.h ../DataStr/List.h GFace.h \
+  Pair.h GRegion.h ../Common/SmoothNormals.h gmshFace.h gmshVertex.h \
+  ../Mesh/Mesh.h ../DataStr/Tree.h ../DataStr/avl.h ../Mesh/Vertex.h \
+  ../Mesh/Element.h ../Mesh/Vertex.h ../Mesh/Simplex.h ../Mesh/Vertex.h \
+  ../Mesh/Element.h ../Mesh/Face.h ../Mesh/Vertex.h ../Mesh/Element.h \
+  ../Mesh/Edge.h ../Mesh/Vertex.h ../Mesh/Simplex.h \
+  ../Geo/ExtrudeParams.h ../Mesh/Metric.h ../Mesh/Vertex.h \
+  ../Mesh/Simplex.h ../Mesh/Mesh.h ../Mesh/Matrix.h gmshRegion.h Geo.h \
+  ../Mesh/Create.h ../Mesh/Vertex.h ../Mesh/Mesh.h
 # 1 "/Users/geuzaine/.gmsh/Geo//"
 SVector3.o: SVector3.cpp SVector3.h SPoint3.h
 # 1 "/Users/geuzaine/.gmsh/Geo//"
diff --git a/Graphics/Makefile b/Graphics/Makefile
index e9df4935011426e5ef8e55dcacb6598c46abcd38..103fe3790013e154b43218b74fbfd1a4403a22a4 100644
--- a/Graphics/Makefile
+++ b/Graphics/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.97 2006-08-16 17:14:57 geuzaine Exp $
+# $Id: Makefile,v 1.98 2006-08-17 21:28:34 geuzaine Exp $
 #
 # Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
 #
@@ -101,16 +101,16 @@ Mesh.o: Mesh.cpp ../Common/Gmsh.h ../Common/Message.h ../DataStr/Malloc.h \
   ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \
   ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/MElement.h ../Geo/MVertex.h \
   ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h \
-  ../Geo/MVertex.h ../Geo/SVector3.h ../Numeric/Numeric.h ../Geo/GFace.h \
-  ../Geo/GPoint.h ../Geo/GEntity.h ../Geo/MElement.h ../Geo/SPoint2.h \
-  ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h \
-  ../Geo/MElement.h ../Geo/SBoundingBox3d.h ../Common/SmoothNormals.h \
-  Draw.h ../Common/Views.h ../Common/ColorTable.h ../Common/VertexArray.h \
+  ../Geo/MVertex.h ../Geo/SVector3.h ../Numeric/Numeric.h \
+  ../Common/Context.h ../Geo/GFace.h ../Geo/GPoint.h ../Geo/GEntity.h \
+  ../Geo/MElement.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
+  ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/MElement.h \
+  ../Geo/SBoundingBox3d.h ../Common/SmoothNormals.h Draw.h \
+  ../Common/Views.h ../Common/ColorTable.h ../Common/VertexArray.h \
   ../Common/SmoothNormals.h ../Common/GmshMatrix.h \
-  ../Common/AdaptiveViews.h ../Common/GmshMatrix.h ../Common/Context.h \
-  ../Geo/MRep.h ../Geo/GEdge.h ../Geo/GFace.h ../Geo/GRegion.h \
-  ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/MElement.h ../Common/OS.h \
-  gl2ps.h tc.h
+  ../Common/AdaptiveViews.h ../Common/GmshMatrix.h ../Geo/MRep.h \
+  ../Geo/GEdge.h ../Geo/GFace.h ../Geo/GRegion.h ../Geo/MVertex.h \
+  ../Geo/MEdge.h ../Geo/MElement.h ../Common/OS.h gl2ps.h tc.h
 # 1 "/Users/geuzaine/.gmsh/Graphics//"
 Geom.o: Geom.cpp ../Common/Gmsh.h ../Common/Message.h ../DataStr/Malloc.h \
   ../DataStr/List.h ../DataStr/Tree.h ../DataStr/avl.h ../DataStr/Tools.h \
diff --git a/Mesh/Makefile b/Mesh/Makefile
index af1c1309f46c7e881ed1fb1fa2ac80ddc2887efd..0f04931440000c34178fc14e3cc3d361aade3e57 100644
--- a/Mesh/Makefile
+++ b/Mesh/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.120 2006-08-16 17:14:57 geuzaine Exp $
+# $Id: Makefile,v 1.121 2006-08-17 21:28:34 geuzaine Exp $
 #
 # Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
 #
@@ -410,11 +410,11 @@ meshGEdge.o: meshGEdge.cpp meshGEdge.h ../Geo/GEdge.h ../Geo/GEntity.h \
   ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
   ../Geo/MElement.h ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/MVertex.h \
   ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \
-  ../Numeric/Numeric.h ../Common/Gmsh.h ../Common/Message.h \
-  ../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h \
-  ../DataStr/avl.h ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h \
-  Utils.h Vertex.h Mesh.h Element.h Simplex.h Face.h Edge.h \
-  ../Geo/ExtrudeParams.h Metric.h Matrix.h ../Common/Context.h
+  ../Numeric/Numeric.h ../Common/Context.h ../DataStr/List.h \
+  ../Common/Gmsh.h ../Common/Message.h ../DataStr/Malloc.h \
+  ../DataStr/Tree.h ../DataStr/avl.h ../DataStr/Tools.h ../DataStr/List.h \
+  ../DataStr/Tree.h Utils.h Vertex.h Mesh.h Element.h Simplex.h Face.h \
+  Edge.h ../Geo/ExtrudeParams.h Metric.h Matrix.h
 # 1 "/Users/geuzaine/.gmsh/Mesh//"
 meshGFace.o: meshGFace.cpp meshGFace.h ../Geo/SPoint2.h ../Geo/GVertex.h \
   ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
@@ -426,9 +426,9 @@ meshGFace.o: meshGFace.cpp meshGFace.h ../Geo/SPoint2.h ../Geo/GVertex.h \
   ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
   ../Geo/MElement.h ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/MVertex.h \
   ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \
-  ../Numeric/Numeric.h ../Geo/GFace.h ../Geo/GPoint.h ../Geo/GEntity.h \
-  ../Geo/MElement.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
-  ../Common/Context.h Utils.h ../Common/Message.h BDS.h ../Common/Views.h \
+  ../Numeric/Numeric.h ../Common/Context.h ../Geo/GFace.h ../Geo/GPoint.h \
+  ../Geo/GEntity.h ../Geo/MElement.h ../Geo/SPoint2.h ../Geo/SVector3.h \
+  ../Geo/Pair.h Utils.h ../Common/Message.h BDS.h ../Common/Views.h \
   ../Common/ColorTable.h ../Common/VertexArray.h \
   ../Common/SmoothNormals.h ../Common/GmshMatrix.h \
   ../Common/AdaptiveViews.h ../Common/GmshMatrix.h
diff --git a/Parser/Makefile b/Parser/Makefile
index 06442544bd218fd00fdede71a930c4b3f1792365..b4231924c9448bdf60756d623ddf37949e0e3f0b 100644
--- a/Parser/Makefile
+++ b/Parser/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.98 2006-08-16 17:14:57 geuzaine Exp $
+# $Id: Makefile,v 1.99 2006-08-17 21:28:34 geuzaine Exp $
 #
 # Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
 #
@@ -117,12 +117,12 @@ OpenFile.o: OpenFile.cpp ../Common/Gmsh.h ../Common/Message.h \
   ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h \
   ../Geo/SPoint2.h ../Geo/MElement.h ../Geo/MVertex.h ../Geo/MEdge.h \
   ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h \
-  ../Geo/SVector3.h ../Numeric/Numeric.h ../Geo/GFace.h ../Geo/GPoint.h \
-  ../Geo/GEntity.h ../Geo/MElement.h ../Geo/SPoint2.h ../Geo/SVector3.h \
-  ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/MElement.h \
-  ../Geo/SBoundingBox3d.h ../Common/SmoothNormals.h ../Common/Context.h \
-  Parser.h OpenFile.h ../Common/CommandLine.h ../Common/Views.h \
-  ../Common/ColorTable.h ../Common/VertexArray.h \
+  ../Geo/SVector3.h ../Numeric/Numeric.h ../Common/Context.h \
+  ../Geo/GFace.h ../Geo/GPoint.h ../Geo/GEntity.h ../Geo/MElement.h \
+  ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h \
+  ../Geo/GEntity.h ../Geo/MElement.h ../Geo/SBoundingBox3d.h \
+  ../Common/SmoothNormals.h Parser.h OpenFile.h ../Common/CommandLine.h \
+  ../Common/Views.h ../Common/ColorTable.h ../Common/VertexArray.h \
   ../Common/SmoothNormals.h ../Common/GmshMatrix.h \
   ../Common/AdaptiveViews.h ../Common/GmshMatrix.h ../Mesh/Mesh.h \
   ../Mesh/Vertex.h ../Mesh/Element.h ../Mesh/Vertex.h ../Mesh/Simplex.h \
diff --git a/doc/texinfo/opt_mesh.texi b/doc/texinfo/opt_mesh.texi
index 8d46aaee946851916140028bb7bdd61363cc3ffa..c5345a6bd3479bbf4f90d5a3bd278cae0554e10f 100644
--- a/doc/texinfo/opt_mesh.texi
+++ b/doc/texinfo/opt_mesh.texi
@@ -141,7 +141,7 @@ Saved in: @code{General.OptionsFileName}
 
 @item Mesh.Light
 Enable lighting for the mesh@*
-Default value: @code{0}@*
+Default value: @code{1}@*
 Saved in: @code{General.OptionsFileName}
 
 @item Mesh.LightLines
@@ -319,6 +319,11 @@ Recombine algorithm (1=mixed triangles-quadrangles, 2=all quadrangles)@*
 Default value: @code{1}@*
 Saved in: @code{General.OptionsFileName}
 
+@item Mesh.ReverseAllNormals
+Reverse all the mesh normals (for display)@*
+Default value: @code{0}@*
+Saved in: @code{General.OptionsFileName}
+
 @item Mesh.SaveAll
 Ignore Physical definitions and save all elements@*
 Default value: @code{0}@*
@@ -411,12 +416,12 @@ Saved in: @code{General.OptionsFileName}
 
 @item Mesh.Color.Points
 Mesh node color@*
-Default value: @code{@{0,255,0@}}@*
+Default value: @code{@{0,0,128@}}@*
 Saved in: @code{General.OptionsFileName}
 
 @item Mesh.Color.Lines
 Mesh line color@*
-Default value: @code{@{0,255,0@}}@*
+Default value: @code{@{0,0,0@}}@*
 Saved in: @code{General.OptionsFileName}
 
 @item Mesh.Color.Triangles
@@ -461,102 +466,102 @@ Saved in: @code{General.OptionsFileName}
 
 @item Mesh.Color.Zero
 Color 0 in color carousel@*
-Default value: @code{@{9,3,103@}}@*
+Default value: @code{@{255,120,0@}}@*
 Saved in: @code{General.OptionsFileName}
 
 @item Mesh.Color.One
 Color 1 in color carousel@*
-Default value: @code{@{35,0,111@}}@*
+Default value: @code{@{255,160,0@}}@*
 Saved in: @code{General.OptionsFileName}
 
 @item Mesh.Color.Two
 Color 2 in color carousel@*
-Default value: @code{@{60,0,114@}}@*
+Default value: @code{@{255,200,0@}}@*
 Saved in: @code{General.OptionsFileName}
 
 @item Mesh.Color.Three
 Color 3 in color carousel@*
-Default value: @code{@{83,0,114@}}@*
+Default value: @code{@{255,240,0@}}@*
 Saved in: @code{General.OptionsFileName}
 
 @item Mesh.Color.Four
 Color 4 in color carousel@*
-Default value: @code{@{105,1,109@}}@*
+Default value: @code{@{228,255,0@}}@*
 Saved in: @code{General.OptionsFileName}
 
 @item Mesh.Color.Five
 Color 5 in color carousel@*
-Default value: @code{@{126,10,102@}}@*
+Default value: @code{@{188,255,0@}}@*
 Saved in: @code{General.OptionsFileName}
 
 @item Mesh.Color.Six
 Color 6 in color carousel@*
-Default value: @code{@{145,21,93@}}@*
+Default value: @code{@{148,255,0@}}@*
 Saved in: @code{General.OptionsFileName}
 
 @item Mesh.Color.Seven
 Color 7 in color carousel@*
-Default value: @code{@{163,34,82@}}@*
+Default value: @code{@{108,255,0@}}@*
 Saved in: @code{General.OptionsFileName}
 
 @item Mesh.Color.Eight
 Color 8 in color carousel@*
-Default value: @code{@{179,50,69@}}@*
+Default value: @code{@{68,255,0@}}@*
 Saved in: @code{General.OptionsFileName}
 
 @item Mesh.Color.Nine
 Color 9 in color carousel@*
-Default value: @code{@{193,67,57@}}@*
+Default value: @code{@{0,255,52@}}@*
 Saved in: @code{General.OptionsFileName}
 
 @item Mesh.Color.Ten
 Color 10 in color carousel@*
-Default value: @code{@{207,85,44@}}@*
+Default value: @code{@{0,255,132@}}@*
 Saved in: @code{General.OptionsFileName}
 
 @item Mesh.Color.Eleven
 Color 11 in color carousel@*
-Default value: @code{@{219,104,32@}}@*
+Default value: @code{@{0,255,192@}}@*
 Saved in: @code{General.OptionsFileName}
 
 @item Mesh.Color.Twelve
 Color 12 in color carousel@*
-Default value: @code{@{229,124,22@}}@*
+Default value: @code{@{0,216,255@}}@*
 Saved in: @code{General.OptionsFileName}
 
-@item Mesh.Color.Thirtheen
+@item Mesh.Color.Thirteen
 Color 13 in color carousel@*
-Default value: @code{@{238,143,13@}}@*
+Default value: @code{@{0,176,255@}}@*
 Saved in: @code{General.OptionsFileName}
 
 @item Mesh.Color.Fourteen
 Color 14 in color carousel@*
-Default value: @code{@{246,162,8@}}@*
+Default value: @code{@{0,116,255@}}@*
 Saved in: @code{General.OptionsFileName}
 
 @item Mesh.Color.Fifteen
 Color 15 in color carousel@*
-Default value: @code{@{252,181,5@}}@*
+Default value: @code{@{0,76,255@}}@*
 Saved in: @code{General.OptionsFileName}
 
 @item Mesh.Color.Sixteen
 Color 16 in color carousel@*
-Default value: @code{@{255,198,6@}}@*
+Default value: @code{@{24,0,255@}}@*
 Saved in: @code{General.OptionsFileName}
 
 @item Mesh.Color.Seventeen
 Color 17 in color carousel@*
-Default value: @code{@{255,214,11@}}@*
+Default value: @code{@{84,0,255@}}@*
 Saved in: @code{General.OptionsFileName}
 
 @item Mesh.Color.Eighteen
 Color 18 in color carousel@*
-Default value: @code{@{255,228,22@}}@*
+Default value: @code{@{104,0,255@}}@*
 Saved in: @code{General.OptionsFileName}
 
 @item Mesh.Color.Nineteen
 Color 19 in color carousel@*
-Default value: @code{@{255,240,38@}}@*
+Default value: @code{@{184,0,255@}}@*
 Saved in: @code{General.OptionsFileName}
 
 @end ftable
diff --git a/doc/texinfo/shortcuts.texi b/doc/texinfo/shortcuts.texi
index 5306391df61d3fa0c601847a533d12eb0c895f74..a67be5b78416c142c12875b5ff15b17ffc0ca9af 100644
--- a/doc/texinfo/shortcuts.texi
+++ b/doc/texinfo/shortcuts.texi
@@ -145,6 +145,8 @@ Hide/show mesh points
 Hide/show mesh surface edges
 @item Alt+Shift+v
 Hide/show mesh volume edges
+@item Alt+Shift+w
+Reverse all mesh normals
 @item Alt+Shift+x
 Set -X view 
 @item Alt+Shift+y