build_slice_polydata

build_slice_polydata#

build_slice_polydata(d1, d2, d3, axis, frame=None)[source]#

Build a quad-faced pyvista.PolyData surface patch from coordinate arrays.

The coordinate arrays are moved so that axis is the leading dimension, then reshaped to (S, M, N) where S is the number of independent surface patches, and M × N is the grid resolution of each patch. Quads are constructed for all (M-1) × (N-1) interior cells of each patch.

Parameters:
d1, d2, d3np.ndarray

Coordinate arrays for the three spatial dimensions. All arrays must have the same shape.

axisint

The “batch” axis that enumerates independent surface patches (moved to the leading dimension).

frameMeshFramesType | None, optional

Coordinate frame label written to result.user_dict['MESH_FRAME']. Default is None.

Returns:
outpyvista.PolyData

A quad-faced polydata surface.