Box#
- Box(
- bounds: VectorLike[float] = (-1.0, 1.0, -1.0, 1.0, -1.0, 1.0),
- level: int | VectorLike[int] = 0,
- quads: bool = True,
Create a box with solid faces for the given bounds.
- Parameters:
- boundssequence[
float], default: (-1.0, 1.0, -1.0, 1.0, -1.0, 1.0) Specify the bounding box of the cube.
(x_min, x_max, y_min, y_max, z_min, z_max).- level
int|VectorLike[int], default: 0 Level of subdivision of the faces.
Note
The algorithm is not optimized when a 3 length vector is given.
Added in version 0.47: Enable specifying different values for x, y, and z directions.
- quadsbool, default:
True Flag to tell the source to generate either a quad or two triangle for a set of four points.
- boundssequence[
- Returns:
pyvista.PolyDataMesh of the box.
Examples#
Download Python source code | Download Jupyter notebook
Create a box with subdivision level=2.
Set the level separately for each axis.
Used In#
Docstring Examples
DataSetFilters.voxelize(1 use)Plotter.add_axes(1 use)Plotter.enable_shadows(1 use)Plotter.where_is(1 use)Renderer.add_axes(1 use)Renderer.enable_shadows(1 use)
Gallery Examples