pyvista.PolyData.strips

Contents

pyvista.PolyData.strips#

property PolyData.strips: NumpyArray[int][source]#

Return or set the strips padded connectivity array.

Like all padded VTK connectivity arrays, the array is structured as:

[n0, p0_0, p0_1, ..., p0_n, n1, p1_0, p1_1, ..., p1_n, ...]

where n0 is the number of points in strip 0, and pX_Y is the Y’th point in strip X.

Only the connectivity of TRIANGLE_STRIP cells is stored in this array.

For example, two strips with one and two triangles, respectively, might look like:

[3, 0, 1, 2, 4, 3, 4, 5, 6]

Where the individual strips are [3, 0, 1, 2] and [4, 3, 4, 5, 6].

Returns:
numpy.ndarray

Array of strip indices.

See also

n_strips
verts, lines, faces

Padded connectivity arrays for other PolyData cell types.

Examples

>>> import pyvista as pv
>>> polygon = pv.Rectangle()
>>> extruded = polygon.extrude((0, 0, 1), capping=False)
>>> extruded.strips
array([4, 0, 1, 4, 5, 4, 1, 2, 5, 6, 4, 2, 3, 6, 7, 4, 3, 0, 7, 4])
>>> extruded.n_strips
4