I have two dictionary in python with the same information:
first dictionary at each key contains the informations about nodes of my mesh, so the node number and the (x,y,z) coordinate
Second dictionary containing the elements and the connectivity, so the element number and the node i and j to define the line, or polyline ecc.
I tried to generate the vtk file containing this information, but without success, I did as follow:
import vtk lineSource = vtk.vtkLineSource() for e in int_p_connect: nodei = int_p_connect[e] nodej = int_p_connect[e] lineSource.SetPoint1(list(int_p_nodes[nodei][1:4])) lineSource.SetPoint2(list(int_p_nodes[nodej][1:4]))
when I display it only one line is shown