Go to the documentation of this file.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 #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