1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D
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.
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.
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
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 // File : GHS3DPRLPlugin_Hypothesis.hxx
21 // Author : Christian VAN WAMBEKE (CEA) (from Hexotic plugin Lioka RAZAFINDRAZAKA)
24 #ifndef _GHS3DPRLPlugin_Hypothesis_HXX_
25 #define _GHS3DPRLPlugin_Hypothesis_HXX_
27 #include "SMESH_Hypothesis.hxx"
28 #include "Utils_SALOME_Exception.hxx"
30 // Parameters for work of GHS3DPRL
33 class GHS3DPRLPlugin_Hypothesis: public SMESH_Hypothesis
37 GHS3DPRLPlugin_Hypothesis(int hypId, int studyId, SMESH_Gen* gen);
39 void SetMEDName(std::string theVal);
40 std::string GetMEDName() const { return _MEDName; }
42 void SetNbPart(int theVal);
43 int GetNbPart() const { return _NbPart; }
45 void SetKeepFiles(bool theVal);
46 bool GetKeepFiles() const { return _KeepFiles; }
48 void SetBackground(bool theVal);
49 bool GetBackground() const { return _Background; }
51 void SetToMeshHoles(bool theVal);
52 bool GetToMeshHoles() const { return _ToMeshHoles; }
54 // the parameters default values
56 static std::string GetDefaultMEDName();
57 static int GetDefaultNbPart();
58 static bool GetDefaultKeepFiles();
59 static bool GetDefaultBackground();
60 static bool GetDefaultToMeshHoles();
63 virtual std::ostream& SaveTo(std::ostream& save);
64 virtual std::istream& LoadFrom(std::istream& load);
65 friend std::ostream& operator <<(std::ostream& save, GHS3DPRLPlugin_Hypothesis& hyp);
66 friend std::istream& operator >>(std::istream& load, GHS3DPRLPlugin_Hypothesis& hyp);
70 * \param theMesh - the built mesh
71 * \param theShape - the geometry of interest
72 * \retval bool - always false
74 virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
76 * \brief Initialize my parameter values by default parameters.
77 * \retval bool - true if parameter values have been successfully defined
79 virtual bool SetParametersByDefaults(const TDefaults& dflts, const SMESH_Mesh* theMesh=0);
86 std::string _MEDName; // generic path/name of med files
87 int _NbPart; // number of partitions
88 bool _KeepFiles; // keep intermediates tepal files or not
89 bool _Background; // tepal in background