[vtkusers] vtkCellLocator - finding bracketing subids

Biddiscombe, John A. biddisco at cscs.ch
Wed Mar 31 15:12:12 EDT 2010


Dean

I think a picture would help. Is the contour 2D or 3D?

JB

> -----Original Message-----
> From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf
> Of Dean Inglis
> Sent: 31 March 2010 20:57
> To: vtkusers archive
> Subject: [vtkusers] vtkCellLocator - finding bracketing subids
> 
> 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
> 
> _______________________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers



More information about the vtkusers mailing list