works in debug mode but not in release mode ( vtk9.2.0 )
Hello, I try to get 3 xyz coordinates per cell using NumCpp and vtk.
vtkNew<vtkIdList> idL;
polydata->GetPolys()->InitTraversal();
auto cellpoints = nc::NdArray<float>(polydata->GetNumberOfCells(), 9);
for (int i = 0; i < polydata->GetNumberOfCells(); i++)
{
decimated->GetPolys()->GetNextCell(idL);
int a = idL->GetId(0);
int b = idL->GetId(1);
int c = idL->GetId(2);
cellpoints(i, 0) = points(a, 0);
cellpoints(i, 1) = points(a, 1);
cellpoints(i, 2) = points(a, 2);
cellpoints(i, 3) = points(b, 0);
cellpoints(i, 4) = points(b, 1);
cellpoints(i, 5) = points(b, 2);
cellpoints(i, 6) = points(c, 0);
cellpoints(i, 7) = points(c, 1);
cellpoints(i, 8) = points(c, 2);
}
This code works in debug mode but not in release mode.
In GetId(), Occur access violation.
I checked everything I could, but I couldn't solve it.
Is there a way to solve this problem?
Edited by Mathieu Westphal (Kitware)