Skip to content

pass field data arrays instead of the field data itself in vtkPolyDataNormals

Fixes vtkPolyDataNormals removing any field data arrays of its input data in certain cases.

For example, in the code below, the second update call on normals removes the field data arrays of poly as a side effect. I suppose it's somehow caused by the fact that the modified filter clears/recreates it's output, which contains the field data of the input.

auto poly = vtkSmartPointer<vtkPolyData>::New();
poly->GetFieldData()->AddArray(...);
auto normals = vtkSmartPointer<vtkPolyDataNormals>::New();
normals->SetInputData(poly);
normals->Update();
normals->Modified();
normals->Update();

Merge request reports