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 #ifndef _StdMeshers_MEFISTO_2D_HXX_
00030 #define _StdMeshers_MEFISTO_2D_HXX_
00031
00032 #include "SMESH_StdMeshers.hxx"
00033
00034 #include "SMESH_2D_Algo.hxx"
00035
00036 class TopoDS_Face;
00037 class StdMeshers_MaxElementArea;
00038 class StdMeshers_LengthFromEdges;
00039 class SMDS_MeshNode;
00040 class SMESH_MesherHelper;
00041 class StdMeshers_FaceSide;
00042
00043 #include <vector>
00044 #include <list>
00045 #include "Rn.h"
00046
00047 class STDMESHERS_EXPORT StdMeshers_MEFISTO_2D: public SMESH_2D_Algo
00048 {
00049 public:
00050 StdMeshers_MEFISTO_2D(int hypId, int studyId, SMESH_Gen* gen);
00051 virtual ~StdMeshers_MEFISTO_2D();
00052
00053 virtual bool CheckHypothesis(SMESH_Mesh& aMesh,
00054 const TopoDS_Shape& aShape,
00055 SMESH_Hypothesis::Hypothesis_Status& aStatus);
00056
00057 virtual bool Compute(SMESH_Mesh& aMesh,
00058 const TopoDS_Shape& aShape);
00059
00060 virtual bool Evaluate(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape,
00061 MapShapeNbElems& aResMap);
00062
00063 typedef boost::shared_ptr< StdMeshers_FaceSide> StdMeshers_FaceSidePtr;
00064 typedef std::vector< StdMeshers_FaceSidePtr > TWireVector;
00065
00066 bool LoadPoints(TWireVector & wires,
00067 R2* uvslf,
00068 std::vector< const SMDS_MeshNode*>& mefistoToDS,
00069 double scalex, double scaley);
00070
00071 void ComputeScaleOnFace(SMESH_Mesh& aMesh,
00072 const TopoDS_Face& aFace,
00073 double& scalex,
00074 double& scaley);
00075
00076 void StoreResult (Z nbst, R2* uvst, Z nbt, Z* nust,
00077 std::vector< const SMDS_MeshNode*>& mefistoToDS,
00078 double scalex, double scaley);
00079
00080 protected:
00081 double _edgeLength;
00082 double _maxElementArea;
00083 const StdMeshers_MaxElementArea* _hypMaxElementArea;
00084 const StdMeshers_LengthFromEdges* _hypLengthFromEdges;
00085
00086 std::list<const SMDS_MeshNode*> myNodesOnCommonV;
00087
00088 SMESH_MesherHelper* myTool;
00089 };
00090
00091 #endif