[vtkusers] Re: Fill contours with Pixels

Kent Eschenberg eschenbe at psc.edu
Wed Feb 14 11:45:21 EST 2007


> Mike Jackson wrote:
>> I tried again, but I still get these errors:
>>
>> Warning: In 
>> /Users/Shared/OpenSource/VTK-5.0.2/Filtering/vtkPolygon.cxx, line 562
>> vtkPolygon (0xb300910): Degenerate polygon encountered during 
>> triangulation

I've attached a short Python program that uses VTK to look for bad 
triangles and other problems. I too had a problem with bad triangles and 
could not find a simple tool to look for them.

You will need VTK with Python bindings and you will need to write your 
polygon surface to a file. It must be a dataset of type vtkPolyData, not 
  merely an unstructured grid of triangles.

The one problem my program will not find are two or more perfectly valid 
triangles that are almost on top of each other but which have their own 
vertices. Checking the distance between triangle centers might find such 
cases.

This program is crude - for example, you must edit it to change the 
input file. It is supplied with NO warranty.

Kent
Pittsburgh Supercomputing Center
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: avtk.py
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070214/fc37911e/attachment.asc>


More information about the vtkusers mailing list