1 // Copyright (C) 2012-2013 ALNEOS
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.alneos.com/ or email : contact@alneos.fr
21 #include "GmshConfig.h"
22 #include "GModelIO_OCC.h"
24 #include "GEdgeCompound.h"
25 #include "GFaceCompound.h"
28 #ifndef _GMSHPlugin_Mesher_HXX_
29 #define _GMSHPlugin_Mesher_HXX_
31 #include "GMSHPlugin_Defs.hxx"
32 #include "StdMeshers_FaceSide.hxx"
33 #include "SMDS_MeshElement.hxx"
34 #include "SMESH_Algo.hxx"
44 class TopTools_DataMapOfShapeShape;
45 class TopTools_IndexedMapOfShape;
46 class GMSHPlugin_Hypothesis;
49 //=============================================================================
51 * \brief This class calls the GMSH mesher of OCC geometry
53 //=============================================================================
55 class GMSHPLUGIN_EXPORT GMSHPlugin_Mesher
58 // ---------- PUBLIC METHODS ----------
60 GMSHPlugin_Mesher (SMESH_Mesh* mesh, const TopoDS_Shape& aShape);
62 void SetParameters(const GMSHPlugin_Hypothesis* hyp);
66 bool Evaluate(MapShapeNbElems& aResMap);
71 const TopoDS_Shape& _shape;
81 double _minSize, _maxSize;
82 bool _secondOrder, _useIncomplElem;
86 std::set<std::string> _compounds;
88 void SetGmshOptions();
89 void CreateGmshCompounds();
91 float DistBoundingBox(SBoundingBox3d& bounds,SPoint3& point);
93 class mymsg : public GmshMessage
98 mymsg(GModel* _gModel) : _gModel(_gModel), GmshMessage() {}
99 void operator()(std::string level, std::string msg);