X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_PreVisualObj.cxx;h=6f329dd130f88494bdf9d45b3acd7e5dc2b24a21;hb=4002febb8b27c5d1bb1817183d1f046096ecb8f6;hp=3e05490da123b34c4cd4535924effe166d5d8277;hpb=02ac54c6f33c5437c1d2204d704cf3da6fd31a8e;p=modules%2Fsmesh.git diff --git a/src/SMESHGUI/SMESHGUI_PreVisualObj.cxx b/src/SMESHGUI/SMESHGUI_PreVisualObj.cxx index 3e05490da..6f329dd13 100644 --- a/src/SMESHGUI/SMESHGUI_PreVisualObj.cxx +++ b/src/SMESHGUI/SMESHGUI_PreVisualObj.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2020 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 @@ -22,15 +22,20 @@ #include "SMESHGUI_PreVisualObj.h" -#include +#include #include SMESHGUI_PreVisualObj::SMESHGUI_PreVisualObj() { - myMesh = new SMDS_Mesh(); + myMesh = new SMESHDS_Mesh(0,true); } -bool SMESHGUI_PreVisualObj::Update( int theIsClear = true ) +SMDS_Mesh* SMESHGUI_PreVisualObj::GetMesh() const +{ + return myMesh; +} + +bool SMESHGUI_PreVisualObj::Update( int /*theIsClear*/) { return false; } @@ -59,7 +64,7 @@ int SMESHGUI_PreVisualObj::GetElemDimension( const int theObjId ) int SMESHGUI_PreVisualObj::GetNbEntities( const SMDSAbs_ElementType theType ) const { - myMesh->GetMeshInfo().NbElements( theType ); + return myMesh->GetMeshInfo().NbElements( theType ); } SMESH::SMESH_Mesh_ptr SMESHGUI_PreVisualObj::GetMeshServer() @@ -98,7 +103,7 @@ bool SMESHGUI_PreVisualObj::IsValid() const vtkUnstructuredGrid* SMESHGUI_PreVisualObj::GetUnstructuredGrid() { - return myMesh->getGrid(); + return myMesh->GetGrid(); } @@ -116,13 +121,13 @@ vtkIdType SMESHGUI_PreVisualObj::GetNodeVTKId( int theObjID ) vtkIdType SMESHGUI_PreVisualObj::GetElemObjId( int theVTKID ) { - return this->GetMesh()->fromVtkToSmds(theVTKID); + return this->GetMesh()->FromVtkToSmds(theVTKID); } vtkIdType SMESHGUI_PreVisualObj::GetElemVTKId( int theObjID ) { const SMDS_MeshElement* e = myMesh->FindElement(theObjID); - return e ? e->getVtkId() : -1; + return e ? e->GetVtkID() : -1; } void SMESHGUI_PreVisualObj::ClearEntitiesFlags()