Salome HOME
IMP 23078: [CEA 1498] Sewing of meshes without having to set the nodes ids
[modules/smesh.git] / src / SMESHUtils / SMESH_MeshAlgos.hxx
index fe5074eb5aa7b6245a148e5cf30f5848a98bb0c6..9b860a6ab1150ef5169e25d1b81a6d89d27ba68b 100644 (file)
@@ -156,10 +156,45 @@ namespace SMESH_MeshAlgos
    * \brief Return SMESH_ElementSearcher. The caller is responsible for deleting it
    */
   SMESHUtils_EXPORT
-  SMESH_ElementSearcher* GetElementSearcher( SMDS_Mesh& mesh );
+  SMESH_ElementSearcher* GetElementSearcher( SMDS_Mesh& mesh,
+                                             double     tolerance=-1.);
   SMESHUtils_EXPORT
   SMESH_ElementSearcher* GetElementSearcher( SMDS_Mesh& mesh,
-                                             SMDS_ElemIteratorPtr elemIt );
-}
+                                             SMDS_ElemIteratorPtr elemIt,
+                                             double     tolerance=-1. );
+
+
+
+  typedef std::vector<const SMDS_MeshNode*> TFreeBorder;
+  typedef std::vector<TFreeBorder>          TFreeBorderVec;
+  struct TFreeBorderPart
+  {
+    int _border; // border index within a TFreeBorderVec
+    int _node1;  // node index within the border-th TFreeBorder
+    int _node2;
+    int _nodeLast;
+  };
+  typedef std::vector<TFreeBorderPart>  TCoincidentGroup;
+  typedef std::vector<TCoincidentGroup> TCoincidentGroupVec;
+  struct CoincidentFreeBorders
+  {
+    TFreeBorderVec      _borders;          // nodes of all free borders
+    TCoincidentGroupVec _coincidentGroups; // groups of coincident parts of borders
+  };
+
+  /*!
+   * Returns TFreeBorder's coincident within the given tolerance.
+   * If the tolerance <= 0.0 then one tenth of an average size of elements adjacent
+   * to free borders being compared is used.
+   *
+   * (Implemented in ./SMESH_FreeBorders.cxx)
+   */
+  SMESHUtils_EXPORT
+  void FindCoincidentFreeBorders(SMDS_Mesh&              mesh,
+                                 double                  tolerance,
+                                 CoincidentFreeBorders & foundFreeBordes);
+  
+
+} // SMESH_MeshAlgos
 
 #endif