concatenate

StructuredGrid.concatenate(other, axis, tolerance=0.0)

Concatenate a structured grid to this grid.

Joins structured grids into a single structured grid. Grids must be of compatible dimension, and must be coincident along the seam. Grids must have the same point and cell data. Field data is ignored.

Parameters
otherpyvista.StructuredGrid

Structured grid to concatenate.

axisint

Axis along which to concatenate.

tolerancefloat, optional

Tolerance for point coincidence along joining seam.

Returns
pyvista.StructuredGrid

Concatenated grid.

Examples

Split a grid in half and join them.

>>> import numpy as np
>>> import pyvista
>>> from pyvista import examples
>>> grid = examples.load_structured()
>>> voi_1 = grid.extract_subset([0, 80, 0, 40, 0, 1], boundary=True)
>>> voi_2 = grid.extract_subset([0, 80, 40, 80, 0, 1], boundary=True)
>>> joined = voi_1.concatenate(voi_2, axis=1)
>>> f'{grid.dimensions} same as {joined.dimensions}'
'(80, 80, 1) same as (80, 80, 1)'