Salome HOME
23068: [CEA 1505] Be able to keep meshing in 2D after having merged the nodes in 1D
[modules/smesh.git] / src / SMESH / SMESH_Algo.hxx
index b827cd21ec59e5e352329ada59c260d92c688cb5..6363dc469d4949411d6f380e7d869e937475893b 100644 (file)
@@ -313,6 +313,7 @@ public:
    * \param theEdge - The geometrical edge of interest
    * \param theParams - The resulting vector of sorted node parameters
    * \retval bool - false if not all parameters are OK
+   * \warning Nodes moved to other geometry by MergeNodes() are NOT returned.
    */
   static bool GetNodeParamOnEdge(const SMESHDS_Mesh*     theMesh,
                                  const TopoDS_Edge&      theEdge,
@@ -325,17 +326,14 @@ public:
    * \param ignoreMediumNodes - to store medium nodes of quadratic elements or not
    * \param typeToCheck - type of elements to check for medium nodes
    * \retval bool - false if not all parameters are OK
+   * \warning Nodes moved to other geometry by MergeNodes() are NOT returned.
    */
   static bool GetSortedNodesOnEdge(const SMESHDS_Mesh*                        theMesh,
                                    const TopoDS_Edge&                         theEdge,
                                    const bool                                 ignoreMediumNodes,
                                    std::map< double, const SMDS_MeshNode* > & theNodes,
                                    const SMDSAbs_ElementType                  typeToCheck = SMDSAbs_All);
-  /*!
-   * Moved to SMESH_MesherHelper
-   */
-  // static bool IsReversedSubMesh (const TopoDS_Face&  theFace,
-  //                                SMESHDS_Mesh*       theMeshDS);
+
   /*!
    * \brief Compute length of an edge
     * \param E - the edge
@@ -343,7 +341,6 @@ public:
    */
   static double EdgeLength(const TopoDS_Edge & E);
 
-  //static int NumberOfWires(const TopoDS_Shape& S);
   int NumberOfPoints(SMESH_Mesh& aMesh,const TopoDS_Wire& W);
 
   /*!
@@ -372,11 +369,34 @@ public:
   /*!
    * \brief Return the node built on a vertex
     * \param V - the vertex
-    * \param meshDS - mesh
+    * \param meshDS - mesh data structure
     * \retval const SMDS_MeshNode* - found node or NULL
    */
   static const SMDS_MeshNode* VertexNode(const TopoDS_Vertex& V, const SMESHDS_Mesh* meshDS);
 
+  /*!
+   * \brief Return the node built on a vertex.
+   *        A node moved to other geometry by MergeNodes() is also returned.
+    * \param V - the vertex
+    * \param mesh - mesh
+    * \retval const SMDS_MeshNode* - found node or NULL
+   */
+  static const SMDS_MeshNode* VertexNode(const TopoDS_Vertex& V, const SMESH_Mesh* mesh);
+
+  /*!
+   * \brief Return the node built on a vertex.
+   *        A node moved to other geometry by MergeNodes() is also returned.
+    * \param V - the vertex
+    * \param edgeSM - sub-mesh of a meshed EDGE sharing the vertex
+    * \param mesh - the mesh
+    * \param checkV - if \c true, presence of a node on the vertex is checked
+    * \retval const SMDS_MeshNode* - found node or NULL
+   */
+  static const SMDS_MeshNode* VertexNode(const TopoDS_Vertex&   V,
+                                         const SMESHDS_SubMesh* edgeSM,
+                                         const SMESH_Mesh*      mesh,
+                                         const bool             checkV=true);
+
   enum EMeshError { MEr_OK = 0, MEr_HOLES, MEr_BAD_ORI, MEr_EMPTY };
 
   /*!