diff --git a/Common/GmshMatrix.h b/Common/GmshMatrix.h
index 60786e06c6d7cdd114b025511cb09544d6ab2145..49c0ec3e1c15d09f1e7838f4c055dbafc5caac60 100644
--- a/Common/GmshMatrix.h
+++ b/Common/GmshMatrix.h
@@ -2,10 +2,10 @@
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to <gmsh@geuz.org>.
+
 #ifndef _GMSH_MATRIX_H_
 #define _GMSH_MATRIX_H_
 
-
 template <class SCALAR>
 class Gmsh_Vector
 {
diff --git a/Mesh/BackgroundMesh.cpp b/Mesh/BackgroundMesh.cpp
index c62804f1f8ca854908d2aca65cfc32fba408fa18..b7e2f3ea4b197733ef369a4573e50953f0c38a25 100644
--- a/Mesh/BackgroundMesh.cpp
+++ b/Mesh/BackgroundMesh.cpp
@@ -171,13 +171,10 @@ double BGM_MeshSize(GEntity *ge, double U, double V, double X, double Y, double
 
 bool Extend1dMeshIn2dSurfaces()
 {
-  // don't extend 1d mesh in surfaces if there is a background field
-  if(GModel::current()->getFields()->background_field != -1) return false;
-
   return CTX.mesh.lc_extend_from_boundary ? true : false;
 }
 
 bool Extend2dMeshIn3dVolumes()
 {
-  return Extend1dMeshIn2dSurfaces();
+  return CTX.mesh.lc_extend_from_boundary ? true : false;
 }
diff --git a/Mesh/Field.cpp b/Mesh/Field.cpp
index b03f72ab4ef1385a736088748fa147503a80c6eb..95b49b7bc22922d689eb70c0ecda7de89ddb12c4 100644
--- a/Mesh/Field.cpp
+++ b/Mesh/Field.cpp
@@ -31,27 +31,15 @@
 
 extern Context_T CTX;
 
-class FieldOptionDouble:public FieldOption
+class FieldOptionDouble : public FieldOption
 {
-public:
+ public:
   double &val;
-  FieldOptionType get_type()
-  {
-    return FIELD_OPTION_DOUBLE;
-  };
-FieldOptionDouble(double &_val, bool * _status = NULL):FieldOption(_status),
-    val(_val) {
-  };
-  double numerical_value() const
-  {
-    return val;
-  };
-  void numerical_value(double v)
-  {
-    modified();
-    val = v;
-  };
-  void get_text_representation(std::string & v_str)
+  FieldOptionType get_type(){ return FIELD_OPTION_DOUBLE; }
+  FieldOptionDouble(double &_val, bool *_status=0) : FieldOption(_status), val(_val){}
+  double numerical_value() const { return val; }
+  void numerical_value(double v){ modified(); val = v; }
+  void get_text_representation(std::string &v_str)
   {
     std::ostringstream sstream;
     sstream.precision(16);
@@ -60,26 +48,14 @@ FieldOptionDouble(double &_val, bool * _status = NULL):FieldOption(_status),
   }
 };
 
-class FieldOptionInt:public FieldOption
+class FieldOptionInt : public FieldOption
 {
-public:
+ public:
   int &val;
-  FieldOptionType get_type()
-  {
-    return FIELD_OPTION_INT;
-  };
-FieldOptionInt(int &_val, bool * _status = NULL):FieldOption(_status),
-    val(_val) {
-  };
-  double numerical_value() const
-  {
-    return val;
-  };
-  void numerical_value(double v)
-  {
-    modified();
-    val = (int)v;
-  };
+  FieldOptionType get_type(){ return FIELD_OPTION_INT; }
+  FieldOptionInt(int &_val, bool *_status=0) : FieldOption(_status), val(_val){}
+  double numerical_value() const { return val; }
+  void numerical_value(double v){ modified(); val = (int)v; }
   void get_text_representation(std::string & v_str)
   {
     std::ostringstream sstream;
@@ -87,27 +63,16 @@ FieldOptionInt(int &_val, bool * _status = NULL):FieldOption(_status),
     v_str = sstream.str();
   }
 };
-class FieldOptionList:public FieldOption
+
+class FieldOptionList : public FieldOption
 {
-public:
+ public:
   std::list < int >&val;
-  FieldOptionType get_type()
-  {
-    return FIELD_OPTION_LIST;
-  };
-FieldOptionList(std::list < int >&_val, bool * _status = NULL):FieldOption(_status),
-    val(_val)
-  {
-  };
-  std::list < int >&list()
-  {
-    modified();
-    return val;
-  }
-  const std::list < int >&list() const
-  {
-    return val;
-  }
+  FieldOptionType get_type(){ return FIELD_OPTION_LIST; }
+  FieldOptionList(std::list<int> &_val, bool *_status=0) 
+    : FieldOption(_status), val(_val) {}
+  std::list<int> &list(){ modified(); return val; }
+  const std::list<int>& list() const { return val; }
   void get_text_representation(std::string & v_str)
   {
     std::ostringstream sstream;
@@ -121,52 +86,33 @@ FieldOptionList(std::list < int >&_val, bool * _status = NULL):FieldOption(_stat
     v_str = sstream.str();
   }
 };
+
 class FieldOptionString:public FieldOption
 {
-public:
+ public:
   std::string & val;
-  virtual FieldOptionType get_type()
-  {
-    return FIELD_OPTION_STRING;
-  };
-FieldOptionString(std::string & _val, bool * _status = NULL):FieldOption(_status),
-    val(_val) {
-  };
-  std::string & string() {
-    modified();
-    return val;
-  }
-  const std::string & string() const
-  {
-    return val;
-  }
-  void get_text_representation(std::string & v_str)
+  virtual FieldOptionType get_type(){ return FIELD_OPTION_STRING; }
+  FieldOptionString(std::string &_val, bool *_status=0)
+    : FieldOption(_status), val(_val) {}
+  std::string &string() { modified(); return val; }
+  const std::string &string() const { return val; }
+  void get_text_representation(std::string &v_str)
   {
     std::ostringstream sstream;
     sstream << "\"" << val << "\"";
     v_str = sstream.str();
   }
 };
-class FieldOptionBool:public FieldOption
+
+class FieldOptionBool : public FieldOption
 {
-public:
+ public:
   bool & val;
-  FieldOptionType get_type()
-  {
-    return FIELD_OPTION_BOOL;
-  };
-FieldOptionBool(bool & _val, bool * _status = NULL):FieldOption(_status),
-    val(_val) {
-  };
-  double numerical_value() const
-  {
-    return val;
-  };
-  void numerical_value(double v)
-  {
-    modified();
-    val = v;
-  };
+  FieldOptionType get_type(){ return FIELD_OPTION_BOOL; }
+  FieldOptionBool(bool & _val, bool *_status=0)
+    : FieldOption(_status), val(_val) {}
+  double numerical_value() const { return val; }
+  void numerical_value(double v){ modified(); val = v; }
   void get_text_representation(std::string & v_str)
   {
     std::ostringstream sstream;
@@ -187,7 +133,7 @@ Field *FieldManager::get(int id)
 {
   iterator it = find(id);
   if(it == end()) {
-    return NULL;
+    return 0;
   }
   return it->second;
 }
@@ -196,15 +142,15 @@ Field *FieldManager::new_field(int id, std::string type_name)
 {
   if(find(id) != end()) {
     Msg::Error("Field id %i is already defined.", id);
-    return NULL;
+    return 0;
   }
   if(map_type_name.find(type_name) == map_type_name.end()) {
     Msg::Error("Unknown field type \"%s\".", type_name.c_str());
-    return NULL;
+    return 0;
   }
   Field *f = (*map_type_name[type_name]) ();
   if(!f)
-    return NULL;
+    return 0;
   f->id = id;
   (*this)[id] = f;
   return f;
@@ -231,6 +177,7 @@ int FieldManager::max_id()
   else
     return 0;
 }
+
 void FieldManager::delete_field(int id)
 {
   iterator it = find(id);
@@ -243,7 +190,7 @@ void FieldManager::delete_field(int id)
 }
 
 // StructuredField
-class StructuredField:public Field
+class StructuredField : public Field
 {
   double o[3], d[3];
   int n[3];
@@ -251,12 +198,13 @@ class StructuredField:public Field
   bool error_status;
   bool text_format;
   std::string file_name;
-public:StructuredField()
+ public:
+  StructuredField()
   {
     options["FileName"] = new FieldOptionString(file_name, &update_needed);
     text_format = false;
     options["TextFormat"] = new FieldOptionBool(text_format, &update_needed);
-    data = NULL;
+    data = 0;
   }
   const char *get_name()
   {
@@ -333,17 +281,17 @@ public:StructuredField()
   }
   FieldDialogBox *&dialog_box()
   {
-    static FieldDialogBox *dialogBox = NULL;
+    static FieldDialogBox *dialogBox = 0;
     return dialogBox;
   }
 };
 
-class UTMField:public Field
+class UTMField : public Field
 {
   int field_id, zone;
   double a, b, n, n2, n3, n4, n5, e, e2, e1, e12, e13, e14, J1, J2, J3, J4,
     Ap, Bp, Cp, Dp, Ep, e4, e6, ep, ep2, ep4, k0, mu_fact;
-public:
+ public:
   UTMField()
   {
     field_id = 1;
@@ -416,15 +364,15 @@ public:
   }
   FieldDialogBox *&dialog_box()
   {
-    static FieldDialogBox *dialogBox = NULL;
+    static FieldDialogBox *dialogBox = 0;
     return dialogBox;
   }
 };
 
-class LonLatField:public Field
+class LonLatField : public Field
 {
   int field_id;
-public:
+ public:
   LonLatField()
   {
     field_id = 1;
@@ -441,15 +389,15 @@ public:
   }
   FieldDialogBox *&dialog_box()
   {
-    static FieldDialogBox *dialogBox = NULL;
+    static FieldDialogBox *dialogBox = 0;
     return dialogBox;
   }
 };
 
-class BoxField:public Field
+class BoxField : public Field
 {
   double v_in, v_out, x_min, x_max, y_min, y_max, z_min, z_max;
-public:
+ public:
   BoxField()
   {
     v_in = v_out = x_min = x_max = y_min = y_max = z_min = z_max = 0;
@@ -468,7 +416,7 @@ public:
   }
   FieldDialogBox *&dialog_box()
   {
-    static FieldDialogBox *dialogBox = NULL;
+    static FieldDialogBox *dialogBox = 0;
     return dialogBox;
   }
   double operator() (double x, double y, double z)
@@ -478,12 +426,12 @@ public:
   }
 };
 
-
-class ThresholdField:public Field
+class ThresholdField : public Field
 {
   int iField;
   double dmin, dmax, lcmin, lcmax;
-public:
+  bool sigmoid;
+ public:
   const char *get_name()
   {
     return "Threshold";
@@ -495,33 +443,41 @@ public:
     dmax = 10;
     lcmin = 0.1;
     lcmax = 1;
+    sigmoid = false;
     options["IField"] = new FieldOptionInt(iField);
     options["DistMin"] = new FieldOptionDouble(dmin);
     options["DistMax"] = new FieldOptionDouble(dmax);
     options["LcMin"] = new FieldOptionDouble(lcmin);
     options["LcMax"] = new FieldOptionDouble(lcmax);
+    options["Sigmoid"] = new FieldOptionBool(sigmoid);
   }
   double operator() (double x, double y, double z)
   {
     Field *field = GModel::current()->getFields()->get(iField);
     double r = ((*field) (x, y, z) - dmin) / (dmax - dmin);
     r = std::max(std::min(r, 1.), 0.);
-    double lc = lcmin * (1 - r) + lcmax * r;
+    double lc;
+    if(sigmoid){
+      double s = exp(12. * r - 6.) / (1. + exp(12. * r - 6.));
+      lc = lcmin * (1. - s) + lcmax * s;
+    }
+    else{ // linear
+      lc = lcmin * (1 - r) + lcmax * r;
+    }
     return lc;
   }
   FieldDialogBox *&dialog_box()
   {
-    static FieldDialogBox *dialogBox = NULL;
+    static FieldDialogBox *dialogBox = 0;
     return dialogBox;
   }
 };
 
-
 class GradientField:public Field
 {
   int iField, kind;
   double delta;
-public:
+ public:
   const char *get_name()
   {
     return "Gradient";
@@ -565,15 +521,16 @@ public:
   }
   FieldDialogBox *&dialog_box()
   {
-    static FieldDialogBox *dialogBox = NULL;
+    static FieldDialogBox *dialogBox = 0;
     return dialogBox;
   }
 };
+
 class CurvatureField:public Field
 {
   int iField;
   double delta;
-public:
+ public:
   const char *get_name()
   {
     return "Curvature";
@@ -606,21 +563,22 @@ public:
   }
   FieldDialogBox *&dialog_box()
   {
-    static FieldDialogBox *dialogBox = NULL;
+    static FieldDialogBox *dialogBox = 0;
     return dialogBox;
   }
 };
+
 #if defined(HAVE_GSL)
 #include <gsl/gsl_math.h>
 #include <gsl/gsl_eigen.h>
-class MaxEigenHessianField:public Field
+class MaxEigenHessianField : public Field
 {
   int iField;
   double delta;
   gsl_eigen_symm_workspace *gslwork;
   gsl_matrix *gslmat;
   gsl_vector *eigenvalues;
-public:
+ public:
   const char *get_name()
   {
     return "MaxEigenHessian";
@@ -672,17 +630,17 @@ public:
   }
   FieldDialogBox *&dialog_box()
   {
-    static FieldDialogBox *dialogBox = NULL;
+    static FieldDialogBox *dialogBox = 0;
     return dialogBox;
   }
 };
 #endif
 
-class LaplacianField:public Field
+class LaplacianField : public Field
 {
   int iField;
   double delta;
-public:
+ public:
   const char *get_name()
   {
     return "Laplacian";
@@ -704,17 +662,17 @@ public:
   }
   FieldDialogBox *&dialog_box()
   {
-    static FieldDialogBox *dialogBox = NULL;
+    static FieldDialogBox *dialogBox = 0;
     return dialogBox;
   }
 };
 
-class MeanField:public Field
+class MeanField : public Field
 {
   int iField;
   double delta;
   int n;
-public:
+ public:
   const char *get_name()
   {
     return "Mean";
@@ -737,7 +695,7 @@ public:
   }
   FieldDialogBox *&dialog_box()
   {
-    static FieldDialogBox *dialogBox = NULL;
+    static FieldDialogBox *dialogBox = 0;
     return dialogBox;
   }
 };
@@ -754,7 +712,7 @@ class MathEvalExpression
   int *evaluators_id;
   std::string function;
   char *c_str_function;
-public:
+ public:
   double evaluate(double x, double y, double z)
   {
     if(error_status)
@@ -779,11 +737,12 @@ public:
     }
     return evaluator_evaluate(eval, nvalues, names, values);
   }
-  MathEvalExpression() {
-    eval = NULL;
-    values = NULL;
-    c_str_function = NULL;
-    evaluators_id = NULL;
+  MathEvalExpression()
+  {
+    eval = 0;
+    values = 0;
+    c_str_function = 0;
+    evaluators_id = 0;
   }
   bool set_function(const std::string & f)
   {
@@ -832,11 +791,11 @@ public:
   }
 };
 
-class MathEvalField:public Field
+class MathEvalField : public Field
 {
   MathEvalExpression expr;
   std::string f;
-public:
+ public:
   MathEvalField()
   {
     options["F"] = new FieldOptionString(f, &update_needed);
@@ -853,7 +812,7 @@ public:
   }
   FieldDialogBox *&dialog_box()
   {
-    static FieldDialogBox *dialogBox = NULL;
+    static FieldDialogBox *dialogBox = 0;
     return dialogBox;
   }
   const char *get_name()
@@ -861,12 +820,13 @@ public:
     return "MathEval";
   }
 };
+
 class ParametricField:public Field
 {
   MathEvalExpression expr[3];
   std::string f[3];
   int ifield;
-public:
+ public:
   ParametricField()
   {
     options["IField"] = new FieldOptionInt(ifield);
@@ -890,7 +850,7 @@ public:
   }
   FieldDialogBox *&dialog_box()
   {
-    static FieldDialogBox *dialogBox = NULL;
+    static FieldDialogBox *dialogBox = 0;
     return dialogBox;
   }
   const char *get_name()
@@ -901,10 +861,11 @@ public:
 #endif
 
 #if !defined(HAVE_NO_POST)
-class PostViewField:public Field
+class PostViewField : public Field
 {
   OctreePost *octree;
-public:int view_index;
+ public:
+  int view_index;
   double operator() (double x, double y, double z)
   {
     // FIXME: should test unique view num instead, but that would be slower
@@ -949,26 +910,28 @@ public:int view_index;
   {
     return "PostView";
   }
-  PostViewField() {
-    octree = NULL;
+  PostViewField()
+  {
+    octree = 0;
     options["IView"] = new FieldOptionInt(view_index, &update_needed);
   }
-  ~PostViewField() {
+  ~PostViewField()
+  {
     if(octree)
       delete octree;
   }
   FieldDialogBox *&dialog_box()
   {
-    static FieldDialogBox *dialogBox = NULL;
+    static FieldDialogBox *dialogBox = 0;
     return dialogBox;
   }
 };
 #endif
 
-class MinField:public Field
+class MinField : public Field
 {
-  std::list < int >idlist;
-public:
+  std::list<int> idlist;
+ public:
   MinField()
   {
     options["FieldsList"] = new FieldOptionList(idlist, &update_needed);
@@ -986,7 +949,7 @@ public:
   }
   FieldDialogBox *&dialog_box()
   {
-    static FieldDialogBox *dialogBox = NULL;
+    static FieldDialogBox *dialogBox = 0;
     return dialogBox;
   }
   const char *get_name()
@@ -995,10 +958,10 @@ public:
   }
 };
 
-class MaxField:public Field
+class MaxField : public Field
 {
-  std::list < int >idlist;
-public:
+  std::list<int> idlist;
+ public:
   MaxField()
   {
     options["FieldsList"] = new FieldOptionList(idlist, &update_needed);
@@ -1016,7 +979,7 @@ public:
   }
   FieldDialogBox *&dialog_box()
   {
-    static FieldDialogBox *dialogBox = NULL;
+    static FieldDialogBox *dialogBox = 0;
     return dialogBox;
   }
   const char *get_name()
@@ -1026,7 +989,7 @@ public:
 };
 
 #ifdef HAVE_ANN
-class AttractorField:public Field
+class AttractorField : public Field
 {
   ANNkd_tree *kdtree;
   ANNpointArray zeronodes;
@@ -1035,7 +998,8 @@ class AttractorField:public Field
   std::list < int >nodes_id;
   std::list < int >edges_id;
   int n_nodes_by_edge;
-public:AttractorField():kdtree(0), zeronodes(0)
+ public:
+  AttractorField() : kdtree(0), zeronodes(0)
   {
     index = new ANNidx[1];
     dist = new ANNdist[1];
@@ -1122,49 +1086,49 @@ public:AttractorField():kdtree(0), zeronodes(0)
   }
   FieldDialogBox *&dialog_box()
   {
-    static FieldDialogBox *dialogBox = NULL;
+    static FieldDialogBox *dialogBox = 0;
     return dialogBox;
   }
 };
 #endif
 
-template < class F > class FieldFactoryT:public FieldFactory {
-public:
+template<class F> class FieldFactoryT : public FieldFactory {
+ public:
   Field * operator()() {
     return new F;
   };
 };
 
-template < class F > Field * field_factory()
+template<class F> Field *field_factory()
 {
   return new F();
 };
 
 FieldManager::FieldManager()
 {
-  map_type_name["Structured"] = new FieldFactoryT < StructuredField > ();
-  map_type_name["Threshold"] = new FieldFactoryT < ThresholdField > ();
-  map_type_name["Box"] = new FieldFactoryT < BoxField > ();
-  map_type_name["LonLat"] = new FieldFactoryT < LonLatField > ();
+  map_type_name["Structured"] = new FieldFactoryT<StructuredField>();
+  map_type_name["Threshold"] = new FieldFactoryT<ThresholdField>();
+  map_type_name["Box"] = new FieldFactoryT<BoxField>();
+  map_type_name["LonLat"] = new FieldFactoryT<LonLatField>();
 #if !defined(HAVE_NO_POST)
-  map_type_name["PostView"] = new FieldFactoryT < PostViewField > ();
+  map_type_name["PostView"] = new FieldFactoryT<PostViewField>();
 #endif
-  map_type_name["Gradient"] = new FieldFactoryT < GradientField > ();
-  map_type_name["Min"] = new FieldFactoryT < MinField > ();
-  map_type_name["Max"] = new FieldFactoryT < MaxField > ();
-  map_type_name["UTM"] = new FieldFactoryT < UTMField > ();
-  map_type_name["Laplacian"] = new FieldFactoryT < LaplacianField > ();
-  map_type_name["Mean"] = new FieldFactoryT < MeanField > ();
-  map_type_name["Curvature"] = new FieldFactoryT < CurvatureField > ();
+  map_type_name["Gradient"] = new FieldFactoryT<GradientField>();
+  map_type_name["Min"] = new FieldFactoryT<MinField>();
+  map_type_name["Max"] = new FieldFactoryT<MaxField>();
+  map_type_name["UTM"] = new FieldFactoryT<UTMField>();
+  map_type_name["Laplacian"] = new FieldFactoryT<LaplacianField>();
+  map_type_name["Mean"] = new FieldFactoryT<MeanField>();
+  map_type_name["Curvature"] = new FieldFactoryT<CurvatureField>();
 #if defined(HAVE_MATH_EVAL)
-  map_type_name["Param"] = new FieldFactoryT < ParametricField > ();
-  map_type_name["MathEval"] = new FieldFactoryT < MathEvalField > ();
+  map_type_name["Param"] = new FieldFactoryT<ParametricField>();
+  map_type_name["MathEval"] = new FieldFactoryT<MathEvalField>();
 #endif
 #if defined(HAVE_ANN)
-  map_type_name["Attractor"] = new FieldFactoryT < AttractorField > ();
+  map_type_name["Attractor"] = new FieldFactoryT<AttractorField>();
 #endif
 #if defined(HAVE_GSL)
-  map_type_name["MaxEigenHessian"] = new FieldFactoryT <MaxEigenHessianField > ();
+  map_type_name["MaxEigenHessian"] = new FieldFactoryT <MaxEigenHessianField>();
 #endif
   background_field = -1;
 }
diff --git a/Mesh/Field.h b/Mesh/Field.h
index d0963872dbf4e2d0d7685f1ca89c40fc641950dc..3e025c778662d2bbd67f5d7dcb1e6cec560c2dd3 100644
--- a/Mesh/Field.h
+++ b/Mesh/Field.h
@@ -29,10 +29,7 @@ typedef enum {
 class FieldOption {
  protected:
   bool *status;
-  inline void modified()
-  {
-    if(status)  *status = true;
-  }
+  inline void modified(){ if(status) *status = true; }
  public:
   FieldOption(bool *_status) : status(_status) {}
   virtual ~FieldOption() {}
diff --git a/Mesh/meshGFaceTransfinite.cpp b/Mesh/meshGFaceTransfinite.cpp
index 1b4e1bc189b946390bd87efa467c6a0408b9ea41..58a18025782ff6c19052496bdb76f1d8b9e70f8c 100644
--- a/Mesh/meshGFaceTransfinite.cpp
+++ b/Mesh/meshGFaceTransfinite.cpp
@@ -142,7 +142,7 @@ int MeshTransfiniteSurface(GFace *gf)
     int Hb = m_vertices.size() - N4;
     if(Lb != L || Hb != H){
       Msg::Error("Surface %d cannot be meshed using the transfinite algo", 
-          gf->tag());
+		 gf->tag());
       return 0;
     }
   }
@@ -150,7 +150,7 @@ int MeshTransfiniteSurface(GFace *gf)
     int Lb = m_vertices.size() - N3;      
     if(Lb != L){
       Msg::Error("Surface %d cannot be meshed using the transfinite algo %d != %d", 
-          gf->tag(), L, Lb);
+		 gf->tag(), L, Lb);
       return 0;
     }      
   }
diff --git a/benchmarks/3d/sphere_in_cube_hexa.geo b/benchmarks/3d/sphere_in_cube_hexa.geo
index 6bbb75dc1eabec47d75f4abbe640f66092ac11df..3c29e5901809f74840b4352ba8e9246b394372bc 100644
--- a/benchmarks/3d/sphere_in_cube_hexa.geo
+++ b/benchmarks/3d/sphere_in_cube_hexa.geo
@@ -1,8 +1,9 @@
 l = 1;
 r1 = 3;
 r2 = 0.5;
-n = 3;
+n = 10;
 n2 = n;
+progr = 1.4;
 
 // exterior cube
 Point(1) = {0,0,0,l};
@@ -68,7 +69,7 @@ Line(56) = {109,15};
 Line(57) = {104,4};
 Line(58) = {103,3};
 Line(59) = {106,11};
-Transfinite Line{52:59} = n2;
+Transfinite Line{52:59} = n2 Using Progression progr;
 
 Line Loop(60) = {58,-1,-52,-29};Plane Surface(61) = {60};
 Line Loop(62) = {58,18,-59,-39};Plane Surface(63) = {62};