Commit 7621d322 authored by Cory Quammen's avatar Cory Quammen Committed by Kitware Robot
Browse files

Merge topic 'geometryfilter-nonlinear'

e7da231a Using vtkNew instead of raw pointers
7fec293a

 Reuse temporary data structures for non-linear cells
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: Cory Quammen's avatarCory Quammen <cory.quammen@kitware.com>
Merge-request: !4660
parents 9db353bb e7da231a
......@@ -35,6 +35,7 @@
#include "vtkVoxel.h"
#include "vtkWedge.h"
#include "vtkIncrementalPointLocator.h"
#include "vtkNew.h"
vtkStandardNewMacro(vtkGeometryFilter);
......@@ -717,6 +718,12 @@ void vtkGeometryFilter::UnstructuredGridExecute(vtkDataSet *dataSetInput,
}//for all cells
}//if not all visible
// Used for nonlinear cells only
vtkNew<vtkGenericCell> cell;
vtkNew<vtkIdList> ipts;
vtkNew<vtkPoints> coords;
vtkNew<vtkIdList> icellIds;
// These store the cell ids of the input that map to the
// new vert/line/poly/strip cells, for copying cell data
// in appropriate order.
......@@ -1003,11 +1010,7 @@ void vtkGeometryFilter::UnstructuredGridExecute(vtkDataSet *dataSetInput,
case VTK_BIQUADRATIC_QUADRATIC_WEDGE:
case VTK_BIQUADRATIC_QUADRATIC_HEXAHEDRON:
{
vtkGenericCell *cell = vtkGenericCell::New();
input->GetCell(cellId,cell);
vtkIdList *ipts = vtkIdList::New();
vtkPoints *coords = vtkPoints::New();
vtkIdList *icellIds = vtkIdList::New();
if ( cell->GetCellDimension() == 1 )
{
......@@ -1053,10 +1056,6 @@ void vtkGeometryFilter::UnstructuredGridExecute(vtkDataSet *dataSetInput,
}
}
} //3d cell
icellIds->Delete();
coords->Delete();
ipts->Delete();
cell->Delete();
}
break; //done with quadratic cells
} //switch
......
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