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