From 68b21769d3491e5aa78c7aaad9ac4ad3b31e437c Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Sun, 20 Jun 2004 23:25:33 +0000 Subject: [PATCH] - mesh.algo -> algo2d and algo3d - replaced most of the remaining radio buttons with Fl_Choices (requires less screen real estate) --- Common/CommandLine.cpp | 8 +- Common/Context.h | 2 +- Common/DefaultOptions.h | 6 +- Common/Options.cpp | 86 ++++++++++------ Common/Options.h | 3 +- Fltk/Callbacks.cpp | 34 +++---- Fltk/GUI.cpp | 221 ++++++++++++++++++++-------------------- Fltk/GUI.h | 1 + Makefile | 3 +- Mesh/2D_Cylindrical.cpp | 6 +- Mesh/2D_Mesh.cpp | 6 +- Mesh/2D_Mesh_Aniso.cpp | 22 ++-- Mesh/Generator.cpp | 6 +- Mesh/Mesh.h | 16 +-- Plugin/Plugin.cpp | 21 ++-- 15 files changed, 213 insertions(+), 228 deletions(-) diff --git a/Common/CommandLine.cpp b/Common/CommandLine.cpp index 58d7c6ea2e..45504626a2 100644 --- a/Common/CommandLine.cpp +++ b/Common/CommandLine.cpp @@ -1,4 +1,4 @@ -// $Id: CommandLine.cpp,v 1.42 2004-06-17 21:16:57 geuzaine Exp $ +// $Id: CommandLine.cpp,v 1.43 2004-06-20 23:25:31 geuzaine Exp $ // // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // @@ -397,11 +397,11 @@ void Get_Options(int argc, char *argv[], int *nbfiles) i++; if(argv[i] != NULL) { if(!strncmp(argv[i], "iso", 3)) - CTX.mesh.algo = DELAUNAY_ISO; + CTX.mesh.algo2d = DELAUNAY_ISO; else if(!strncmp(argv[i], "tri", 3)) - CTX.mesh.algo = DELAUNAY_SHEWCHUK; + CTX.mesh.algo2d = DELAUNAY_TRIANGLE; else if(!strncmp(argv[i], "aniso", 5)) - CTX.mesh.algo = DELAUNAY_ANISO; + CTX.mesh.algo2d = DELAUNAY_ANISO; else { fprintf(stderr, ERROR_STR "Unknown mesh algorithm\n"); exit(1); diff --git a/Common/Context.h b/Common/Context.h index d57781150a..b22d843841 100644 --- a/Common/Context.h +++ b/Common/Context.h @@ -167,7 +167,7 @@ public : double scaling_factor, lc_factor, rand_factor; int dual, interactive; int light, light_two_side; - int format, nb_smoothing, algo, order; + int format, nb_smoothing, algo2d, algo3d, order; int point_insertion, speed_max, min_circ_points, constrained_bgmesh; int histogram, initial_only; double normals, tangents, explode; diff --git a/Common/DefaultOptions.h b/Common/DefaultOptions.h index 7678da05e5..36697b2ce6 100644 --- a/Common/DefaultOptions.h +++ b/Common/DefaultOptions.h @@ -699,15 +699,17 @@ StringXNumber GeometryOptions_Number[] = { } ; StringXNumber MeshOptions_Number[] = { - { F|O, "Algorithm" , opt_mesh_algo , DELAUNAY_ISO , + { F|O, "Algorithm" , opt_mesh_algo2d , DELAUNAY_ISO , "2D mesh algorithm (1=isotropic, 2=anisotropic, 3=triangle)" }, + { F|O, "Algorithm3D" , opt_mesh_algo3d , DELAUNAY_ISO , + "3D mesh algorithm (1=isotropic, 4=netgen)" }, { F, "AllowDegeneratedExtrude" , opt_mesh_allow_degenerated_extrude , 0. , "Allow the generation of degenerated hexahedra or prisms during extrusion" }, { F|O, "CharacteristicLengthFactor" , opt_mesh_lc_factor , 1.0 , "Factor applied to all characteristic lengths (and background meshes)" }, { F|O, "ColorCarousel" , opt_mesh_color_carousel , 1. , - "Color mesh by region? (0=no, 1=by elementary entity, 2=by physical entity, 3=by partition)" }, + "Mesh coloring (0=by element type, 1=by elementary entity, 2=by physical entity, 3=by partition)" }, { F|O, "ColorScheme" , opt_mesh_color_scheme , 0. , "Default mesh color scheme (0, 1 or 2)" }, { F|O, "ConstrainedBackgroundMesh" , opt_mesh_constrained_bgmesh, 0. , diff --git a/Common/Options.cpp b/Common/Options.cpp index c55ad6290b..7f2dd4cb77 100644 --- a/Common/Options.cpp +++ b/Common/Options.cpp @@ -1,4 +1,4 @@ -// $Id: Options.cpp,v 1.167 2004-06-17 21:16:57 geuzaine Exp $ +// $Id: Options.cpp,v 1.168 2004-06-20 23:25:31 geuzaine Exp $ // // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // @@ -918,10 +918,6 @@ char *opt_general_graphics_font(OPT_ARGS_STR) char *opt_mesh_triangle_options(OPT_ARGS_STR){ if(action & GMSH_SET) CTX.mesh.triangle_options = val; -#if defined(HAVE_FLTK) - if(WID && (action & GMSH_GUI)) - WID->mesh_input[0]->value(CTX.mesh.triangle_options); -#endif return CTX.mesh.triangle_options; } @@ -2230,13 +2226,11 @@ double opt_general_orthographic(OPT_ARGS_NUM) #if defined(HAVE_FLTK) if(WID && (action & GMSH_GUI)) { if(CTX.ortho){ - WID->gen_butt[10]->value(1); - WID->gen_butt[11]->value(0); + WID->gen_choice[2]->value(0); //WID->persp_bmp->label(WID->g_status_butt[4]); } else{ - WID->gen_butt[10]->value(0); - WID->gen_butt[11]->value(1); + WID->gen_choice[2]->value(1); //WID->ortho_bmp->label(WID->g_status_butt[4]); } //WID->g_status_butt[4]->redraw(); @@ -3469,27 +3463,63 @@ double opt_mesh_nb_smoothing(OPT_ARGS_NUM) return CTX.mesh.nb_smoothing; } -double opt_mesh_algo(OPT_ARGS_NUM) +double opt_mesh_algo2d(OPT_ARGS_NUM) { if(action & GMSH_SET){ int algo = (int)val; if(algo != DELAUNAY_ISO && - algo != DELAUNAY_SHEWCHUK && + algo != DELAUNAY_TRIANGLE && algo != DELAUNAY_ANISO){ Msg(WARNING, "Unknown mesh algorithm: keeping existing value"); } else{ - CTX.mesh.algo = algo; + CTX.mesh.algo2d = algo; + } + } +#if defined(HAVE_FLTK) + if(WID && (action & GMSH_GUI)) { + switch (CTX.mesh.algo2d) { + case DELAUNAY_ISO: + WID->mesh_choice[2]->value(0); + break; + case DELAUNAY_TRIANGLE: + WID->mesh_choice[2]->value(1); + break; + case DELAUNAY_ANISO: + default: + WID->mesh_choice[2]->value(2); + break; + } + } +#endif + return CTX.mesh.algo2d; +} + +double opt_mesh_algo3d(OPT_ARGS_NUM) +{ + if(action & GMSH_SET){ + int algo = (int)val; + if(algo != DELAUNAY_ISO && algo != FRONTAL_NETGEN){ + Msg(WARNING, "Unknown mesh algorithm: keeping existing value"); + } + else{ + CTX.mesh.algo3d = algo; } } #if defined(HAVE_FLTK) if(WID && (action & GMSH_GUI)) { - WID->mesh_butt[0]->value(CTX.mesh.algo == DELAUNAY_ISO); - WID->mesh_butt[1]->value(CTX.mesh.algo == DELAUNAY_SHEWCHUK); - WID->mesh_butt[2]->value(CTX.mesh.algo == DELAUNAY_ANISO); + switch (CTX.mesh.algo3d) { + case DELAUNAY_ISO: + WID->mesh_choice[3]->value(0); + break; + case FRONTAL_NETGEN: + default: + WID->mesh_choice[3]->value(1); + break; + } } #endif - return CTX.mesh.algo; + return CTX.mesh.algo3d; } double opt_mesh_point_insertion(OPT_ARGS_NUM) @@ -3668,13 +3698,12 @@ double opt_mesh_color_carousel(OPT_ARGS_NUM) if(action & GMSH_SET) { if(CTX.mesh.color_carousel != (int)val) CTX.mesh.changed = 1; CTX.mesh.color_carousel = (int)val; + if(CTX.mesh.color_carousel < 0 || CTX.mesh.color_carousel > 2) + CTX.mesh.color_carousel = 0; } #if defined(HAVE_FLTK) if(WID && (action & GMSH_GUI)){ - WID->mesh_butt[18]->value(CTX.mesh.color_carousel==0); - WID->mesh_butt[19]->value(CTX.mesh.color_carousel==1); - WID->mesh_butt[20]->value(CTX.mesh.color_carousel==2); - WID->mesh_butt[21]->value(CTX.mesh.color_carousel==3); + WID->mesh_choice[4]->value(CTX.mesh.color_carousel); } #endif return CTX.mesh.color_carousel; @@ -3867,15 +3896,14 @@ double opt_post_scales(OPT_ARGS_NUM) double opt_post_link(OPT_ARGS_NUM) { - if(action & GMSH_SET) + if(action & GMSH_SET){ CTX.post.link = (int)val; + if(CTX.post.link < 0 || CTX.post.link > 4) + CTX.post.link = 0; + } #if defined(HAVE_FLTK) if(WID && (action & GMSH_GUI)) { - WID->post_butt[0]->value(CTX.post.link == 0); - WID->post_butt[1]->value(CTX.post.link == 1); - WID->post_butt[2]->value(CTX.post.link == 2); - WID->post_butt[3]->value(CTX.post.link == 3); - WID->post_butt[4]->value(CTX.post.link == 4); + WID->post_choice[0]->value(CTX.post.link); } #endif return CTX.post.link; @@ -3885,10 +3913,6 @@ double opt_post_smooth(OPT_ARGS_NUM) { if(action & GMSH_SET) CTX.post.smooth = (int)val; -#if defined(HAVE_FLTK) - if(WID && (action & GMSH_GUI)) - WID->post_butt[5]->value(CTX.post.smooth); -#endif return CTX.post.smooth; } @@ -3909,7 +3933,7 @@ double opt_post_anim_cycle(OPT_ARGS_NUM) CTX.post.anim_cycle = (int)val; #if defined(HAVE_FLTK) if(WID && (action & GMSH_GUI)) - WID->post_butt[6]->value(CTX.post.anim_cycle); + WID->post_butt[0]->value(CTX.post.anim_cycle); if(WID) WID->check_anim_buttons(); #endif diff --git a/Common/Options.h b/Common/Options.h index d26d916b65..2268f396cf 100644 --- a/Common/Options.h +++ b/Common/Options.h @@ -367,7 +367,8 @@ double opt_mesh_light_two_side(OPT_ARGS_NUM); double opt_mesh_format(OPT_ARGS_NUM); double opt_mesh_msh_file_version(OPT_ARGS_NUM); double opt_mesh_nb_smoothing(OPT_ARGS_NUM); -double opt_mesh_algo(OPT_ARGS_NUM); +double opt_mesh_algo2d(OPT_ARGS_NUM); +double opt_mesh_algo3d(OPT_ARGS_NUM); double opt_mesh_point_insertion(OPT_ARGS_NUM); double opt_mesh_speed_max(OPT_ARGS_NUM); double opt_mesh_min_circ_points(OPT_ARGS_NUM); diff --git a/Fltk/Callbacks.cpp b/Fltk/Callbacks.cpp index eada8fae5c..e42a180dcf 100644 --- a/Fltk/Callbacks.cpp +++ b/Fltk/Callbacks.cpp @@ -1,4 +1,4 @@ -// $Id: Callbacks.cpp,v 1.248 2004-06-17 21:16:57 geuzaine Exp $ +// $Id: Callbacks.cpp,v 1.249 2004-06-20 23:25:31 geuzaine Exp $ // // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // @@ -866,7 +866,6 @@ void general_options_ok_cb(CALLBACK_ARGS) if(sessionrc && !opt_general_session_save(0, GMSH_GET, 0)) Print_Options(0, GMSH_SESSIONRC, true, CTX.session_filename_fullpath); opt_general_options_save(0, GMSH_SET, WID->gen_butt[9]->value()); - opt_general_orthographic(0, GMSH_SET | GMSH_GUI, WID->gen_butt[10]->value()); opt_general_tooltips(0, GMSH_SET, WID->gen_butt[13]->value()); opt_general_confirm_overwrite(0, GMSH_SET, WID->gen_butt[14]->value()); opt_general_rotation_center_cg(0, GMSH_SET, WID->gen_butt[15]->value()); @@ -905,6 +904,7 @@ void general_options_ok_cb(CALLBACK_ARGS) } opt_general_vector_type(0, GMSH_SET, val); opt_general_graphics_font(0, GMSH_SET, (char *)WID->gen_choice[1]->text()); + opt_general_orthographic(0, GMSH_SET | GMSH_GUI, !WID->gen_choice[2]->value()); } void general_arrow_param_cb(CALLBACK_ARGS) @@ -972,10 +972,6 @@ void mesh_options_color_scheme_cb(CALLBACK_ARGS) void mesh_options_ok_cb(CALLBACK_ARGS) { - opt_mesh_algo(0, GMSH_SET, - WID->mesh_butt[0]->value()? DELAUNAY_ISO : - WID->mesh_butt[1]->value()? DELAUNAY_SHEWCHUK : - DELAUNAY_ANISO); opt_mesh_order(0, GMSH_SET, WID->mesh_butt[3]->value()? 2 : 1); opt_mesh_interactive(0, GMSH_SET, WID->mesh_butt[4]->value()); opt_mesh_constrained_bgmesh(0, GMSH_SET, WID->mesh_butt[5]->value()); @@ -993,11 +989,6 @@ void mesh_options_ok_cb(CALLBACK_ARGS) opt_mesh_cut_plane_as_surface(0, GMSH_SET, WID->mesh_butt[22]->value()); opt_mesh_light(0, GMSH_SET, WID->mesh_butt[17]->value()); opt_mesh_light_two_side(0, GMSH_SET, WID->mesh_butt[23]->value()); - opt_mesh_color_carousel(0, GMSH_SET, - WID->mesh_butt[18]->value()? 0 : - WID->mesh_butt[19]->value()? 1 : - WID->mesh_butt[20]->value()? 2 : - 3); opt_mesh_nb_smoothing(0, GMSH_SET, WID->mesh_value[0]->value()); opt_mesh_scaling_factor(0, GMSH_SET, WID->mesh_value[1]->value()); @@ -1019,8 +1010,14 @@ void mesh_options_ok_cb(CALLBACK_ARGS) opt_mesh_point_type(0, GMSH_SET, WID->mesh_choice[0]->value()); opt_mesh_line_type(0, GMSH_SET, WID->mesh_choice[1]->value()); - - opt_mesh_triangle_options(0, GMSH_SET, (char *)WID->mesh_input[0]->value()); + opt_mesh_algo2d(0, GMSH_SET, + (WID->mesh_choice[2]->value() == 0) ? DELAUNAY_ISO : + (WID->mesh_choice[2]->value() == 1) ? DELAUNAY_TRIANGLE : + DELAUNAY_ANISO); + opt_mesh_algo3d(0, GMSH_SET, + (WID->mesh_choice[3]->value() == 0) ? DELAUNAY_ISO : + FRONTAL_NETGEN); + opt_mesh_color_carousel(0, GMSH_SET, WID->mesh_choice[4]->value()); } // Solver options @@ -1043,16 +1040,11 @@ void post_options_cb(CALLBACK_ARGS) void post_options_ok_cb(CALLBACK_ARGS) { - opt_post_link(0, GMSH_SET, - WID->post_butt[0]->value()? 0 : - WID->post_butt[1]->value()? 1 : - WID->post_butt[2]->value()? 2 : - WID->post_butt[3]->value()? 3 : 4); - - opt_post_smooth(0, GMSH_SET, WID->post_butt[5]->value()); - opt_post_anim_cycle(0, GMSH_SET, WID->post_butt[6]->value()); + opt_post_anim_cycle(0, GMSH_SET, WID->post_butt[0]->value()); opt_post_anim_delay(0, GMSH_SET, WID->post_value[0]->value()); + + opt_post_link(0, GMSH_SET, WID->post_choice[0]->value()); } // Statistics Menu diff --git a/Fltk/GUI.cpp b/Fltk/GUI.cpp index 4238f1e423..223a93de0b 100644 --- a/Fltk/GUI.cpp +++ b/Fltk/GUI.cpp @@ -1,4 +1,4 @@ -// $Id: GUI.cpp,v 1.316 2004-06-12 18:34:31 geuzaine Exp $ +// $Id: GUI.cpp,v 1.317 2004-06-20 23:25:31 geuzaine Exp $ // // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // @@ -1526,45 +1526,46 @@ void GUI::create_option_window() Fl_Group *o = new Fl_Group(WB, WB + BH, width - 2 * WB, height - 2 * WB - BH, "Aspect"); o->hide(); - gen_butt[10] = new Fl_Check_Button(2 * WB, 2 * WB + 1 * BH, BW, BH, "Orthographic projection"); - gen_butt[11] = new Fl_Check_Button(2 * WB, 2 * WB + 2 * BH, BW, BH, "Perspective projection"); - for(i = 10; i < 12; i++) { - gen_butt[i]->type(FL_RADIO_BUTTON); - gen_butt[i]->down_box(RADIO_BOX); - gen_butt[i]->selection_color(RADIO_COLOR); - } + static Fl_Menu_Item menu_projection[] = { + {"Orthographic", 0, 0, 0}, + {"Perspective", 0, 0, 0}, + {0} + }; + gen_choice[2] = new Fl_Choice(2 * WB, 2 * WB + 1 * BH, IW, BH, "Projection mode"); + gen_choice[2]->menu(menu_projection); + gen_choice[2]->align(FL_ALIGN_RIGHT); - gen_value[2] = new Fl_Value_Input(2 * WB, 2 * WB + 3 * BH, IW/3, BH); + gen_value[2] = new Fl_Value_Input(2 * WB, 2 * WB + 2 * BH, IW/3, BH); gen_value[2]->minimum(-1); gen_value[2]->maximum(1); gen_value[2]->step(0.01); - gen_value[3] = new Fl_Value_Input(2 * WB + IW / 3, 2 * WB + 3 * BH, IW/3, BH); + gen_value[3] = new Fl_Value_Input(2 * WB + IW / 3, 2 * WB + 2 * BH, IW/3, BH); gen_value[3]->minimum(-1); gen_value[3]->maximum(1); gen_value[3]->step(0.01); - gen_value[4] = new Fl_Value_Input(2 * WB + 2 * IW / 3, 2 * WB + 3 * BH, IW/3, BH, "Light position"); + gen_value[4] = new Fl_Value_Input(2 * WB + 2 * IW / 3, 2 * WB + 2 * BH, IW/3, BH, "Light position"); gen_value[4]->minimum(-1); gen_value[4]->maximum(1); gen_value[4]->step(0.01); gen_value[4]->align(FL_ALIGN_RIGHT); - gen_value[1] = new Fl_Value_Input(2 * WB, 2 * WB + 4 * BH, IW, BH, "Material shininess"); + gen_value[1] = new Fl_Value_Input(2 * WB, 2 * WB + 3 * BH, IW, BH, "Material shininess"); gen_value[1]->minimum(0); gen_value[1]->maximum(10); gen_value[1]->step(0.1); gen_value[1]->align(FL_ALIGN_RIGHT); - gen_value[11] = new Fl_Value_Input(2 * WB, 2 * WB + 5 * BH, IW, BH, "Quadric subdivisions"); + gen_value[11] = new Fl_Value_Input(2 * WB, 2 * WB + 4 * BH, IW, BH, "Quadric subdivisions"); gen_value[11]->minimum(3); gen_value[11]->maximum(30); gen_value[11]->step(1); gen_value[11]->align(FL_ALIGN_RIGHT); - gen_value[6] = new Fl_Value_Input(2 * WB, 2 * WB + 6 * BH, IW, BH, "Point size"); + gen_value[6] = new Fl_Value_Input(2 * WB, 2 * WB + 5 * BH, IW, BH, "Point size"); gen_value[6]->minimum(0.1); gen_value[6]->maximum(50); gen_value[6]->step(0.1); - gen_value[7] = new Fl_Value_Input(2 * WB, 2 * WB + 7 * BH, IW, BH, "Line width"); + gen_value[7] = new Fl_Value_Input(2 * WB, 2 * WB + 6 * BH, IW, BH, "Line width"); gen_value[7]->minimum(0.1); gen_value[7]->maximum(50); gen_value[7]->step(0.1); @@ -1579,19 +1580,18 @@ void GUI::create_option_window() {"3D arrow", 0, 0, 0}, {0} }; - gen_choice[0] = new Fl_Choice(2 * WB, 2 * WB + 8 * BH, IW, BH, "Vector display"); + gen_choice[0] = new Fl_Choice(2 * WB, 2 * WB + 7 * BH, IW, BH, "Vector display"); gen_choice[0]->menu(menu_genvectype); gen_choice[0]->align(FL_ALIGN_RIGHT); - gen_choice[0]->callback(set_changed_cb, 0); - Fl_Button *b = new Fl_Button(2 * IW - 2 * WB, 2 * WB + 8 * BH, (int)(1.5*BB), BH, "Edit arrow shape"); + Fl_Button *b = new Fl_Button(2 * IW - 2 * WB, 2 * WB + 7 * BH, (int)(1.5*BB), BH, "Edit arrow shape"); b->callback(general_arrow_param_cb); - gen_choice[1] = new Fl_Choice(2 * WB, 2 * WB + 9 * BH, IW, BH, "Font"); + gen_choice[1] = new Fl_Choice(2 * WB, 2 * WB + 8 * BH, IW, BH, "Font"); gen_choice[1]->menu(menu_font_names); gen_choice[1]->align(FL_ALIGN_RIGHT); - gen_value[12] = new Fl_Value_Input(2 * WB, 2 * WB + 10 * BH, IW, BH, "Font size"); + gen_value[12] = new Fl_Value_Input(2 * WB, 2 * WB + 9 * BH, IW, BH, "Font size"); gen_value[12]->minimum(5); gen_value[12]->maximum(40); gen_value[12]->step(1); @@ -1672,7 +1672,6 @@ void GUI::create_option_window() geo_butt[9]->type(FL_TOGGLE_BUTTON); geo_butt[9]->down_box(TOGGLE_BOX); geo_butt[9]->selection_color(TOGGLE_COLOR); - geo_butt[9]->callback(set_changed_cb, 0); geo_choice[0] = new Fl_Choice(2 * WB, 2 * WB + 2 * BH, IW, BH, "Point display"); geo_choice[0]->menu(menu_point_display); @@ -1741,19 +1740,44 @@ void GUI::create_option_window() Fl_Group *o = new Fl_Group(WB, WB + BH, width - 2 * WB, height - 2 * WB - BH, "General"); o->hide(); - mesh_value[0] = new Fl_Value_Input(2 * WB, 2 * WB + 1 * BH, IW, BH, "Number of smoothing steps"); + static Fl_Menu_Item menu_2d_algo[] = { + {"Isotropic", 0, 0, 0}, + {"Triangle", 0, 0, 0}, + {"Anisotropic", 0, 0, 0}, + {0} + }; + static Fl_Menu_Item menu_3d_algo[] = { + {"Isotropic", 0, 0, 0}, + {"Netgen", 0, 0, 0}, + {0} + }; + + mesh_choice[2] = new Fl_Choice(2 * WB, 2 * WB + 1 * BH, IW, BH, "2D algorithm"); + mesh_choice[2]->menu(menu_2d_algo); + mesh_choice[2]->align(FL_ALIGN_RIGHT); + + mesh_choice[3] = new Fl_Choice(2 * WB, 2 * WB + 2 * BH, IW, BH, "3D algorithm"); + mesh_choice[3]->menu(menu_3d_algo); + mesh_choice[3]->align(FL_ALIGN_RIGHT); + + mesh_butt[4] = new Fl_Check_Button(2 * WB, 2 * WB + 3 * BH, BW, BH, "Show interactive anisotropic mesh construction"); + mesh_butt[4]->type(FL_TOGGLE_BUTTON); + mesh_butt[4]->down_box(TOGGLE_BOX); + mesh_butt[4]->selection_color(TOGGLE_COLOR); + + mesh_value[0] = new Fl_Value_Input(2 * WB, 2 * WB + 4 * BH, IW, BH, "Number of smoothing steps"); mesh_value[0]->minimum(0); mesh_value[0]->maximum(100); mesh_value[0]->step(1); - mesh_value[1] = new Fl_Value_Input(2 * WB, 2 * WB + 2 * BH, IW, BH, "Mesh scaling factor"); + mesh_value[1] = new Fl_Value_Input(2 * WB, 2 * WB + 5 * BH, IW, BH, "Mesh scaling factor"); mesh_value[1]->minimum(0.001); mesh_value[1]->maximum(1000); mesh_value[1]->step(0.001); - mesh_value[2] = new Fl_Value_Input(2 * WB, 2 * WB + 3 * BH, IW, BH, "Characteristic length factor"); + mesh_value[2] = new Fl_Value_Input(2 * WB, 2 * WB + 6 * BH, IW, BH, "Characteristic length factor"); mesh_value[2]->minimum(0.001); mesh_value[2]->maximum(1000); mesh_value[2]->step(0.001); - mesh_value[3] = new Fl_Value_Input(2 * WB, 2 * WB + 4 * BH, IW, BH, "Random perturbation factor"); + mesh_value[3] = new Fl_Value_Input(2 * WB, 2 * WB + 7 * BH, IW, BH, "Random perturbation factor"); mesh_value[3]->minimum(1.e-6); mesh_value[3]->maximum(1.e-1); mesh_value[3]->step(1.e-6); @@ -1761,44 +1785,18 @@ void GUI::create_option_window() mesh_value[i]->align(FL_ALIGN_RIGHT); } - mesh_butt[3] = new Fl_Check_Button(2 * WB, 2 * WB + 5 * BH, BW, BH, "Generate second order elements"); + mesh_butt[3] = new Fl_Check_Button(2 * WB, 2 * WB + 8 * BH, BW, BH, "Generate second order elements"); mesh_butt[3]->type(FL_TOGGLE_BUTTON); mesh_butt[3]->down_box(TOGGLE_BOX); mesh_butt[3]->selection_color(TOGGLE_COLOR); - mesh_butt[5] = new Fl_Check_Button(2 * WB, 2 * WB + 6 * BH, BW, BH, "Constrain background mesh"); + mesh_butt[5] = new Fl_Check_Button(2 * WB, 2 * WB + 9 * BH, BW, BH, "Constrain background mesh"); mesh_butt[5]->type(FL_TOGGLE_BUTTON); mesh_butt[5]->down_box(TOGGLE_BOX); mesh_butt[5]->selection_color(TOGGLE_COLOR); o->end(); } - { - Fl_Group *o = new Fl_Group(WB, WB + BH, width - 2 * WB, height - 2 * WB - BH, "2D"); - o->hide(); - - mesh_butt[0] = new Fl_Check_Button(2 * WB, 2 * WB + 1 * BH, BW, BH, "Isotropic algorithm"); - mesh_butt[1] = new Fl_Check_Button(2 * WB, 2 * WB + 2 * BH, BW - 8 * fontsize - WB, BH, "Isotropic algorithm: Triangle, with options "); - mesh_butt[2] = new Fl_Check_Button(2 * WB, 2 * WB + 3 * BH, BW, BH, "Anisotropic algorithm"); - for(i = 0; i < 3; i++) { - mesh_butt[i]->type(FL_RADIO_BUTTON); - mesh_butt[i]->down_box(RADIO_BOX); - mesh_butt[i]->selection_color(RADIO_COLOR); - } - - mesh_input[0] = new Fl_Input(width - 2 * WB - 8 * fontsize, 2 * WB + 2 * BH, 8 * fontsize, BH); - -#if !defined(HAVE_TRIANGLE) - mesh_butt[1]->deactivate(); - mesh_input[0]->deactivate(); -#endif - mesh_butt[4] = new Fl_Check_Button(2 * WB, 2 * WB + 4 * BH, BW, BH, "Interactive"); - mesh_butt[4]->type(FL_TOGGLE_BUTTON); - mesh_butt[4]->down_box(TOGGLE_BOX); - mesh_butt[4]->selection_color(TOGGLE_COLOR); - - o->end(); - } { Fl_Group *o = new Fl_Group(WB, WB + BH, width - 2 * WB, height - 2 * WB - BH, "Visibility"); mesh_butt[6] = new Fl_Check_Button(2 * WB, 2 * WB + 1 * BH, BW / 2 - WB, BH, "Nodes"); @@ -1844,6 +1842,27 @@ void GUI::create_option_window() o->end(); } + { + Fl_Group *o = new Fl_Group(WB, WB + BH, width - 2 * WB, height - 2 * WB - BH, "Cut plane"); + o->hide(); + mesh_butt[16] = new Fl_Check_Button(2 * WB, 2 * WB + 1 * BH, BW, BH, "Enable"); + mesh_butt[16]->type(FL_TOGGLE_BUTTON); + mesh_butt[16]->down_box(TOGGLE_BOX); + mesh_butt[16]->selection_color(TOGGLE_COLOR); + mesh_butt[22] = new Fl_Check_Button(2 * WB, 2 * WB + 2 * BH, BW, BH, "Draw intersecting volume layer as surface"); + mesh_butt[22]->type(FL_TOGGLE_BUTTON); + mesh_butt[22]->down_box(TOGGLE_BOX); + mesh_butt[22]->selection_color(TOGGLE_COLOR); + + mesh_value[14] = new Fl_Value_Input(2 * WB, 2 * WB + 3 * BH, IW, BH, "A"); + mesh_value[15] = new Fl_Value_Input(2 * WB, 2 * WB + 4 * BH, IW, BH, "B"); + mesh_value[16] = new Fl_Value_Input(2 * WB, 2 * WB + 5 * BH, IW, BH, "C"); + mesh_value[17] = new Fl_Value_Input(2 * WB, 2 * WB + 6 * BH, IW, BH, "D"); + for(i = 14; i <= 17; i++) { + mesh_value[i]->align(FL_ALIGN_RIGHT); + } + o->end(); + } { Fl_Group *o = new Fl_Group(WB, WB + BH, width - 2 * WB, height - 2 * WB - BH, "Aspect"); o->hide(); @@ -1887,54 +1906,35 @@ void GUI::create_option_window() { Fl_Group *o = new Fl_Group(WB, WB + BH, width - 2 * WB, height - 2 * WB - BH, "Colors"); o->hide(); - mesh_butt[18] = new Fl_Check_Button(2 * WB, 2 * WB + 1 * BH, BW / 2 - WB, BH, "Color by element type"); - mesh_butt[19] = new Fl_Check_Button(2 * WB, 2 * WB + 2 * BH, BW / 2 - WB, BH, "Color by elementary entity"); - mesh_butt[20] = new Fl_Check_Button(width / 2, 2 * WB + 1 * BH, BW / 2 - WB, BH, "Color by physical entity"); - mesh_butt[21] = new Fl_Check_Button(width / 2, 2 * WB + 2 * BH, BW / 2 - WB, BH, "Color by partition"); - for(i = 18; i < 22; i++) { - mesh_butt[i]->type(FL_RADIO_BUTTON); - mesh_butt[i]->down_box(RADIO_BOX); - mesh_butt[i]->selection_color(RADIO_COLOR); - } - mesh_value[12] = new Fl_Value_Input(2 * WB, 2 * WB + 3 * BH, IW, BH, "Predefined color scheme"); + static Fl_Menu_Item menu_mesh_color[] = { + {"By element type", 0, 0, 0}, + {"By elementary entity", 0, 0, 0}, + {"By physical entity", 0, 0, 0}, + {"By partition", 0, 0, 0}, + {0} + }; + mesh_choice[4] = new Fl_Choice(2 * WB, 2 * WB + 1 * BH, IW, BH, "Coloring mode"); + mesh_choice[4]->menu(menu_mesh_color); + mesh_choice[4]->align(FL_ALIGN_RIGHT); + + mesh_value[12] = new Fl_Value_Input(2 * WB, 2 * WB + 2 * BH, IW, BH, "Predefined color scheme"); mesh_value[12]->minimum(0); mesh_value[12]->maximum(2); mesh_value[12]->step(1); mesh_value[12]->align(FL_ALIGN_RIGHT); mesh_value[12]->callback(mesh_options_color_scheme_cb); - Fl_Scroll *s = new Fl_Scroll(2 * WB, 3 * WB + 4 * BH, IW + 20, height - 5 * WB - 4 * BH); + Fl_Scroll *s = new Fl_Scroll(2 * WB, 3 * WB + 3 * BH, IW + 20, height - 5 * WB - 3 * BH); i = 0; while(MeshOptions_Color[i].str) { - mesh_col[i] = new Fl_Button(2 * WB, 3 * WB + (4 + i) * BH, IW, BH, MeshOptions_Color[i].str); + mesh_col[i] = new Fl_Button(2 * WB, 3 * WB + (3 + i) * BH, IW, BH, MeshOptions_Color[i].str); mesh_col[i]->callback(color_cb, (void *)MeshOptions_Color[i].function); i++; } s->end(); o->end(); } - { - Fl_Group *o = new Fl_Group(WB, WB + BH, width - 2 * WB, height - 2 * WB - BH, "Cut plane"); - o->hide(); - mesh_butt[16] = new Fl_Check_Button(2 * WB, 2 * WB + 1 * BH, BW, BH, "Enable"); - mesh_butt[16]->type(FL_TOGGLE_BUTTON); - mesh_butt[16]->down_box(TOGGLE_BOX); - mesh_butt[16]->selection_color(TOGGLE_COLOR); - mesh_butt[22] = new Fl_Check_Button(2 * WB, 2 * WB + 2 * BH, BW, BH, "Draw intersecting volume layer as surface"); - mesh_butt[22]->type(FL_TOGGLE_BUTTON); - mesh_butt[22]->down_box(TOGGLE_BOX); - mesh_butt[22]->selection_color(TOGGLE_COLOR); - - mesh_value[14] = new Fl_Value_Input(2 * WB, 2 * WB + 3 * BH, IW, BH, "A"); - mesh_value[15] = new Fl_Value_Input(2 * WB, 2 * WB + 4 * BH, IW, BH, "B"); - mesh_value[16] = new Fl_Value_Input(2 * WB, 2 * WB + 5 * BH, IW, BH, "C"); - mesh_value[17] = new Fl_Value_Input(2 * WB, 2 * WB + 6 * BH, IW, BH, "D"); - for(i = 14; i <= 17; i++) { - mesh_value[i]->align(FL_ALIGN_RIGHT); - } - o->end(); - } o->end(); } mesh_window->end(); @@ -1946,7 +1946,7 @@ void GUI::create_option_window() { Fl_Tabs *o = new Fl_Tabs(WB, WB, width - 2 * WB, height - 2 * WB); { - Fl_Group *o = new Fl_Group(WB, WB + BH, width - 2 * WB, height - 2 * WB - BH, "Solver"); + Fl_Group *o = new Fl_Group(WB, WB + BH, width - 2 * WB, height - 2 * WB - BH, "General"); Fl_Box *text = new Fl_Box(FL_NO_BOX, 2 * WB, 3 * WB + 1 * BH, width - 4 * WB, 2 * BH, "There are no global solver options available yet.\n\n" @@ -1966,37 +1966,32 @@ void GUI::create_option_window() { Fl_Tabs *o = new Fl_Tabs(WB, WB, width - 2 * WB, height - 2 * WB); { - Fl_Group *o = new Fl_Group(WB, WB + BH, width - 2 * WB, height - 2 * WB - BH, "Links"); - post_butt[0] = new Fl_Check_Button(2 * WB, 2 * WB + 1 * BH, BW, BH, "Independent views"); - post_butt[1] = new Fl_Check_Button(2 * WB, 2 * WB + 2 * BH, BW, BH, "Apply next changes to all visible views"); - post_butt[2] = new Fl_Check_Button(2 * WB, 2 * WB + 3 * BH, BW, BH, "Apply next changes to all views"); - post_butt[3] = new Fl_Check_Button(2 * WB, 2 * WB + 4 * BH, BW, BH, "Force same options for all visible views"); - post_butt[4] = new Fl_Check_Button(2 * WB, 2 * WB + 5 * BH, BW, BH, "Force same options for all views"); - for(i = 0; i < 5; i++) { - post_butt[i]->type(FL_RADIO_BUTTON); - post_butt[i]->down_box(RADIO_BOX); - post_butt[i]->selection_color(RADIO_COLOR); - } - o->end(); - } - { - Fl_Group *o = new Fl_Group(WB, WB + BH, width - 2 * WB, height - 2 * WB - BH, "Miscellaneous"); - o->hide(); - post_value[0] = new Fl_Value_Input(2 * WB, 2 * WB + 1 * BH, IW, BH, "Animation delay"); + Fl_Group *o = new Fl_Group(WB, WB + BH, width - 2 * WB, height - 2 * WB - BH, "General"); + + static Fl_Menu_Item menu_links[] = { + {"None", 0, 0, 0}, + {"Apply next changes to all visible views", 0, 0, 0}, + {"Apply next changes to all views", 0, 0, 0}, + {"Force same options for all visible views", 0, 0, 0}, + {"Force same options for all views", 0, 0, 0}, + {0} + }; + + post_choice[0] = new Fl_Choice(2 * WB, 2 * WB + 1 * BH, IW, BH, "View links"); + post_choice[0]->menu(menu_links); + post_choice[0]->align(FL_ALIGN_RIGHT); + + post_value[0] = new Fl_Value_Input(2 * WB, 2 * WB + 2 * BH, IW, BH, "Animation delay"); post_value[0]->minimum(0); post_value[0]->maximum(10); post_value[0]->step(0.01); post_value[0]->align(FL_ALIGN_RIGHT); - post_butt[6] = new Fl_Check_Button(2 * WB, 2 * WB + 2 * BH, BW, BH, "Cycle through views instead of time steps"); - post_butt[6]->type(FL_TOGGLE_BUTTON); - post_butt[6]->down_box(TOGGLE_BOX); - post_butt[6]->selection_color(TOGGLE_COLOR); + post_butt[0] = new Fl_Check_Button(2 * WB, 2 * WB + 3 * BH, BW, BH, "Cycle through views instead of time steps"); + post_butt[0]->type(FL_TOGGLE_BUTTON); + post_butt[0]->down_box(TOGGLE_BOX); + post_butt[0]->selection_color(TOGGLE_COLOR); - post_butt[5] = new Fl_Check_Button(2 * WB, 2 * WB + 3 * BH, BW, BH, "Smooth views during merge"); - post_butt[5]->type(FL_TOGGLE_BUTTON); - post_butt[5]->down_box(TOGGLE_BOX); - post_butt[5]->selection_color(TOGGLE_COLOR); o->end(); } o->end(); @@ -2732,7 +2727,7 @@ PluginDialogBox *GUI::create_plugin_window(GMSH_Plugin * p) Fl_Button *cancel = new Fl_Button(width - BB - WB, height - BH - WB, BB, BH, "Cancel"); cancel->callback(cancel_cb, (void *)pdb->main_window); - pdb->main_window->resizable(new Fl_Box(2 * WB, 2 * WB + BH, 10, 10)); + //pdb->main_window->resizable(new Fl_Box(2 * WB, 2 * WB + BH, 10, 10)); pdb->main_window->position(m_window->x() + m_window->w() / 2 - width / 2, m_window->y() + 6 * BH); diff --git a/Fltk/GUI.h b/Fltk/GUI.h index 02d5d2ce13..b19dba523f 100644 --- a/Fltk/GUI.h +++ b/Fltk/GUI.h @@ -185,6 +185,7 @@ public: Fl_Window *post_window ; Fl_Check_Button *post_butt[20] ; Fl_Value_Input *post_value[20] ; + Fl_Choice *post_choice[20] ; // view options int view_number ; diff --git a/Makefile b/Makefile index fc54e13fc6..7a7b1b6f91 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.351 2004-06-13 20:46:20 geuzaine Exp $ +# $Id: Makefile,v 1.352 2004-06-20 23:25:31 geuzaine Exp $ # # Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle # @@ -56,6 +56,7 @@ install: variables install-mac: variables package-mac cp -rf gmsh-${GMSH_VERSION}/Gmsh.app /Applications + rm -rf gmsh-${GMSH_VERSION} gmsh-${GMSH_VERSION}-MacOSX.tgz variables: configure @echo "********************************************************************" diff --git a/Mesh/2D_Cylindrical.cpp b/Mesh/2D_Cylindrical.cpp index 47c021b91f..a0e1684fe0 100644 --- a/Mesh/2D_Cylindrical.cpp +++ b/Mesh/2D_Cylindrical.cpp @@ -1,4 +1,4 @@ -// $Id: 2D_Cylindrical.cpp,v 1.16 2004-02-07 01:40:20 geuzaine Exp $ +// $Id: 2D_Cylindrical.cpp,v 1.17 2004-06-20 23:25:32 geuzaine Exp $ // // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // @@ -290,9 +290,9 @@ int MeshCylindricalSurface(Surface * s) ori = Calcule_Contours(s); MAXIMUM_LC_FOR_SURFACE = SURF->Cyl.radius1 / 3.; - if(CTX.mesh.algo == DELAUNAY_ISO) + if(CTX.mesh.algo2d == DELAUNAY_ISO) Maillage_Automatique_VieuxCode(s, THEM, ori); - else if(CTX.mesh.algo == DELAUNAY_ANISO) + else if(CTX.mesh.algo2d == DELAUNAY_ANISO) AlgorithmeMaillage2DAnisotropeModeJF(s); else Mesh_Shewchuk(s); diff --git a/Mesh/2D_Mesh.cpp b/Mesh/2D_Mesh.cpp index 6a5455677e..17724ce5e8 100644 --- a/Mesh/2D_Mesh.cpp +++ b/Mesh/2D_Mesh.cpp @@ -1,4 +1,4 @@ -// $Id: 2D_Mesh.cpp,v 1.58 2004-05-26 00:33:37 geuzaine Exp $ +// $Id: 2D_Mesh.cpp,v 1.59 2004-06-20 23:25:32 geuzaine Exp $ // // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // @@ -828,9 +828,9 @@ void Maillage_Surface(void *data, void *dum) ori = Calcule_Contours(s); - if(CTX.mesh.algo == DELAUNAY_ISO) + if(CTX.mesh.algo2d == DELAUNAY_ISO) Maillage_Automatique_VieuxCode(s, THEM, ori); - else if(CTX.mesh.algo == DELAUNAY_ANISO) + else if(CTX.mesh.algo2d == DELAUNAY_ANISO) AlgorithmeMaillage2DAnisotropeModeJF(s); else Mesh_Shewchuk(s); diff --git a/Mesh/2D_Mesh_Aniso.cpp b/Mesh/2D_Mesh_Aniso.cpp index e0ad61b3e3..ed66192b4b 100644 --- a/Mesh/2D_Mesh_Aniso.cpp +++ b/Mesh/2D_Mesh_Aniso.cpp @@ -1,4 +1,4 @@ -// $Id: 2D_Mesh_Aniso.cpp,v 1.41 2004-05-26 01:29:29 geuzaine Exp $ +// $Id: 2D_Mesh_Aniso.cpp,v 1.42 2004-06-20 23:25:32 geuzaine Exp $ // // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // @@ -39,15 +39,6 @@ inline void cgsmpl(Simplex * s, double &x, double &y) y = (1. / 3.) * (s->V[0]->Pos.Y + s->V[1]->Pos.Y + s->V[2]->Pos.Y); } -MeshParameters::MeshParameters() - : NbSmoothing(3), - DelaunayAlgorithm(DELAUNAY_ANISO), - DelaunayInsertionMethod(INSERTION_CENTROID), - DelaunayQuality(QUALITY_EDGES_BASED), InteractiveDelaunay(false) -{ - ; -} - extern Simplex MyNewBoundary; extern Mesh *THEM; extern double MAXIMUM_LC_FOR_SURFACE; @@ -542,7 +533,7 @@ bool draw_simplex2d(Surface * sur, Simplex * s, bool nouv) double x[3], y[3], z[3]; Vertex v1, v2, v3; - if(!THEM->MeshParams.InteractiveDelaunay) + if(!CTX.mesh.interactive) return false; if(s == &MyNewBoundary || !s || !s->iEnt) @@ -939,11 +930,10 @@ Vertex *NewVertex_2D(Simplex * s) 0.0, lc, 0.0); */ - if(THEM->MeshParams.DelaunayInsertionMethod == INSERTION_CENTROID) - v = - Create_Vertex(++THEM->MaxPointNum, s->Center.X, s->Center.Y, 0.0, lc, - 0.0); - else if(THEM->MeshParams.DelaunayInsertionMethod == INSERTION_EDGE) { + if(1){ // INSERTION_CENTROID + v = Create_Vertex(++THEM->MaxPointNum, s->Center.X, s->Center.Y, 0.0, lc, 0.0); + } + else{ // INSERTION_EDGE Vertex *vv[2]; double l = THEM->Metric->getWorstEdge(s, PARAMETRIC, vv); double f = 0.5; diff --git a/Mesh/Generator.cpp b/Mesh/Generator.cpp index ed242cecfd..b6e512944a 100644 --- a/Mesh/Generator.cpp +++ b/Mesh/Generator.cpp @@ -1,4 +1,4 @@ -// $Id: Generator.cpp,v 1.53 2004-05-25 04:10:05 geuzaine Exp $ +// $Id: Generator.cpp,v 1.54 2004-06-20 23:25:32 geuzaine Exp $ // // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // @@ -375,10 +375,6 @@ void mai3d(Mesh * M, int Asked) return; } - M->MeshParams.DelaunayAlgorithm = CTX.mesh.algo; - M->MeshParams.NbSmoothing = CTX.mesh.nb_smoothing; - M->MeshParams.InteractiveDelaunay = CTX.mesh.interactive; - oldstatus = M->status; // re-read data diff --git a/Mesh/Mesh.h b/Mesh/Mesh.h index b1488d49a4..4f3cb679be 100644 --- a/Mesh/Mesh.h +++ b/Mesh/Mesh.h @@ -390,21 +390,10 @@ typedef struct{ #define QUALITY_EDGES_BASED 1 #define QUALITY_SIMPLEX_BASED 2 -#define INSERTION_CENTROID 1 -#define INSERTION_EDGE 2 #define DELAUNAY_ISO 1 #define DELAUNAY_ANISO 2 -#define DELAUNAY_SHEWCHUK 3 - -class MeshParameters{ - public: - int NbSmoothing; - int DelaunayAlgorithm; - int DelaunayInsertionMethod; - int DelaunayQuality; - bool InteractiveDelaunay; - MeshParameters(); -}; +#define DELAUNAY_TRIANGLE 3 +#define FRONTAL_NETGEN 4 struct _Mesh{ char name[256]; @@ -427,7 +416,6 @@ struct _Mesh{ double quality_rho[3]; // mesh quality statistics int Histogram[3][NB_HISTOGRAM]; // quality histograms GMSHMetric *Metric; - MeshParameters MeshParams; int MaxPointNum, MaxLineNum, MaxLineLoopNum, MaxSurfaceNum; int MaxSurfaceLoopNum, MaxVolumeNum, MaxPhysicalNum; }; diff --git a/Plugin/Plugin.cpp b/Plugin/Plugin.cpp index ea69aef1ca..14fe73cd6c 100644 --- a/Plugin/Plugin.cpp +++ b/Plugin/Plugin.cpp @@ -1,4 +1,4 @@ -// $Id: Plugin.cpp,v 1.54 2004-06-15 18:20:53 geuzaine Exp $ +// $Id: Plugin.cpp,v 1.55 2004-06-20 23:25:33 geuzaine Exp $ // // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // @@ -146,34 +146,31 @@ void GMSH_PluginManager::registerDefaultPlugins() ("CutMap", GMSH_RegisterCutMapPlugin())); allPlugins.insert(std::pair < char *, GMSH_Plugin * > ("CutPlane", GMSH_RegisterCutPlanePlugin())); - allPlugins.insert(std::pair < char *, GMSH_Plugin * > - ("CutParametric", GMSH_RegisterCutParametricPlugin())); allPlugins.insert(std::pair < char *, GMSH_Plugin * > ("CutSphere", GMSH_RegisterCutSpherePlugin())); allPlugins.insert(std::pair < char *, GMSH_Plugin * > ("Skin", GMSH_RegisterSkinPlugin())); allPlugins.insert(std::pair < char *, GMSH_Plugin * > ("Extract", GMSH_RegisterExtractPlugin())); - // not ready yet - // allPlugins.insert(std::pair < char *, GMSH_Plugin * > - // ("Harmonic2Time", GMSH_RegisterHarmonic2TimePlugin())); allPlugins.insert(std::pair < char *, GMSH_Plugin * > ("DecomposeInSimplex", GMSH_RegisterDecomposeInSimplexPlugin())); allPlugins.insert(std::pair < char *, GMSH_Plugin * > ("Smooth", GMSH_RegisterSmoothPlugin())); allPlugins.insert(std::pair < char *, GMSH_Plugin * > ("Transform", GMSH_RegisterTransformPlugin())); -#if defined(HAVE_TRIANGLE) - allPlugins.insert(std::pair < char *, GMSH_Plugin * > - ("Triangulate", GMSH_RegisterTriangulatePlugin())); -#endif allPlugins.insert(std::pair < char *, GMSH_Plugin * > ("SphericalRaise", GMSH_RegisterSphericalRaisePlugin())); allPlugins.insert(std::pair < char *, GMSH_Plugin * > ("DisplacementRaise", GMSH_RegisterDisplacementRaisePlugin())); +#if defined(HAVE_TRIANGLE) + allPlugins.insert(std::pair < char *, GMSH_Plugin * > + ("Triangulate", GMSH_RegisterTriangulatePlugin())); +#endif #if defined(HAVE_MATH_EVAL) allPlugins.insert(std::pair < char *, GMSH_Plugin * > ("Evaluate", GMSH_RegisterEvaluatePlugin())); + allPlugins.insert(std::pair < char *, GMSH_Plugin * > + ("CutParametric", GMSH_RegisterCutParametricPlugin())); #endif #if defined(HAVE_FLTK) @@ -204,7 +201,6 @@ void GMSH_PluginManager::addPlugin(char *dirName, char *pluginName) { #if defined(HAVE_NO_DLL) || !defined(HAVE_FLTK) Msg(WARNING, "No dynamic plugin loading on this platform"); - return; #else char dynamic_lib[1024]; char plugin_name[256]; @@ -220,8 +216,7 @@ void GMSH_PluginManager::addPlugin(char *dirName, char *pluginName) Msg(WARNING, "Error in opening %s (dlerror = %s)", dynamic_lib, err); return; } - registerPlugin = - (class GMSH_Plugin * (*)(void))dlsym(hlib, GMSH_PluginEntry); + registerPlugin = (class GMSH_Plugin * (*)(void))dlsym(hlib, GMSH_PluginEntry); err = (char*)dlerror(); if(err != NULL) { Msg(WARNING, "Symbol '%s' missing in plugin '%s' (dlerror = %s)", -- GitLab