[vtk-developers] Problem (and proposed fix) in vtkDelaunay3D

Will Schroeder will.schroeder at kitware.com
Wed Oct 15 14:40:33 EDT 2003


Hi Andy-

Excellent work and thanks for the fix. I'll take a deeper look and check it 
in today or tomorrow if all goes well.

Will

At 07:57 AM 10/13/2003 -0600, Wilson, Andrew T wrote:
>I believe I've found a problem in vtkDelaunay3D.  It will sometimes (often)
>create tetrahedra whose points are arranged incorrectly.  This causes
>problems when I'm trying to compute face normals for the cells in an
>unstructured grid: if the points are in the wrong order, I can get an
>inward-facing normal when I expected an outward-facing one.
>
>In the file format specification
>(http://public.kitware.com/VTK/pdf/file-formats.pdf), page 9, it seems to me
>that VTK_TETRA has the following requirement.  When looking downward from
>point 3, points 0, 1, and 2 must appear in counterclockwise order.  This is
>not enforced in the meshes that come out of vtkDelaunay3D.
>
>At the end of this message I've pasted in a diff against the current
>revision of vtkDelaunay3D.cxx that I believe fixes the problem.  My solution
>was to create the initial bounding tetrahedra with the correct point order,
>then ensure that whenever a new tetrahedron is added to the mesh it gets the
>order right as well.  The test results for vtkDelaunay3D
>(/Graphics/Testing/Tcl/{Delaunay3D.tcl,cylMap.tcl}) look the same both with
>and without this patch in place, although if there are more stringent tests
>I'm not aware of them.  I've also run my own tests to examine the point
>ordering in the output.
>
>Should this patch go into the repository?
>
>-- Andy





More information about the vtk-developers mailing list