From a4e0e20f3c55871a70a54e708ed1c42f3d208375 Mon Sep 17 00:00:00 2001 From: dmv Date: Thu, 17 Sep 2009 13:18:43 +0000 Subject: [PATCH] IPAL21374 Add 0D element leads to visualization failure. --- src/OBJECT/SMESH_DeviceActor.cxx | 1 - src/OBJECT/SMESH_Object.cxx | 2 +- src/SMESH_I/SMESH_Mesh_i.cxx | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/OBJECT/SMESH_DeviceActor.cxx b/src/OBJECT/SMESH_DeviceActor.cxx index 2a657eb34..2b7beccf8 100644 --- a/src/OBJECT/SMESH_DeviceActor.cxx +++ b/src/OBJECT/SMESH_DeviceActor.cxx @@ -546,7 +546,6 @@ SMESH_DeviceActor aDataSet->Delete(); }else if(FreeNodes* aFreeNodes = dynamic_cast(theFunctor.get())){ myExtractUnstructuredGrid->SetModeOfChanging(VTKViewer_ExtractUnstructuredGrid::eAdding); - vtkUnstructuredGrid* aGrid = myVisualObj->GetUnstructuredGrid(); vtkIdType aNbNodes = myVisualObj->GetNbEntities(SMDSAbs_Node); for( vtkIdType i = 0; i < aNbNodes; i++ ){ vtkIdType anObjId = myVisualObj->GetNodeObjId(i); diff --git a/src/OBJECT/SMESH_Object.cxx b/src/OBJECT/SMESH_Object.cxx index 5f12330ef..943f0896d 100644 --- a/src/OBJECT/SMESH_Object.cxx +++ b/src/OBJECT/SMESH_Object.cxx @@ -678,7 +678,7 @@ void SMESH_MeshObj::UpdateFunctor( const SMESH::Controls::FunctorPtr& theFunctor //================================================================================= bool SMESH_MeshObj::IsNodePrs() const { - return myClient->NbEdges() == 0 &&myClient->NbFaces() == 0 && myClient->NbVolumes() == 0 ; + return myClient->Nb0DElements() == 0 && myClient->NbEdges() == 0 && myClient->NbFaces() == 0 && myClient->NbVolumes() == 0 ; } diff --git a/src/SMESH_I/SMESH_Mesh_i.cxx b/src/SMESH_I/SMESH_Mesh_i.cxx index e0c228dfa..164b27407 100644 --- a/src/SMESH_I/SMESH_Mesh_i.cxx +++ b/src/SMESH_I/SMESH_Mesh_i.cxx @@ -2414,7 +2414,7 @@ CORBA::Long SMESH_Mesh_i::NbNodes()throw(SALOME::SALOME_Exception) CORBA::Long SMESH_Mesh_i::NbElements()throw (SALOME::SALOME_Exception) { Unexpect aCatch(SALOME_SalomeException); - return NbEdges() + NbFaces() + NbVolumes(); + return Nb0DElements() + NbEdges() + NbFaces() + NbVolumes(); } //============================================================================= -- 2.39.2