Salome HOME
fbd9fd068d0af2f50fd36a245a6c2209ffb8015d
[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 // Date      : 20/03/2006
25 // Project   : SALOME
26 //=============================================================================
27
28 #ifndef _BLSURFPlugin_BLSURF_HXX_
29 #define _BLSURFPlugin_BLSURF_HXX_
30
31 #include "SMESH_2D_Algo.hxx"
32 #include "SMESH_Mesh.hxx"
33 #include "Utils_SALOME_Exception.hxx"
34
35 class BLSURFPlugin_Hypothesis;
36
37 class BLSURFPlugin_BLSURF: public SMESH_2D_Algo {
38   public:
39     BLSURFPlugin_BLSURF(int hypId, int studyId, SMESH_Gen* gen);
40
41     virtual ~BLSURFPlugin_BLSURF();
42
43     virtual bool CheckHypothesis(SMESH_Mesh&                          aMesh,
44                                  const TopoDS_Shape&                  aShape,
45                                  SMESH_Hypothesis::Hypothesis_Status& aStatus);
46
47     void SetParameters(const BLSURFPlugin_Hypothesis* hyp);
48
49     virtual bool Compute(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape);
50
51     ostream & SaveTo(ostream & save);
52     istream & LoadFrom(istream & load);
53     friend ostream & operator << (ostream & save, BLSURFPlugin_BLSURF & hyp);
54     friend istream & operator >> (istream & load, BLSURFPlugin_BLSURF & hyp);
55
56   protected:
57     const BLSURFPlugin_Hypothesis* _hypothesis;
58
59   private:
60     int    _physicalMesh;
61     double _phySize;
62     int    _geometricMesh;
63     double _angleMeshS;
64     double _gradation;
65     bool   _quadAllowed;
66     bool   _decimesh;
67 };
68
69 #endif