[vtkusers] Modification of a vtkActor and cell picking

Vincent Arsigny vincent.arsigny at inria.fr
Mon Sep 8 12:19:20 EDT 2003


Hi all,

here is the epilogue of this problem:

when in order to add new cells to a polydata that has already been 
rendered, the command
"InsertNextCell" has to be applied on the PolyData. A contrario, if this 
is done
directly on the CellArray provided to the PolyData, there is no 
guarantee that
the variable "Cells" of the PolyData will be updated, even when we use 
"Update"
on the PolyData after having used "Modified" on the CellArray. This can 
result in a
horrible Segmenation Fault when resorting to a CellPicker, because some 
cells are considered
as "EmptyCell" even though they aren't.

All the best,

Vincent Arsigny
(EPIDAURE Project, INRIA, France)

Will Schroeder wrote:

> It is possible that picking is not the problem, but rather the 
> addition of the cells is corrupting memory and when you pick the 
> problem is exposed. I suggest that you get a tool like Purify or 
> Valgrind and diagnose where the memory problem is.
> Will
>
> At 11:47 AM 9/4/2003 +0200, Vincent Arsigny wrote:
>
>> Hi,
>>
>> I'm currently visualizing some data with vtkPolyData, and there
>>
>> First, I create an initial PolyData, which is rendered.
>> Then, I modify this PolyData by adding new cells, which are displayed
>> correctly in the render window.
>>
>> The trouble is that when I use a vtkCellPicker after having modified the
>> PolyData, the system crashes because of a segmentation fault in the 
>> method GetCell().
>>
>> I guess what is missing here is some king of updating procedure that 
>> must be done prior to the picking. Could any one give me a clue about 
>> this?
>> I've already tried losts of Modified() and Update() on all the objects
>> involved in this, but so far to no avail.
>
>
>
>
> William J. Schroeder, Ph.D.
> Kitware, Inc.
> 469 Clifton Corporate Parkway
> Clifton Park, NY 12065
> will.schroeder at kitware.com
> 1-518-371-3971 x102 (phone)
> 1-518-371-3971 (fax)
>





More information about the vtkusers mailing list