- // Fill map of src to tgt nodes with nodes on edges
-
- src2tgtNodes.clear();
- TAssocTool::TNodeNodeMap::iterator srcN_tgtN;
-
- bool tgtEdgesMeshed = false;
- for ( TopExp_Explorer srcExp( srcFace, TopAbs_EDGE); srcExp.More(); srcExp.Next() )
- {
- const TopoDS_Shape& srcEdge = srcExp.Current();
- const TopoDS_Shape& tgtEdge = shape2ShapeMap( srcEdge, /*isSrc=*/true );
- tgtEdgesMeshed != tgtMesh->GetSubMesh( tgtEdge )->IsEmpty();
-
- if ( srcMesh->GetSubMesh( srcEdge )->IsEmpty() ||
- tgtMesh->GetSubMesh( tgtEdge )->IsEmpty() )
- continue;
-
- map< double, const SMDS_MeshNode* > srcNodes, tgtNodes;
- if (( ! SMESH_Algo::GetSortedNodesOnEdge( srcMeshDS,
- TopoDS::Edge( srcEdge ),
- /*ignoreMediumNodes = */true,
- srcNodes ))
- ||
- ( ! SMESH_Algo::GetSortedNodesOnEdge( tgtMeshDS,
- TopoDS::Edge( tgtEdge ),
- /*ignoreMediumNodes = */true,
- tgtNodes ))
- ||
- (( srcNodes.size() != tgtNodes.size() ) && tgtNodes.size() > 0 )
- )
- return false;
-
- if ( !tgtNodes.empty() )
- {
- map< double, const SMDS_MeshNode* >::iterator u_tn = tgtNodes.begin();
- map< double, const SMDS_MeshNode* >::iterator u_sn = srcNodes.begin();
- for ( ; u_tn != tgtNodes.end(); ++u_tn, ++u_sn)
- src2tgtNodes.insert( make_pair( u_sn->second, u_tn->second ));
- }
- }
- // check nodes on VERTEXes for a case of not meshes EDGEs
- for ( TopExp_Explorer srcExp( srcFace, TopAbs_VERTEX); srcExp.More(); srcExp.Next() )
- {
- const TopoDS_Shape& srcV = srcExp.Current();
- const TopoDS_Shape& tgtV = shape2ShapeMap( srcV, /*isSrc=*/true );
- const SMDS_MeshNode* srcN = SMESH_Algo::VertexNode( TopoDS::Vertex( srcV ), srcMeshDS );
- const SMDS_MeshNode* tgtN = SMESH_Algo::VertexNode( TopoDS::Vertex( tgtV ), tgtMeshDS );
- if ( !srcN )
- continue;
- if ( !tgtN || tgtV.ShapeType() != TopAbs_VERTEX )
- return false;
-
- src2tgtNodes.insert( make_pair( srcN, tgtN ));
- }
-
-