[Paraview] Adding axes

Weirs, V Gregory vgweirs at sandia.gov
Wed Dec 3 11:08:45 EST 2008


Just use the Cube Axes properties of the representation, no need to create the vtk object.

Greg

On 12/3/08 8:49 AM, "Hom Nath Gharti" <hng.email at gmail.com> wrote:

My python script consists of following segments:

import vtk
sm=servermanager
pm=sm.ProxyManager()
view=sm.GetRenderView() #CreateRenderView()
reader=pm.GetProxy('sources','py_3d_strike0_stack_XY.vti')
rep=sm.CreateRepresentation(reader,view)

...
...
...

# draw the axes.  Add the actor to the renderer.
axes = vtk.vtkCubeAxesActor2D()
axes.SetInput(normals.GetOutput())
axes.SetCamera(ren.GetActiveCamera())
axes.SetLabelFormat("%6.4g")
axes.SetFlyModeToOuterEdges()
axes.SetFontFactor(0.8)
axes.SetAxisTitleTextProperty(tprop)
axes.SetAxisLabelTextProperty(tprop)

Now, how can I add 'axes' to 'view'? Because I cannot use like 'view.AddViewProp(axes)'. I would be grateful for the suggestions.

Thanks

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20081203/3c04a9e1/attachment.htm>


More information about the ParaView mailing list