How to select a geometrical face and highligts it.

Dear vtk.js:

My target is to show an geometry shape on web (from reading *.obj or *.vtp). when user picks one of the geoetrical faces, the selected face is highligted.

my strategy is to append cell data that is the geometrical face id number. Through cellpicker, I can get the picked cell and the face id that the picked cell belongs to. The question is that how to make the selections of the cells withing the face and render it with mapper and actor?

In vtk/C++, I can find vtkSelectionNode, vtkSelection, vtkExtractSelection to reach this target. But in vtk.js, I can not find a appropriate solution. does anyone give some hints or a elegant way for this target?

thanks alot for your help.

If you just want to highlight, one (high-level) possible approach is to color your dataset by a cell data scalars, and update that color for the selected face.

thanks alot, your suggestion did help to solve this problem. it works!