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