+ const TopoDS_Shape& seam = sm->GetSubShape();
+ if ( u2nodesMaps[ NEW_NODES ].size() > 0 &&
+ u2nodesOnSeam.size() > 0 &&
+ seam.ShapeType() == TopAbs_EDGE )
+ {
+ int nbE1 = TAssocTool::Count( tgtFace, TopAbs_EDGE, /*ignoreSame=*/true );
+ int nbE2 = TAssocTool::Count( srcFace, TopAbs_EDGE, /*ignoreSame=*/true );
+ if ( nbE1 != nbE2 ) // 2 EDGEs are mapped to a seam EDGE
+ {
+ // find the 2 EDGEs of srcFace
+ TopTools_DataMapIteratorOfDataMapOfShapeShape src2tgtIt( shape2ShapeMap._map2to1 );
+ for ( ; src2tgtIt.More(); src2tgtIt.Next() )
+ if ( seam.IsSame( src2tgtIt.Value() ))
+ {
+ const TopoDS_Shape& tgtEdge = src2tgtIt.Key();
+ if ( SMESHDS_SubMesh* tgtSM = srcMesh->GetMeshDS()->MeshElements( tgtEdge ))
+ {
+ SMDS_NodeIteratorPtr nIt = tgtSM->GetNodes();
+ while ( nIt->more() )
+ SMESH_Algo::addBadInputElement( nIt->next() );
+ }
+ }
+ return error( COMPERR_BAD_INPUT_MESH,
+ "Different number of nodes on two edges projected to a seam edge" );
+ }
+ }