[vtkusers] Ordering lines

Amy Henderson amy.henderson at kitware.com
Thu Dec 13 10:47:56 EST 2001


Try using vtkStripper.  It creates polylines from lines in the input (as 
well as creating triangle strips from input polygons).

- Amy

At 03:32 PM 12/13/2001 +0000, Carl Hetherington wrote:
>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
>
>_______________________________________________
>This is the private VTK discussion list.
>Please keep messages on-topic. Check the FAQ at: 
><http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://public.kitware.com/mailman/listinfo/vtkusers




More information about the vtkusers mailing list