X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FStdMeshers%2FStdMeshers_Propagation.cxx;h=6253dc27058eb449b9ae1dacd04fbe590fbdabdc;hb=977978e76db5ea09b53d7d94e921abf098b107be;hp=c6b9b015fb50193491cfb8dd7525e74b8cfe26f4;hpb=0635c9fc80f67d1e5dc0e94ec85f487286a92070;p=modules%2Fsmesh.git diff --git a/src/StdMeshers/StdMeshers_Propagation.cxx b/src/StdMeshers/StdMeshers_Propagation.cxx index c6b9b015f..6253dc270 100644 --- a/src/StdMeshers/StdMeshers_Propagation.cxx +++ b/src/StdMeshers/StdMeshers_Propagation.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -19,16 +19,18 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SMESH SMESH : implementaion of SMESH idl descriptions // File : StdMeshers_Propagation.cxx // Module : SMESH - +// #include "StdMeshers_Propagation.hxx" #include "utilities.h" #include "SMDS_SetIterator.hxx" #include "SMESH_Algo.hxx" +#include "SMESH_Gen.hxx" #include "SMESH_HypoFilter.hxx" #include "SMESH_Mesh.hxx" #include "SMESH_subMesh.hxx" @@ -39,7 +41,7 @@ #include #define DBGMSG(txt) \ -// cout << txt << endl; + // cout << txt << endl; using namespace std; @@ -266,7 +268,7 @@ namespace { for (; itA.More(); itA.Next()) { // there are objects of different type among the ancestors of edge - if ( itA.Value().ShapeType() != TopAbs_WIRE || !checkedShapes.Add( itA.Value() )) + if ( itA.Value().ShapeType() != TopAbs_WIRE /*|| !checkedShapes.Add( itA.Value() )*/) continue; // Get ordered edges and find index of anE in a sequence @@ -288,8 +290,7 @@ namespace { continue; // too few edges } else if ( edges.size() == 4 ) { - int oppIndex = edgeIndex + 2; - if ( oppIndex > 3 ) oppIndex -= 4; + int oppIndex = ( edgeIndex + 2 ) % 4; anOppE = edges[ oppIndex ]; } else { @@ -346,6 +347,10 @@ namespace { oppSM->ComputeStateEngine( SMESH_subMesh::CLEAN ); oppData->SetState( IN_CHAIN ); DBGMSG( "set IN_CHAIN on " << oppSM->GetId() ); + if ( oppSM->GetAlgoState() != SMESH_subMesh::HYP_OK ) + // make oppSM check algo state + if ( SMESH_Algo* algo = mesh->GetGen()->GetAlgo( *mesh, anOppE )) + oppSM->AlgoStateEngine(SMESH_subMesh::ADD_FATHER_ALGO,algo); } else { oppData->SetState( LAST_IN_CHAIN ); @@ -454,6 +459,7 @@ namespace { void PropagationMgr::Set(SMESH_subMesh * submesh) { + if ( findData( submesh )) return; DBGMSG( "PropagationMgr::Set() on " << submesh->GetId() ); EventListenerData* data = new PropagationMgrData(); submesh->SetEventListener( getListener(), data, submesh );