[vtkusers] Pick & delete cell
alexmalvtk at gmail.com
Wed Feb 27 20:34:48 EST 2013
I believe you can't obtain polydata when making shallow copy of
Filter has to be invoked.
Check vtkGeometryFilter .
On Wed, Feb 27, 2013 at 11:02 AM, David Doria <daviddoria at gmail.com> wrote:
> On Wed, Feb 27, 2013 at 9:49 AM, Massinissa Bandou
> <Massinissa.Bandou at usherbrooke.ca> wrote:
>> Hi David,
>> Sorry for late response, I tried the vtkExtractSelection by displaying the
>> unselected cells:
>> I hope this is what you mean directly from the polydata.
>> But it seems not working because I still see the junctions/points or
>> vertices and the cells if I "delete" a couple of neighboring cells.
>> I don't know how you can delete the cells directly from the polydata??
>> Thank you for your help!
> I meant try replacing
> vtkSmartPointer<vtkUnstructuredGrid> selected =
> vtkSmartPointer<vtkPolyData> selected =
> I tried it, but the output
> std::cout << "There are " << selected->GetNumberOfCells()
> << " cells in the selection." << std::endl;
> says that there are 0 cells in the selection when a vtkPolyData is
> used, but 10 cells when a vtkUnstructuredGrid is used.
> If anyone could explain why this is, that would be helpful. That is,
> can we modify the example to use vtkPolyData, or is there a reason
> that the cells cannot be copied into a vtkPolyData even though they
> are 2D cells?
> Powered by www.kitware.com
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
More information about the vtkusers