View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0010860VTK(No Category)public2010-06-22 03:502016-08-12 09:55
ReporterBryn Lloyd 
Assigned ToKitware Robot 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionmoved 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0010860: Unreliable return value in vtkOBBTree::IntersectWithLine(const double p1[3], const double p2[3], vtkPoints *, vtkIdList *)
DescriptionThe return value, which is supposed to tell me if the point p1 is inside or outside, is not reliable. Following addition to the code would make this function much more robust (vtkOBBTree.cxx, around line 888 ):

...
  delete [] senseList;
  delete [] cellList;
  delete [] distanceList;
  delete [] OBBstack;
  // return 1 if p1 is inside, 0 is p1 is outside
//---- begin added code ----
if(nPoints == 0)
  rval = 0;
else if(nPoints % 2)
  rval = 1;
else
  rval = -1;
//---- end added code ----
  return rval;
}


For this to work nPoints must be placed outside of the scope of
if (listSize != 0) {
...
}
at line 801.

This change will also make all functions using this function more robust, e.g. vtkOBBTree::InsideOrOutside.


I added a patch (diff oldvtkOBBTree.cxx newOBBTree.cxx).
Additional Information800a801
> int nPoints = 0;
817d817
< int nPoints = 0;
892c892,901
< // return 1 if p1 is inside, 0 is p1 is outside
---
> // return 1 if p1 is inside, -1 is p1 is outside, 0 if no intersections
> //---- begin added code ----
> if(nPoints == 0)
> rval = 0;
> else if(nPoints % 2)
> rval = 1;
> else
> rval = -1;
> //---- end added code ----
>
TagsNo tags attached.
Project
Type
Attached Files

 Relationships

  Notes
(0037180)
Kitware Robot (administrator)
2016-08-12 09:55

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current VTK Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2010-06-22 03:50 Bryn Lloyd New Issue
2011-06-16 13:11 Zack Galbreath Category => (No Category)
2016-08-12 09:55 Kitware Robot Note Added: 0037180
2016-08-12 09:55 Kitware Robot Status expired => closed
2016-08-12 09:55 Kitware Robot Resolution open => moved
2016-08-12 09:55 Kitware Robot Assigned To => Kitware Robot


Copyright © 2000 - 2018 MantisBT Team