[vtkusers] Ordering lines

Carl Hetherington lists at carlh.net
Mon Dec 17 07:52:02 EST 2001


On Fri, 14 Dec 2001, Sylvain Jaume wrote:

> Have you tried vtkCleanPolyData and play with SetTolerance?
> It should collapse the points that are within the tolerance (relative to
> the bounding box).

Thanks Sylvain (and all the others who have offered suggestions)

I've looked into this a bit further now, and my problems continue!

I have a vtkPolyData which is made up of 2088 identical cells, each of
which is a simple vtkLine.

In particular, two of the lines are as follows:

Start: Point id 0
(13.262147903442383, 8.9552860260009766, -0.025043485686182976)
End:   Point id 1
(13.134280204772949, 8.9872589111328125, -0.025043489411473274)

Start: Point id 1591
(13.327729225158691,8.9663839340209961,-0.025043489411473274)
End:   Point id 0
(13.262147903442383, 8.9552860260009766, -0.025043485686182976)

I'm passing this vtkPolyData into a vtkStripper; I want it to merge all
these lines into poly-lines.

The output of the vtkStripper is not quite what I am after.  For the
example input mentioned above, I get 10 output poly-lines.  In particular,
I have the two poly-lines:

Start: Point id 0
... more points ...
End:   Point id <x>

Start: Point id <y>
... more points ...
End:   Point id 0

What I'm after is for these two lines to be joined together so that the
end of the second line is connected to the start of the first.

Can anyone suggest why this isn't happening?

Thanks in advance
Carl






More information about the vtkusers mailing list