Back to index

salome-smesh  6.5.0
StdMeshers_MEFISTO_2D.hxx
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  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 
00023 //  SMESH SMESH : implementaion of SMESH idl descriptions
00024 //  File   : StdMeshers_MEFISTO_2D.hxx
00025 //           Moved here from SMESH_MEFISTO_2D.hxx
00026 //  Author : Paul RASCLE, EDF
00027 //  Module : SMESH
00028 //  $Header: /home/server/cvs/SMESH/SMESH_SRC/src/StdMeshers/StdMeshers_MEFISTO_2D.hxx,v 1.10.2.2.6.2.8.1 2012-04-13 09:31:20 vsr Exp $
00029 //
00030 #ifndef _StdMeshers_MEFISTO_2D_HXX_
00031 #define _StdMeshers_MEFISTO_2D_HXX_
00032 
00033 #include "SMESH_StdMeshers.hxx"
00034 
00035 #include "SMESH_2D_Algo.hxx"
00036 
00037 class TopoDS_Face;
00038 class StdMeshers_MaxElementArea;
00039 class StdMeshers_LengthFromEdges;
00040 class SMDS_MeshNode;
00041 class SMESH_MesherHelper;
00042 class StdMeshers_FaceSide;
00043 
00044 #include <vector>
00045 #include <list>
00046 #include "Rn.h"
00047 
00048 class STDMESHERS_EXPORT StdMeshers_MEFISTO_2D: public SMESH_2D_Algo
00049 {
00050 public:
00051   StdMeshers_MEFISTO_2D(int hypId, int studyId, SMESH_Gen* gen);
00052   virtual ~StdMeshers_MEFISTO_2D();
00053 
00054   virtual bool CheckHypothesis(SMESH_Mesh& aMesh,
00055                                const TopoDS_Shape& aShape,
00056                                SMESH_Hypothesis::Hypothesis_Status& aStatus);
00057 
00058   virtual bool Compute(SMESH_Mesh& aMesh,
00059                        const TopoDS_Shape& aShape);
00060 
00061   virtual bool Evaluate(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape,
00062                         MapShapeNbElems& aResMap);
00063 
00064   typedef boost::shared_ptr< StdMeshers_FaceSide> StdMeshers_FaceSidePtr;
00065   typedef std::vector< StdMeshers_FaceSidePtr > TWireVector;
00066 
00067   bool LoadPoints(TWireVector &                       wires,
00068                   R2*                                 uvslf, 
00069                   std::vector< const SMDS_MeshNode*>& mefistoToDS,
00070                   double scalex, double               scaley);
00071 
00072   void ComputeScaleOnFace(SMESH_Mesh& aMesh,
00073                           const TopoDS_Face& aFace,
00074                           double& scalex,
00075                           double& scaley);
00076 
00077   void StoreResult (Z nbst, R2* uvst, Z nbt, Z* nust, 
00078                     std::vector< const SMDS_MeshNode*>& mefistoToDS,
00079                     double scalex, double scaley);
00080                                           
00081 protected:
00082   double                            _edgeLength;
00083   double                            _maxElementArea;
00084   const StdMeshers_MaxElementArea*  _hypMaxElementArea;
00085   const StdMeshers_LengthFromEdges* _hypLengthFromEdges;
00086 
00087   std::list<const SMDS_MeshNode*> myNodesOnCommonV;
00088 
00089   SMESH_MesherHelper* myTool; // tool for working with quadratic elements
00090 };
00091 
00092 #endif