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
1
vote
1 answer
Boolean union two meshes only works for ellipsoid
I want to create a pothole (ellipsoid) in a street (plane). After some testing, I realized that the boolean union is probably the one to use (as I want to combine both of the meshes however do not want the street to cover up the pothole).
When I try…

Michael Hüppe
- 81
- 1
- 7
1
vote
1 answer
Applying Perlin noise to plane multiple times/ sphere
I have some questions regarding the Perlin noise and the pv.sample_function in general.
How would you go about applying Perlin noise to a sphere? I would like to have a little bit disformed sphere.
Can you apply Perlin noise to a mesh…

Michael Hüppe
- 81
- 1
- 7
1
vote
1 answer
How to convert a cartesian problem in a cylindrical problem?
I display a gyroid structure (TPMS) in a cartesian system using Pyvista. I try now to display the structure in cylindrical coordinates. Pyvista displays something cylindrical indeed but it seems that the unit cell length is not uniform (while there…

VinceCha
- 33
- 3
1
vote
1 answer
PyVista plotter unable to produce background image for multiple subplots
I am trying to render a mesh in Python using pyvista.Plotter() while trying to show images alongside the rendered mesh. The code is currently in the form of
import pyvista as pv
from pyvista import examples
filenames =…

Arttu
- 11
- 1
1
vote
1 answer
How to check if a single point is inside a surface in pyvista?
So I have a closed mesh and a single point. How to check if one is inside another?
I tried:
def is_inside(point):
points = pv.PolyData([point,])
point_in_question = points.points[0]
select = mesh_model.select_enclosed_points(points)
…

DuckQueen
- 772
- 10
- 62
- 134
1
vote
1 answer
How to cut vertices and faces connected to points lower than some value in pyvista?
So when one exports r.out.vtk from Grass GIS we get a bad surface with -99999 points instead of nulls:
I want to remove them, yet a simple clip is not enough:
pd = pv.read('./pid1.vtk')
pd = pd.clip((0,1,1),…

DuckQueen
- 772
- 10
- 62
- 134
1
vote
1 answer
How to join 2 surfaces on Z acess into one mesh?
So I have 2 surfaces (PolyData in PyVista) one on top of another:
They are shaped a little differently on Z access yet whenever a top one has a Z value on X, Y plane we are sure a-bottom one has the same. So how one can merge two surfaces X, Y…

DuckQueen
- 772
- 10
- 62
- 134
1
vote
1 answer
Interactive plotting in spyder using pyvista widgets
I need help regarding interactive plotting in spyder using pyvista (widgets??). I checked the example files in pyvista site. When I run the example codes, all I get is static plots. I found a similar post here by Dr Thomas but I need a full code…

Shahidul
- 21
- 2
1
vote
1 answer
Save screen capture in pyvista including interaction / rotation
I'm looking for a way to effectively capture the frame buffer during interaction in pyvista so that I can produce a video afterwards of the model moving around on the screen.
The problem I've encountered is that when I click the screen to interact…

HotDogCannon
- 2,113
- 11
- 34
- 53
1
vote
1 answer
PyVista error trying to cast a shadow onto a gridded plane
PyVista is great, and let's me do lots of cool things very conveniently. I would like to cast the shadow of a 3D object onto a plane with grid lines. Here's what I would like, minus the shadows, shadows=False, gridlines=True
I can enable shadows…

Peter Corke
- 544
- 4
- 16
1
vote
1 answer
PyVista, How to save the whole render result
When using PyVista, we can use mesh.save() or pyvista.save_meshio() to save a mesh, but not the whole render result. Taking the following code as an example, how do I save the render result, instead of just a single mesh?
from math import sin, cos,…

Sunchi
- 85
- 1
- 9
1
vote
1 answer
Pyvista access to VTK file values
I have a VTK file and I can open that using pyvista. When I open this file in any 3D viewer applicatoins (e.g. Paraview) I can see the points and their values (there are many points distributed in X,Y,Z and each point has its own value).
In pyvista…

aminrd
- 4,300
- 4
- 23
- 45
1
vote
1 answer
How do I test that PyVista successfully plotted a figure?
I am generating 3D meshes in PyVista, and I would like to update my integration test suite to ensure that it successfully shows my plots.
I'm hoping to adapt the methodology described here, to work with PyVista. Unfortunately, I can't find any…

wingedNorthropi
- 149
- 2
- 16
1
vote
0 answers
PyVista add_volume shows a blank image
I am trying to develop some data visualizations with PyVista (on a mac). My Python version is 3.7.4 and my PyVista (installed via conda) is 0.25.1. I tried the example provided here:…

Samarth
- 133
- 1
- 6
1
vote
1 answer
PyVista TypeError: SetSpacing argument
I previously ran the following with no issues.
grid=pv.UniformGrid()
grid.points=np.array([x_surf,y_surf,z_surf]).transpose()
Today, I ran it and received the following. I have already tried reinstalling the package.
Traceback (most recent call…

Cam K
- 127
- 2
- 2
- 13