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

Fixup bugs in vtkBoxClipDataSet.

There were some copy/paste errors and an uninitialized
traversal causing the clipped output to produce a data set
with more cell types than cell connections.

Change-Id: Ia8918b58f925c075eed10e8157406759cd789f42
parent 99101fdf
......@@ -359,7 +359,7 @@ int vtkBoxClipDataSet::RequestData(vtkInformation *vtkNotUsed(request),
inPD, outPD, inCD, cellId, outCD);
}
numNew[0] = conn[0]->GetNumberOfCells() - num[0];
numNew[1] = conn[1]->GetNumberOfCells() - num[0];
numNew[1] = conn[1]->GetNumberOfCells() - num[1];
num[0] = conn[0]->GetNumberOfCells();
num[1] = conn[1]->GetNumberOfCells();
}
......@@ -376,7 +376,7 @@ int vtkBoxClipDataSet::RequestData(vtkInformation *vtkNotUsed(request),
inPD, outPD, inCD, cellId, outCD);
}
numNew[0] = conn[0]->GetNumberOfCells() - num[0];
numNew[1] = conn[1]->GetNumberOfCells() - num[0];
numNew[1] = conn[1]->GetNumberOfCells() - num[1];
num[0] = conn[0]->GetNumberOfCells();
num[1] = conn[1]->GetNumberOfCells();
}
......@@ -458,6 +458,7 @@ int vtkBoxClipDataSet::RequestData(vtkInformation *vtkNotUsed(request),
for (i=0 ; i<numOutputs; i++) // for both outputs
{
conn[i]->InitTraversal();
for (j=0; j < numNew[i]; j++)
{
locs[i]->InsertNextValue(conn[i]->GetTraversalLocation());
......
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