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',
)[source]#

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_lengthfloat, default: 1.0

Length of the cube in the x-direction.

y_lengthfloat, default: 1.0

Length of the cube in the y-direction.

z_lengthfloat, 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_dtypestr, default: ‘float32’

Set the desired output point types. It must be either ‘float32’ or ‘float64’.

Added in version 0.44.0.

Examples

Create a default CubeSource.

>>> import pyvista as pv
>>> source = pv.CubeSource()
>>> source.output.plot(show_edges=True, line_width=5)
../../../_images/pyvista-CubeSource-1_00_00.png

Methods

Attributes

CubeSource.bounds

Return or set the bounding box of the cube.

CubeSource.center

Get the center in [x, y, z].

CubeSource.output

Get the output data object for a port on this algorithm.

CubeSource.point_dtype

Get the desired output point types.

CubeSource.x_length

Get the x length along the cube in its specified direction.

CubeSource.y_length

Get the y length along the cube in its specified direction.

CubeSource.z_length

Get the z length along the cube in its specified direction.