vtkCellPicker not working correctly

The vtkCellPicker example allows for creating spheres at the picked position. It works well on the side triangles of the cone (cell ID = 2):

However, right clicking on the bottom cell of the cone results in some spheres being created at the bottom (cell ID = 0) and some at the sides (cell IDs = 1 to 6):

Is there some sort of clipping plane that divides the spheres?

Cell picking currently works only with triangle cells.

See cellPicker randomly picks backfaces with cubeSource · Issue #1122 · Kitware/vtk-js · GitHub

A quick fix is to “triangulate” your mesh before picking.
A better fix is to implement picking for all cell types.

Please let us know if you need our support to implement the “better fix”.

Regards,
Julien.

Thank you for clarifying. Using triangles works just fine.