diff --git a/Common/Context.h b/Common/Context.h index 35101a76595b6fd7db9fdfbb464c8d5ea10549fb..1a42a1d810871f7a39d0d853df8800f44467af45 100644 --- a/Common/Context.h +++ b/Common/Context.h @@ -67,6 +67,7 @@ public : int ctx_position[2]; // position of the geo/mesh context windows on the screen int solver_position[2]; // position of the solver windows on the screen int plugin_position[2]; // position of the plugin window on the screen + int plugin_size[2]; // size of the plugin window on the screen int file_chooser_position[2]; // position of the file chooser window on the screen int system_menu_bar; // use the system menu bar on MacOS? diff --git a/Common/DefaultOptions.h b/Common/DefaultOptions.h index fed805d02759f3f163a2bc49fb414a10ae5adfef..745f97f5e03d999534d7c83148a2c7880f347fd1 100644 --- a/Common/DefaultOptions.h +++ b/Common/DefaultOptions.h @@ -688,6 +688,11 @@ StringXNumber GeneralOptions_Number[] = { "Horizontal position (in pixels) of the upper left corner of the plugin window" }, { F|S, "PluginPositionY" , opt_general_plugin_position1 , 550. , "Vertical position (in pixels) of the upper left corner of the plugin window" }, + { F|S, "PluginWidth" , opt_general_plugin_size0 , 100. , + "Width (in pixels) of the plugin window" }, + { F|S, "PluginHeight" , opt_general_plugin_size1 , 100. , + "Height (in pixels) of the plugin window" }, + { F|O, "PointSize" , opt_general_point_size , 3. , "Display size of points (in pixels)" }, { F|O, "PolygonOffsetAlwaysOn" , opt_general_polygon_offset_always , 0. , diff --git a/Common/Options.cpp b/Common/Options.cpp index ceab67a03e9e97b28ea3b05e07673686258f290b..e718141085ffb49d2b9ca45f30413e5040570f84 100644 --- a/Common/Options.cpp +++ b/Common/Options.cpp @@ -1,4 +1,4 @@ -// $Id: Options.cpp,v 1.342 2007-05-04 10:45:07 geuzaine Exp $ +// $Id: Options.cpp,v 1.343 2007-05-04 14:27:41 geuzaine Exp $ // // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // @@ -2404,6 +2404,20 @@ double opt_general_plugin_position1(OPT_ARGS_NUM) return CTX.plugin_position[1]; } +double opt_general_plugin_size0(OPT_ARGS_NUM) +{ + if(action & GMSH_SET) + CTX.plugin_size[0] = (int)val; + return CTX.plugin_size[0]; +} + +double opt_general_plugin_size1(OPT_ARGS_NUM) +{ + if(action & GMSH_SET) + CTX.plugin_size[1] = (int)val; + return CTX.plugin_size[1]; +} + double opt_general_statistics_position0(OPT_ARGS_NUM) { if(action & GMSH_SET) diff --git a/Common/Options.h b/Common/Options.h index 13ee9730d793d043c2c2cb6467ddef0724b3ff93..0cb1ca3a4310c8c38507b787ed5a6f75d5712109 100644 --- a/Common/Options.h +++ b/Common/Options.h @@ -251,6 +251,8 @@ double opt_general_option_position0(OPT_ARGS_NUM); double opt_general_option_position1(OPT_ARGS_NUM); double opt_general_plugin_position0(OPT_ARGS_NUM); double opt_general_plugin_position1(OPT_ARGS_NUM); +double opt_general_plugin_size0(OPT_ARGS_NUM); +double opt_general_plugin_size1(OPT_ARGS_NUM); double opt_general_statistics_position0(OPT_ARGS_NUM); double opt_general_statistics_position1(OPT_ARGS_NUM); double opt_general_visibility_position0(OPT_ARGS_NUM); diff --git a/Fltk/Callbacks.cpp b/Fltk/Callbacks.cpp index 080bb548e7683c66c72ac1a90ec7d7d609e0abc6..f24d5fcf2f6fda4e4a708bc536c90dd5876f9d96 100644 --- a/Fltk/Callbacks.cpp +++ b/Fltk/Callbacks.cpp @@ -1,4 +1,4 @@ -// $Id: Callbacks.cpp,v 1.525 2007-05-04 10:45:07 geuzaine Exp $ +// $Id: Callbacks.cpp,v 1.526 2007-05-04 14:27:41 geuzaine Exp $ // // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // @@ -2447,7 +2447,7 @@ void help_short_cb(CALLBACK_ARGS) Msg(DIRECT, " Shift+o Show general options"); Msg(DIRECT, " Shift+p Show post-processing options"); Msg(DIRECT, " Shift+s Show solver options"); - Msg(DIRECT, " Shift+u Show post-processing plugins"); + Msg(DIRECT, " Shift+u Show post-processing view plugins"); Msg(DIRECT, " Shift+w Show post-processing view options"); Msg(DIRECT, " Shift+Escape Enable full mouse selection"); Msg(DIRECT, " "); @@ -2467,6 +2467,7 @@ void help_short_cb(CALLBACK_ARGS) Msg(DIRECT, " Shift+" CC("n") " Show option window"); Msg(DIRECT, " Shift+" CC("o") " Merge file(s)"); Msg(DIRECT, " Shift+" CC("s") " Save mesh in default format"); + Msg(DIRECT, " Shift+" CC("u") " Show plugin window"); Msg(DIRECT, " Shift+" CC("v") " Show visibility window"); Msg(DIRECT, " "); Msg(DIRECT, " Alt+a Loop through axes modes"); @@ -2480,6 +2481,7 @@ void help_short_cb(CALLBACK_ARGS) Msg(DIRECT, " Alt+n Hide/show all post-processing view annotations"); Msg(DIRECT, " Alt+o Change projection mode (orthographic/perspective)"); Msg(DIRECT, " Alt+p Hide/show geometry points"); + Msg(DIRECT, " Alt+r Loop through range modes for visible post-processing views"); Msg(DIRECT, " Alt+s Hide/show geometry surfaces"); Msg(DIRECT, " Alt+t Loop through interval modes for visible post-processing views"); Msg(DIRECT, " Alt+v Hide/show geometry volumes"); @@ -4591,14 +4593,15 @@ void view_plugin_run_cb(CALLBACK_ARGS) } } - Draw(); CTX.post.plugin_draw_function = NULL; + Draw(); } void view_plugin_cancel_cb(CALLBACK_ARGS) { WID->plugin_window->hide(); CTX.post.plugin_draw_function = NULL; + Draw(); } // Contextual windows for geometry diff --git a/Fltk/GUI.cpp b/Fltk/GUI.cpp index a5d6237fc2a2e04d31c1bbac0595501ebb173ec5..74afbe353089f2eb0527b8391f6723f88a51554c 100644 --- a/Fltk/GUI.cpp +++ b/Fltk/GUI.cpp @@ -1,4 +1,4 @@ -// $Id: GUI.cpp,v 1.607 2007-05-04 10:45:08 geuzaine Exp $ +// $Id: GUI.cpp,v 1.608 2007-05-04 14:27:41 geuzaine Exp $ // // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // @@ -62,6 +62,7 @@ Fl_Menu_Item m_menubar_table[] = { {0}, {"&Tools", 0, 0, 0, FL_SUBMENU}, {"&Options...", FL_CTRL+FL_SHIFT+'n', (Fl_Callback *)options_cb, 0}, + {"Pl&ugins...", FL_CTRL+FL_SHIFT+'u', (Fl_Callback *)view_plugin_cb, (void*)(-1)}, {"&Visibility", FL_CTRL+FL_SHIFT+'v', (Fl_Callback *)visibility_cb, 0}, {"&Clipping Planes", FL_CTRL+FL_SHIFT+'c', (Fl_Callback *)clip_cb, 0}, {"&Manipulator", FL_CTRL+FL_SHIFT+'m', (Fl_Callback *)manip_cb, 0, FL_MENU_DIVIDER}, @@ -102,6 +103,7 @@ Fl_Menu_Item m_sys_menubar_table[] = { {0}, {"Tools", 0, 0, 0, FL_SUBMENU}, {"Options...", FL_META+FL_SHIFT+'n', (Fl_Callback *)options_cb, 0}, + {"Plugins...", FL_META+FL_SHIFT+'u', (Fl_Callback *)view_plugin_cb, (void*)(-1)}, {"Visibility", FL_META+FL_SHIFT+'v', (Fl_Callback *)visibility_cb, 0}, {"Clipping Planes", FL_META+FL_SHIFT+'c', (Fl_Callback *)clip_cb, 0}, {"Manipulator", FL_META+FL_SHIFT+'m', (Fl_Callback *)manip_cb, 0, FL_MENU_DIVIDER}, @@ -747,6 +749,19 @@ int GUI::global_shortcuts(int event) redraw_opengl(); return 1; } + else if(Fl::test_shortcut(FL_ALT + 'r')) { + for(i = 0; i < List_Nbr(CTX.post.list); i++) { + if(opt_view_visible(i, GMSH_GET, 0)) { + j = (int)opt_view_range_type(i, GMSH_GET, 0); + opt_view_range_type(i, GMSH_SET | GMSH_GUI, + (j == DRAW_POST_RANGE_DEFAULT) ? DRAW_POST_RANGE_PER_STEP : + (j == DRAW_POST_RANGE_PER_STEP) ? DRAW_POST_RANGE_CUSTOM : + DRAW_POST_RANGE_DEFAULT); + } + } + redraw_opengl(); + return 1; + } else if(Fl::test_shortcut(FL_ALT + 'n')) { for(i = 0; i < List_Nbr(CTX.post.list); i++) if(opt_view_visible(i, GMSH_GET, 0)) @@ -1385,7 +1400,6 @@ void GUI::create_graphic_window() } // dummy resizable box - Dummy_Box *resize_box = new Dummy_Box(x, 0, width - x, glheight); g_window->resizable(resize_box); @@ -3491,6 +3505,7 @@ void GUI::create_plugin_dialog_box(GMSH_Plugin *p, int x, int y, int width, int s->end(); g->end(); + o->resizable(g); // to avoid ugly resizing of tab labels } { Fl_Group *g = new Fl_Group(x, y + BH, width, height - BH, "About"); @@ -3532,26 +3547,38 @@ void GUI::reset_plugin_view_browser() char str[128]; plugin_view_browser->clear(); - for(int i = 0; i < List_Nbr(CTX.post.list); i++) { - sprintf(str, "View [%d]", i); - plugin_view_browser->add(str); - } - for(int i = 0; i < plugin_view_browser->size(); i++){ - if(i < state.size() && state[i]) - plugin_view_browser->select(i + 1); + if(List_Nbr(CTX.post.list)){ + plugin_view_browser->activate(); + for(int i = 0; i < List_Nbr(CTX.post.list); i++) { + sprintf(str, "View [%d]", i); + plugin_view_browser->add(str); + } + for(int i = 0; i < plugin_view_browser->size(); i++){ + if(i < state.size() && state[i]) + plugin_view_browser->select(i + 1); + } + } + else{ + plugin_view_browser->add("No Views"); + plugin_view_browser->deactivate(); } } void GUI::create_plugin_window(int numview) { - int width = 40 * fontsize; - int height = 13 * BH + 5 * WB; + int width0 = 40 * fontsize; + int height0 = 13 * BH + 5 * WB; + + int width = (CTX.plugin_size[0] < width0) ? width0 : CTX.plugin_size[0]; + int height = (CTX.plugin_size[1] < height0) ? height0 : CTX.plugin_size[1]; if(plugin_window) { + reset_plugin_view_browser(); if(numview >= 0 && numview < List_Nbr(CTX.post.list)){ plugin_view_browser->deselect(); plugin_view_browser->select(numview + 1); + view_plugin_browser_cb(NULL, NULL); } plugin_window->show(); return; @@ -3569,7 +3596,7 @@ void GUI::create_plugin_window(int numview) o->callback(view_plugin_run_cb); } - int L1 = 8 * fontsize, L2 = 7 * fontsize; + int L1 = width / 4, L2 = 2 * L1 / 3; plugin_browser = new Fl_Hold_Browser(WB, WB, L1, height - 3 * WB - BH); plugin_browser->callback(view_plugin_browser_cb); @@ -3593,6 +3620,10 @@ void GUI::create_plugin_window(int numview) } } + Dummy_Box *resize_box = new Dummy_Box(WB + L1 / 2, WB, width - L1 / 2- 2 * BB - 3 * WB, height - 3 * WB - BH); + plugin_window->resizable(resize_box); + plugin_window->size_range(width0, height0); + plugin_window->position(CTX.plugin_position[0], CTX.plugin_position[1]); plugin_window->end(); } diff --git a/Fltk/Message.cpp b/Fltk/Message.cpp index 89916aae724c3be9c9b81e2a2e54a77134bfb299..824c9bb671796005483e4529132c0b5d298794f0 100644 --- a/Fltk/Message.cpp +++ b/Fltk/Message.cpp @@ -1,4 +1,4 @@ -// $Id: Message.cpp,v 1.79 2007-05-04 10:45:08 geuzaine Exp $ +// $Id: Message.cpp,v 1.80 2007-05-04 14:27:41 geuzaine Exp $ // // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // @@ -228,6 +228,8 @@ void Exit(int level) CTX.opt_position[1] = WID->opt_window->y(); CTX.plugin_position[0] = WID->plugin_window->x(); CTX.plugin_position[1] = WID->plugin_window->y(); + CTX.plugin_size[0] = WID->plugin_window->w(); + CTX.plugin_size[1] = WID->plugin_window->h(); CTX.stat_position[0] = WID->stat_window->x(); CTX.stat_position[1] = WID->stat_window->y(); CTX.vis_position[0] = WID->vis_window->x(); diff --git a/Plugin/Levelset.cpp b/Plugin/Levelset.cpp index e13800e4fa1ecbcd52844d9d32506034bc6a8bb6..36b3fc416332c3562d97264d7cabb78e2201a11e 100644 --- a/Plugin/Levelset.cpp +++ b/Plugin/Levelset.cpp @@ -1,4 +1,4 @@ -// $Id: Levelset.cpp,v 1.31 2007-03-05 09:30:57 geuzaine Exp $ +// $Id: Levelset.cpp,v 1.32 2007-05-04 14:27:41 geuzaine Exp $ // // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // @@ -20,7 +20,7 @@ // Please report all bugs and problems to <gmsh@geuz.org>. #include "Levelset.h" -#include "DecomposeInSimplex.h" +#include "MakeSimplex.h" #include "List.h" #include "Tools.h" #include "Views.h" @@ -454,8 +454,8 @@ void GMSH_LevelsetPlugin::executeList(Post_View * iView, List_T * iList, } else{ // we decompose the element into simplices - DecomposeInSimplex iDec(nbNod, iNbComp); - DecomposeInSimplex dDec(nbNod, dNbComp); + MakeSimplex iDec(nbNod, iNbComp); + MakeSimplex dDec(nbNod, dNbComp); int nbNodNew = iDec.numSimplexNodes(); int nbEdgNew = (nbNodNew == 4) ? 6 : 3; diff --git a/Plugin/DecomposeInSimplex.cpp b/Plugin/MakeSimplex.cpp similarity index 76% rename from Plugin/DecomposeInSimplex.cpp rename to Plugin/MakeSimplex.cpp index 8e6f5e9a69cfeb674c4a56f3fdf8859a989b913e..1f01922d526dfa51ea880e8fe00d1612eab99f22 100644 --- a/Plugin/DecomposeInSimplex.cpp +++ b/Plugin/MakeSimplex.cpp @@ -1,4 +1,4 @@ -// $Id: DecomposeInSimplex.cpp,v 1.22 2007-05-04 10:45:08 geuzaine Exp $ +// $Id: MakeSimplex.cpp,v 1.1 2007-05-04 14:27:41 geuzaine Exp $ // // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // @@ -20,7 +20,7 @@ // Please report all bugs and problems to <gmsh@geuz.org>. #include "Plugin.h" -#include "DecomposeInSimplex.h" +#include "MakeSimplex.h" #include "List.h" #include "Tree.h" #include "Views.h" @@ -30,57 +30,57 @@ extern Context_T CTX; -StringXNumber DecomposeInSimplexOptions_Number[] = { +StringXNumber MakeSimplexOptions_Number[] = { {GMSH_FULLRC, "iView", NULL, -1.} }; extern "C" { - GMSH_Plugin *GMSH_RegisterDecomposeInSimplexPlugin() + GMSH_Plugin *GMSH_RegisterMakeSimplexPlugin() { - return new GMSH_DecomposeInSimplexPlugin(); + return new GMSH_MakeSimplexPlugin(); } } -GMSH_DecomposeInSimplexPlugin::GMSH_DecomposeInSimplexPlugin() +GMSH_MakeSimplexPlugin::GMSH_MakeSimplexPlugin() { ; } -void GMSH_DecomposeInSimplexPlugin::getName(char *name) const +void GMSH_MakeSimplexPlugin::getName(char *name) const { - strcpy(name, "Decompose in Simplex"); + strcpy(name, "Make Simplex"); } -void GMSH_DecomposeInSimplexPlugin::getInfos(char *author, char *copyright, - char *help_text) const +void GMSH_MakeSimplexPlugin::getInfos(char *author, char *copyright, + char *help_text) const { strcpy(author, "C. Geuzaine"); strcpy(copyright, "DGR (www.multiphysics.com)"); strcpy(help_text, - "Plugin(DecomposeInSimplex) decomposes all\n" - "non-simplectic elements (quadrangles, prisms,\n" + "Plugin(MakeSimplex) decomposes all non-\n" + "simplectic elements (quadrangles, prisms,\n" "hexahedra, pyramids) in the view `iView' into\n" "simplices (triangles, tetrahedra). If `iView' < 0,\n" "the plugin is run on the current view.\n" "\n" - "Plugin(DecomposeInSimplex) is executed\n" + "Plugin(MakeSimplex) is executed\n" "in-place.\n"); } -int GMSH_DecomposeInSimplexPlugin::getNbOptions() const +int GMSH_MakeSimplexPlugin::getNbOptions() const { - return sizeof(DecomposeInSimplexOptions_Number) / sizeof(StringXNumber); + return sizeof(MakeSimplexOptions_Number) / sizeof(StringXNumber); } -StringXNumber *GMSH_DecomposeInSimplexPlugin::getOption(int iopt) +StringXNumber *GMSH_MakeSimplexPlugin::getOption(int iopt) { - return &DecomposeInSimplexOptions_Number[iopt]; + return &MakeSimplexOptions_Number[iopt]; } -void GMSH_DecomposeInSimplexPlugin::catchErrorMessage(char *errorMessage) const +void GMSH_MakeSimplexPlugin::catchErrorMessage(char *errorMessage) const { - strcpy(errorMessage, "DecomposeInSimplex failed..."); + strcpy(errorMessage, "MakeSimplex failed..."); } static void decomposeList(Post_View *v, int nbNod, int nbComp, @@ -88,7 +88,7 @@ static void decomposeList(Post_View *v, int nbNod, int nbComp, { double xNew[4], yNew[4], zNew[4]; double *valNew = new double[v->NbTimeStep * nbComp * nbNod]; - DecomposeInSimplex dec(nbNod, nbComp, v->NbTimeStep); + MakeSimplex dec(nbNod, nbComp, v->NbTimeStep); if(!(*nbIn)) return; @@ -121,9 +121,9 @@ static void decomposeList(Post_View *v, int nbNod, int nbComp, *nbIn = 0; } -Post_View *GMSH_DecomposeInSimplexPlugin::execute(Post_View * v) +Post_View *GMSH_MakeSimplexPlugin::execute(Post_View * v) { - int iView = (int)DecomposeInSimplexOptions_Number[0].def; + int iView = (int)MakeSimplexOptions_Number[0].def; if(iView < 0) iView = v ? v->Index : 0; @@ -137,7 +137,7 @@ Post_View *GMSH_DecomposeInSimplexPlugin::execute(Post_View * v) // Bail out if the view is an alias or if other views duplicate it if(v1->AliasOf || v1->Links) { - Msg(GERROR, "DecomposeInSimplex cannot be applied to an aliased view"); + Msg(GERROR, "MakeSimplex cannot be applied to an aliased view"); return 0; } @@ -166,13 +166,13 @@ Post_View *GMSH_DecomposeInSimplexPlugin::execute(Post_View * v) // Utility class -DecomposeInSimplex::DecomposeInSimplex(int numNodes, int numComponents, int numTimeSteps) +MakeSimplex::MakeSimplex(int numNodes, int numComponents, int numTimeSteps) : _numNodes(numNodes), _numComponents(numComponents), _numTimeSteps(numTimeSteps) { ; } -int DecomposeInSimplex::numSimplices() +int MakeSimplex::numSimplices() { switch(_numNodes) { case 4: return 2; // quad -> 2 tris @@ -183,7 +183,7 @@ int DecomposeInSimplex::numSimplices() return 0; } -int DecomposeInSimplex::numSimplexNodes() +int MakeSimplex::numSimplexNodes() { if(_numNodes == 4) return 3; // quad -> tris @@ -191,9 +191,9 @@ int DecomposeInSimplex::numSimplexNodes() return 4; // all others -> tets } -void DecomposeInSimplex::reorder(int map[4], int n, - double *x, double *y, double *z, double *val, - double *xn, double *yn, double *zn, double *valn) +void MakeSimplex::reorder(int map[4], int n, + double *x, double *y, double *z, double *val, + double *xn, double *yn, double *zn, double *valn) { for(int i = 0; i < n; i++) { xn[i] = x[map[i]]; @@ -230,9 +230,9 @@ void DecomposeInSimplex::reorder(int map[4], int n, } } -void DecomposeInSimplex::decompose(int num, - double *x, double *y, double *z, double *val, - double *xn, double *yn, double *zn, double *valn) +void MakeSimplex::decompose(int num, + double *x, double *y, double *z, double *val, + double *xn, double *yn, double *zn, double *valn) { int quadTri[2][4] = {{0,1,2,-1}, {0,2,3,-1}}; int hexaTet[6][4] = {{0,1,3,7}, {0,4,1,7}, {1,4,5,7}, {1,2,3,7}, {1,6,2,7}, {1,5,6,7}}; diff --git a/Plugin/DecomposeInSimplex.h b/Plugin/MakeSimplex.h similarity index 85% rename from Plugin/DecomposeInSimplex.h rename to Plugin/MakeSimplex.h index 881024d2f50fced1ca9835cb9dd35cf31244bfa6..9dad922b310f453e3b7df83c1b83ddd52161f220 100644 --- a/Plugin/DecomposeInSimplex.h +++ b/Plugin/MakeSimplex.h @@ -1,5 +1,5 @@ -#ifndef _DECOMPOSE_IN_SIMPLEX_H_ -#define _DECOMPOSE_IN_SIMPLEX_H_ +#ifndef _MAKE_SIMPLEX_H_ +#define _MAKE_SIMPLEX_H_ // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // @@ -24,13 +24,13 @@ extern "C" { - GMSH_Plugin *GMSH_RegisterDecomposeInSimplexPlugin(); + GMSH_Plugin *GMSH_RegisterMakeSimplexPlugin(); } -class GMSH_DecomposeInSimplexPlugin : public GMSH_Post_Plugin +class GMSH_MakeSimplexPlugin : public GMSH_Post_Plugin { public: - GMSH_DecomposeInSimplexPlugin(); + GMSH_MakeSimplexPlugin(); void getName(char *name) const; void getInfos(char *author, char *copyright, char *help_text) const; void catchErrorMessage(char *errorMessage) const; @@ -39,7 +39,7 @@ public: Post_View *execute(Post_View *); }; -class DecomposeInSimplex{ +class MakeSimplex{ private: // how many nodes in the element to decompose int _numNodes; @@ -53,7 +53,7 @@ class DecomposeInSimplex{ double *xn, double *yn, double *zn, double *valn); public: // default constructor - DecomposeInSimplex(int numNodes, int numComponents, int numTimeSteps=1); + MakeSimplex(int numNodes, int numComponents, int numTimeSteps=1); // the number of simplices into which the element is decomposed int numSimplices(); // the number of nodes of the simplex diff --git a/Plugin/Makefile b/Plugin/Makefile index c70909bc91963e35bb6523071a6241704710f092..8175d70530a629e030f3c0f651c277768c69a734 100644 --- a/Plugin/Makefile +++ b/Plugin/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.121 2007-04-21 19:40:01 geuzaine Exp $ +# $Id: Makefile,v 1.122 2007-05-04 14:27:41 geuzaine Exp $ # # Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle # @@ -39,7 +39,7 @@ SRC = Plugin.cpp\ Warp.cpp\ Skin.cpp\ Extract.cpp ExtractElements.cpp ExtractEdges.cpp\ - DecomposeInSimplex.cpp\ + MakeSimplex.cpp\ Evaluate.cpp\ Integrate.cpp Gradient.cpp Curl.cpp Divergence.cpp\ Annotate.cpp Remove.cpp\ @@ -77,17 +77,17 @@ Plugin.o: Plugin.cpp Plugin.h ../Common/Options.h ../Common/Message.h \ CutSphere.h Skin.h ../DataStr/Tree.h ../DataStr/avl.h Extract.h \ ExtractElements.h ExtractEdges.h HarmonicToTime.h ModulusPhase.h \ Integrate.h Gradient.h Curl.h Divergence.h Annotate.h Remove.h \ - DecomposeInSimplex.h Smooth.h Transform.h Triangulate.h Warp.h \ - Eigenvectors.h Eigenvalues.h Lambda2.h Evaluate.h \ - ../Common/OctreePost.h ../Common/Octree.h ../Common/OctreeInternals.h \ - Probe.h ../Common/Context.h + MakeSimplex.h Smooth.h Transform.h Triangulate.h Warp.h Eigenvectors.h \ + Eigenvalues.h Lambda2.h Evaluate.h ../Common/OctreePost.h \ + ../Common/Octree.h ../Common/OctreeInternals.h Probe.h \ + ../Common/Context.h Levelset.o: Levelset.cpp Levelset.h Plugin.h ../Common/Options.h \ ../Common/Message.h ../Common/Views.h ../Common/ColorTable.h \ ../DataStr/List.h ../Common/VertexArray.h ../Common/SmoothData.h \ ../Numeric/Numeric.h ../Common/AdaptiveViews.h ../Common/GmshMatrix.h \ - DecomposeInSimplex.h ../DataStr/Tools.h ../DataStr/List.h \ - ../DataStr/Tree.h ../DataStr/avl.h ../Graphics/Iso.h \ - ../Common/Context.h ../DataStr/Malloc.h + MakeSimplex.h ../DataStr/Tools.h ../DataStr/List.h ../DataStr/Tree.h \ + ../DataStr/avl.h ../Graphics/Iso.h ../Common/Context.h \ + ../DataStr/Malloc.h CutPlane.o: CutPlane.cpp CutPlane.h Levelset.h Plugin.h \ ../Common/Options.h ../Common/Message.h ../Common/Views.h \ ../Common/ColorTable.h ../DataStr/List.h ../Common/VertexArray.h \ @@ -208,12 +208,12 @@ ExtractEdges.o: ExtractEdges.cpp Plugin.h ../Common/Options.h \ ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/ExtrudeParams.h \ ../Geo/MElement.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \ ../Geo/ExtrudeParams.h -DecomposeInSimplex.o: DecomposeInSimplex.cpp Plugin.h ../Common/Options.h \ +MakeSimplex.o: MakeSimplex.cpp Plugin.h ../Common/Options.h \ ../Common/Message.h ../Common/Views.h ../Common/ColorTable.h \ ../DataStr/List.h ../Common/VertexArray.h ../Common/SmoothData.h \ ../Numeric/Numeric.h ../Common/AdaptiveViews.h ../Common/GmshMatrix.h \ - DecomposeInSimplex.h ../DataStr/Tree.h ../DataStr/avl.h \ - ../Common/Context.h ../DataStr/Malloc.h + MakeSimplex.h ../DataStr/Tree.h ../DataStr/avl.h ../Common/Context.h \ + ../DataStr/Malloc.h Evaluate.o: Evaluate.cpp Plugin.h ../Common/Options.h ../Common/Message.h \ ../Common/Views.h ../Common/ColorTable.h ../DataStr/List.h \ ../Common/VertexArray.h ../Common/SmoothData.h ../Numeric/Numeric.h \ diff --git a/Plugin/Plugin.cpp b/Plugin/Plugin.cpp index f96fe17712ced6127121762f5c45449377b15aeb..2e075bc44e4ddaa0f6757a875291e695700233f2 100644 --- a/Plugin/Plugin.cpp +++ b/Plugin/Plugin.cpp @@ -1,4 +1,4 @@ -// $Id: Plugin.cpp,v 1.86 2007-01-16 11:31:42 geuzaine Exp $ +// $Id: Plugin.cpp,v 1.87 2007-05-04 14:27:41 geuzaine Exp $ // // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // @@ -50,7 +50,7 @@ #include "Divergence.h" #include "Annotate.h" #include "Remove.h" -#include "DecomposeInSimplex.h" +#include "MakeSimplex.h" #include "Smooth.h" #include "Transform.h" #include "Triangulate.h" @@ -190,7 +190,7 @@ void GMSH_PluginManager::registerDefaultPlugins() ("ExtractEdges", GMSH_RegisterExtractEdgesPlugin())); #endif allPlugins.insert(std::pair < char *, GMSH_Plugin * > - ("DecomposeInSimplex", GMSH_RegisterDecomposeInSimplexPlugin())); + ("MakeSimplex", GMSH_RegisterMakeSimplexPlugin())); allPlugins.insert(std::pair < char *, GMSH_Plugin * > ("Smooth", GMSH_RegisterSmoothPlugin())); allPlugins.insert(std::pair < char *, GMSH_Plugin * > diff --git a/doc/VERSIONS b/doc/VERSIONS index bfe3d2e114bdae1e97dd0a5aa588878d560a9ba2..bbd8c1337b467faa830390f543f2c04a343c0b3a 100644 --- a/doc/VERSIONS +++ b/doc/VERSIONS @@ -1,4 +1,4 @@ -$Id: VERSIONS,v 1.384 2007-05-04 10:45:09 geuzaine Exp $ +$Id: VERSIONS,v 1.385 2007-05-04 14:27:41 geuzaine Exp $ new since 2.0: volumes can now be defined from external CAD surfaces; Delaunay/Tetgen algorithm is now used by default when available; @@ -8,7 +8,8 @@ limited set of geometrical primitives available in the GEO language, of course--so trying to convert e.g. a trimmed NURBS from a STEP file into a GEO file will fail); "lateral" entities are now added at the end of the list returned by extrusion commands; unused vertices are -not saved in mesh files anymore; new plugin GUI; fixed various bugs. +not saved in mesh files anymore; new plugin GUI; renamed +DecomposeInSimplex into MakeSimplex; fixed various bugs. 2.0 (February 5, 2007): new geometry and mesh databases, with support for STEP and IGES import via OpenCascade; complete rewrite of geometry diff --git a/doc/texinfo/opt_general.texi b/doc/texinfo/opt_general.texi index f5a4aaa2f2084109c7b85f990f3de781b5beab6c..7f92a88427822a5c7afe0c6354353f8220aeafc5 100644 --- a/doc/texinfo/opt_general.texi +++ b/doc/texinfo/opt_general.texi @@ -684,6 +684,16 @@ Vertical position (in pixels) of the upper left corner of the plugin window@* Default value: @code{550}@* Saved in: @code{General.SessionFileName} +@item General.PluginWidth +Width (in pixels) of the plugin window@* +Default value: @code{100}@* +Saved in: @code{General.SessionFileName} + +@item General.PluginHeight +Height (in pixels) of the plugin window@* +Default value: @code{100}@* +Saved in: @code{General.SessionFileName} + @item General.PointSize Display size of points (in pixels)@* Default value: @code{3}@* diff --git a/doc/texinfo/opt_plugin.texi b/doc/texinfo/opt_plugin.texi index 8ea083e1cdde496a9224146fbf416951c570d2e5..84aca53ab4f61c475491b7539c4d39d867939db6 100644 --- a/doc/texinfo/opt_plugin.texi +++ b/doc/texinfo/opt_plugin.texi @@ -227,22 +227,6 @@ Default value: @code{4} Default value: @code{-1} @end table -@item Plugin(DecomposeInSimplex) -Plugin(DecomposeInSimplex) decomposes all -non-simplectic elements (quadrangles, prisms, -hexahedra, pyramids) in the view `iView' into -simplices (triangles, tetrahedra). If `iView' < 0, -the plugin is run on the current view. - -Plugin(DecomposeInSimplex) is executed -in-place. - -Numeric options: -@table @code -@item iView -Default value: @code{-1} -@end table - @item Plugin(Divergence) Plugin(Divergence) computes the divergence of the field in the view `iView'. If `iView' < 0, the plugin @@ -507,6 +491,22 @@ Default value: @code{2} Default value: @code{-1} @end table +@item Plugin(MakeSimplex) +Plugin(MakeSimplex) decomposes all non- +simplectic elements (quadrangles, prisms, +hexahedra, pyramids) in the view `iView' into +simplices (triangles, tetrahedra). If `iView' < 0, +the plugin is run on the current view. + +Plugin(MakeSimplex) is executed +in-place. + +Numeric options: +@table @code +@item iView +Default value: @code{-1} +@end table + @item Plugin(ModulusPhase) Plugin(ModulusPhase) interprets the time steps `realPart' and `imaginaryPart' in the view `iView' diff --git a/doc/texinfo/shortcuts.texi b/doc/texinfo/shortcuts.texi index 3756899ff4f4d7181f0498e744954bb4cea03394..74872a39a6ec6f08c79cce3b3a67e8f5cf2a3be9 100644 --- a/doc/texinfo/shortcuts.texi +++ b/doc/texinfo/shortcuts.texi @@ -52,7 +52,7 @@ Show post-processing options @item Shift+s Show solver options @item Shift+u -Show post-processing plugins +Show post-processing view plugins @item Shift+w Show post-processing view options @@ -85,6 +85,8 @@ Show option window Merge file(s) @item Shift+Ctrl+s Save mesh in default format +@item Shift+Ctrl+u +Show plugin window @item Shift+Ctrl+v Show visibility window @@ -112,10 +114,12 @@ Hide/show all post-processing view annotations Change projection mode (orthographic/perspective) @item Alt+p Hide/show geometry points +@item Alt+r +Loop through range modes for visible post-processing views @item Alt+s Hide/show geometry surfaces @item Alt+t -Loop through interval modes for visible post-processing views +Loop through interval modes for visible post-processing views @item Alt+v Hide/show geometry volumes @item Alt+w