Skip to content
Snippets Groups Projects
Commit 997bff11 authored by Jean-François Remacle's avatar Jean-François Remacle
Browse files

*** empty log message ***

parent 536a05ab
No related branches found
No related tags found
No related merge requests found
...@@ -38,7 +38,7 @@ void GMSH_CutMapPlugin::getInfos(char *author, char *copyright, char *help_text) ...@@ -38,7 +38,7 @@ void GMSH_CutMapPlugin::getInfos(char *author, char *copyright, char *help_text)
int GMSH_CutMapPlugin::getNbOptions() const int GMSH_CutMapPlugin::getNbOptions() const
{ {
return 2; return 5;
} }
StringXNumber *GMSH_CutMapPlugin:: GetOption (int iopt) StringXNumber *GMSH_CutMapPlugin:: GetOption (int iopt)
......
#include "CutPlane.h" #include "CutPlane.h"
#include "List.h"
/* /*
Plugin Entry : GMSH_RegisterPlugin Plugin Entry : GMSH_RegisterPlugin
...@@ -15,7 +16,8 @@ StringXNumber CutPlaneOptions_Number[] = { ...@@ -15,7 +16,8 @@ StringXNumber CutPlaneOptions_Number[] = {
{ GMSH_FULLRC, "A" , opt_cut_plane_A , 1. }, { GMSH_FULLRC, "A" , opt_cut_plane_A , 1. },
{ GMSH_FULLRC, "B" , opt_cut_plane_A , 1. }, { GMSH_FULLRC, "B" , opt_cut_plane_A , 1. },
{ GMSH_FULLRC, "C" , opt_cut_plane_A , 1. }, { GMSH_FULLRC, "C" , opt_cut_plane_A , 1. },
{ GMSH_FULLRC, "D" , opt_cut_plane_A , 1. } { GMSH_FULLRC, "D" , opt_cut_plane_A , 1. },
{ GMSH_FULLRC, "iView" , opt_cut_plane_A , 1. }
}; };
extern "C" extern "C"
...@@ -64,6 +66,27 @@ double GMSH_CutPlanePlugin :: levelset (double x, double y, double z, double val ...@@ -64,6 +66,27 @@ double GMSH_CutPlanePlugin :: levelset (double x, double y, double z, double val
return a * x + b * y + c * z + d; return a * x + b * y + c * z + d;
} }
extern List_T *Post_ViewList;
Post_View *GMSH_CutPlanePlugin::execute (Post_View *v)
{
a = CutPlaneOptions_Number[0].def;
b = CutPlaneOptions_Number[1].def;
c = CutPlaneOptions_Number[2].def;
d = CutPlaneOptions_Number[3].def;
int iView = (int)CutPlaneOptions_Number[4].def;
if(v)return GMSH_LevelsetPlugin::execute(v);
else
{
if(List_Nbr(Post_ViewList) < iView)
{
Msg(WARNING,"Plugin CutPlane, view %d not loaded\n",iView);
return 0;
}
return GMSH_LevelsetPlugin::execute((Post_View*)List_Pointer_Test(Post_ViewList,iView));
}
}
......
...@@ -21,5 +21,6 @@ public: ...@@ -21,5 +21,6 @@ public:
virtual void CatchErrorMessage (char *errorMessage) const; virtual void CatchErrorMessage (char *errorMessage) const;
virtual int getNbOptions() const; virtual int getNbOptions() const;
virtual StringXNumber *GetOption (int iopt); virtual StringXNumber *GetOption (int iopt);
virtual Post_View *execute (Post_View *);
}; };
#endif #endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment