Salome HOME
projects
/
modules
/
smesh.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
23586: [EDF] HYDRO: Copy mesh to new geometry
[modules/smesh.git]
/
src
/
SMESH
/
SMESH_subMesh.cxx
diff --git
a/src/SMESH/SMESH_subMesh.cxx
b/src/SMESH/SMESH_subMesh.cxx
index e8a61f295e8675f80d042240b222e5d77b3c80f9..8ef0c8827cdd8c344487f1a042548a3ddbf3925d 100644
(file)
--- 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;
{
if ( _dependenceAnalysed || !_father->HasShapeToMesh() )
return _mapDepend;
@@
-1683,6
+1683,8
@@
bool SMESH_subMesh::ComputeStateEngine(compute_event event)
else
updateDependantsState( SUBMESH_COMPUTED );
}
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
}
break;
case COMPUTE_CANCELED: // nothing to do
@@
-2276,9
+2278,9
@@
void SMESH_subMesh::setEventListener(EventListener* listener,
_eventListeners.find( listener );
if ( l_d != _eventListeners.end() ) {
EventListenerData* curData = l_d->second;
_eventListeners.find( listener );
if ( l_d != _eventListeners.end() ) {
EventListenerData* curData = l_d->second;
+ l_d->second = data;
if ( curData && curData != data && curData->IsDeletable() )
delete curData;
if ( curData && curData != data && curData->IsDeletable() )
delete curData;
- l_d->second = data;
}
else
{
}
else
{
@@
-2286,6
+2288,7
@@
void SMESH_subMesh::setEventListener(EventListener* listener,
if ( listener->GetName() == l_d->first->GetName() )
{
EventListenerData* curData = l_d->second;
if ( listener->GetName() == l_d->first->GetName() )
{
EventListenerData* curData = l_d->second;
+ l_d->second = 0;
if ( curData && curData != data && curData->IsDeletable() )
delete curData;
if ( l_d->first != listener && l_d->first->IsDeletable() )
if ( curData && curData != data && curData->IsDeletable() )
delete curData;
if ( l_d->first != listener && l_d->first->IsDeletable() )
@@
-2548,9
+2551,9
@@
namespace {
//================================================================================
/*!
//================================================================================
/*!
- * \brief
Return iterator on the submeshes this one depends on
-
*
\param includeSelf - this submesh to be returned also
-
*
\param reverse - if true, complex shape submeshes go first
+ * \brief Return iterator on the submeshes this one depends on
+
*
\param includeSelf - this submesh to be returned also
+
*
\param reverse - if true, complex shape submeshes go first
*/
//================================================================================
*/
//================================================================================
@@
-2591,8
+2594,13
@@
const std::vector< SMESH_subMesh * > & SMESH_subMesh::GetAncestors() const
SMESH_subMesh* me = const_cast< SMESH_subMesh* >( this );
me->_ancestors.reserve( ancShapes.Extent() );
SMESH_subMesh* me = const_cast< SMESH_subMesh* >( this );
me->_ancestors.reserve( ancShapes.Extent() );
+ // assure that all sub-meshes exist
+ TopoDS_Shape mainShape = _father->GetShapeToMesh();
+ if ( !mainShape.IsNull() )
+ _father->GetSubMesh( mainShape )->DependsOn();
+
TopTools_MapOfShape map;
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() ))
for ( TopTools_ListIteratorOfListOfShape it( ancShapes ); it.More(); it.Next() )
if ( SMESH_subMesh* sm = _father->GetSubMeshContaining( it.Value() ))
if ( map.Add( it.Value() ))