1 // Copyright (C) 2007-2021 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, or (at your option) any later version.
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"
29 #include "HexoticPlugin_Hypothesis.hxx"
31 #include "SMESH_Algo.hxx"
32 #include "SMESH_Mesh.hxx"
33 #include "Utils_SALOME_Exception.hxx"
35 #ifdef WITH_BLSURFPLUGIN
36 #include "BLSURFPlugin_Hypothesis.hxx"
41 #include "DriverGMF_Read.hxx"
42 #include "DriverGMF_Write.hxx"
44 #include <SALOMEconfig.h>
45 #include CORBA_CLIENT_HEADER(GEOM_Gen)
46 #include <SMESH_Gen_i.hxx>
48 class HexoticPlugin_Hypothesis;
49 class TCollection_AsciiString;
53 class HEXOTICPLUGIN_EXPORT HexoticPlugin_Hexotic: public SMESH_3D_Algo
56 HexoticPlugin_Hexotic(int hypId, SMESH_Gen* gen);
57 virtual ~HexoticPlugin_Hexotic();
59 #ifdef WITH_BLSURFPLUGIN
60 bool CheckBLSURFHypothesis(SMESH_Mesh& aMesh,
61 const TopoDS_Shape& aShape);
64 virtual bool CheckHypothesis(SMESH_Mesh& aMesh,
65 const TopoDS_Shape& aShape,
66 SMESH_Hypothesis::Hypothesis_Status& aStatus);
68 void SetParameters(const HexoticPlugin_Hypothesis* hyp);
70 virtual bool Compute(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape);
72 virtual bool Compute(SMESH_Mesh & aMesh, SMESH_MesherHelper* aHelper);
74 virtual void CancelCompute();
75 bool computeCanceled() { return _computeCanceled; }
77 virtual bool Evaluate(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape,
78 MapShapeNbElems& aResMap);
81 const HexoticPlugin_Hypothesis* _hypothesis;
85 std::string getHexoticCommand(const TCollection_AsciiString& Hexotic_In,
86 const TCollection_AsciiString& Hexotic_Out,
87 const TCollection_AsciiString& Hexotic_Sol,
88 const bool forExecutable) const;
90 GEOM::GEOM_Object_var entryToGeomObj(std::string entry);
91 TopoDS_Shape entryToShape(std::string entry);
93 std::vector<std::string> writeSizeMapFile(MG_Hexotic_API* mgOutput,
94 std::string fileName);
100 double _hexesMinSize;
101 double _hexesMaxSize;
103 bool _hexoticIgnoreRidges;
104 bool _hexoticInvalidElements;
105 bool _hexoticFilesKept;
106 int _hexoticSharpAngleThreshold;
108 std::string _hexoticWorkingDirectory;
109 int _hexoticVerbosity;
110 int _hexoticMaxMemory;
112 std::string _textOptions;
113 HexoticPlugin_Hypothesis::THexoticSizeMaps _sizeMaps;
115 double _firstLayerSize;
118 std::vector<int> _facesWithLayers;
119 std::vector<int> _imprintedFaces;
120 SMDS_MeshNode** _tabNode;
122 bool _removeLogOnSuccess;
123 bool _logInStandardOutput;
125 #ifdef WITH_BLSURFPLUGIN
126 const BLSURFPlugin_Hypothesis* _blsurfHypo;