OBB tree tolerance not always applied correctly
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
These comments refer to Revision: 1.63 of vtkOBBTree.cxx
The Tolerance in a locator is meant to signify an absolute distance in world coordinates. Two vtkOBBTree methods do not properly use the tolerance: DisjointOBBNodes and TriangleIntersectsNode. Neither of these methods are covered by any tests.
DisjointOBBNodes:
The "rangeAMax", "rangeAMin" etc. are in units of world coord dimension squared. Before "eps" is added to these values, it needs to be scaled appropriately. Because it is not scaled properly, too small a tolerance is applied to large OBB nodes, and too large a tolerance is applied to small OBB nodes.
On line 1513 (the 1st test), "eps" should be multiplied by the modulus of "AtoB" in order to scale it properly.
On line 1540 (the 2nd test, which is called the 3rd test in the code), "eps" should be multiplied by the modulus of pB->Axes[ii].
On line 1568 (the 3nd test, which is called the 2nd test in the code), "eps" should be multiplied by the modulus of pA->Axes[ii].
On line 1608 (the 4st test), "eps" should be multiplied by the modulus of "AtoB".
TriangleIntersectsNode has similar problems with its three checks.