[vtkusers] Re: deleting cells interactively from an unstructured grid
Goodwin Lawlor
goodwin.lawlor at ucd.ie
Thu Jun 1 12:19:10 EDT 2006
kshivann at engineering.uiowa.edu wrote:
> hi all,
> i want to delete a cell in the unstructured grid interactively.
> solution available in the VTK mailing list is to maintain a seperate
> vtkList and copy the updated vtkList to the new unstructured grid being
> created. Is this the best possible solution and can i use the function
> RemoveReferenceToCell().
>
> thanks
>
> kiran
Hi Kiran,
For an unstructured grid you could try vtkExtractCells with a vtkIdList.
The problem with interactive removal is as you remove cells the cell ids
are remapped to fill in the gaps in the cell id list. So the cell id you
get from the renderer's picker is not the cell id you want to remove.
You could have a look at how vtkRemoveCellsFilter
http://www.bioengineering-research.com/vtk/vtkRemoveCellsFilter.htm
takes care of this.
hth
Goodwin
More information about the vtkusers
mailing list