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
#include "CutMap.h"
#include "List.h"
#include "List.h"
double opt_cut_map_A(OPT_ARGS_NUM)
{
return 0;
......@@ -38,7 +38,7 @@ void GMSH_CutMapPlugin::getInfos(char *author, char *copyright, char *help_text)
int GMSH_CutMapPlugin::getNbOptions() const
{
return 2;
return 5;
}
StringXNumber *GMSH_CutMapPlugin:: GetOption (int iopt)
......@@ -59,7 +59,7 @@ double GMSH_CutMapPlugin :: levelset (double x, double y, double z, double val)
return A - val;
}
extern List_T *Post_ViewList;
extern List_T *Post_ViewList;
Post_View *GMSH_CutMapPlugin::execute (Post_View *v)
{
......
#include "CutPlane.h"
#include "List.h"
/*
Plugin Entry : GMSH_RegisterPlugin
......@@ -15,7 +16,8 @@ StringXNumber CutPlaneOptions_Number[] = {
{ GMSH_FULLRC, "A" , opt_cut_plane_A , 1. },
{ GMSH_FULLRC, "B" , 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"
......@@ -64,6 +66,27 @@ double GMSH_CutPlanePlugin :: levelset (double x, double y, double z, double val
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:
virtual void CatchErrorMessage (char *errorMessage) const;
virtual int getNbOptions() const;
virtual StringXNumber *GetOption (int iopt);
virtual Post_View *execute (Post_View *);
};
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment