diff --git a/CMakeLists.txt b/CMakeLists.txt index 106903715e1e238f13610a64afef052c531f17fd..aa72738f0e95f3af52e2a3d0779e42eb95dfb066 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -87,6 +87,7 @@ opt(SOLVER "Enable built-in finite element solvers (required for compounds)" ${D opt(TAUCS "Enable Taucs linear solver" ${DEFAULT}) opt(TCMALLOC "Enable libtcmalloc, a fast malloc implementation but that does not release memory" OFF) opt(TETGEN "Enable Tetgen 3D initial mesh generator" ${DEFAULT}) +opt(VISUDEV "Enable additional visualization capabilities for development purpose" OFF) opt(VORO3D "Enable Voro3D (for hex meshing, experimental)" ${DEFAULT}) opt(WRAP_JAVA "Enable generation of Java wrappers (experimental)" OFF) opt(WRAP_PYTHON "Enable generation of Python wrappers" OFF) @@ -484,6 +485,10 @@ if(ENABLE_PARSER) set_config_option(HAVE_PARSER "Parser") endif(ENABLE_PARSER) +if(ENABLE_VISUDEV) + set_config_option(HAVE_VISUDEV "VisuDev") +endif(ENABLE_VISUDEV) + if(ENABLE_FLTK) # first, try to use fltk-config for fltk >= 1.3 (FindFLTK is buggy on Unix, # where e.g. xft and xinerama options are not dealt with) diff --git a/Common/Context.h b/Common/Context.h index 11802ececb1b80d0f56c093e2c4c67024a3b2f93..0b0dad6c0d5d32dfc6c405aacbee3364a712246b 100644 --- a/Common/Context.h +++ b/Common/Context.h @@ -235,6 +235,10 @@ class CTX { int mouseSelection, mouseHoverMeshes, pickElements; // disable some warnings for expert users? int expertMode; +#if defined(HAVE_VISUDEV) + // Enable heavy visualization capabilities (for development purpose) + int heavyVisu; +#endif // dynamic: equal to 1 while gmsh is printing int printing; // hide all unselected entities? diff --git a/Common/GmshConfig.h.in b/Common/GmshConfig.h.in index ed5a2758328ffcf4616d068440ae3fb2f3da478a..2b6d92121c5142fcc56c909d1acb962bd0f38376 100644 --- a/Common/GmshConfig.h.in +++ b/Common/GmshConfig.h.in @@ -67,6 +67,7 @@ #cmakedefine HAVE_SOLVER #cmakedefine HAVE_TAUCS #cmakedefine HAVE_TETGEN +#cmakedefine HAVE_VISUDEV #cmakedefine HAVE_VORO3D #cmakedefine HAVE_ZIPPER diff --git a/Common/Options.cpp b/Common/Options.cpp index ca8f85104bc206703cbe8786d0af0eb508c239d8..bdbc331eadb41b9cefca3fabb10b30d9fe1496ee 100644 --- a/Common/Options.cpp +++ b/Common/Options.cpp @@ -3616,6 +3616,15 @@ double opt_general_expert_mode(OPT_ARGS_NUM) return CTX::instance()->expertMode; } +#if defined(HAVE_VISUDEV) +double opt_general_heavy_visualization(OPT_ARGS_NUM) +{ + if(action & GMSH_SET) + CTX::instance()->heavyVisu = (int)val; + return CTX::instance()->heavyVisu; +} +#endif + double opt_general_stereo_mode(OPT_ARGS_NUM) { if(action & GMSH_SET) diff --git a/Common/Options.h b/Common/Options.h index 7b04adbe7bc6a441103cadfe535f3c10fe52ba4f..b02ddaf7829d43f0137b59212b962420194708ec 100644 --- a/Common/Options.h +++ b/Common/Options.h @@ -283,6 +283,7 @@ double opt_general_zoom_factor(OPT_ARGS_NUM); double opt_general_expert_mode(OPT_ARGS_NUM); double opt_general_stereo_mode(OPT_ARGS_NUM); double opt_general_camera_mode(OPT_ARGS_NUM); +double opt_general_heavy_visualization(OPT_ARGS_NUM); double opt_general_eye_sep_ratio(OPT_ARGS_NUM); double opt_general_focallength_ratio(OPT_ARGS_NUM); double opt_general_camera_aperture(OPT_ARGS_NUM); diff --git a/Fltk/optionWindow.cpp b/Fltk/optionWindow.cpp index e2358c070dbbf896caa71cdb692e4f854238cacb..131751ca8588d907aeda73fb6d03709afbb6705d 100644 --- a/Fltk/optionWindow.cpp +++ b/Fltk/optionWindow.cpp @@ -296,6 +296,9 @@ static void general_options_ok_cb(Fl_Widget *w, void *data) (CTX::instance()->homeDir + CTX::instance()->sessionFileName).c_str()); opt_general_options_save(0, GMSH_SET, o->general.butt[9]->value()); opt_general_expert_mode(0, GMSH_SET, o->general.butt[10]->value()); +#if defined(HAVE_VISUDEV) + opt_general_heavy_visualization(0, GMSH_SET, o->general.butt[22]->value()); +#endif if(opt_general_gui_color_scheme(0, GMSH_GET, 0) != o->general.butt[21]->value()){ opt_general_gui_color_scheme(0, GMSH_SET, o->general.butt[21]->value()); @@ -1476,6 +1479,13 @@ optionWindow::optionWindow(int deltaFontSize) general.butt[9]->type(FL_TOGGLE_BUTTON); general.butt[9]->callback(general_options_ok_cb); +#if defined(HAVE_VISUDEV) + general.butt[22] = new Fl_Check_Button + (L + 2 * WB, 2 * WB + 8 * BH, BW/2-WB, BH, "Enable heavy visualization capabilities"); + general.butt[22]->type(FL_TOGGLE_BUTTON); + general.butt[22]->callback(general_options_ok_cb); +#endif + Fl_Button *b1 = new Fl_Button (L + width - 2 * WB - BW/3, 2 * WB + 7 * BH, BW/3, BH, "Show file path"); b1->callback(options_show_file_cb, (void*)"option"); diff --git a/Fltk/optionWindow.h b/Fltk/optionWindow.h index f00cbfada2424c4487ae74814b49275b402631fa..9119d8808b60fc4213ad8ae2dedd8fc8cc21f2ca 100644 --- a/Fltk/optionWindow.h +++ b/Fltk/optionWindow.h @@ -33,7 +33,11 @@ class optionWindow{ struct{ Fl_Group *group; +#if defined(HAVE_VISUDEV) + Fl_Check_Button *butt[23]; +#else Fl_Check_Button *butt[22]; +#endif Fl_Button *push[20]; Fl_Value_Input *value[50]; Fl_Button *color[50];