X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESH%2FSMESH_subMesh.cxx;h=8ef0c8827cdd8c344487f1a042548a3ddbf3925d;hb=b3b2e34960fcba153ea04a52bc2666211f80dcbc;hp=57d0d338df5cd790b315ef4e456dcedae0a77b18;hpb=db7a4ffa0c087b5af172883702468d207f29480b;p=modules%2Fsmesh.git diff --git a/src/SMESH/SMESH_subMesh.cxx b/src/SMESH/SMESH_subMesh.cxx index 57d0d338d..8ef0c8827 100644 --- a/src/SMESH/SMESH_subMesh.cxx +++ b/src/SMESH/SMESH_subMesh.cxx @@ -365,7 +365,7 @@ int SMESH_subMesh::computeCost() const */ //============================================================================= -const map < int, SMESH_subMesh * >& SMESH_subMesh::DependsOn() +const std::map < int, SMESH_subMesh * >& SMESH_subMesh::DependsOn() { if ( _dependenceAnalysed || !_father->HasShapeToMesh() ) return _mapDepend; @@ -1683,6 +1683,8 @@ bool SMESH_subMesh::ComputeStateEngine(compute_event event) else updateDependantsState( SUBMESH_COMPUTED ); } + // let algo clear its data gathered while algo->Compute() + algo->CheckHypothesis((*_father), _subShape, hyp_status); } break; case COMPUTE_CANCELED: // nothing to do @@ -2592,14 +2594,13 @@ const std::vector< SMESH_subMesh * > & SMESH_subMesh::GetAncestors() const SMESH_subMesh* me = const_cast< SMESH_subMesh* >( this ); me->_ancestors.reserve( ancShapes.Extent() ); - TopTools_MapOfShape map; - // assure that all sub-meshes exist TopoDS_Shape mainShape = _father->GetShapeToMesh(); - if (!mainShape.IsNull()) - { - _father->GetSubMesh( _father->GetShapeToMesh() )->DependsOn(); - } + if ( !mainShape.IsNull() ) + _father->GetSubMesh( mainShape )->DependsOn(); + + TopTools_MapOfShape map; + for ( TopTools_ListIteratorOfListOfShape it( ancShapes ); it.More(); it.Next() ) if ( SMESH_subMesh* sm = _father->GetSubMeshContaining( it.Value() )) if ( map.Add( it.Value() ))