Detect the collosion of models, and change model outlook realtime

Hi:
Thanks for your reading. There are a question confused me. In mine scene, there are a femur model, and probe model. I control the probe to grind the femur. I can capture the collision caused by probe and femur. BUT I want to change the femur model outlook realtime. JUSH LIKE BELOW PICTURE

Screenshot from 2021-09-29 22-45-23

the white part is femur bone, and the green part is grinded region, if the probe model contacts the green part, the triangle cell will be change, the green part will disappear gradually.

how can i implement this effect?

I use vtkcollosiondetectfilter to capture the collosion caused by model nodes.

You can detect collisions with that filter you mention inside a periodic timer callback function supposing you have probe position tracked and you can update the femur model polydata using combineModel’s logic to make a boolean difference operation that would remove the material the probe is touching but I have my concers regarding implementation of that, I think it would be easier to use the segmentEditor erase effect to get what you want, you just need a way to get the mouse to move where the probe is. Maybe this last thing is easier to achieve.