[vtkusers] Creating a polydata of edges (lines) from a vtkGraph

David Doria daviddoria+vtk at gmail.com
Wed Nov 11 13:37:05 EST 2009


> vtkGraphLayout algorithm assigns points to a graph. You can also do this
> manually by:
> vtkPoints* pts = vtkPoints::New();
> pts->SetNumberOfPoints(graph->GetNumberOfVertices());
> // Fill in points here
> graph->SetPoints(pts);
> Jeff

Jeff,

I tried to do that, but it said I needed to select a layout strategy.
I tried to use vtkAssignCoordinatesLayoutStrategy

http://www.rpi.edu/~doriad/VTK_List/GraphCoordinateAssignment/

but I get the following error:
vtkStreamingDemandDrivenPipeline (0x9761220): Algorithm
vtkAssignCoordinates(0x975dfb0) returned failure for request:
vtkInformation (0x9761e18)

Can you see where I have gone wrong?

Thanks,

David



More information about the vtkusers mailing list