Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable / hide normal vectors of the clip plane #908

Closed
leminhson opened this issue Sep 28, 2020 · 4 comments · Fixed by #1150
Closed

Disable / hide normal vectors of the clip plane #908

leminhson opened this issue Sep 28, 2020 · 4 comments · Fixed by #1150
Labels
feature-request Please add this cool feature!

Comments

@leminhson
Copy link

Hi everyone,

I am wondering that it is possible to disable or hide the normal vectors of the clip plane ?

I need this method because, when I apply set_scale to the plotter, the corresponding normal vector is scaled as well and it will be distorted.

In addition, sometime we do not want users to rotate the clip plane, only slide them along the axis.

@github-actions
Copy link
Contributor

Hi and welcome! Thanks for posting your first issue in the PyVista project! Someone from @pyvista/developers will chime in before too long. If your question is support related, it may be automatically transferred to https://github.com/pyvista/pyvista-support

@banesullivan banesullivan added the feature-request Please add this cool feature! label Sep 28, 2020
@mforbes
Copy link

mforbes commented Jan 9, 2021

Yes. Set their opacity to be zero:

w = plotter.add_plane_widget(...)
w.GetNormalProperty().SetOpacity(0)

This will hide the normal vectors and make them no-longer selectable, so the plane cannot be rotated.

See:

https://itk.org/pipermail/vtkusers/2006-July/036465.html

@leminhson
Copy link
Author

leminhson commented Jan 12, 2021

@mforbes : Thank you for your solution. Now I can solve my problem.
However, if I apply the method 'set_scale' to the plotter, it is really difficult to select the clip plane for sliding

@banesullivan
Copy link
Member

@mforbes, thanks for sharing that simple solution (this had been bugging me a really long time and I never thought to set the opacity 🤦🏻‍♂️ )

I will add a PR with thiis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Please add this cool feature!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants