<div dir="ltr">Hi Ignacio,<div><br></div><div>I've never tried the any of the "BaseFor" or "OrientedBounds" methods for this class, but I did a quick look through the vtkAxisActor.cxx code and I can confirm that UserTransform is ignored. The vtkAxisActor is actually a collection of other actors (for the text, the ticks, the axis line, etc etc). Most attributes of these child actors are not set when you set attributes of the vtkAxisActor. That's why the UserTransform is ignored. It might be tricky to get the UserTransform working properly. The *BaseFor* methods might way to reorient the axes. </div><div><br></div><div>This might also be related why setting Opacity < 1.0 causes the axes to vanish. The VTK renderer uses separate render passes for opaque object vs. translucent objects, and if the pass for the main vtkAxisActor is different from its children, maybe that messes up the rendering? It's just a guess, though.</div><div><br></div><div> - David</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Feb 4, 2018 at 1:45 AM, Ignacio Fernández Galván via vtkusers <span dir="ltr"><<a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 03/02/18, at 19:29, Ignacio Fernández Galván via vtkusers wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
This was apparently mentioned some time ago (<a href="http://vtk.1045678.n5.nabble.com/oriented-vtkCubeAxesActor-issue-td5726648.html" rel="noreferrer" target="_blank">http://vtk.1045678.n5.nabble.<wbr>com/oriented-vtkCubeAxesActor-<wbr>issue-td5726648.html</a>), but there was no solution, and I think I'm having the same problem.<br>
<br>
Basically, I set up a vtkCubeAxesActor with custom range:<br>
<br>
axes = vtk.vtkCubeAxesActor()<br>
axes.SetCamera(renderer.GetAct<wbr>iveCamera())<br>
axes.SetAxisBaseForX(1,0,0)<br>
axes.SetAxisBaseForY(0,1,0)<br>
axes.SetAxisBaseForZ(0,0,1)<br>
axes.SetBounds(0,10,0,10,0,10)<br>
axes.SetOrientedBounds(0,10,0,<wbr>10,0,10)<br>
axes.SetUseOrientedBounds(1)<br>
axes.SetXAxisRange(0,1)<br>
renderer.AddActor(axes)<br>
<br>
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.<br>
<br>
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.<br>
<br>
In the thread linked above, it was mentioned that this is done correctly in Paraview. Is it really so? How can I test it?<br>
<br>
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...)<br>
</blockquote>
<br>
<br></span>
Going one level down, I tried with vtkAxisActor:<br>
<br>
- Like vtkCubeAxesActor, it seems impervious to SetUserTransform.<br>
<br>
- Like vtkCubeAxesActor, not setting the bounds results in clipping issues, but I guess that's intended.<br>
<br>
- I can't set the lines to translucent. Get*Property().SetOpacity(x), for any x<1.0 makes the lines disappear, as if the x is interpreted as an integer (I'm using the python wrapper, if it matters). SetColor works fine.<br>
<br>
I also noticed that the automatic positioning of vtkCubeAxesActor get's confused if one used a too distorted frame, or exchanges some axes (with the "BaseFor" axes): in some orientations the axes end up in the wrong side. It looks like there are some hardcoded assumptions about where x, y and z are.<br>
<br>
These all look like bugs or limitations to me. Is it worth reporting them on gitlab?<div class="HOEnZb"><div class="h5"><br>
<br>
Ignacio<br>
______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensou<wbr>rce/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FA<wbr>Q</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://vtk.org/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">https://vtk.org/mailman/listin<wbr>fo/vtkusers</a><br>
</div></div></blockquote></div><br></div>