[vtkusers] vtkCellLocator - finding bracketing subids

Dean Inglis dean.inglis at camris.ca
Wed Mar 31 14:57:27 EDT 2010


I have a vtkPolyData, a contour generated by vtkContourWidget,
that I want to pick on and then clip such that the longest part of
the contour is retained.  I am using vtkCellLocator to get the
closest point on the contour (which is not necessarily an actual
point defining the contour) and the cell's (a vtkLine) nearest subId.  What 
I want
is to have the two subIds that define the segment of the contour containing
the closest point.  For example, an open contour could have 4 points and the
following cell array indices:
0, 1, 2, 3
and if I pick a location between points 1 and 2, Ill get subId 1 or
2 depending on where along that part of the contour I pick, but not
both.  Anyone know of a way to get the bracketing subIds?

Dean




More information about the vtkusers mailing list