[vtkusers] Get neighboring points of a point in a polydata
    Yang, Jinzhong 
    jinzhong76 at gmail.com
       
    Fri Aug 14 10:40:52 EDT 2009
    
    
  
Hi David, sorry for that. I meant to reply to the list but just pressed
"Reply" button in Outlook.
 
It is a good idea to add such a function to vtkPolyData. I also noticed
another weird thing. When I used BuildLinks() to  create the links for
random access to cells, I have to used DeleteCells() to release the memory
before I called BuildLinks() second time. Just wonder why it is  not
DeleteLinks().
 
-Jinzhong
 
From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf
Of David Doria
Sent: Friday, August 14, 2009 6:32 AM
To: vtkusers at vtk.org
Subject: Re: [vtkusers] Get neighboring points of a point in a polydata
 
On Thu, Aug 13, 2009 at 10:41 AM, Yang, Jinzhong <jinzhong76 at gmail.com>
wrote:
Didn't you check the methods GetPointCells() and Get CellPoints()? If the
cells are simply the triangles or lines, it is quite easy to do that. If the
cells are more complicated, you may need some additional processing.
 
-Jinzhong
 
Jinzhong - thanks for the reply, but please reply to the list rather than
just me so everyone can share the discussion :)
I see, so do something like this:
GetPointNeighbors()
---------------------
cells = GetPointCells(queryPoint)
for each cell in cells
   points = GetCellPoints()
   for each point in points
       IsEdge(queryPoint, point)
Can that be added as function to vtkPolyData? It seems like this would be a
very common operation.
Thanks,
David
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090814/4982dff5/attachment.htm>
    
    
More information about the vtkusers
mailing list