TShapePairsList::iterator s1_s2 = shapesQueue.begin();
for ( ; s1_s2 != shapesQueue.end(); ++s1_s2 )
{
+ if ( theMap.IsBound( s1_s2->first )) // avoid re-binding for a seam edge
+ continue; // to avoid this: Forward seam -> Reversed seam
InsertAssociation( s1_s2->first, s1_s2->second, theMap );
TopoDS_Iterator s1It( s1_s2->first), s2It( s1_s2->second );
for ( ; s1It.More(); s1It.Next(), s2It.Next() )
mesh->GetHypotheses( shape, hypoFilter, hyps, true, &assignedTo );
if ( nbAlgos > 1 ) // concurrent algos
{
- list<SMESH_subMesh*> smList; // where an algo is assigned
+ vector<SMESH_subMesh*> smList; // where an algo is assigned
list< TopoDS_Shape >::iterator shapeIt = assignedTo.begin();
for ( ; shapeIt != assignedTo.end(); ++shapeIt )
smList.push_back( mesh->GetSubMesh( *shapeIt ));
}
else
{
- subMesh->SetEventListener( getSrcSubMeshListener(),
- SMESH_subMeshEventListenerData::MakeData( subMesh ),
- srcShapeSM );
+ if ( SMESH_subMeshEventListenerData* data =
+ srcShapeSM->GetEventListenerData( getSrcSubMeshListener() ))
+ {
+ bool alreadyIn =
+ (std::find( data->mySubMeshes.begin(),
+ data->mySubMeshes.end(), subMesh ) != data->mySubMeshes.end() );
+ if ( !alreadyIn )
+ data->mySubMeshes.push_back( subMesh );
+ }
+ else
+ {
+ subMesh->SetEventListener( getSrcSubMeshListener(),
+ SMESH_subMeshEventListenerData::MakeData( subMesh ),
+ srcShapeSM );
+ }
}
}
}