Hi,
I wanted to ask if there had been any updates.
I saw @dgobbi mentioned autcompletion might be available in vtk 9. I used pip install vtk
in my conda environment to get vtk==9.0.3
.
But autocompletion for import vtk
still wasn’t available in PyCharm, PyDev on Eclipse, nor on VsCode.
@ben.boeckel suggests using import vtkmodules
, but this works only partially.
An example of it working,
Let’s look at the example from https://kitware.github.io/vtk-examples/site/Python/GeometricObjects/Cone/ You being with import vtk
and then call vtk.vtkConeSource()
Because you cannot call vtkmodules.vtkConeSource()
, I had to google a bit.
This was relatively simple, I googled to find out that vtkNamedColors
lived in vtkCommonColor
then I called vtkmodules.vtkCommonColor.vtkNamedColors()
An example of it being unusable
Unfortunately, using vtkmodules
I can’t find a lot of paths.
From the same example, https://kitware.github.io/vtk-examples/site/Python/GeometricObjects/Cone/ , there is the line mapper = vtk.vtkPolyDataMapper()
But, I can’t find a vtkmodules
equivalent. I tried vtkmodules.vtkPolyDataMapper()
but that did not work.
I googled, again, to find where vtkPolyDataMapper
lives.
I saw vtkPolyDataMapper
lives in vtkMapper
. I tried vtkmodules.vtkMapper
and vtkmodules. vtkAbstractMapper3D
but neither were autocompleted nor appeared to be a valid path so I’m not sure what an equivalent vtkmodules
path is for mapper = vtk.vtkPolyDataMapper()
Is there autocompletion for vtk
? If so, how can I set it up.
If I must use vtkmodules
, how can I find equivalent paths between it and vtkmodules
since vtkmodules
doesn’t seem to own all the packages that vtk
does.
I apologize if these are ignorant questions. I am a new user.
Thank you,
CoffeeCup