How to Scale vtkCubeAxesActor2D

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to Scale vtkCubeAxesActor2D

sergio968
Hello

I scaled "Z" axes polydata through vtkActor

   vtkSmartPointer<vtkTransform> transform = vtkSmartPointer<vtkTransform>::New();
    transform->Scale(1,1,30);
     actor->SetUserMatrix(transform->GetMatrix())

but Now when i use vtkCubeAxesActor2D :

vtkSmartPointer<vtkCubeAxesActor2D>axes= vtkSmartPointer<vtkCubeAxesActor2D>::New();
    axes->SetViewProp(outlineActor);
    axes->SetCamera(ren->GetActiveCamera());
    axes->SetLabelFormat("%6.4g");
    axes->SetNumberOfLabels(5);
    axes->SetFlyModeToOuterEdges();
    axes->SetFontFactor(0.8);
    axes->SetAxisTitleTextProperty(tprop);
    axes->SetAxisLabelTextProperty(tprop);

the scale of the label axes do not match with the data. any suggestions?

regards

ruben

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: How to Scale vtkCubeAxesActor2D

David Doria-2-3
On Tue, Dec 20, 2011 at 5:36 PM, sergio campos <[hidden email]> wrote:

> Hello
>
> I scaled "Z" axes polydata through vtkActor
>
>    vtkSmartPointer<vtkTransform> transform =
> vtkSmartPointer<vtkTransform>::New();
>     transform->Scale(1,1,30);
>      actor->SetUserMatrix(transform->GetMatrix())
>
> but Now when i use vtkCubeAxesActor2D :
>
> vtkSmartPointer<vtkCubeAxesActor2D>axes=
> vtkSmartPointer<vtkCubeAxesActor2D>::New();
>     axes->SetViewProp(outlineActor);
>     axes->SetCamera(ren->GetActiveCamera());
>     axes->SetLabelFormat("%6.4g");
>     axes->SetNumberOfLabels(5);
>     axes->SetFlyModeToOuterEdges();
>     axes->SetFontFactor(0.8);
>     axes->SetAxisTitleTextProperty(tprop);
>     axes->SetAxisLabelTextProperty(tprop);
>
> the scale of the label axes do not match with the data. any suggestions?
>
> regards
>
> ruben

There is no example of this class on the wiki. Please add an example here:
http://www.vtk.org/Wiki/index.php?title=VTK/Examples/Cxx/WishList/Visualization/CubeAxesActor&action=edit&redlink=1

then maybe someone can fix it for you.

David
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers