27 #ifndef StdMeshers_ProjectionUtils_HeaderFile 28 #define StdMeshers_ProjectionUtils_HeaderFile 32 #include <TopTools_DataMapOfShapeShape.hxx> 33 #include <TopoDS_Edge.hxx> 34 #include <TopoDS_Vertex.hxx> 35 #include <TopoDS_Face.hxx> 45 class TopTools_IndexedDataMapOfShapeListOfShape;
56 typedef std::map<const SMDS_MeshNode*, const SMDS_MeshNode*>
TNodeNodeMap;
70 const TopoDS_Shape& theShape2,
72 TShapeShapeMap & theAssociationMap);
86 const TopoDS_Face& face2,
88 std::list< TopoDS_Edge > & edges1,
89 std::list< TopoDS_Edge > & edges2);
98 TShapeShapeMap & theAssociationMap,
99 const TopoDS_Shape& theTargetShape);
110 const TopoDS_Shape& theShape2,
111 TShapeShapeMap & theAssociationMap,
112 const bool theBidirectional=
true);
116 static bool IsSubShape(
const TopoDS_Shape& shape,
const TopoDS_Shape& mainShape );
122 const TopoDS_Vertex& V1,
123 const TopoDS_Vertex& V2);
129 static TopoDS_Face
GetNextFace(
const TAncestorMap& edgeToFaces,
130 const TopoDS_Edge& edge,
131 const TopoDS_Face& face);
136 const TopoDS_Vertex& vertex);
145 const TopoDS_Edge& anEdge,
146 const TopoDS_Edge& fromEdge);
160 const TopoDS_Face& face2,
162 const TShapeShapeMap & assocMap,
163 TNodeNodeMap & nodeIn2OutMap);
177 static TopoDS_Shape
OuterShape(
const TopoDS_Face& face,
178 TopAbs_ShapeEnum type);
195 static int Count(
const TopoDS_Shape& shape,
196 const TopAbs_ShapeEnum type,
197 const bool ignoreSame);
206 TopoDS_Shape srcShape,
213 const TopoDS_Shape& edgeContainer,
static bool IsBoundaryEdge(const TopoDS_Edge &edge, const TopoDS_Shape &edgeContainer, SMESH_Mesh &mesh)
Return true if edge is a boundary of edgeContainer.
TopTools_DataMapOfShapeShape TShapeShapeMap
static int Count(const TopoDS_Shape &shape, const TopAbs_ShapeEnum type, const bool ignoreSame)
Count nb of subshapes.
static int FindFaceAssociation(const TopoDS_Face &face1, TopoDS_Vertex VV1[2], const TopoDS_Face &face2, TopoDS_Vertex VV2[2], std::list< TopoDS_Edge > &edges1, std::list< TopoDS_Edge > &edges2)
Find association of edges of faces.
TopTools_IndexedDataMapOfShapeListOfShape TAncestorMap
static bool MakeComputed(SMESH_subMesh *sm, const int iterationNb=0)
Check that submeshis is computed and try to compute it if is not.
static bool IsClosedEdge(const TopoDS_Edge &anEdge)
Check if the first and last vertices of an edge are the same.
static bool FindMatchingNodesOnFaces(const TopoDS_Face &face1, SMESH_Mesh *mesh1, const TopoDS_Face &face2, SMESH_Mesh *mesh2, const TShapeShapeMap &assocMap, TNodeNodeMap &nodeIn2OutMap)
Find corresponding nodes on two faces.
static TopoDS_Shape OuterShape(const TopoDS_Face &face, TopAbs_ShapeEnum type)
Return any subshape of a face belonging to the outer wire.
static bool InsertAssociation(const TopoDS_Shape &theShape1, const TopoDS_Shape &theShape2, TShapeShapeMap &theAssociationMap, const bool theBidirectional=true)
Inserts association theShape1 <-> theShape2 to TShapeShapeMap.
static TopoDS_Edge GetEdgeByVertices(SMESH_Mesh *aMesh, const TopoDS_Vertex &V1, const TopoDS_Vertex &V2)
Finds an edge by its vertices in a main shape of the mesh.
static std::pair< int, TopoDS_Edge > GetPropagationEdge(SMESH_Mesh *aMesh, const TopoDS_Edge &anEdge, const TopoDS_Edge &fromEdge)
Return an oriented propagation edge.
static void SetEventListener(SMESH_subMesh *subMesh, TopoDS_Shape srcShape, SMESH_Mesh *srcMesh)
Set event listeners to submesh with projection algo.
static void InitVertexAssociation(const SMESH_Hypothesis *theHyp, TShapeShapeMap &theAssociationMap, const TopoDS_Shape &theTargetShape)
Insert vertex association defined by a hypothesis into a map.
static bool IsSubShape(const TopoDS_Shape &shape, SMESH_Mesh *aMesh)
static bool FindSubShapeAssociation(const TopoDS_Shape &theShape1, SMESH_Mesh *theMesh1, const TopoDS_Shape &theShape2, SMESH_Mesh *theMesh2, TShapeShapeMap &theAssociationMap)
Looks for association of all subshapes of two shapes.
Class encapsulating methods common to Projection algorithms.
static TopoDS_Face GetNextFace(const TAncestorMap &edgeToFaces, const TopoDS_Edge &edge, const TopoDS_Face &face)
Return another face sharing an edge.
std::map< const SMDS_MeshNode *, const SMDS_MeshNode * > TNodeNodeMap
static TopoDS_Vertex GetNextVertex(const TopoDS_Edge &edge, const TopoDS_Vertex &vertex)
Return other vertex of an edge.