[vtk-developers] vtkTriangle::IntersectWithLine hard test bug

Mathieu Westphal mathieu.westphal at kitware.com
Thu May 28 09:22:12 EDT 2015


In vtkTriangle IntersectWithLine there is a "hard" part for when the easy
test have not been able to compute intersection
vtkTriangle.cxx:530

However, the only way to reach this part of the code is when the test
(evaluatePosition)  line 516 returns -1.

The only way for vtkTriangle::evaluatePosition to return -1 is when the
triangle is flat ( degenerated ), and in that case, pcoords are forced to
zero.

Then the following three tests, 539, 544, 555 will never succeed.

So it looks like this "hard" code never succeed into finding intersection,
which is not very important.
Also degenerated triangle cannot be interessected, which is important.

What do you think about it ?

Mathieu Westphal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20150528/f9ff9d54/attachment.html>


More information about the vtk-developers mailing list