[vtk-developers] ARB-Request: Blessing of vtkPolyData->IsEdge fix

lucantiga at softhome.net lucantiga at softhome.net
Wed Mar 12 14:39:29 EST 2003


Hi Rasmus,
 about the problem of explicitly representing edges, I have written some
classes that implement neighborhoods and stencils (and sparse matrix rows,
which are used by a linear system solver). They work for me and there is
much space for improvement. Also they work outside vtkPolyData, as
vtkCellLinks do, with a Build function. If you are interested please take
a look at the Documentation at
http://www.imaging.robarts.ca/~lantiga/code/html/index.html Unfortunately
I didn't find the time to write method descriptions yet, but you can take
a look at class hierarchy and class and method names to figure out what
happens.

luca


On Wed, 12 Mar 2003, Rasmus Reinhold Paulsen wrote:

> Hi Ken,
> 
> Thanks for the swift and informative response!
> 
> On Wed, 12 Mar 2003, Ken Martin wrote:
> 
> > I think there are a couple problems with the suggested code.
> > Specifically three cases come to mind that I think will break it. 
> > 
> > 1) For a triangle strip with points p0, p1, p2, p3 ... the points p0 and
> > p2 do form an edge but would not be correctly reported by the code
> > below. 
> > 
> > 2) for a poly vertex there are no edges but the function could say that
> > there was one
> > 
> > 3) for poly lines if someone checked the first and last point of a poly
> > line (in either order) it would match.
> > 
> > And a minor formatting issue in that the "if" statements do not have {}
> > under them. Having said that, the original code was clearly screwed up.
> > It looks like a valid solution will have to know what type of cell is
> > being considered. Perhaps a switch (this->GetCellType(cell[i])) with the
> > current code in the default case but special cases for Tstrips,
> > polyvert, and polyline. The whole thing should probably be moved into
> > the cxx file as well, getting a bit long and complicated for an inline.
> 
> Hail the mighty ARB! We obviously have a tendency to focus on our own data
> and problems. I had not thought about the strips and polylines. These
> indeed makes the original code more obscure. Luca is working on a new
> implementation.
> 
> Currently vtkPolyData has a BuildLinks and BuildCells that builds internal
> lookup tables allowing inquires about which cells using a given point etc.
> 
> Why not include a vtkEdgeTable in the vtkPolyData and add a method called
> BuildEdges? Then letting the internal edgetable handle edge related
> queries? For graph-like manipulation; like for eksample when calculating
> surface geodesics, a method like GetPointNeighbourPoints that return a
> list of points connected to a given point would be nice. The edgetable
> could be used for that as well.
> 
> I know that another LUT will make it simpler to do topology-queries, but
> will be a great pain when performing topology-changing operations on the
> mesh.
> 
> Regards,
> Rasmus
> 
> 
> _______________________________________________
> vtk-developers mailing list
> vtk-developers at public.kitware.com
> http://public.kitware.com/mailman/listinfo/vtk-developers
> 

-- 
Luca Antiga, PhD
--------------------------------------
Imaging Research Laboratories
Robarts Research Institute
P.O. Box 5015, 100 Perth Drive
London, Ontario, Canada N6A 5K8
--------------------------------------
phone: (001) (519) 663-5777 ext.34028
email: lantiga at imaging.robarts.ca
web:   www.imaging.robarts.ca/~lantiga
--------------------------------------




More information about the vtk-developers mailing list