# CellPicker example glitch

**URL:** https://discourse.vtk.org/t/cellpicker-example-glitch/1852
**Category:** Web
**Created:** [October 2, 2019, 3:44pm UTC](https://discourse.vtk.org/t/cellpicker-example-glitch/1852 "2019-10-02T15:44:20Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![EmileSonneveld](https://discourse.vtk.org/user_avatar/discourse.vtk.org/emilesonneveld/32/939_2.png) [@EmileSonneveld](https://discourse.vtk.org/u/EmileSonneveld)
#### Post date: [October 2, 2019, 3:44pm UTC](https://discourse.vtk.org/t/cellpicker-example-glitch/1852/1 "2019-10-02T15:44:20Z")

</div>

Hi,

In the following example there seem to have a glitch: [https://kitware.github.io/vtk-js/examples/CellPicker.html](https://kitware.github.io/vtk-js/examples/CellPicker.html)  
Some points are considered to be on the Cell, while actually they appear in mid air.  
Is this intentional?

Here follows an image where I illustrate the problem:

 ![image](https://discourse.vtk.org/uploads/default/original/1X/b262836effec1bff23ce7ddcb7cc25b3f477f430.png)

Warm greetings,  
Emile

---

<div class="post-metadata">

### Author: ![finetjul](https://discourse.vtk.org/user_avatar/discourse.vtk.org/finetjul/32/154_2.png) [@finetjul](https://discourse.vtk.org/u/finetjul)
#### Post date: [October 3, 2019, 6:50am UTC](https://discourse.vtk.org/t/cellpicker-example-glitch/1852/2 "2019-10-03T06:50:52Z")

</div>

You might want to play with the tolerance of the cell picker functions to see if that improves things.

Hth,  
Julien.

---

<div class="post-metadata">

### Author: ![EmileSonneveld](https://discourse.vtk.org/user_avatar/discourse.vtk.org/emilesonneveld/32/939_2.png) [@EmileSonneveld](https://discourse.vtk.org/u/EmileSonneveld)
#### Post date: [October 3, 2019, 8:01am UTC](https://discourse.vtk.org/t/cellpicker-example-glitch/1852/3 "2019-10-03T08:01:20Z")

</div>

Hi Julien,

Indeed, in the minified code, I changed tolerance from .025 to 0 and the problem was fixed.  
It could be nice if the demo source code mentions something about this tolerance.

> **[vtk.js](https://kitware.github.io/vtk-js/examples/CellPicker.html)**
>
> CellPickerLive example Sourceimport 'vtk.js/Sources/favicon';import vtkActor from 'vtk.js/Sources/Rendering/Core/Actor';import vtkCellPicker from 'vtk.js/Sources/Rendering/Core/CellPicker';import vtk

Thanks for the swift reply!  
Emile

---

<div class="post-metadata">

### Author: ![finetjul](https://discourse.vtk.org/user_avatar/discourse.vtk.org/finetjul/32/154_2.png) [@finetjul](https://discourse.vtk.org/u/finetjul)
#### Post date: [October 3, 2019, 8:25am UTC](https://discourse.vtk.org/t/cellpicker-example-glitch/1852/4 "2019-10-03T08:25:30Z")

</div>

Glad it works.

Feel free to submit a pull request with the suggested change 🙂
