pyvista.CubeSource#
- class CubeSource(
- center=(0.0, 0.0, 0.0),
- x_length=1.0,
- y_length=1.0,
- z_length=1.0,
- bounds=None,
- point_dtype='float32',
Cube source algorithm class.
Added in version 0.44.0.
- Parameters:
- centersequence[
float
], default: (0.0, 0.0, 0.0) Center in
[x, y, z]
.- x_length
float
, default: 1.0 Length of the cube in the x-direction.
- y_length
float
, default: 1.0 Length of the cube in the y-direction.
- z_length
float
, default: 1.0 Length of the cube in the z-direction.
- boundssequence[
float
],optional
Specify the bounding box of the cube. If given, all other size arguments are ignored.
(xMin, xMax, yMin, yMax, zMin, zMax)
.- point_dtype
str
, default: ‘float32’ Set the desired output point types. It must be either ‘float32’ or ‘float64’.
Added in version 0.44.0.
- centersequence[
Examples
Create a default CubeSource.
>>> import pyvista as pv >>> source = pv.CubeSource() >>> source.output.plot(show_edges=True, line_width=5)
Methods
Attributes
Return or set the bounding box of the cube.
Get the center in
[x, y, z]
.Get the output data object for a port on this algorithm.
Get the desired output point types.
Get the x length along the cube in its specified direction.
Get the y length along the cube in its specified direction.
Get the z length along the cube in its specified direction.