+ //================================================================================
+ /*!
+ * \brief Associate faces having one edge in the outer wire.
+ * No check is done if there is really only one outer edge
+ */
+ //================================================================================
+
+ bool assocFewEdgesFaces( const TopoDS_Face& face1,
+ SMESH_Mesh* mesh1,
+ const TopoDS_Face& face2,
+ SMESH_Mesh* mesh2,
+ HERE::TShapeShapeMap & theMap)
+ {
+ TopoDS_Vertex v1 = TopoDS::Vertex( HERE::OuterShape( face1, TopAbs_VERTEX ));
+ TopoDS_Vertex v2 = TopoDS::Vertex( HERE::OuterShape( face2, TopAbs_VERTEX ));
+ TopoDS_Vertex VV1[2] = { v1, v1 };
+ TopoDS_Vertex VV2[2] = { v2, v2 };
+ list< TopoDS_Edge > edges1, edges2;
+ if ( int nbE = HERE::FindFaceAssociation( face1, VV1, face2, VV2, edges1, edges2 ))
+ {
+ HERE::InsertAssociation( face1, face2, theMap );
+ fixAssocByPropagation( nbE, edges1, edges2, mesh1, mesh2 );
+ list< TopoDS_Edge >::iterator eIt1 = edges1.begin();
+ list< TopoDS_Edge >::iterator eIt2 = edges2.begin();
+ for ( ; eIt1 != edges1.end(); ++eIt1, ++eIt2 )
+ {
+ HERE::InsertAssociation( *eIt1, *eIt2, theMap );
+ v1 = SMESH_MesherHelper::IthVertex( 0, *eIt1 );
+ v2 = SMESH_MesherHelper::IthVertex( 0, *eIt2 );
+ HERE::InsertAssociation( v1, v2, theMap );
+ }
+ return true;
+ }
+ return false;
+ }
+