pyvista.PolyDataFilters.strip#
- PolyDataFilters.strip(
- join: bool = False,
- max_length=1000,
- pass_cell_data: bool = False,
- pass_cell_ids: bool = False,
- pass_point_ids: bool = False,
- progress_bar: bool = False,
Strip poly data cells.
Generates triangle strips and/or poly-lines from input polygons, triangle strips, and lines.
Polygons are assembled into triangle strips only if they are triangles; other types of polygons are passed through to the output and not stripped. (Use
triangulate
filter to triangulate non-triangular polygons prior to running this filter if you need to strip all the data.) The filter will pass through (to the output) vertices if they are present in the input polydata.Also note that if triangle strips or polylines are defined in the input they are passed through and not joined nor extended. (If you wish to strip these use
triangulate
filter to fragment the input into triangles and lines prior to running this filter.)This filter implements vtkStripper
- Parameters:
- joinbool, default:
False
If
True
, the output polygonal segments will be joined if they are contiguous. This is useful after slicing a surface.- max_length
int
, default: 1000 Specify the maximum number of triangles in a triangle strip, and/or the maximum number of lines in a poly-line.
- pass_cell_databool, default:
False
Enable/Disable passing of the CellData in the input to the output as FieldData. Note the field data is transformed.
- pass_cell_idsbool, default:
False
If
True
, the output polygonal dataset will have a celldata array that holds the cell index of the original 3D cell that produced each output cell. This is useful for picking. The default isFalse
to conserve memory.- pass_point_idsbool, default:
False
If
True
, the output polygonal dataset will have a pointdata array that holds the point index of the original vertex that produced each output vertex. This is useful for picking. The default isFalse
to conserve memory.- progress_barbool, default:
False
Display a progress bar to indicate progress.
- joinbool, default:
- Returns:
pyvista.PolyData
Stripped mesh.
Examples
>>> from pyvista import examples >>> mesh = examples.load_airplane() >>> slc = mesh.slice(normal='z', origin=(0, 0, -10)) >>> stripped = slc.strip() >>> stripped.n_cells 1 >>> stripped.plot(show_edges=True, line_width=3)