X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FOBJECT%2FSMESH_Object.cxx;h=253219d0b2b565a1466f7d4eb66823d0e3259ec0;hp=61b36a78c706f0b5270700ee4678bd80994a9b19;hb=2e5f78b7d298f01eda6768a5e7427f60b09a0691;hpb=004925bca40d46c25cf9cc837193335163c2d44f diff --git a/src/OBJECT/SMESH_Object.cxx b/src/OBJECT/SMESH_Object.cxx index 61b36a78c..253219d0b 100644 --- a/src/OBJECT/SMESH_Object.cxx +++ b/src/OBJECT/SMESH_Object.cxx @@ -32,6 +32,8 @@ #include "SMDS_Mesh.hxx" #include "SMDS_MeshCell.hxx" #include "SMDS_PolyhedralVolumeOfNodes.hxx" +#include "SMESHDS_Mesh.hxx" +#include "SMESHDS_Script.hxx" #include "SMESH_Actor.h" #include "SMESH_ControlsDef.hxx" @@ -54,7 +56,7 @@ #include #include -#include "utilities.h" +#include using namespace std; @@ -280,8 +282,11 @@ void SMESH_VisualObjDef::buildPrs(bool buildGrid) myLocalGrid = false; if (!GetMesh()->isCompacted()) { + NulData(); // detach from the SMDS grid to allow immediate memory de-allocation in compactMesh() if ( MYDEBUG ) MESSAGE("*** buildPrs ==> compactMesh!"); GetMesh()->compactMesh(); + if ( SMESHDS_Mesh* m = dynamic_cast( GetMesh() )) // IPAL53915 + m->GetScript()->SetModified(false); // drop IsModified set in compactMesh() } vtkUnstructuredGrid *theGrid = GetMesh()->getGrid(); updateEntitiesFlags(); @@ -570,6 +575,7 @@ vtkUnstructuredGrid* SMESH_VisualObjDef::GetUnstructuredGrid() { if ( !myLocalGrid && !GetMesh()->isCompacted() ) { + NulData(); // detach from the SMDS grid to allow immediate memory de-allocation in compactMesh() GetMesh()->compactMesh(); updateEntitiesFlags(); vtkUnstructuredGrid *theGrid = GetMesh()->getGrid(); @@ -717,7 +723,7 @@ bool SMESH_MeshObj::NulData() points->SetNumberOfPoints(0); myEmptyGrid->SetPoints( points ); points->Delete(); - myEmptyGrid->BuildLinks(); + //myEmptyGrid->BuildLinks(); } myGrid->ShallowCopy(myEmptyGrid); return true;