Version: 6.3.1

src/StdMeshers/StdMeshers_ProjectionUtils.hxx

Go to the documentation of this file.
00001 // Copyright (C) 2007-2011  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 : idl implementation based on 'SMESH' unit's calsses
00024 // File      : StdMeshers_ProjectionUtils.hxx
00025 // Created   : Thu Oct 26 15:37:24 2006
00026 // Author    : Edward AGAPOV (eap)
00027 //
00028 #ifndef StdMeshers_ProjectionUtils_HeaderFile
00029 #define StdMeshers_ProjectionUtils_HeaderFile
00030 
00031 #include "SMESH_StdMeshers.hxx"
00032 
00033 #include <TopTools_DataMapOfShapeShape.hxx>
00034 #include <TopoDS_Edge.hxx>
00035 #include <TopoDS_Vertex.hxx>
00036 #include <TopoDS_Face.hxx>
00037 
00038 #include <list>
00039 #include <map>
00040 
00041 class TopoDS_Shape;
00042 class SMDS_MeshNode;
00043 class SMESH_Mesh;
00044 class SMESH_Hypothesis;
00045 class SMESH_subMesh;
00046 class TopTools_IndexedDataMapOfShapeListOfShape;
00047 
00051 class StdMeshers_ProjectionUtils
00052 {
00053  public:
00054 
00055   typedef TopTools_DataMapOfShapeShape                         TShapeShapeMap;
00056   typedef TopTools_IndexedDataMapOfShapeListOfShape            TAncestorMap;
00057   typedef std::map<const SMDS_MeshNode*, const SMDS_MeshNode*> TNodeNodeMap;
00058 
00069   static bool FindSubShapeAssociation(const TopoDS_Shape& theShape1,
00070                                       SMESH_Mesh*         theMesh1,
00071                                       const TopoDS_Shape& theShape2,
00072                                       SMESH_Mesh*         theMesh2,
00073                                       TShapeShapeMap &    theAssociationMap);
00074 
00085   static int FindFaceAssociation(const TopoDS_Face&         face1,
00086                                  TopoDS_Vertex              VV1[2],
00087                                  const TopoDS_Face&         face2,
00088                                  TopoDS_Vertex              VV2[2],
00089                                  std::list< TopoDS_Edge > & edges1,
00090                                  std::list< TopoDS_Edge > & edges2);
00091 
00098   static void InitVertexAssociation( const SMESH_Hypothesis* theHyp,
00099                                      TShapeShapeMap &        theAssociationMap,
00100                                      const TopoDS_Shape&     theTargetShape);
00101 
00110   static bool InsertAssociation( const TopoDS_Shape& theShape1,
00111                                  const TopoDS_Shape& theShape2,
00112                                  TShapeShapeMap &    theAssociationMap,
00113                                  const bool          theBidirectional=true);
00114 
00118   static TopoDS_Edge GetEdgeByVertices( SMESH_Mesh*          aMesh,
00119                                         const TopoDS_Vertex& V1,
00120                                         const TopoDS_Vertex& V2);
00121                                         
00126   static TopoDS_Face GetNextFace( const TAncestorMap& edgeToFaces,
00127                                   const TopoDS_Edge&  edge,
00128                                   const TopoDS_Face&  face);
00132   static TopoDS_Vertex GetNextVertex(const TopoDS_Edge&   edge,
00133                                      const TopoDS_Vertex& vertex);
00134 
00141   static std::pair<int,TopoDS_Edge> GetPropagationEdge( SMESH_Mesh*        aMesh,
00142                                                         const TopoDS_Edge& anEdge,
00143                                                         const TopoDS_Edge& fromEdge);
00144 
00155   static bool FindMatchingNodesOnFaces( const TopoDS_Face&     face1,
00156                                         SMESH_Mesh*            mesh1,
00157                                         const TopoDS_Face&     face2,
00158                                         SMESH_Mesh*            mesh2,
00159                                         const TShapeShapeMap & assocMap,
00160                                         TNodeNodeMap &         nodeIn2OutMap);
00167   static TopoDS_Shape OuterShape( const TopoDS_Face& face,
00168                                   TopAbs_ShapeEnum   type);
00169 
00176   static bool MakeComputed(SMESH_subMesh * sm, const int iterationNb = 0);
00177 
00185   static int Count(const TopoDS_Shape&    shape,
00186                    const TopAbs_ShapeEnum type,
00187                    const bool             ignoreSame);
00188 
00195   static void SetEventListener(SMESH_subMesh* subMesh,
00196                                TopoDS_Shape   srcShape,
00197                                SMESH_Mesh*    srcMesh);
00198 
00202   static bool IsBoundaryEdge(const TopoDS_Edge&  edge,
00203                              const TopoDS_Shape& edgeContainer,
00204                              SMESH_Mesh&         mesh);
00205 };
00206 
00207 #endif
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS