[vtk-developers] vtkTriangle::IntersectWithLine hard test bug
bill.lorensen at gmail.com
Thu May 28 10:09:44 EDT 2015
According to this coverage report,
the "hard" code is never tested.
On Thu, May 28, 2015 at 9:58 AM, Will Schroeder
<will.schroeder at kitware.com> wrote:
> In the past I have encountered situations where picking (or some other
> operation that depends on intersect with line) failed due to degenerate
> triangles. So I suggest that we have to build a test to explicitly test for
> For example, say you read in some polygonal soup that includes degenerate
> triangles (maybe zero area "needles" or even triangles collapsed to a
> point). Now you want to visually identify these bad triangles via picking,
> etc. For example you run a shrink filter that isolates the triangles so you
> can clearly see them (even if they are degenerate). If you remove the
> degenerate intersection code you may never be able to select these
> degenerate triangles (if using intersect with line).
> On Thu, May 28, 2015 at 9:22 AM, Mathieu Westphal
> <mathieu.westphal at kitware.com> wrote:
>> In vtkTriangle IntersectWithLine there is a "hard" part for when the easy
>> test have not been able to compute intersection
>> 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
>> 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
>> Powered by www.kitware.com
>> Visit other Kitware open-source projects at
>> Search the list archives at: http://markmail.org/search/?q=vtk-developers
>> Follow this link to subscribe/unsubscribe:
> William J. Schroeder, PhD
> Kitware, Inc.
> 28 Corporate Drive
> Clifton Park, NY 12065
> will.schroeder at kitware.com
> (518) 881-4902
> Powered by www.kitware.com
> Visit other Kitware open-source projects at
> Search the list archives at: http://markmail.org/search/?q=vtk-developers
> Follow this link to subscribe/unsubscribe:
Unpaid intern in BillsBasement at noware dot com
More information about the vtk-developers