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
2
votes
2 answers
How to pick point with out key press in pyvista
I am using pyvista to visualize stl file. To get point information, i used below code to achieve this
import pyvista as pv
p = pv.Plotter()
mesh = pv.read(filename)
p.add_mesh(mesh)
def callback(x, y)…

Viswa
- 134
- 1
- 13
2
votes
2 answers
How to create shared topology using PyAnsys and PyVista
I have created two cylindrical meshes using PyVista with the goal of performing a modal analysis using PyAnsys on both the inner cylinder (shown in blue) and the outer cylinder (shown in grey). Where each of these cylinders have differing material…

ChaddRobertson
- 605
- 3
- 11
- 30
2
votes
1 answer
An algorithm to sort top and bottom slices of curved surfaces
I try to do:
Cut STL file https://www.dropbox.com/s/pex20yqfgmxgt0w/wing_fish.stl?dl=0 at Z-coordinate using PyVsita https://docs.pyvista.org/ )
Extract point's coordinates X, Y at given section Z
Sort points to Upper and Down groups for further…

Miro
- 23
- 6
2
votes
1 answer
Import getfem++ into conda environnement ? - Raspberry Pi 4 - Ubuntu 21.04
In my project I'm using an Raspberry PI 4 with Ubuntu 21.04 installed on it (aarch64).
I'm using :
-Pycharm as my IDE for Python
-Miniforge3 to have a conda environnement
I would like to install the library getfem++ and pyvista to run this example…

Tchimy
- 41
- 4
2
votes
1 answer
PyVista: AttributeError: 'Plotter' object has no attribute 'ren_win'
I am using the example code of the documentation from PyVista:
import pyvista as pv
import matplotlib.pyplot as plt
from pyvista import examples
mesh = examples.load_random_hills()
p = pv.Plotter()
p.add_mesh(mesh, color=True)
p.show()
zval =…

mzr97
- 69
- 7
2
votes
1 answer
How to extrude an irregular polygon?
I have a set of 2D vertex coordinates in the plane (assume xy-plane) and I would like to extrude this in the z-direction to form a PolyData object that I can transform and render.
The ideal function would take an nx2 ndarray of vertices and a height…

Peter Corke
- 544
- 4
- 16
2
votes
1 answer
Finding k nearest neighbors in 3d numpy array
So I'm trying to find the k nearest neighbors in a pyvista numpy array from an example mesh. With the neighbors received, I want to implement some region growing in my 3d model.
But unfortunaley I receive some weird output, which you can see in the…

Lukas Marschall
- 93
- 1
- 7
2
votes
1 answer
Add new point to PolyData in PyVista / Best way to process XYZ to TIN
Is it possible to add new point (X, Y, Z) to PolyData points array, without creating new PolyData? I want to make new Triangulate Surface (TIN) really fast, but creating a new PolyData from NumPy array takes around 1 second. Meanwhile, e.g. function…

dany
- 173
- 1
- 8
2
votes
1 answer
Plotting parametric objects as a grid in PyVista
I am stuck with probably a simple problem but after reading pyvista docs I am still looking for an answer. I am trying to plot a grid in which each cell will be a mesh defined as a parametric shape i.e. supertorus. In an early version of pyvista, I…

wawosz
- 23
- 6
2
votes
1 answer
Is there a way to integrate Pyvista with tkinter?
I'm working on a python script where it takes a VTI file and plots out the data using pyvista. At its current state, (clicking a button on tkinter), it will run a script and plot my data using pyvista in new window. What I trying to achieve is to…

Zhe Wei
- 21
- 2
2
votes
2 answers
How to generate mesh and plot 3d surface in python?
I have 6 corner points coordinate of 3d surface like Figure 1. I want to generate and plot 3d surface like Figure 2. I need to find the distance of midpoint of each meshed area from the origin.
Figure 1
Figure 2
Please suggest me, which module will…

Md Motiur RAHMAN
- 31
- 1
- 2
1
vote
0 answers
pyvista ray trace detects only one intersection
I try to do detect the intersections of a ray with a polygon using pyvista. In this case the polygon is a cube. The cube is defined by points in 2d and then extruded. Why does this simple example where a ray is intersecting with the cube detect only…

Bulbasaur
- 135
- 5
1
vote
0 answers
How to remove the sunken area in the 3D point cloud?
I have a point cloud data which originally looks like this:
Now I have implemented the removal of the edge of the recessed area through the following code. The point cloud after removal is like this, the red area is the edge of the deletion
import…

Shihan Chao
- 11
- 1
1
vote
1 answer
Interact directly in pyvista display
I created a box in pyvista. When I want to change the size of the box, I will change the bounds values. However, I want to change the size of the box directly by interacting with the box in pyvista display, not in python code. Can I do that in…

killermama98
- 45
- 5
1
vote
1 answer
PolyData with nonconvex polygons
Just to replicate the error, let's consider the succession of points describing a nonconvex polygon:
[0. , 0. , 0. ],
[1. , 0. , 0. ],
[1. , 0.5, 0. ],
[0.5, 0.5, 0. ],
[0.5, 1. , 0. ],
[1. , 1. , 0. ],
[1. , 1.5, 0. ],
[0. , 1.5, 0. ]
This data…

Franco Milanese
- 402
- 3
- 7