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
Merge branch V7_3_1_BR
[modules/smesh.git]
/
src
/
SMESHDS
/
SMESHDS_Mesh.cxx
diff --git
a/src/SMESHDS/SMESHDS_Mesh.cxx
b/src/SMESHDS/SMESHDS_Mesh.cxx
index 885a76107185f07d7b76209a5139f64335f1d292..089e9feecf52d3d2efe338179d855ae3a2eb1aa2 100644
(file)
--- a/
src/SMESHDS/SMESHDS_Mesh.cxx
+++ b/
src/SMESHDS/SMESHDS_Mesh.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-201
3
CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-201
4
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
@@
-6,7
+6,7
@@
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License
, or (at your option) any later version
.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
@@
-888,15
+888,16
@@
void SMESHDS_Mesh::RemoveFreeNode(const SMDS_MeshNode * n,
set<SMESHDS_GroupBase*>::iterator GrIt = myGroups.begin();
for (; GrIt != myGroups.end(); GrIt++) {
SMESHDS_Group* group = dynamic_cast<SMESHDS_Group*>(*GrIt);
set<SMESHDS_GroupBase*>::iterator GrIt = myGroups.begin();
for (; GrIt != myGroups.end(); GrIt++) {
SMESHDS_Group* group = dynamic_cast<SMESHDS_Group*>(*GrIt);
- if (
!group || group->IsEmpty()) continue;
- group->SMDSGroup().Remove(n);
+ if (
group && !group->IsEmpty())
+
group->SMDSGroup().Remove(n);
}
}
// Rm from sub-mesh
// Node should belong to only one sub-mesh
}
}
// Rm from sub-mesh
// Node should belong to only one sub-mesh
- if( subMesh )
- subMesh->RemoveNode(n,/*deleted=*/false);
+ if ( !subMesh || !subMesh->RemoveNode(n,/*deleted=*/false))
+ if (( subMesh = MeshElements( n->getshapeId() )))
+ subMesh->RemoveNode(n,/*deleted=*/false );
SMDS_Mesh::RemoveFreeElement(n);
}
SMDS_Mesh::RemoveFreeElement(n);
}
@@
-915,11
+916,12
@@
void SMESHDS_Mesh::RemoveElement(const SMDS_MeshElement * elt)
if (!hasConstructionEdges() && !hasConstructionFaces())
{
SMESHDS_SubMesh* subMesh=0;
if (!hasConstructionEdges() && !hasConstructionFaces())
{
SMESHDS_SubMesh* subMesh=0;
- map<int,SMESHDS_SubMesh*>::iterator SubIt = myShapeIndexToSubMesh.begin();
- for ( ; !subMesh && SubIt != myShapeIndexToSubMesh.end(); SubIt++ )
- if (!SubIt->second->IsComplexSubmesh() && SubIt->second->Contains( elt ))
+ if ( elt->getshapeId() > 0 )
+ {
+ map<int,SMESHDS_SubMesh*>::iterator SubIt = myShapeIndexToSubMesh.find( elt->getshapeId() );
+ if ( SubIt != myShapeIndexToSubMesh.end() )
subMesh = SubIt->second;
subMesh = SubIt->second;
- //MESSAGE("subMesh " << elt->getshapeId());
+ }
RemoveFreeElement( elt, subMesh, true);
return;
}
RemoveFreeElement( elt, subMesh, true);
return;
}
@@
-997,6
+999,10
@@
void SMESHDS_Mesh::ClearMesh()
g->Clear();
g->SetType( groupType );
}
g->Clear();
g->SetType( groupType );
}
+ else
+ {
+ (*group)->Extent(); // to free cashed elements in GroupOnFilter's
+ }
}
}
}
}