Bug 0016617: Regression in V5.1.1rc3: the groups are not generated.

This commit is contained in:
jfa 2009-03-19 14:45:23 +00:00
parent c41e91659f
commit b2f1b14274
2 changed files with 11 additions and 11 deletions

View File

@ -701,7 +701,7 @@ void SMESHDS_Mesh::RemoveNode(const SMDS_MeshNode * n)
else else
SubIt = myShapeIndexToSubMesh.begin(); SubIt = myShapeIndexToSubMesh.begin();
for ( ; !subMesh && SubIt != myShapeIndexToSubMesh.end(); SubIt++ ) for ( ; !subMesh && SubIt != myShapeIndexToSubMesh.end(); SubIt++ )
if ( SubIt->second->Contains( n )) if (!SubIt->second->IsComplexSubmesh() && SubIt->second->Contains( n ))
subMesh = SubIt->second; subMesh = SubIt->second;
RemoveFreeNode( n, subMesh, true); RemoveFreeNode( n, subMesh, true);
@ -764,7 +764,7 @@ void SMESHDS_Mesh::RemoveElement(const SMDS_MeshElement * elt)
SMESHDS_SubMesh* subMesh=0; SMESHDS_SubMesh* subMesh=0;
map<int,SMESHDS_SubMesh*>::iterator SubIt = myShapeIndexToSubMesh.begin(); map<int,SMESHDS_SubMesh*>::iterator SubIt = myShapeIndexToSubMesh.begin();
for ( ; !subMesh && SubIt != myShapeIndexToSubMesh.end(); SubIt++ ) for ( ; !subMesh && SubIt != myShapeIndexToSubMesh.end(); SubIt++ )
if ( SubIt->second->Contains( elt )) if (!SubIt->second->IsComplexSubmesh() && SubIt->second->Contains( elt ))
subMesh = SubIt->second; subMesh = SubIt->second;
RemoveFreeElement( elt, subMesh, true); RemoveFreeElement( elt, subMesh, true);

View File

@ -243,17 +243,17 @@ SMDS_NodeIteratorPtr SMESHDS_SubMesh::GetNodes() const
bool SMESHDS_SubMesh::Contains(const SMDS_MeshElement * ME) const bool SMESHDS_SubMesh::Contains(const SMDS_MeshElement * ME) const
{ {
// DO NOT TRY TO FIND A REMOVED ELEMENT !! // DO NOT TRY TO FIND A REMOVED ELEMENT !!
if ( IsComplexSubmesh() || !ME ) if ( !ME )
return false; return false;
// if ( IsComplexSubmesh() ) if ( IsComplexSubmesh() )
// { {
// set<const SMESHDS_SubMesh*>::const_iterator aSubIt = mySubMeshes.begin(); set<const SMESHDS_SubMesh*>::const_iterator aSubIt = mySubMeshes.begin();
// for ( ; aSubIt != mySubMeshes.end(); aSubIt++ ) for ( ; aSubIt != mySubMeshes.end(); aSubIt++ )
// if ( (*aSubIt)->Contains( ME )) if ( (*aSubIt)->Contains( ME ))
// return true; return true;
// return false; return false;
// } }
if ( ME->GetType() == SMDSAbs_Node ) if ( ME->GetType() == SMDSAbs_Node )
return ( myNodes.find( ME ) != myNodes.end() ); return ( myNodes.find( ME ) != myNodes.end() );