StructuredGrid.concatenate#
- StructuredGrid.concatenate(
- other: StructuredGrid,
- axis: int,
- tolerance: float = 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. The output keeps this grid’s offset.
- Parameters:
- other
pyvista.StructuredGrid Structured grid to concatenate.
- axis
int Axis along which to concatenate.
- tolerance
float, default: 0.0 Tolerance for point coincidence along joining seam.
- other
- Returns:
pyvista.StructuredGridConcatenated grid.
Examples#
Download Python source code | Download Jupyter notebook
Split a grid in half and join them.
>>> import numpy as np
>>> import pyvista as pv
>>> 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)'
Used In#
API Examples
StructuredGrid.extract_subset(1 use)