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
22 #include "GmshConfig.h"
23 #include "GModelIO_OCC.h"
25 #include "GEdgeCompound.h"
26 #include "GFaceCompound.h"
29 #ifndef _GMSHPlugin_Mesher_HXX_
30 #define _GMSHPlugin_Mesher_HXX_
32 #include "GMSHPlugin_Defs.hxx"
33 #include "StdMeshers_FaceSide.hxx"
34 #include "SMDS_MeshElement.hxx"
35 #include "SMESH_Algo.hxx"
45 class TopTools_DataMapOfShapeShape;
46 class TopTools_IndexedMapOfShape;
47 class GMSHPlugin_Hypothesis;
50 //=============================================================================
52 * \brief This class calls the GMSH mesher of OCC geometry
54 //=============================================================================
56 class GMSHPLUGIN_EXPORT GMSHPlugin_Mesher
59 // ---------- PUBLIC METHODS ----------
61 GMSHPlugin_Mesher (SMESH_Mesh* mesh, const TopoDS_Shape& aShape);
63 void SetParameters(const GMSHPlugin_Hypothesis* hyp);
67 bool Evaluate(MapShapeNbElems& aResMap);
72 const TopoDS_Shape& _shape;
82 double _minSize, _maxSize;
83 bool _secondOrder, _useIncomplElem;
87 std::set<std::string> _compounds;
89 void SetGmshOptions();
90 void CreateGmshCompounds();
92 float DistBoundingBox(SBoundingBox3d& bounds,SPoint3& point);
94 class mymsg : public GmshMessage
99 mymsg(GModel* _gModel) : _gModel(_gModel), GmshMessage() {}
100 void operator()(std::string level, std::string msg);