diff --git a/Plugin/CutMap.cpp b/Plugin/CutMap.cpp index 5a0ebc8ce96871e2382cd53d246ad39ce66202f8..993d14ac9805802fd26f7d93407b5f645c6d7755 100644 --- a/Plugin/CutMap.cpp +++ b/Plugin/CutMap.cpp @@ -1,4 +1,4 @@ -// $Id: CutMap.cpp,v 1.16 2001-08-06 10:35:47 geuzaine Exp $ +// $Id: CutMap.cpp,v 1.17 2001-08-06 10:52:52 geuzaine Exp $ #include "CutMap.h" #include "List.h" @@ -70,17 +70,14 @@ Post_View *GMSH_CutMapPlugin::execute (Post_View *v) if(v && iView < 0) vv = v; - else if(!(vv = (Post_View*)List_Pointer_Test(Post_ViewList,iView))){ - Msg(WARNING,"Plugin CutMap: View[%d] does not exist",iView); - return 0; + else{ + if(!v && iView < 0) iView = 0; + if(!(vv = (Post_View*)List_Pointer_Test(Post_ViewList,iView))){ + Msg(WARNING,"Plugin CutMap: View[%d] does not exist",iView); + return 0; + } } return GMSH_LevelsetPlugin::execute(vv); } -void GMSH_CutMapPlugin::Run () -{ - int iView = (int)CutMapOptions_Number[1].def; - if(iView < 0) CutMapOptions_Number[1].def = 0; - execute (0); -} diff --git a/Plugin/CutMap.h b/Plugin/CutMap.h index dacb411dc5de9baf421b3d8bdb46dedf51ba43bb..a1aa27cd4a18d925bcbff1f1c5381858f80ea4f2 100644 --- a/Plugin/CutMap.h +++ b/Plugin/CutMap.h @@ -22,6 +22,5 @@ public: virtual int getNbOptions() const; virtual StringXNumber* GetOption (int iopt); virtual Post_View *execute (Post_View *); - virtual void Run(); }; #endif diff --git a/Plugin/CutPlane.cpp b/Plugin/CutPlane.cpp index 008bda943cbe642f4dc77e52293aec7a52ff7f8b..198ff3d237f4dbee4f9400e66f9fb0370dde0ed8 100644 --- a/Plugin/CutPlane.cpp +++ b/Plugin/CutPlane.cpp @@ -1,4 +1,4 @@ -// $Id: CutPlane.cpp,v 1.14 2001-08-06 10:35:47 geuzaine Exp $ +// $Id: CutPlane.cpp,v 1.15 2001-08-06 10:52:52 geuzaine Exp $ #include "CutPlane.h" #include "List.h" @@ -76,20 +76,14 @@ Post_View *GMSH_CutPlanePlugin::execute (Post_View *v) if(v && iView < 0) vv = v; - else if(!(vv = (Post_View*)List_Pointer_Test(Post_ViewList,iView))){ - Msg(WARNING,"Plugin CutPlane: View[%d] does not exist",iView); - return 0; + else{ + if(!v && iView < 0) iView = 0; + if(!(vv = (Post_View*)List_Pointer_Test(Post_ViewList,iView))){ + Msg(WARNING,"Plugin CutPlane: View[%d] does not exist",iView); + return 0; + } } return GMSH_LevelsetPlugin::execute(vv); } -void GMSH_CutPlanePlugin::Run () -{ - int iView = (int)CutPlaneOptions_Number[4].def; - if(iView < 0) CutPlaneOptions_Number[4].def = 0; - execute (0); -} - - - diff --git a/Plugin/CutPlane.h b/Plugin/CutPlane.h index 89abdb196a0c55986b1d0d031338cf80c17eb846..4575add1a984d3f3339dfcadcbba8a31a9060450 100644 --- a/Plugin/CutPlane.h +++ b/Plugin/CutPlane.h @@ -23,7 +23,6 @@ public: virtual int getNbOptions() const; virtual StringXNumber *GetOption (int iopt); virtual Post_View *execute (Post_View *); - virtual void Run(); }; #endif diff --git a/Plugin/CutSphere.cpp b/Plugin/CutSphere.cpp index eb6634096cc66c3eba12aaa23195d7a8992c3d4e..cb76ec4163e13d4071e6044f80c30c61235613b8 100644 --- a/Plugin/CutSphere.cpp +++ b/Plugin/CutSphere.cpp @@ -1,4 +1,4 @@ -// $Id: CutSphere.cpp,v 1.13 2001-08-06 10:35:47 geuzaine Exp $ +// $Id: CutSphere.cpp,v 1.14 2001-08-06 10:52:52 geuzaine Exp $ #include <string.h> #include "CutSphere.h" @@ -77,17 +77,14 @@ Post_View *GMSH_CutSpherePlugin::execute (Post_View *v) if(v && iView < 0) vv = v; - else if(!(vv = (Post_View*)List_Pointer_Test(Post_ViewList,iView))){ - Msg(WARNING,"Plugin CutSphere: View[%d] does not exist",iView); - return 0; + else{ + if(!v && iView < 0) iView = 0; + if(!(vv = (Post_View*)List_Pointer_Test(Post_ViewList,iView))){ + Msg(WARNING,"Plugin CutSphere: View[%d] does not exist",iView); + return 0; + } } return GMSH_LevelsetPlugin::execute(vv); } -void GMSH_CutSpherePlugin::Run () -{ - int iView = (int)CutSphereOptions_Number[4].def; - if(iView < 0) CutSphereOptions_Number[4].def = 0; - execute (0); -} diff --git a/Plugin/CutSphere.h b/Plugin/CutSphere.h index cb3493c8427b4c584d8bfce0969387b68113d109..bee21ba1e26bf338c19f8ff9df0aa5dff01dc9c3 100644 --- a/Plugin/CutSphere.h +++ b/Plugin/CutSphere.h @@ -23,7 +23,6 @@ public: virtual int getNbOptions() const; virtual StringXNumber* GetOption (int iopt); virtual Post_View *execute (Post_View *); - virtual void Run(); }; #endif diff --git a/Plugin/Skin.cpp b/Plugin/Skin.cpp index c80e5642608a6ec12a4dba54c5d6dd48004cb40b..b5ee53fac365c1bc929fee476f573d679bb16c4e 100644 --- a/Plugin/Skin.cpp +++ b/Plugin/Skin.cpp @@ -1,4 +1,4 @@ -// $Id: Skin.cpp,v 1.3 2001-08-06 10:35:47 geuzaine Exp $ +// $Id: Skin.cpp,v 1.4 2001-08-06 10:52:52 geuzaine Exp $ #include "Plugin.h" #include "Skin.h" @@ -117,9 +117,12 @@ Post_View *GMSH_SkinPlugin::execute (Post_View *v) if(v && iView < 0) vv = v; - else if(!(vv = (Post_View*)List_Pointer_Test(Post_ViewList,iView))){ - Msg(WARNING,"Plugin Skin: View[%d] does not exist",iView); - return 0; + else{ + if(!v && iView < 0) iView = 0; + if(!(vv = (Post_View*)List_Pointer_Test(Post_ViewList,iView))){ + Msg(WARNING,"Plugin Skin: View[%d] does not exist",iView); + return 0; + } } if(vv->NbSS){ @@ -156,8 +159,6 @@ Post_View *GMSH_SkinPlugin::execute (Post_View *v) void GMSH_SkinPlugin::Run () { - int iView = (int)SkinOptions_Number[0].def; - if(iView < 0) SkinOptions_Number[0].def = 0; execute(0); } diff --git a/Plugin/Smooth.cpp b/Plugin/Smooth.cpp index 4cfe69045930b375e0a1a7ef9ca6f46d9daf9475..f9df89a2a55e6158750f80f5e8990cfda6398b47 100644 --- a/Plugin/Smooth.cpp +++ b/Plugin/Smooth.cpp @@ -1,4 +1,4 @@ -// $Id: Smooth.cpp,v 1.3 2001-08-06 10:35:47 geuzaine Exp $ +// $Id: Smooth.cpp,v 1.4 2001-08-06 10:52:52 geuzaine Exp $ #include "Plugin.h" #include "Smooth.h" @@ -61,9 +61,12 @@ Post_View *GMSH_SmoothPlugin::execute (Post_View *v) if(v && iView < 0) vv = v; - else if(!(vv = (Post_View*)List_Pointer_Test(Post_ViewList,iView))){ - Msg(WARNING,"Plugin Smooth: View[%d] does not exist",iView); - return 0; + else{ + if(!v && iView < 0) iView = 0; + if(!(vv = (Post_View*)List_Pointer_Test(Post_ViewList,iView))){ + Msg(WARNING,"Plugin Smooth: View[%d] does not exist",iView); + return 0; + } } vv->smooth(); @@ -72,8 +75,6 @@ Post_View *GMSH_SmoothPlugin::execute (Post_View *v) void GMSH_SmoothPlugin::Run () { - int iView = (int)SmoothOptions_Number[0].def; - if(iView < 0) SmoothOptions_Number[0].def = 0; execute(0); } diff --git a/Plugin/Transform.cpp b/Plugin/Transform.cpp index 89e6374a3ceb28cec34a5efe1e16606c26149d3c..1dd55f120e4c50b810ccf242264b9abdd5531926 100644 --- a/Plugin/Transform.cpp +++ b/Plugin/Transform.cpp @@ -1,4 +1,4 @@ -// $Id: Transform.cpp,v 1.3 2001-08-06 10:35:47 geuzaine Exp $ +// $Id: Transform.cpp,v 1.4 2001-08-06 10:52:52 geuzaine Exp $ #include "Plugin.h" #include "Transform.h" @@ -95,9 +95,12 @@ Post_View *GMSH_TransformPlugin::execute (Post_View *v) if(v && iView < 0) vv = v; - else if(!(vv = (Post_View*)List_Pointer_Test(Post_ViewList,iView))){ - Msg(WARNING,"Plugin Transform: View[%d] does not exist",iView); - return 0; + else{ + if(!v && iView < 0) iView = 0; + if(!(vv = (Post_View*)List_Pointer_Test(Post_ViewList,iView))){ + Msg(WARNING,"Plugin Transform: View[%d] does not exist",iView); + return 0; + } } vv->transform(mat); @@ -106,8 +109,6 @@ Post_View *GMSH_TransformPlugin::execute (Post_View *v) void GMSH_TransformPlugin::Run () { - int iView = (int)TransformOptions_Number[9].def; - if(iView < 0) TransformOptions_Number[9].def = 0; execute(0); }