[vtkusers] Copy a vtkDirectedGraph into a vtkUndirectedGraph?

David Doria daviddoria+vtk at gmail.com
Fri Dec 4 16:19:36 EST 2009


Is there any way to remove the directed-ness of a graph? I want to do:

vtkUndirectedGraph* UG = vtkUndirectedGraph::New();
UG->ShallowCopy(DirectedGraph);]

but the error is:
Invalid graph structure for this type of graph.

Do I have to traverse the directed graph and create each edge in the
new undirected graph?

Thanks,

David



More information about the vtkusers mailing list