vtkAngleRepresentation3D does not compute angle if x-coords of points are the same
Today I recognized a strange behaviour of the vtkAngleWidget
. (version 9.0 commit 1762d09c)
When initializing the widget programmatically with three points (all laying on the YZ-plane) the widget does not compute the angle.
The problematic section of code is in vtkAngleRepresentation3D
line 293.
// Compute the angle (only if necessary since we don't want
// fluctuations in angle value as the camera moves, etc.)
if (p1[0] - c[0] == 0.0 || p2[0] - c[0] == 0.0)
{
return;
}
Here, the BuildRepresentation()
method returns if the x-coordinates of the points are the same (why is it that way?). Is that a bug, or an intended behaviour?
In my use case (CT Viewer) I cannot measure 3D angle if the picked world coordinates originate from the sagittal plane (x-coordinates of all three points are the same). For an example image of the imcomplete angle measurement of the vtkAngleWidget
see attached image file.