[vtkusers] Bug in vtkCubeAxesActor2D ?

JBK juk124 at psu.edu
Thu Jun 2 10:22:11 EDT 2011


Hi Artem,

I have witnessed the behavior you are referring to.  I have narrowed it to an issue of VTK shifting what it considers the X, Y, and Z axes of the cube axes actor as you interact with the cube.  I noticed this particular behavior after  I modified the source code for vtkCubeAxesActor2D to allow me to independently change the label sizes, number of ticks, label format, etc. on the X, Y, and Z axes.

The fix I implemented was to put in an event handler that basically checks to see what is being considered the X, Y, or Z axis after interaction occurs - which is actually independent of how your data is plotted.  In other words, if you call GetZAxisActor2D() when the cube is in one position, and then call it again after interaction, you may not get the same actor each time.  Now, since I modifed the cube axes actor source code, I'm not sure what you would need to do to fix your particular issue but hopefully this will point you in the right direction of thinking about some creative ways to deal with it.

Regards,
Josh


Message: 11
Date: Thu, 2 Jun 2011 14:00:38 +0100
From: Artem Babayan<artem.paraview at googlemail.com>
Subject: [vtkusers] Bug in vtkCubeAxesActor2D ?
To:vtkusers at vtk.org
Message-ID:<BANLkTi=2YDOWUc4QZRtQnDoH-o_kPJ_wzg at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Hi,

I set vtkCubeAxesActor2D to show 'nice' (rounded) values for labels
along Z axis:

m_axes_actor->GetZAxisActor2D()->AdjustLabelsOn();

however, it seems like it works only for certain camera positions (see
pictures) -- once Z axis 'jumps' to another corner the labels values
are not 'nice' anymore. If Z axis moves to the old position the labels
are nice again.

Is it a bug or feature?

The VTK version is 5.6.1

Best wishes
Artem

Joshua B. Kollat, Ph.D.
Research Associate
Penn State University
403 Sackett Building
University Park, PA 16802
PH: 814-865-1521


On 6/2/2011 9:00 AM, vtkusers-request at vtk.org wrote:
> Message: 11
> Date: Thu, 2 Jun 2011 14:00:38 +0100
> From: Artem Babayan<artem.paraview at googlemail.com>
> Subject: [vtkusers] Bug in vtkCubeAxesActor2D ?
> To:vtkusers at vtk.org
> Message-ID:<BANLkTi=2YDOWUc4QZRtQnDoH-o_kPJ_wzg at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi,
>
> I set vtkCubeAxesActor2D to show 'nice' (rounded) values for labels
> along Z axis:
>
> m_axes_actor->GetZAxisActor2D()->AdjustLabelsOn();
>
> however, it seems like it works only for certain camera positions (see
> pictures) -- once Z axis 'jumps' to another corner the labels values
> are not 'nice' anymore. If Z axis moves to the old position the labels
> are nice again.
>
> Is it a bug or feature?
>
> The VTK version is 5.6.1
>
> Best wishes
> Artem



More information about the vtkusers mailing list