Salome HOME
First version of SizeMap for BLSurf :
[plugins/blsurfplugin.git] / src / BLSURFPlugin / BLSURFPlugin_BLSURF.hxx
1 //  Copyright (C) 2007-2008  CEA/DEN, EDF R&D
2 //
3 //  This library is free software; you can redistribute it and/or
4 //  modify it under the terms of the GNU Lesser General Public
5 //  License as published by the Free Software Foundation; either
6 //  version 2.1 of the License.
7 //
8 //  This library is distributed in the hope that it will be useful,
9 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
10 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 //  Lesser General Public License for more details.
12 //
13 //  You should have received a copy of the GNU Lesser General Public
14 //  License along with this library; if not, write to the Free Software
15 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19 // ---
20 // File    : BLSURFPlugin_BLSURF.hxx
21 // Authors : Francis KLOSS (OCC) & Patrick LAUG (INRIA) & Lioka RAZAFINDRAZAKA (CEA)
22 //           & Aurelien ALLEAUME (DISTENE)
23 // ---
24 //
25 #ifndef _BLSURFPlugin_BLSURF_HXX_
26 #define _BLSURFPlugin_BLSURF_HXX_
27
28 #include <Python.h>
29 #include "SMESH_2D_Algo.hxx"
30 #include "SMESH_Mesh.hxx"
31 #include "Utils_SALOME_Exception.hxx"
32 extern "C"{
33 #include "distene/api.h"
34 }
35
36 class BLSURFPlugin_Hypothesis;
37
38 class BLSURFPlugin_BLSURF: public SMESH_2D_Algo {
39   public:
40     BLSURFPlugin_BLSURF(int hypId, int studyId, SMESH_Gen* gen);
41
42     virtual ~BLSURFPlugin_BLSURF();
43
44     virtual bool CheckHypothesis(SMESH_Mesh&                          aMesh,
45                                  const TopoDS_Shape&                  aShape,
46                                  SMESH_Hypothesis::Hypothesis_Status& aStatus);
47
48     void SetParameters(const BLSURFPlugin_Hypothesis* hyp, blsurf_session_t *bls);
49
50     virtual bool Compute(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape);
51
52     ostream & SaveTo(ostream & save);
53     istream & LoadFrom(istream & load);
54     friend ostream & operator << (ostream & save, BLSURFPlugin_BLSURF & hyp);
55     friend istream & operator >> (istream & load, BLSURFPlugin_BLSURF & hyp);
56  
57   protected:
58     const BLSURFPlugin_Hypothesis* _hypothesis;
59
60   private:
61       PyObject *          main_mod;
62       PyObject *          main_dict;
63
64 };
65
66 #endif