#include "SUIT_ResourceMgr.h"
#include <vtkUnstructuredGrid.h>
+#include <vtkCellType.h>
#include <vtkProperty.h>
#include <vtkMapper.h>
CORBA::Long aRetVal = -1;
VISU::PIDMapper anIDMapper;
anIDMapper = myResult->GetInput()->GetMeshOnGroup(theMeshName,theGroupName);
-
+ if(!anIDMapper)
+ MESSAGE("Warning: There are no mesh with group=|"<<theGroupName<<"|");
VISU_MeshPL* aTmpMesh = VISU_MeshPL::New();
aTmpMesh->SetIDMapper(anIDMapper);
if (MYDEBUG) MESSAGE("VISU::PrsMerger_i::SetScalarMap");
VISU::PIDMapper anIDMapper;
anIDMapper = myResult->GetInput()->GetTimeStampOnMesh(theMeshName,(VISU::TEntity)theEntity,theFieldName,int(theStampsNum));
+
+ myEntity = (VISU::TEntity)theEntity;
+ myFieldName = theFieldName;
+ myIteration = theStampsNum;
+
myScalarsPL->SetIDMapper(anIDMapper);
myPrsMergerPL->SetScalars(myScalarsPL);
}
if(!anIDMapper) return false;
bool aAllPoints = true;
- for(int i=0;i<anIDMapper->GetVTKOutput()->GetNumberOfCells();i++)
- if(anIDMapper->GetVTKOutput()->GetCellType(i) != 1){
- aAllPoints = false;
+ if(anIDMapper->GetVTKOutput()->GetNumberOfCells()>0){
+ int aVtkCellType = anIDMapper->GetVTKOutput()->GetCellType(0);
+ if (MYDEBUG) MESSAGE("CellType="<<aVtkCellType);
+ switch(myEntity){
+ case NODE_ENTITY:
+ case CELL_ENTITY:
+ if(aVtkCellType != VTK_LINE &&
+ aVtkCellType != VTK_POLY_LINE &&
+ aVtkCellType != VTK_VERTEX &&
+ aVtkCellType != VTK_PIXEL)
+ aAllPoints = false;
+ break;
+ case EDGE_ENTITY:
+ if(aVtkCellType == VTK_LINE ||
+ aVtkCellType == VTK_POLY_LINE)
+ aAllPoints = false;
+ break;
+ case FACE_ENTITY:
+ if(aVtkCellType == VTK_TRIANGLE ||
+ aVtkCellType == VTK_TRIANGLE_STRIP ||
+ aVtkCellType == VTK_POLYGON ||
+ aVtkCellType == VTK_QUAD)
+ aAllPoints = false;
break;
}
+ }
+ if (MYDEBUG) MESSAGE("return="<<!aAllPoints);
return (!aAllPoints);
}