diff --git a/vtkPolyDataContactFilter.cxx b/vtkPolyDataContactFilter.cxx index bc651da..6907eda 100644 --- a/vtkPolyDataContactFilter.cxx +++ b/vtkPolyDataContactFilter.cxx @@ -136,11 +136,6 @@ int vtkPolyDataContactFilter::RequestData (vtkInformation *request, vtkInformati obbA->IntersectWithOBBTree(obbB, mat, InterOBBNodes, this); - if (contLines->GetNumberOfCells() == 0) { - vtkErrorMacro("There is no contact."); - return 1; - } - if (aborted) { vtkErrorMacro("Bad shaped cells detected."); return 1; @@ -156,6 +151,11 @@ int vtkPolyDataContactFilter::RequestData (vtkInformation *request, vtkInformati return 1; } + if (contLines->GetNumberOfCells() == 0) { + vtkErrorMacro("There is no contact."); + return 1; + } + contLines->GetCellData()->AddArray(contA); contLines->GetCellData()->AddArray(contB);