Hello!!!
I'm trying to drawn what I call a "Spider" type shape in a vtkUnstructuredGrid.
"What's a Spider type shape" you might ask?
It's a shape that has one reference point, attached via edges to multiple other points.
Imagine a + sign - the reference point is a the center and the four other points are each of the tips.
I can draw this type of shape using a vtkPolyLine as follows
origin = [0.0, 0.0, 0.0]
p0 = [1.0, 0.0, 0.0]
p1 = [-1.0, 0.0, 0.0]
p2 = [0.0, 1.0, 0.0]
p3 = [0.0, -1.0, 0.0]
points = vtk.vtkPoints()
points.InsertNextPoint(origin)
points.InsertNextPoint(p0)
points.InsertNextPoint(p1)
points.InsertNextPoint(p2)
points.InsertNextPoint(p3)
mesh = vtk.vtkUnstructuredGrid()
mesh.SetPoints(points)
polyLine = vtk.vtkPolyLine()
polyLine.GetPointIds().SetNumberOfIds(8)
polyLine.GetPointIds().SetId(0, 0)
polyLine.GetPointIds().SetId(1, 1)
polyLine.GetPointIds().SetId(2, 0)
polyLine.GetPointIds().SetId(3, 2)
polyLine.GetPointIds().SetId(4, 0)
polyLine.GetPointIds().SetId(5, 3)
polyLine.GetPointIds().SetId(6, 0)
polyLine.GetPointIds().SetId(7, 4)
But I have to draw 100,000+ of these shapes and this approach seems wasteful - 7 edges in the polyline when only four are required.
Any ideas for a more efficient approach will be gratefully received,
Thanks,
Doug
<br/><hr align="left" width="300" />
Sent from the <a href="http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html">VTK - Users mailing list archive</a> at Nabble.com.<br/>