[vtkusers] Bug in vtkPolygon ??

de Boer Ingo I.deBoer at polytec.de
Mon Feb 16 05:52:31 EST 2004


Hi,

I am using VTK 4.4.0 release. This also happend in the versions before.

vtkPolygon.cxx: "$Revision: 1.104 $"

void vtkPolygon::ComputeNormal(vtkPoints *p, int numPts, vtkIdType *pts, double *n)

In this function, sometimes I have int numPts == 1 !! That is 
why pts[1] equals -842150451 and I cannot get the correct point
in line 92:

p->GetPoint(pts[1],v2);

And my application crashes. I tried something like:
if ( numPts > 1 ) p->GetPoint(pts[1],v2);
This works and my geometry looks good.
But the loop afterwards
for (i=0; i < numPts; i++) 
{
...
}
uses v2 !!

Any ideas how I can avoid this ? Is this a bug ?
There is nothing special in the geometry that I have!

greets
  Ingo

---
Dr.-Ing. Ingo H. de Boer

Polytec GmbH
Polytec-Platz 1-7, 76337 Waldbronn, Germany
phone: ++49 7243 604 106
fax  : ++49 7243 604 255



More information about the vtkusers mailing list