[vtkusers] Ordering lines
Carl Hetherington
lists at carlh.net
Thu Dec 13 10:32:50 EST 2001
Hi,
I've got the output of a vtkCutter as a set of lines. I'm looking for a
way to collect these multiple (unordered) lines into a single polyline.
The best approach I have found so far is to use a vtkCellLinks to find the
lines which use each point. It seems, though, that I have run into a
limitation of the C++/Python interface.
I can do something like
>>> cutter = vtkCutter()
... stuff ...
>>> slice = cutter.GetOutput()
>>> cl = vtkCellLinks()
>>> cl.Allocate(10000, 1000)
>>> cl.BuildLinks(slice)
>>> cl.GetNcells(1)
2
>>> cl.GetNcells(2)
2
Is there any way I can get at the details of vtkCellLinks from Python? Or
perhaps there is another way to collect a cutter's output lines into a
single polyline?
Thanks,
Carl
More information about the vtkusers
mailing list