I have been trying to use the hardwareselector example given at https://lorensen.github.io/VTKExamples/site/Python/Visualization/HardwareSelector/ and this only occasionally works. I am running the file exacly as it is given. I am using an anaconda environment with python 3.7.3 and vtk 8.2.0 installed using
conda install vtk . I get the same behaviour when using Visual Studio Code to run the environment.
When I run the program from anaconda prompt, it will open a small window which remains black until I interact with it.
The sphere then becomes visible.
When I press the ‘u’ key to capture the visible cells, one of three things happens.
- The list of the cells are printed in anaconda prompt as expected
- One element is printed
- The window freezes and then closes.
Which of the behaviours is exibhited seems random, however the windows does not crash once behaviour (1) or (2) occurs. The results shown here are after trying the program 3 times before it stopped crashing and then many ‘u’ presses (about 30) before the visible cells were printed. After each, I changed the orientation, position of zoom of the sphere.
I have no prior experienced with vtk and only very limited experience with python so am unlikely to be able to make any progress with this on my own. I am happy to provide more information if needed.