[vtkusers] Oriented vtkCubeAxesActor issues
    Ignacio Fernández Galván 
    jellby at yahoo.com
       
    Sat Feb  3 13:29:58 EST 2018
    
    
  
Hi,
This was apparently mentioned some time ago 
(http://vtk.1045678.n5.nabble.com/oriented-vtkCubeAxesActor-issue-td5726648.html), 
but there was no solution, and I think I'm having the same problem.
Basically, I set up a vtkCubeAxesActor with custom range:
     axes = vtk.vtkCubeAxesActor()
     axes.SetCamera(renderer.GetActiveCamera())
     axes.SetAxisBaseForX(1,0,0)
     axes.SetAxisBaseForY(0,1,0)
     axes.SetAxisBaseForZ(0,0,1)
     axes.SetBounds(0,10,0,10,0,10)
     axes.SetOrientedBounds(0,10,0,10,0,10)
     axes.SetUseOrientedBounds(1)
     axes.SetXAxisRange(0,1)
     renderer.AddActor(axes)
I set the "BaseFor" axes to the Cartesian ones, so the actor should look 
the same with "UseOrientedBounds" or without. But with oriented bounds I 
get an X axis labeled from 0 to 10, while without it it's 0 to 1, as I 
requested.
Also, if I use the oriented bounds and do not set the bounds, there is 
some clipping, as if the renderer didn't notice the actor's real extent.
In the thread linked above, it was mentioned that this is done correctly 
in Paraview. Is it really so? How can I test it?
My ultimate goal is to show the outline of a transformed ImageData grid, 
with ticks marking the gridpoints on the outline. Is there some other 
way to achieve that? (I have the outline as a transformed box, I'm just 
missing the ticks. So in fact I would also like to disable the axis line 
in the vtkCubeAxesActor and leave the ticks...)
Thanks,
Ignacio
    
    
More information about the vtkusers
mailing list