SALOME - SMESH
|
00001 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE 00002 // 00003 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, 00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 00005 // 00006 // This library is free software; you can redistribute it and/or 00007 // modify it under the terms of the GNU Lesser General Public 00008 // License as published by the Free Software Foundation; either 00009 // version 2.1 of the License. 00010 // 00011 // This library is distributed in the hope that it will be useful, 00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 // Lesser General Public License for more details. 00015 // 00016 // You should have received a copy of the GNU Lesser General Public 00017 // License along with this library; if not, write to the Free Software 00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 // 00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com 00021 // 00022 // SMESH SMESH : implementaion of SMESH idl descriptions 00023 // File : StdMeshers_MEFISTO_2D.hxx 00024 // Moved here from SMESH_MEFISTO_2D.hxx 00025 // Author : Paul RASCLE, EDF 00026 // Module : SMESH 00027 // $Header$ 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; // tool for working with quadratic elements 00089 }; 00090 00091 #endif