imas_paraview.util.points_to_vtkpoly

imas_paraview.util.points_to_vtkpoly(points, is_closed=False, is_filled=False)

Convert a list of 3D points to a vtkPoints and vtkCellArray, which are combined into a single VtkPolyData object. The expected format of the points is: [(x1,y1,z1),(x2,y2,z2),...].

Parameters:
points

A list of 3D points, containing the X,Y,Z-coordinates in tuples of the form (x,y,z).

is_closed=False

Boolean flag whether to close the contour. If set to true, the first and last point are connected by a vtkLine.

is_filled=False

Boolean flag whether to fill a closed contour. If True, the vtkPolyData will contain a single polygon, otherwise it will contain the outline of line segments. Only allowed when is_closed=True.

Returns:

vtkPolyData containing the vtkPoints and vtkLines.


Last update: 2026-03-11