[vtk-developers] patch for vtkPyramid::EvaluatePosition

Kathleen S. Biagas biagas2 at llnl.gov
Tue Apr 2 14:06:31 EDT 2013


I have a patch for vtkPyramid.cxx which corrects a problem with the
EvaluatePosition method.  I also have a small test that demonstrates the
problem: it creates a pyramid with vertices at (1.0, 1.0, 1.0), (-1.0,
1.0, 1.0), (-1.0, -1.0, 1.0), (1.0, -1.0, 1.0),(0.0, 0.0, 0.0), then
calls EvaluatePosition for each of the following Points printing a
message whether the point is considered inside or outside the cell:

(0.0, 0.0, -0.03)
(0.0, 0.0, -0.005)
(1.005, 1.005, 1.0)
(0.0, 0.0, 0.5)


I couldn't determine how this small test case would fit within your
testing framework, or I would push it to gerrit with the vtkPyramid.cxx
patch.  Shall I commit the patch anyway?

Kathleen


Here's various results of the tests with different vtk versions:
(all run on rhel-6, using gcc-4.4)

Results of test when run with VTK-5.8:

Point 0 0 -0.03 is outside the pyramid.
Point 0 0 -0.005 is outside the pyramid.
Point 1.005 1.005 1 is outside the pyramid.
Point 0 0 0.5 is inside the pyramid.

Results of test when run with snapshot of master from this morning
(04-02-12):

Point 0 0 -0.03 is inside the pyramid.
Point 0 0 -0.005 is inside the pyramid.
Point 1.005 1.005 1 is outside the pyramid.
Point 0 0 0.5 is inside the pyramid.

Results of test with proposed change to vtkPyramid.cxx:

Point 0 0 -0.03 is outside the pyramid.
Point 0 0 -0.005 is outside the pyramid.
Point 1.005 1.005 1 is outside the pyramid.
Point 0 0 0.5 is inside the pyramid.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vtkPyramid.patch
Type: text/x-patch
Size: 921 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20130402/6b0c0ede/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestPyramid.cxx
Type: text/x-c++src
Size: 1976 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20130402/6b0c0ede/attachment-0001.cxx>


More information about the vtk-developers mailing list