00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef _NETGENPlugin_Mesher_HXX_
00031 #define _NETGENPlugin_Mesher_HXX_
00032
00033 #include "NETGENPlugin_Defs.hxx"
00034 #include "StdMeshers_FaceSide.hxx"
00035 #include <map>
00036
00037 class SMESH_Mesh;
00038 class SMESHDS_Mesh;
00039 class TopoDS_Shape;
00040 class NETGENPlugin_Hypothesis;
00041 class NETGENPlugin_SimpleHypothesis_2D;
00042 namespace netgen {
00043 class OCCGeometry;
00044 class Mesh;
00045 }
00046
00051 class NETGENPLUGIN_EXPORT NETGENPlugin_Mesher
00052 {
00053 public:
00054
00055
00056 NETGENPlugin_Mesher (SMESH_Mesh* mesh, const TopoDS_Shape& aShape,
00057 const bool isVolume);
00058
00059 void SetParameters(const NETGENPlugin_Hypothesis* hyp);
00060 void SetParameters(const NETGENPlugin_SimpleHypothesis_2D* hyp);
00061
00062 bool Compute();
00063
00064 bool Evaluate(MapShapeNbElems& aResMap);
00065
00066 static void PrepareOCCgeometry(netgen::OCCGeometry& occgeom,
00067 const TopoDS_Shape& shape,
00068 SMESH_Mesh& mesh,
00069 std::list< SMESH_subMesh* > * meshedSM=0);
00070
00071 static void RemoveTmpFiles();
00072
00073 protected:
00074
00075 bool fillNgMesh(netgen::OCCGeometry& occgeom,
00076 netgen::Mesh& ngMesh,
00077 std::vector<SMDS_MeshNode*>& nodeVec,
00078 const std::list< SMESH_subMesh* > & meshedSM);
00079
00080 void defaultParameters();
00081
00082
00083 private:
00084 SMESH_Mesh* _mesh;
00085 const TopoDS_Shape& _shape;
00086 bool _isVolume;
00087 bool _optimize;
00088
00089 const NETGENPlugin_SimpleHypothesis_2D * _simpleHyp;
00090 std::map< int, std::pair<int,int> > _faceDescriptors;
00091 };
00092
00093 #endif