-
Notifications
You must be signed in to change notification settings - Fork 23
Enable parallel_projection as a kwarg #1535
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
Conversation
Signed-off-by: paul.profizi <[email protected]>
ZanePC
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, it's working!
|
Sorry, it's me again. A new problem has arisen. In the same camera perspective (cpos), the field of view in parallel views is much smaller than that in perspective views, so the zoom option in pyvista. plot() is needed to adjust the field of view. Although that can be manually adjusted in interactive mode (interactive=True), it is impossible to adjust each image when saving screenshots in batch mode. I tried to modify the source code of dpf, but failed. |
Hello @ZanePC, are you referring to this functionality? https://docs.pyvista.org/version/stable/api/plotting/_autosummary/pyvista.plotter.zoom_camera |
|
@ZanePC thanks for that, I'll make a PR proposing these changes if that's OK with you. I'll also update the plotting examples and the docstrings. |
|
Sure, I'm glad I could offer you this little bit of help. Thank you very much for your excellent work! |
|
Hi PProfizi, I'm here to provide feedback again. I'm sorry I didn't finish all the related issues at once. The new issue is that when using the DpfPlotter class for plotting, "parallel_projection=True" will fail. So I moved the code you wrote to the vicinity of the "zoom" code mentioned last time, and the modified code is as follows: It should be noted that the code snippet for "parallel_projection" must come before "zoom", otherwise "zoom" will not work After my testing, "parallel_projection" and "zoom" can all work in the following three plotting methods:
|
Hello PProfizi (@PProfizi), In the new version of dpf, although parallel view can now be activated, "zoom" functionality is still not available. The code modifications I mentioned earlier can resolve this issue (link attached). I hope these changes can be incorporated into the next version. Thank you very much! Best regards |





Closes #1532