Changing the geometry of an actor made the picker worked incorrectly

After an actor were created, its geometry were changed.
In fact I just changed its polydata by splitting 1 big triangle into 3.
But I found when I picked the actor, the big triangle seemed become 1 small triangle and the other 2 small ones can’t be hitted, they became hollow!!
But the actor was displayed correctly.
That made me puzzle and I need you help.
Thank you.

What VTK version are you using?

Perhaps, I need to tell the render that I had changed one actor.
But I don’t know how to do it.

Perhaps you could try something like this:


The method above supposedly notifies other algorithms of changes in geometry. That potentially includes the spatial index used by VTK to enable picking.

I have done that, and the actor is displayed correctly.
The problem is only for the picker.

Sorry for the late reply. Is it possible/viable to upgrade to latest version?

I have tried it in vtk8.2. It still doesn’t work.
In fact, someone have told me to call the vtkPolyData::BuildCells(), and it does works in a simple test program.
But in a more complicated program, it still failed.
That make me confused.

Just checking: do you call that method on ALL instances? I mean, maybe you used some filter that spawned more vtkPolyDatas that your code currently manages.

As you said the call works with simple examples, another approach is to tear down scene complexity until you obtain a working version of your code. That’s what I do when I face mysterious problems like that. I comment out most of the code and uncomment them bit-by-bit until I the issue kicks in.

good idea. Carvalho. I’ll try.
sorry for my so late reply.