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
Fix for the '52701: SIGSEGV in Mesh creation dialog box after activating Viscous...
[modules/smesh.git]
/
src
/
SMESH
/
SMESH_subMesh.cxx
diff --git
a/src/SMESH/SMESH_subMesh.cxx
b/src/SMESH/SMESH_subMesh.cxx
index 59294a54c8f608fbd6fd4d8791e8c98d209e4262..6545ef40ceb6c2fc04b31c00609d4f325955103a 100644
(file)
--- a/
src/SMESH/SMESH_subMesh.cxx
+++ b/
src/SMESH/SMESH_subMesh.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-201
4
CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-201
5
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
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@
-2148,9
+2148,9
@@
TopoDS_Shape SMESH_subMesh::getCollection(SMESH_Gen * theGen,
if ( mainShape.IsSame( _subShape ))
return _subShape;
if ( mainShape.IsSame( _subShape ))
return _subShape;
- const bool
ignoreAuxiliary
Hyps = false;
+ const bool
skipAux
Hyps = false;
list<const SMESHDS_Hypothesis*> aUsedHyp =
list<const SMESHDS_Hypothesis*> aUsedHyp =
- theAlgo->GetUsedHypothesis( *_father, _subShape,
ignoreAuxiliary
Hyps ); // copy
+ theAlgo->GetUsedHypothesis( *_father, _subShape,
skipAux
Hyps ); // copy
// put in a compound all shapes with the same hypothesis assigned
// and a good ComputeState
// put in a compound all shapes with the same hypothesis assigned
// and a good ComputeState
@@
-2161,11
+2161,13
@@
TopoDS_Shape SMESH_subMesh::getCollection(SMESH_Gen * theGen,
theSubs.clear();
theSubs.clear();
-
TopExp_Explorer anExplorer( mainShape, _subShape.ShapeType()
);
-
for ( ; anExplorer.More(); anExplorer.Next
() )
+
SMESH_subMeshIteratorPtr smIt = _father->GetSubMesh( mainShape )->getDependsOnIterator(false
);
+
while ( smIt->more
() )
{
{
- const TopoDS_Shape& S = anExplorer.Current();
- SMESH_subMesh* subMesh = _father->GetSubMesh( S );
+ SMESH_subMesh* subMesh = smIt->next();
+ const TopoDS_Shape& S = subMesh->_subShape;
+ if ( S.ShapeType() != this->_subShape.ShapeType() )
+ continue;
theSubs.push_back( subMesh );
if ( subMesh == this )
{
theSubs.push_back( subMesh );
if ( subMesh == this )
{
@@
-2173,12
+2175,14
@@
TopoDS_Shape SMESH_subMesh::getCollection(SMESH_Gen * theGen,
}
else if ( subMesh->GetComputeState() == READY_TO_COMPUTE )
{
}
else if ( subMesh->GetComputeState() == READY_TO_COMPUTE )
{
- SMESH_Algo* anAlgo = theGen->GetAlgo( subMesh );
- if (strcmp( anAlgo->GetName(), theAlgo->GetName()) == 0 && // same algo
- anAlgo->GetUsedHypothesis( *_father, S, ignoreAuxiliaryHyps ) == aUsedHyp) // same hyps
+ SMESH_Algo* anAlgo = subMesh->GetAlgo();
+ if (( anAlgo->IsSameName( *theAlgo )) && // same algo
+ ( anAlgo->GetUsedHypothesis( *_father, S, skipAuxHyps ) == aUsedHyp )) // same hyps
+ {
aBuilder.Add( aCompound, S );
aBuilder.Add( aCompound, S );
- if ( !subMesh->SubMeshesComputed() )
- theSubComputed = false;
+ if ( !subMesh->SubMeshesComputed() )
+ theSubComputed = false;
+ }
}
}
}
}
@@
-2465,7
+2469,9
@@
void SMESH_subMesh::deleteOwnListeners()
{
if ( !_father->MeshExists( d->myMeshID ))
continue;
{
if ( !_father->MeshExists( d->myMeshID ))
continue;
- if ( _father->GetId() == d->myMeshID && !_father->GetSubMeshContaining( d->mySubMeshID ))
+ if ( _father->GetId() == d->myMeshID &&
+ this->GetId() != d->mySubMeshID &&
+ !_father->GetSubMeshContaining( d->mySubMeshID ))
continue;
d->mySubMesh->DeleteEventListener( d->myListener );
}
continue;
d->mySubMesh->DeleteEventListener( d->myListener );
}