Commit 63d3e730 authored by David C. Lonie's avatar David C. Lonie
Browse files

Mark the normals array in the vtkmContour filter.

parent 1cac785b
......@@ -47,6 +47,7 @@ int RunVTKPipeline(T *t, int argc, char* argv[])
cubes->SetNumberOfContours(1);
cubes->SetValue(0,50.5f);
cubes->ComputeScalarsOn();
cubes->ComputeNormalsOn();
vtkNew<vtkPolyDataMapper> mapper;
mapper->SetInputConnection(cubes->GetOutputPort());
......@@ -68,6 +69,13 @@ int RunVTKPipeline(T *t, int argc, char* argv[])
iren->Start();
retVal = vtkRegressionTester::PASSED;
}
if (!cubes->GetOutput()->GetPointData()->GetNormals())
{
std::cerr << "Output normals not set.\n";
return EXIT_FAILURE;
}
return (!retVal);
}
......
......@@ -163,6 +163,13 @@ int vtkmContour::RequestData(vtkInformation* request,
}
}
if (this->ComputeNormals)
{
output->GetPointData()->SetActiveAttribute(
filter.GetNormalArrayName().c_str(), vtkDataSetAttributes::NORMALS);
}
// we got this far, everything is good
return 1;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment