PyVista is a helper module for the Visualization Toolkit (VTK) that takes a different approach on interfacing with VTK through NumPy and direct array access.
Questions tagged [pyvista]
147 questions
4
votes
1 answer
How to handle the lights in PyVista when using a transform matrix for the camera?
I'm using camera transform matrices in PyVista to do an animation. But my object is shadowed:
I apply the same transformation matrices to the lights, as you can see below.
circles = fractal3(4)
for i, matrix in enumerate(matrices):
pltr =…

Stéphane Laurent
- 75,186
- 15
- 119
- 225
4
votes
1 answer
Pyvista surface plot?
I need a way to make a 3-dimensional surface plot using millions of datapoints, so I began checking into pyvista which is supposed to do this well.
However, pyvista is a bit difficult for me to grasp.
I have x,y,z data where x is time, y is…

thatoneguy
- 59
- 1
- 11
3
votes
1 answer
VTK import error when trying to import PyVista on Python 3.10
I installed pyvista on my laptop with Ubuntu (version 22) by using the command pip install pyvista. But when I import pyvista, it gives the following error.
ImportError: cannot import name 'vtkExtractEdges' from 'vtkmodules.vtkFiltersExtraction'…

Mota Mota
- 53
- 1
- 5
3
votes
1 answer
Surface Reconstruction from Point Cloud in Python Pyvista
I am in the process of creating a mesh from my 3D PointCloud data. I have obtained my mesh and will attach pictures below. I was curious if anyone knew how to only obtain the mesh of just the scanned surface. It seems that when the mesh was created…

Camden Nagg
- 41
- 1
- 4
3
votes
1 answer
Mesh to filled voxel grid
I'm trying to work with voxels. I have a closed mesh object, but here I'll use the supplied example mesh. What I would like to do is convert the mesh to a filled voxel grid.
The below code takes a mesh and turns it into a voxel grid using pyvista,…

Spatial Digger
- 1,883
- 1
- 19
- 37
3
votes
1 answer
Is it possible to silent native VTK logs when using python wrapper and/or pyvista?
Currently, we are using Python's vtk wrapper and also Pyvista (a more pythonist vtk wrapper).
At some parts of the process we have some log lines from .cxx files:
2022-03-17 17:21:56.031 ( 156.058s) [ 4CC78740] vtkDelaunay3D.cxx:518 …

Gonzalo Matheu
- 8,984
- 5
- 35
- 58
3
votes
1 answer
Multi-window plot with PyVista are (wrongly) sharing the colorlevels
I want to make a multi-window plot of varies slices of 3D volumetric data. I found PyVista to be what I was looking for. When I am doing just a single plot, everything is fine. I have a problem, however, when I am plotting multiple slices in one…

Alf
- 1,821
- 3
- 30
- 48
3
votes
0 answers
Alpha Shapes in 3D - Follow Up
Problem
I am trying to implement Edelsbrunner's Algorithm for the alpha shape of a 3D point cloud in python as presented in this SO post. However, I'm having trouble plotting results. Half my sphere looks good, and the other half garbled.
I suspect…

adam.hendry
- 4,458
- 5
- 24
- 51
3
votes
0 answers
Can not get Pyvista render to work with Qt QML QQuickFramebufferObject
I have multiple Pyvista 3d visualizations render in the Qt 5.15.x Qt Widgets. This was done using QtInteractor (https://github.com/pyvista/pyvistaqt). Now, I am moving away from Qt widgets to Qt QML.
My idea is to get the renderer from PyVista and…

Bakkiaraj
- 99
- 2
- 3
2
votes
1 answer
Separate vtk self intersected polydata into multiple polygons from duplicate points?
From a vtk self intersected polydata, I would like to separate it into multiple polygons.
Note that intersections in the initial polygon can be detected from duplicate points in the list of points that form the polygon.
Get the test file from a…

PBrockmann
- 303
- 5
- 16
2
votes
1 answer
Convert from plotter coordinates to world coordinates in PyVista
I am new to PyVista and vtk. I am implementing a mesh editing tool (Python=3.10, pyvista=0.37,vtk=9.1 ) When a user clicks all points within a given radius of the mouse cursor's world coordinates (e.g. projected point on the surface) should be…

Harry Matthews
- 143
- 1
- 10
2
votes
1 answer
How can I show the 3D render with stereo?
I just learned how to create 3D images with PyVista, but I got a problem when I wanted to show the image with stereo rendering. Here's the error code: vtkRenderWindow.cxx:267 WARN| vtkWin32OpenGLRenderWindow (0000018518100300): Adjusting stereo…

ryan
- 21
- 3
2
votes
1 answer
PyVista: Why does the callback only draw the 3d entities and not the 2d one on the second time?
I have a question and hope that you can help me.
I put together a small MCVE below.
When you click the button for the first time,
you can see that the 3d data (add_mesh, add_points) and 2d data (chart.scatter) show up.
If you click it again only the…

Joe
- 6,758
- 2
- 26
- 47
2
votes
2 answers
How to stitch two meshes together along overlapping seams without altering other parts of the meshes?
I'm trying to join two meshes together into one single mesh. The boundary edges of both overlap perfectly, but they do not have the same spacing - thus, all faces touching the seams need to be deleted and then all the points from those faces …

Derek Eden
- 4,403
- 3
- 18
- 31
2
votes
1 answer
Vertex normals look different in PyVista and Blender
I'm working with a mesh of a cave, and have manually set all the face normals to be 'correct' (all faces facing outside) using Blender (Edit mode-> choose faces -> flip normal). I also visualised the vertex normals in Blender, and they are all…

Thejasvi
- 200
- 1
- 11