Dear users,

I try to compute points, lines, axes using the programmable filter from 5 points acquired by a PointSource. I select the 5 pointsource, compute axis but paraview simply crashes when I InsertNextCell on the output.
This happens when I get several InputData using GetInputDataObject().
If I get only one input using GetPolyDataInput(), the line is well displayed. Is there a trick?

Thanks for your help,
Laurent.

Here is my code:

A = self.GetInputDataObject(0, 0)
B = self.GetInputDataObject(0, 1)
C = self.GetInputDataObject(0, 2)
D = self.GetInputDataObject(0, 3)
E = self.GetInputDataObject(0, 4)
Point1 = A.GetPoint(0)
print Point1
Point2 = B.GetPoint(0)
print Point2
Point3 = C.GetPoint(0)
print Point3
Point4 = D.GetPoint(0)
print Point4

newPts = vtk.vtkPoints()

#Do some computations (NewPoint1 and NewPoint2) and add it to the newPts
newPts.InsertPoint(0, NewPoint1)
newPts.InsertPoint(1, NewPoint2)

NewLine = vtk.vtkLine()
NewLine.GetPointIds().SetNumberOfIds(2)
NewLine.GetPointIds().SetId(0,0)
NewLine.GetPointIds().SetId(1,1)

output =  self.GetPolyDataOutput()
output.SetPoints(newPts)
# Crash here... don't know why
output.InsertNextCell(NewLine.GetCellType(), NewLine.GetPointIds())

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview

Reply via email to