From beb092878ed7c3bddc330717410935899644938e Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Sun, 18 Apr 2010 09:11:27 +0000
Subject: [PATCH] small cleanups

---
 Fltk/extraDialogs.cpp | 18 +++++++++---------
 Fltk/menuWindow.cpp   | 17 ++++++++---------
 Fltk/optionWindow.cpp |  2 +-
 Mesh/meshGFace.cpp    | 19 ++++++++-----------
 4 files changed, 26 insertions(+), 30 deletions(-)

diff --git a/Fltk/extraDialogs.cpp b/Fltk/extraDialogs.cpp
index 8f7298c2a5..9f51e95aa2 100644
--- a/Fltk/extraDialogs.cpp
+++ b/Fltk/extraDialogs.cpp
@@ -123,12 +123,12 @@ int perspectiveEditor()
 
   if(!editor){
     editor = new _editor;
-    editor->window = new Fl_Menu_Window(150, 20);
+    editor->window = new Fl_Menu_Window(200, 20);
     if(CTX::instance()->nonModalWindows) editor->window->set_non_modal();
-    editor->sa = new Release_Slider(0, 0, 150, 20);
+    editor->sa = new Release_Slider(0, 0, 200, 20);
     editor->sa->type(FL_HOR_NICE_SLIDER);
-    editor->sa->minimum(0.75);
-    editor->sa->maximum(12);
+    editor->sa->minimum(0.1);
+    editor->sa->maximum(20);
     editor->sa->callback(persp_change_factor);
     editor->window->border(0);
     editor->window->end();
@@ -143,7 +143,7 @@ int perspectiveEditor()
   return 0;
 }
 
-// Perspective editor (aka z-clipping planes factor slider)
+// Mesh element size editor
 
 static void mesh_size_factor(Fl_Widget* w, void* data)
 {
@@ -161,12 +161,12 @@ int meshSizeEditor()
 
   if(!editor){
     editor = new _editor;
-    editor->window = new Fl_Menu_Window(150, 20);
+    editor->window = new Fl_Menu_Window(200, 20);
     if(CTX::instance()->nonModalWindows) editor->window->set_non_modal();
-    editor->sa = new Release_Slider(0, 0, 150, 20);
+    editor->sa = new Release_Slider(0, 0, 200, 20);
     editor->sa->type(FL_HOR_NICE_SLIDER);
-    editor->sa->minimum(0.1);
-    editor->sa->maximum(2);
+    editor->sa->minimum(0.05);
+    editor->sa->maximum(5);
     editor->sa->callback(mesh_size_factor);
     editor->window->border(0);
     editor->window->end();
diff --git a/Fltk/menuWindow.cpp b/Fltk/menuWindow.cpp
index d795a4abb6..17cf6e758f 100644
--- a/Fltk/menuWindow.cpp
+++ b/Fltk/menuWindow.cpp
@@ -2570,25 +2570,24 @@ contextItem menu_geometry[] = {
 contextItem menu_mesh[] = {
   {"1Mesh"} ,
   {"Define",       (Fl_Callback *)mesh_define_cb} ,
-  {"Inspect",      (Fl_Callback *)mesh_inspect_cb} , 
-  {"Delete",       (Fl_Callback *)mesh_delete_cb} , 
   {"1D",           (Fl_Callback *)mesh_1d_cb} ,
   {"2D",           (Fl_Callback *)mesh_2d_cb} , 
   {"3D",           (Fl_Callback *)mesh_3d_cb} , 
-  {"Set order",  (Fl_Callback *)mesh_change_order_cb} , 
-  {"Refine by splitting", (Fl_Callback *)mesh_refine_cb} ,
   {"Optimize",     (Fl_Callback *)mesh_optimize_cb} , 
 #if defined(HAVE_NETGEN)
   {"Optimize (Netgen)", (Fl_Callback *)mesh_optimize_netgen_cb} , 
 #endif
+  {"Set order",    (Fl_Callback *)mesh_change_order_cb} , 
+  {"Inspect",      (Fl_Callback *)mesh_inspect_cb} , 
+  {"Refine by splitting", (Fl_Callback *)mesh_refine_cb} ,
 #if defined(HAVE_METIS) || defined(HAVE_CHACO)
-  {"Partition", (Fl_Callback *)mesh_partition_cb} ,
+  {"Partition",    (Fl_Callback *)mesh_partition_cb} ,
 #endif
+  {"Reclassify",   (Fl_Callback *)mesh_classify_cb} , 
 #if defined(HAVE_FOURIER_MODEL)
-  {"Reparameterize",   (Fl_Callback *)mesh_parameterize_cb} , 
+  {"Reparameterize", (Fl_Callback *)mesh_parameterize_cb} , 
 #endif
-  //not polished enough for public release
-  {"Reclassify",   (Fl_Callback *)mesh_classify_cb} , 
+  {"Delete",       (Fl_Callback *)mesh_delete_cb} , 
   {"Save",         (Fl_Callback *)mesh_save_cb} ,
   {""} 
 };  
@@ -2599,7 +2598,7 @@ contextItem menu_mesh[] = {
     {"Embedded points", (Fl_Callback *)mesh_define_embedded_cb, (void*)"point" } ,
     {"Recombine",   (Fl_Callback *)mesh_define_recombine_cb  } ,
     {"Transfinite", (Fl_Callback *)mesh_define_transfinite_cb  } , 
-    {"Compound", (Fl_Callback *)mesh_define_compound_cb  } , 
+    {"Compound",    (Fl_Callback *)mesh_define_compound_cb  } , 
     {""} 
   };  
     contextItem menu_mesh_define_transfinite[] = {
diff --git a/Fltk/optionWindow.cpp b/Fltk/optionWindow.cpp
index cc83f420fc..a785ff7e5c 100644
--- a/Fltk/optionWindow.cpp
+++ b/Fltk/optionWindow.cpp
@@ -1478,7 +1478,7 @@ optionWindow::optionWindow(int deltaFontSize)
       general.value[14] = new Fl_Value_Input
         (L + 2 * WB, 2 * WB + 2 * BH, IW, BH, "Z-clipping distance factor");
       general.value[14]->minimum(0.1);
-      general.value[14]->maximum(10.);
+      general.value[14]->maximum(20.);
       general.value[14]->step(0.1);
       general.value[14]->align(FL_ALIGN_RIGHT);
       general.value[14]->callback(general_options_ok_cb);
diff --git a/Mesh/meshGFace.cpp b/Mesh/meshGFace.cpp
index fa7a29eb5d..158f6df895 100644
--- a/Mesh/meshGFace.cpp
+++ b/Mesh/meshGFace.cpp
@@ -674,7 +674,6 @@ static bool meshGenerator(GFace *gf, int RECUR_ITER,
   // delete the mesh
   delete m;
 
-  //printf("to recombine gf->meshAttributes.recombine=%d \n", gf->meshAttributes.recombine);
   if(gf->meshAttributes.recombine && CTX::instance()->mesh.optimize == 0){
     recombineIntoQuads(gf);   
   }
@@ -685,14 +684,9 @@ static bool meshGenerator(GFace *gf, int RECUR_ITER,
                        gf->meshStatistics.nbTriangle,
                        gf->meshStatistics.nbGoodQuality);
 
-
-
   return true;
 }
 
-
-
-
 // this function buils a list of vertices (BDS) that are consecutive
 // in one given edge loop. We take care of periodic surfaces. In the
 // case of periodicty, some curves are present 2 times in the wire
@@ -1395,7 +1389,8 @@ void partitionAndRemesh(GFaceCompound *gf)
     GEdge *pe = gf->model()->getEdgeByTag(nume+i);//partition edge
     e_compound.push_back(pe); 
     int num_gec = nume + NE + i ;
-    Msg::Info("Parametrize Compound Line (%d) = %d discrete edge", num_gec,  pe->tag() );
+    Msg::Info("Parametrize Compound Line (%d) = %d discrete edge", 
+              num_gec, pe->tag());
     GEdgeCompound *gec = new GEdgeCompound(gf->model(), num_gec, e_compound);
     gf->model()->add(gec);
 
@@ -1410,9 +1405,11 @@ void partitionAndRemesh(GFaceCompound *gf)
     GFace *pf =  gf->model()->getFaceByTag(numf+i);//partition face 
     int num_gfc = numf + NF + i ;
     f_compound.push_back(pf);     
-    Msg::Info("Parametrize Compound Surface (%d) = %d discrete face", num_gfc,  pf->tag() );
-    GFaceCompound *gfc = new GFaceCompound(gf->model(),  num_gfc, f_compound, 
-                                           b[0], b[1], b[2], b[3], 0, gf->getTypeOfMapping() );
+    Msg::Info("Parametrize Compound Surface (%d) = %d discrete face",
+              num_gfc, pf->tag());
+    GFaceCompound *gfc = new GFaceCompound(gf->model(), num_gfc, f_compound,
+                                           b[0], b[1], b[2], b[3], 0,
+                                           gf->getTypeOfMapping());
     gfc->meshAttributes.recombine =  gf->meshAttributes.recombine;
     gf->model()->add(gfc);
 
@@ -1421,7 +1418,7 @@ void partitionAndRemesh(GFaceCompound *gf)
 
   Msg::Info("*** Mesh Compounds:");
 
-  for (int i=0; i < NE; i++){
+  for (int i = 0; i < NE; i++){
     GEdge *gec = gf->model()->getEdgeByTag(nume + NE + i);
      meshGEdge mge;
      mge(gec);
-- 
GitLab