else
SubIt = myShapeIndexToSubMesh.begin();
for ( ; !subMesh && SubIt != myShapeIndexToSubMesh.end(); SubIt++ )
- if ( SubIt->second->Contains( n ))
+ if (!SubIt->second->IsComplexSubmesh() && SubIt->second->Contains( n ))
subMesh = SubIt->second;
RemoveFreeNode( n, subMesh, true);
SMESHDS_SubMesh* subMesh=0;
map<int,SMESHDS_SubMesh*>::iterator SubIt = myShapeIndexToSubMesh.begin();
for ( ; !subMesh && SubIt != myShapeIndexToSubMesh.end(); SubIt++ )
- if ( SubIt->second->Contains( elt ))
+ if (!SubIt->second->IsComplexSubmesh() && SubIt->second->Contains( elt ))
subMesh = SubIt->second;
RemoveFreeElement( elt, subMesh, true);
bool SMESHDS_SubMesh::Contains(const SMDS_MeshElement * ME) const
{
// DO NOT TRY TO FIND A REMOVED ELEMENT !!
- if ( IsComplexSubmesh() || !ME )
+ //if ( IsComplexSubmesh() || !ME )
+ if (!ME )
return false;
-// if ( IsComplexSubmesh() )
-// {
-// set<const SMESHDS_SubMesh*>::const_iterator aSubIt = mySubMeshes.begin();
-// for ( ; aSubIt != mySubMeshes.end(); aSubIt++ )
-// if ( (*aSubIt)->Contains( ME ))
-// return true;
-// return false;
-// }
+ if ( IsComplexSubmesh() )
+ {
+ set<const SMESHDS_SubMesh*>::const_iterator aSubIt = mySubMeshes.begin();
+ for ( ; aSubIt != mySubMeshes.end(); aSubIt++ )
+ if ( (*aSubIt)->Contains( ME ))
+ return true;
+ return false;
+ }
if ( ME->GetType() == SMDSAbs_Node )
return ( myNodes.find( ME ) != myNodes.end() );