Hi there,
For some reason this script crashes my Paraview. I’m using version ParaView-5.9.0-RC4-MPI-Linux-Python3.8-64bit on ubuntu 20.04
import paraview.vtk as vtk
from paraview.simple import *
points = vtk.vtkPoints()
points.InsertPoint(0, 0, 0, 0)
points.InsertPoint(1, 1, 0, 0)
points.InsertPoint(2, 0, 1, 0)
points.InsertPoint(3, 0, 0, 1)
pdo = vtk.vtkPolyData()
pdo.SetPoints(points)
pdo.Allocate(4, 4)
triangle = vtk.vtkPolygon()
triangle.GetPointIds().SetNumberOfIds(3)
tris = [[0,1,2], [0,2,3], [0,3,1], [1,3,2]]
for t in range(0, 4):
for p in range(0, 3):
triangle.GetPointIds().SetId(p, tris[t][p])
pdo.InsertNextCell(triangle.GetCellType(), triangle.GetPointIds())
tp = TrivialProducer()
tp.GetClientSideObject().SetOutput(pdo)
Show(tp)
Render()
This code seems to work fine with pvpython, so I’m not sure what’s up.