-// Copyright (C) 2007-2019 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2021 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
#include "SMESHGUI_PreVisualObj.h"
-#include <SMDS_Mesh.hxx>
+#include <SMESHDS_Mesh.hxx>
#include <SMESH_Actor.h>
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;
}
if ( theFunctor ) theFunctor->SetMesh( GetMesh() );
}
-int SMESHGUI_PreVisualObj::GetElemDimension( const int theObjId )
+int SMESHGUI_PreVisualObj::GetElemDimension( const smIdType theObjId )
{
if ( const SMDS_MeshElement* anElem = myMesh->FindElement( theObjId ))
{
return -1;
}
-int SMESHGUI_PreVisualObj::GetNbEntities( const SMDSAbs_ElementType theType ) const
+smIdType SMESHGUI_PreVisualObj::GetNbEntities( const SMDSAbs_ElementType theType ) const
{
return myMesh->GetMeshInfo().NbElements( theType );
}
// purpose : Retrieve ids of nodes from edge of elements ( edge is numbered from 1 )
//=================================================================================
-bool SMESHGUI_PreVisualObj::GetEdgeNodes( const int theElemId,
- const int theEdgeNum,
- int& theNodeId1,
- int& theNodeId2 ) const
+bool SMESHGUI_PreVisualObj::GetEdgeNodes( const smIdType theElemId,
+ const int theEdgeNum,
+ smIdType& theNodeId1,
+ smIdType& theNodeId2 ) const
{
const SMDS_MeshElement* e = myMesh->FindElement( theElemId );
if ( !e || e->GetType() != SMDSAbs_Face )
}
-vtkIdType SMESHGUI_PreVisualObj::GetNodeObjId( int theVTKID )
+vtkIdType SMESHGUI_PreVisualObj::GetNodeObjId( vtkIdType theVTKID )
{
const SMDS_MeshNode* aNode = myMesh->FindNodeVtk( theVTKID );
return aNode ? aNode->GetID() : -1;
}
-vtkIdType SMESHGUI_PreVisualObj::GetNodeVTKId( int theObjID )
+vtkIdType SMESHGUI_PreVisualObj::GetNodeVTKId( vtkIdType theObjID )
{
const SMDS_MeshNode* aNode = myMesh->FindNode( theObjID );
return aNode ? aNode->GetID() : -1;
}
-vtkIdType SMESHGUI_PreVisualObj::GetElemObjId( int theVTKID )
+vtkIdType SMESHGUI_PreVisualObj::GetElemObjId( vtkIdType theVTKID )
{
return this->GetMesh()->FromVtkToSmds(theVTKID);
}
-vtkIdType SMESHGUI_PreVisualObj::GetElemVTKId( int theObjID )
+vtkIdType SMESHGUI_PreVisualObj::GetElemVTKId( vtkIdType theObjID )
{
const SMDS_MeshElement* e = myMesh->FindElement(theObjID);
return e ? e->GetVtkID() : -1;