In SMESH_VisualObjDef::GetUnstructuredGrid(), compact myGrid if
it is a shallowCopy of SMDS_UnstructuredGrid
vtkUnstructuredGrid* SMESH_VisualObjDef::GetUnstructuredGrid()
{
- //MESSAGE("SMESH_VisualObjDef::GetUnstructuredGrid " << myGrid);
- return myGrid;
+ if ( !myLocalGrid && !GetMesh()->isCompacted() )
+ {
+ GetMesh()->compactMesh();
+ vtkUnstructuredGrid *theGrid = GetMesh()->getGrid();
+ myGrid->ShallowCopy(theGrid);
+ }
+ return myGrid;
}