Salome HOME
23032: EDF SMESH: Projection 1D-2D fails with Netgen 1D-2D
[modules/smesh.git] / src / StdMeshers / StdMeshers_ProjectionUtils.hxx
index 958d55607f0193262b275db4fd50b04f8ea683d2..ea599b7a9c7f4c2709b015e22a783ee57324fa91 100644 (file)
@@ -59,6 +59,10 @@ struct StdMeshers_ShapeShapeBiDirectionMap
 {
   TopTools_DataMapOfShapeShape _map1to2, _map2to1;
 
+  enum EAssocType {
+    UNDEF, INIT_VERTEX, PROPAGATION, PARTNER, CLOSE_VERTEX, COMMON_VERTEX, FEW_EF };
+  EAssocType _assocType;
+
   // convention: s1 - target, s2 - source
   bool Bind( const TopoDS_Shape& s1, const TopoDS_Shape& s2 )
   { _map1to2.Bind( s1, s2 ); return _map2to1.Bind( s2, s1 ); }
@@ -72,6 +76,8 @@ struct StdMeshers_ShapeShapeBiDirectionMap
     // passes incorrect isShape2
     return (isShape2 ? _map2to1 : _map1to2)( s );
   }
+  StdMeshers_ShapeShapeBiDirectionMap() : _assocType( UNDEF ) {}
+  void SetAssocType( EAssocType type ) { if ( _assocType == UNDEF ) _assocType = type; }
 };
 
 /*!
@@ -148,20 +154,22 @@ namespace StdMeshers_ProjectionUtils
 
   /*!
    * \brief Find association of edges of faces
-   * \param face1 - face 1
-   * \param VV1 - vertices of face 1
-   * \param face2 - face 2
-   * \param VV2 - vertices of face 2 associated with oned of face 1
-   * \param edges1 - out list of edges of face 1
-   * \param edges2 - out list of edges of face 2
-   * \retval int - nb of edges in an outer wire in a success case, else zero
+   *  \param face1 - face 1
+   *  \param VV1 - vertices of face 1
+   *  \param face2 - face 2
+   *  \param VV2 - vertices of face 2 associated with oned of face 1
+   *  \param edges1 - out list of edges of face 1
+   *  \param edges2 - out list of edges of face 2
+   *  \param isClosenessAssoc - is association starting by VERTEX closeness
+   *  \retval int - nb of edges in an outer wire in a success case, else zero
    */
   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);
+                          std::list< TopoDS_Edge > & edges2,
+                          const bool                 isClosenessAssoc=false);
 
   /*!
    * \brief Insert vertex association defined by a hypothesis into a map