From: akl Date: Wed, 19 Sep 2007 07:50:48 +0000 (+0000) Subject: VTK-4.4.2 porting X-Git-Tag: T_24092007~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=670c16a492f1a7091a8a9935b8372035d6e31b10;p=modules%2Fvisu.git VTK-4.4.2 porting --- diff --git a/src/PIPELINE/VISU_CellDataToPointData.cxx b/src/PIPELINE/VISU_CellDataToPointData.cxx index 30532952..68552417 100644 --- a/src/PIPELINE/VISU_CellDataToPointData.cxx +++ b/src/PIPELINE/VISU_CellDataToPointData.cxx @@ -50,8 +50,8 @@ void VISU_CellDataToPointData::Execute() vtkCellData *inPD=input->GetCellData(); vtkPointData *outPD=output->GetPointData(); vtkIdList *cellIds; - float weight; - float *weights; + vtkFloatingPointType weight; + vtkFloatingPointType *weights; vtkDebugMacro(<<"Mapping cell data to point data"); @@ -67,7 +67,7 @@ void VISU_CellDataToPointData::Execute() cellIds->Delete(); return; } - weights = new float[VTK_MAX_CELLS_PER_POINT]; + weights = new vtkFloatingPointType[VTK_MAX_CELLS_PER_POINT]; outPD->CopyAllocate(inPD,numPts); diff --git a/src/VISU_I/VISU_PrsMerger_i.cc b/src/VISU_I/VISU_PrsMerger_i.cc index 57397049..878cd2ed 100644 --- a/src/VISU_I/VISU_PrsMerger_i.cc +++ b/src/VISU_I/VISU_PrsMerger_i.cc @@ -65,7 +65,24 @@ int VISU::PrsMerger_i::IsCompatibleCellTypes(Result_i* theResult, const char* th vtkUnsignedCharArray* cellTypes = vtkUnsignedCharArray::New(); VISU::TVTKOutput* aDataSet = anIDMapper->GetVTKOutput(); aDataSet->Update(); - aDataSet->GetListOfUniqueCellTypes(cellTypes); + +// Fills cellTypes with list of unique cell types + unsigned char type; + vtkUnsignedCharArray *typesArray = aDataSet->GetCellTypesArray(); + if (typesArray){ + type = typesArray->GetValue(0); + cellTypes->InsertNextValue(type); + for (int cellId = 0; cellId < aDataSet->GetNumberOfCells(); cellId++){ + type = typesArray->GetValue(cellId); + for (int i = 0; i < cellTypes->GetMaxId()+1; i++){ + if (type != cellTypes->GetValue(i)) + cellTypes->InsertNextValue(type); + else + break; //cell is not unique, return control to outer loop + } + } + } + for(vtkIdType anId = 0; anId < cellTypes->GetNumberOfTuples(); anId++){ const vtkIdType aType = (const vtkIdType)cellTypes->GetValue(anId); if(aType == VTK_QUADRATIC_EDGE ||