Tube#
- Tube(pointa=(- 0.5, 0.0, 0.0), pointb=(0.5, 0.0, 0.0), resolution=1, radius=1.0, n_sides=15)[source]#
Create a tube.
- Parameters
- pointa
np.ndarray
orlist
,optional
Location in
[x, y, z]
.- pointb
np.ndarray
orlist
,optional
Location in
[x, y, z]
.- resolution
int
,optional
Number of pieces to divide tube into.
- radius
float
,optional
Minimum tube radius (minimum because the tube radius may vary).
- n_sides
int
,optional
Number of sides for the tube.
- pointa
- Returns
pyvista.PolyData
Tube mesh.
Examples
Create a tube between
(0, 0, 0)
and(0, 0, 1)
.>>> import pyvista >>> mesh = pyvista.Tube((0, 0, 0), (0, 0, 1)) >>> mesh.plot()