X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FOBJECT%2FSMESH_Object.cxx;fp=src%2FOBJECT%2FSMESH_Object.cxx;h=1912c9156e91eabdd08f12061a4a28423bcaa9ae;hb=0d35811cbb34abd28f858b93ef45a9b119f68d19;hp=f2a83df939398e61668ea0afde87e970fab9846a;hpb=c573d1fae4d91182b563fc308afc4e76f383cceb;p=modules%2Fsmesh.git diff --git a/src/OBJECT/SMESH_Object.cxx b/src/OBJECT/SMESH_Object.cxx index f2a83df93..1912c9156 100644 --- a/src/OBJECT/SMESH_Object.cxx +++ b/src/OBJECT/SMESH_Object.cxx @@ -842,9 +842,32 @@ int SMESH_SubMeshObj::GetElemDimension( const int theObjId ) // function : UpdateFunctor // purpose : Update functor in accordance with current mesh //================================================================================= + void SMESH_SubMeshObj::UpdateFunctor( const SMESH::Controls::FunctorPtr& theFunctor ) { - theFunctor->SetMesh( myMeshObj->GetMesh() ); + if ( SMESH::Controls::CoincidentNodes* cn = + dynamic_cast(theFunctor.get()) ) + { + TEntityList theResList; + GetEntities( SMDSAbs_Node, theResList ); + TIDSortedNodeSet nodeSet; + TEntityList::iterator e = theResList.begin(); + for ( ; e != theResList.end(); ++e ) + nodeSet.insert( nodeSet.end(), (const SMDS_MeshNode* ) *e ); + cn->SetMesh( myMeshObj->GetMesh(), &nodeSet ); + } + else if ( SMESH::Controls::CoincidentElements* ce = + dynamic_cast(theFunctor.get()) ) + { + TEntityList theResList; + GetEntities( ce->GetType(), theResList ); + TIDSortedElemSet elemSet( theResList.begin(), theResList.end() ); + ce->SetMesh( myMeshObj->GetMesh(), &elemSet ); + } + else + { + theFunctor->SetMesh( myMeshObj->GetMesh() ); + } } //================================================================================= @@ -853,7 +876,7 @@ void SMESH_SubMeshObj::UpdateFunctor( const SMESH::Controls::FunctorPtr& theFunc //================================================================================= bool SMESH_SubMeshObj::Update( int theIsClear ) { - MESSAGE("SMESH_SubMeshObj::Update " << this) + MESSAGE("SMESH_SubMeshObj::Update " << this) bool changed = myMeshObj->Update( theIsClear ); buildPrs(true); return changed;