Ray picking of vtkQuadraticTetra cells doesn't work correctly.
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
When picking in a vtkDataSet that contains vtkQuadraticTetra cells, the vtkCellPicker can return cells that have not been picked.
I think that I have found the problem in IntersectWithLine method in vtkQuadraticTetra.cxx. The following patch solved the problem and is in-line with implementation of the other quadratic cell types:
diff --git a/Common/DataModel/vtkQuadraticTetra.cxx b/Common/DataModel/vtkQuadraticTetra.cxx index d2c02a9..e0edefb 100644 --- a/Common/DataModel/vtkQuadraticTetra.cxx +++ b/Common/DataModel/vtkQuadraticTetra.cxx @@ -325,7 +325,7 @@ int vtkQuadraticTetra::IntersectWithLine(double* p1, double* p2, t = VTK_DOUBLE_MAX; for (faceNum=0; faceNum<4; faceNum++) {
- for (int i=0; i<4; i++)
- for (int i=0; i<6; i++) { this->Face->Points->SetPoint(i,this->Points->GetPoint(TetraFaces[faceNum][i])); }