IPAL21374 Add 0D element leads to visualization failure.

This commit is contained in:
dmv 2009-09-17 13:18:43 +00:00
parent 69aebe3a10
commit a4e0e20f3c
3 changed files with 2 additions and 3 deletions

View File

@ -546,7 +546,6 @@ SMESH_DeviceActor
aDataSet->Delete();
}else if(FreeNodes* aFreeNodes = dynamic_cast<FreeNodes*>(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);

View File

@ -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 ;
}

View File

@ -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();
}
//=============================================================================