1 // Copyright (C) 2012-2015 ALNEOS
2 // Copyright (C) 2016 EDF R&D
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 // See http://www.alneos.com/ or email : contact@alneos.fr
21 #ifndef _GMSHPlugin_Mesher_HXX_
22 #define _GMSHPlugin_Mesher_HXX_
26 #include "GmshConfig.h"
27 #include "GModelIO_OCC.h"
28 #include "GModelIO_GEO.h"
30 #include "GEdgeCompound.h"
31 #include "GFaceCompound.h"
34 #include "GMSHPlugin_Defs.hxx"
35 #include "StdMeshers_FaceSide.hxx"
36 #include "SMDS_MeshElement.hxx"
37 #include "SMESH_Algo.hxx"
47 //class TopTools_DataMapOfShapeShape;
48 //class TopTools_IndexedMapOfShape;
49 class GMSHPlugin_Hypothesis;
52 //=============================================================================
54 * \brief This class calls the GMSH mesher of OCC geometry
56 //=============================================================================
58 class GMSHPLUGIN_EXPORT GMSHPlugin_Mesher
61 // ---------- PUBLIC METHODS ----------
63 GMSHPlugin_Mesher (SMESH_Mesh* mesh, const TopoDS_Shape& aShape);
65 void SetParameters(const GMSHPlugin_Hypothesis* hyp);
69 bool Evaluate(MapShapeNbElems& aResMap);
74 const TopoDS_Shape& _shape;
84 double _minSize, _maxSize;
85 bool _secondOrder, _useIncomplElem;
89 std::set<std::string> _compounds;
91 void SetGmshOptions();
92 void CreateGmshCompounds();
94 float DistBoundingBox(SBoundingBox3d& bounds,SPoint3& point);
96 class mymsg : public GmshMessage
101 mymsg(GModel* _gModel) : _gModel(_gModel), GmshMessage() {}
102 void operator()(std::string level, std::string msg);