Index: Filtering/vtkTriangle.cxx
===================================================================
RCS file: /cvsroot/VTK/VTK/Filtering/vtkTriangle.cxx,v
retrieving revision 1.4
diff -u -r1.4 vtkTriangle.cxx
--- Filtering/vtkTriangle.cxx	16 Feb 2005 16:27:55 -0000	1.4
+++ Filtering/vtkTriangle.cxx	25 May 2005 17:42:39 -0000
@@ -965,6 +969,7 @@
 {
   double       x1[3], x2[3], x3[3], v13[3], v21[3], v32[3];
   double       n1[3], n2[3], n3[3];
+  double       closest[3], t, n1dotn2, n2dotn3;
   int           i;
 
   //  Compute appropriate vectors
@@ -998,7 +1003,18 @@
 
   //  Check whether normals go in same direction
   //
-  if ( (vtkMath::Dot(n1,n2) >= 0.0) && (vtkMath::Dot(n2,n3) >= 0.0) )
+  n1dotn2 = vtkMath::Dot(n1,n2);
+  n2dotn3 = vtkMath::Dot(n2,n3);
+
+  if ( (n1dotn2 > 0.0) && (n2dotn3 > 0.0) )
+    {
+    return 1;
+    }
+  else if ( (n1dotn2 == 0.0) && (vtkLine::DistanceToLine(x,p1,p3,t,closest) == 0.0) )
+    {
+    return 1;
+    }
+  else if ( (n2dotn3 == 0.0) && (vtkLine::DistanceToLine(x,p3,p2,t,closest) == 0.0) )
     {
     return 1;
     }
