X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPlugins%2FMEDReader%2FIO%2FvtkELNOFilter.cxx;h=aee584bc112ec507943b05513336e6813234ab81;hb=60ce6156a78d9390b0ff18260b7edf234ff8ac4b;hp=535adb484031748665ecdea327d90996ec857448;hpb=e4350e9cdbb25c86c1b7caa25182a8c99381ead9;p=modules%2Fparavis.git diff --git a/src/Plugins/MEDReader/IO/vtkELNOFilter.cxx b/src/Plugins/MEDReader/IO/vtkELNOFilter.cxx index 535adb48..aee584bc 100644 --- a/src/Plugins/MEDReader/IO/vtkELNOFilter.cxx +++ b/src/Plugins/MEDReader/IO/vtkELNOFilter.cxx @@ -3,7 +3,7 @@ // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -24,10 +24,15 @@ #include "vtkPolyDataAlgorithm.h" #include "vtkPolyData.h" #include "vtkIdTypeArray.h" +#include "vtkFieldData.h" +#include "vtkCellData.h" +#include "vtkPointData.h" #include "vtkInformationQuadratureSchemeDefinitionVectorKey.h" #include "vtkQuadratureSchemeDefinition.h" #include "vtkUnstructuredGrid.h" +#include "MEDUtilities.hxx" + //vtkCxxRevisionMacro(vtkELNOFilter, "$Revision: 1.2.2.2 $"); vtkStandardNewMacro(vtkELNOFilter); @@ -116,7 +121,25 @@ int vtkELNOFilter::RequestData(vtkInformation *request, } start += np; } - + //// bug EDF 8407 PARAVIS - mantis 22610 + vtkFieldData *fielddata(usgIn->GetFieldData()); + for(int index = 0; index < fielddata->GetNumberOfArrays(); index++) + { + vtkDataArray *data(fielddata->GetArray(index)); + vtkInformation *info(data->GetInformation()); + const char *arrayOffsetName(info->Get(vtkQuadratureSchemeDefinition::QUADRATURE_OFFSET_ARRAY_NAME())); + bool isELNO(false); + if(arrayOffsetName) + { + vtkCellData *cellData(usgIn->GetCellData()); + vtkDataArray *offData(cellData->GetArray(arrayOffsetName)); + isELNO=offData->GetInformation()->Get(MEDUtilities::ELNO())==1; + } + if(isELNO) + { + pdOut->GetPointData()->AddArray(data); + } + } return 1; }