1 // Copyright (C) 2007-2013 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
21 // File : HexoticPlugin_Hexotic.hxx
22 // Author : Lioka RAZAFINDRAZAKA (CEA)
25 #ifndef _HexoticPlugin_Hexotic_HXX_
26 #define _HexoticPlugin_Hexotic_HXX_
28 #include "HexoticPlugin_Defs.hxx"
30 #include "SMESH_Algo.hxx"
31 #include "SMESH_Mesh.hxx"
32 #include "Utils_SALOME_Exception.hxx"
34 #ifdef WITH_BLSURFPLUGIN
35 #include "BLSURFPlugin_Hypothesis.hxx"
41 class HexoticPlugin_Hypothesis;
42 class TCollection_AsciiString;
44 class HEXOTICPLUGIN_EXPORT HexoticPlugin_Hexotic: public SMESH_3D_Algo
47 HexoticPlugin_Hexotic(int hypId, int studyId, SMESH_Gen* gen);
48 virtual ~HexoticPlugin_Hexotic();
50 #ifdef WITH_BLSURFPLUGIN
51 bool CheckBLSURFHypothesis(SMESH_Mesh& aMesh,
52 const TopoDS_Shape& aShape);
55 virtual bool CheckHypothesis(SMESH_Mesh& aMesh,
56 const TopoDS_Shape& aShape,
57 SMESH_Hypothesis::Hypothesis_Status& aStatus);
59 void SetParameters(const HexoticPlugin_Hypothesis* hyp);
61 virtual bool Compute(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape);
63 virtual bool Compute(SMESH_Mesh & aMesh, SMESH_MesherHelper* aHelper);
65 #ifdef WITH_SMESH_CANCEL_COMPUTE
66 virtual void CancelCompute();
67 bool computeCanceled() { return _compute_canceled;};
70 virtual bool Evaluate(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape,
71 MapShapeNbElems& aResMap);
74 const HexoticPlugin_Hypothesis* _hypothesis;
78 std::string getHexoticCommand(const TCollection_AsciiString& Hexotic_In,
79 const TCollection_AsciiString& Hexotic_Out) const;
87 bool _hexoticIgnoreRidges;
88 bool _hexoticInvalidElements;
89 bool _hexoticFilesKept;
90 int _hexoticSharpAngleThreshold;
92 std::string _hexoticWorkingDirectory;
93 int _hexoticVerbosity;
94 int _hexoticMaxMemory;
96 SMDS_MeshNode** _tabNode;
98 #ifdef WITH_BLSURFPLUGIN
99 const BLSURFPlugin_Hypothesis* _blsurfHypo;
102 #ifdef WITH_SMESH_CANCEL_COMPUTE
103 volatile bool _compute_canceled;