-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D
+// Copyright (C) 2007-2022 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
#define _HexoticPlugin_Hexotic_HXX_
#include "HexoticPlugin_Defs.hxx"
+#include "HexoticPlugin_Hypothesis.hxx"
#include "SMESH_Algo.hxx"
#include "SMESH_Mesh.hxx"
#include <string>
-class SMESH_Mesh;
+#include "DriverGMF_Read.hxx"
+#include "DriverGMF_Write.hxx"
+
+#include <SALOMEconfig.h>
+#include CORBA_CLIENT_HEADER(GEOM_Gen)
+#include <SMESH_Gen_i.hxx>
+
class HexoticPlugin_Hypothesis;
class TCollection_AsciiString;
+class gp_Pnt;
+class MG_Hexotic_API;
class HEXOTICPLUGIN_EXPORT HexoticPlugin_Hexotic: public SMESH_3D_Algo
{
public:
- HexoticPlugin_Hexotic(int hypId, int studyId, SMESH_Gen* gen);
+ HexoticPlugin_Hexotic(int hypId, SMESH_Gen* gen);
virtual ~HexoticPlugin_Hexotic();
#ifdef WITH_BLSURFPLUGIN
virtual bool Compute(SMESH_Mesh & aMesh, SMESH_MesherHelper* aHelper);
-#ifdef WITH_SMESH_CANCEL_COMPUTE
- virtual void CancelCompute();
- bool computeCanceled() { return _compute_canceled;};
-#endif
+ virtual void CancelCompute();
+ bool computeCanceled() { return _computeCanceled; }
virtual bool Evaluate(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape,
MapShapeNbElems& aResMap);
private:
std::string getHexoticCommand(const TCollection_AsciiString& Hexotic_In,
- const TCollection_AsciiString& Hexotic_Out) const;
-
- int _iShape;
- int _nbShape;
- int _hexesMinLevel;
- int _hexesMaxLevel;
- double _hexesMinSize;
- double _hexesMaxSize;
- bool _hexoticIgnoreRidges;
- bool _hexoticInvalidElements;
- bool _hexoticFilesKept;
- int _hexoticSharpAngleThreshold;
- int _hexoticNbProc;
- std::string _hexoticWorkingDirectory;
- int _hexoticVerbosity;
- int _hexoticSdMode;
- SMDS_MeshNode** _tabNode;
+ const TCollection_AsciiString& Hexotic_Out,
+ const TCollection_AsciiString& Hexotic_Sol,
+ const bool forExecutable) const;
+
+ GEOM::GEOM_Object_var entryToGeomObj(std::string entry);
+ TopoDS_Shape entryToShape(std::string entry);
+
+ std::vector<std::string> writeSizeMapFile(MG_Hexotic_API* mgOutput,
+ std::string fileName);
+
+ int _iShape;
+ int _nbShape;
+ int _hexesMinLevel;
+ int _hexesMaxLevel;
+ double _hexesMinSize;
+ double _hexesMaxSize;
+ double _approxAngle;
+ bool _hexoticIgnoreRidges;
+ bool _hexoticInvalidElements;
+ bool _hexoticFilesKept;
+ int _hexoticSharpAngleThreshold;
+ int _hexoticNbProc;
+ std::string _hexoticWorkingDirectory;
+ int _hexoticVerbosity;
+ int _hexoticMaxMemory;
+ int _hexoticSdMode;
+ std::string _textOptions;
+ HexoticPlugin_Hypothesis::THexoticSizeMaps _sizeMaps;
+ int _nbLayers;
+ double _firstLayerSize;
+ bool _direction;
+ double _growth;
+ std::vector<int> _facesWithLayers;
+ std::vector<int> _imprintedFaces;
+ SMDS_MeshNode** _tabNode;
+ bool _keepFiles;
+ bool _removeLogOnSuccess;
+ bool _logInStandardOutput;
#ifdef WITH_BLSURFPLUGIN
const BLSURFPlugin_Hypothesis* _blsurfHypo;
#endif
-#ifdef WITH_SMESH_CANCEL_COMPUTE
- volatile bool _compute_canceled;
-#endif
};
#endif