lorensen / VTKExamples

The VTK examples, formerly hosted on media wiki
Apache License 2.0
344 stars 157 forks source link

Python Hardwareselector example needs updating #581

Open S0Phon opened 5 years ago

S0Phon commented 5 years ago

I have been trying to work with the hardware selector (https://lorensen.github.io/VTKExamples/site/Python/Visualization/HardwareSelector/) and had been having problems until it was pointed out to me that the x and y values in hsel.SetArea(0, 0, x, y) should be replaced with x-1 and y-1 respectively to give hsel.SetArea(0, 0, x-1, y-1).

My original question and the proposed solution on this issue (and one of the rendering on an intel gpu) is at the following link. The above modification fixed the behaviour of the selector and a workaround for the rendering was also found. https://discourse.vtk.org/t/visible-cell-selection-hardwareselector-py-example-is-not-working-reliably/1262/10