class SMESH_Mesh;
class SMESH_Hypothesis;
class SMESH_subMesh;
+class TopTools_IndexedDataMapOfShapeListOfShape;
/*!
* \brief Class encapsulating methods common to Projection algorithms
*/
-class STDMESHERS_EXPORT StdMeshers_ProjectionUtils
+class StdMeshers_ProjectionUtils
{
public:
typedef TopTools_DataMapOfShapeShape TShapeShapeMap;
+ typedef TopTools_IndexedDataMapOfShapeListOfShape TAncestorMap;
typedef std::map<const SMDS_MeshNode*, const SMDS_MeshNode*> TNodeNodeMap;
/*!
* \brief Insert vertex association defined by a hypothesis into a map
* \param theHyp - hypothesis
* \param theAssociationMap - association map
+ * \param theTargetShape - the shape theHyp assigned to
*/
static void InitVertexAssociation( const SMESH_Hypothesis* theHyp,
- TShapeShapeMap & theAssociationMap);
+ TShapeShapeMap & theAssociationMap,
+ const TopoDS_Shape& theTargetShape);
/*!
* \brief Inserts association theShape1 <-> theShape2 to TShapeShapeMap
/*!
* \brief Finds an edge by its vertices in a main shape of the mesh
- * \param aMesh - the mesh
- * \param V1 - vertex 1
- * \param V2 - vertex 2
- * \retval TopoDS_Edge - found edge
*/
static TopoDS_Edge GetEdgeByVertices( SMESH_Mesh* aMesh,
const TopoDS_Vertex& V1,
/*!
* \brief Return another face sharing an edge
- * \param aMesh - mesh
- * \param edge - edge
- * \param face - face
- * \retval TopoDS_Face - found face
+ * \param edgeToFaces - data map of descendants to ancestors
+ */
+ static TopoDS_Face GetNextFace( const TAncestorMap& edgeToFaces,
+ const TopoDS_Edge& edge,
+ const TopoDS_Face& face);
+ /*!
+ * \brief Return other vertex of an edge
*/
- static TopoDS_Face GetNextFace( SMESH_Mesh* aMesh,
- const TopoDS_Edge& edge,
- const TopoDS_Face& face);
+ static TopoDS_Vertex GetNextVertex(const TopoDS_Edge& edge,
+ const TopoDS_Vertex& vertex);
/*!
* \brief Return an oriented propagation edge
* \param aMesh - mesh
* \param fromEdge - start edge for propagation
- * \retval TopoDS_Edge - found edge
+ * \retval pair<int,TopoDS_Edge> - propagation step and found edge
*/
- static TopoDS_Edge GetPropagationEdge( SMESH_Mesh* aMesh,
- const TopoDS_Edge& anEdge,
- const TopoDS_Edge& fromEdge);
+ static std::pair<int,TopoDS_Edge> GetPropagationEdge( SMESH_Mesh* aMesh,
+ const TopoDS_Edge& anEdge,
+ const TopoDS_Edge& fromEdge);
/*!
* \brief Find corresponding nodes on two faces
static int Count(const TopoDS_Shape& shape,
const TopAbs_ShapeEnum type,
const bool ignoreSame);
+
+ /*!
+ * \brief Set event listeners to submesh with projection algo
+ * \param subMesh - submesh with projection algo
+ * \param srcShape - source shape
+ * \param srcMesh - source mesh
+ */
+ static void SetEventListener(SMESH_subMesh* subMesh,
+ TopoDS_Shape srcShape,
+ SMESH_Mesh* srcMesh);
+
};
#endif