-
Notifications
You must be signed in to change notification settings - Fork 2
feat: Add PyVista Qt support #192
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
Merged
Merged
Changes from all commits
Commits
Show all changes
51 commits
Select commit
Hold shift + click to select a range
c0fbf2c
feat: Add PyVista Qt support
AlejandroFernandezLuces 3bb9f2b
feat: Add example
AlejandroFernandezLuces 492e9fc
test: Add test for Qt backend
AlejandroFernandezLuces c6208cb
chore: adding changelog file 192.added.md [dependabot-skip]
pyansys-ci-bot c864bc7
feat: Add PyVistaQt as optional dependency
AlejandroFernandezLuces 8aacc0f
Merge branch 'feat/add-pyvistaqt-support' of https://github.com/ansys…
AlejandroFernandezLuces 87d0227
fix(temp): Try windows machine
AlejandroFernandezLuces 1357f71
fix(temp): Windows test
AlejandroFernandezLuces d7ba564
fix: Update python version in CICD
AlejandroFernandezLuces d931271
fix: Possible missing installations
AlejandroFernandezLuces 2211c18
fix: Add qt plugin
AlejandroFernandezLuces f8d065d
fix: Installable
AlejandroFernandezLuces 26934fa
fix: Missing sudo
AlejandroFernandezLuces ed4a6fb
fix: More installations
AlejandroFernandezLuces e8958de
temp: Downgrade PySide6
AlejandroFernandezLuces 6cc09ec
fix: Doc dependency
AlejandroFernandezLuces 430570d
fix: Dependencies
AlejandroFernandezLuces 5595c57
fix: Dependency
AlejandroFernandezLuces e93241b
test
AlejandroFernandezLuces 54cf87a
fix: deps
AlejandroFernandezLuces f7eb4cc
fix: Deps
AlejandroFernandezLuces 2ca6e59
fix deps
AlejandroFernandezLuces 1128b44
fix: Deps
AlejandroFernandezLuces 3bdb57d
examples test
AlejandroFernandezLuces cd4df1b
fixes
AlejandroFernandezLuces fcdf1d9
feat: Implement close for PyvistaQT
AlejandroFernandezLuces 8151f48
fix: linux deps
AlejandroFernandezLuces 37b173c
fix: linux deps
AlejandroFernandezLuces 3fc8d5b
fix: Linux deps
AlejandroFernandezLuces a638e99
fix: linux deps
AlejandroFernandezLuces 3000aab
fix: deps
AlejandroFernandezLuces 0639461
test
AlejandroFernandezLuces 2ffbcef
test
AlejandroFernandezLuces c08845b
fix: linux dep
AlejandroFernandezLuces c18d570
test
AlejandroFernandezLuces 48f6f5c
test
AlejandroFernandezLuces 02cb7bc
test
AlejandroFernandezLuces d6e1480
fix: Skip Qt test
AlejandroFernandezLuces 0f3ac43
fix: Remove code execution from example
AlejandroFernandezLuces 508b625
fix: Refactor to have independent backend
AlejandroFernandezLuces e688320
fix: Depenency pinning, remove sys deps
AlejandroFernandezLuces 42a3459
fix: Minor details
AlejandroFernandezLuces aba32e4
fix: Sys deps
AlejandroFernandezLuces cb593a4
Revert "fix: Sys deps"
AlejandroFernandezLuces 5678add
fix: Revert refactor commits
AlejandroFernandezLuces c6c68d3
Merge branch 'feat/add-pyvistaqt-support' of https://github.com/ansys…
AlejandroFernandezLuces 7915d3b
fix: Review comments
AlejandroFernandezLuces a4ed118
fix: Commented code
AlejandroFernandezLuces b5995f1
fix: Revert code block comment in examples
AlejandroFernandezLuces 74f6b87
fix: Add missing import check
AlejandroFernandezLuces 6c6fcc5
fix: Align env variables
AlejandroFernandezLuces File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| feat: Add PyVista Qt support |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| # Copyright (C) 2023 - 2024 ANSYS, Inc. and/or its affiliates. | ||
| # SPDX-License-Identifier: MIT | ||
| # | ||
| # | ||
| # Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| # of this software and associated documentation files (the "Software"), to deal | ||
| # in the Software without restriction, including without limitation the rights | ||
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| # copies of the Software, and to permit persons to whom the Software is | ||
| # furnished to do so, subject to the following conditions: | ||
| # | ||
| # The above copyright notice and this permission notice shall be included in all | ||
| # copies or substantial portions of the Software. | ||
| # | ||
| # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| # SOFTWARE. | ||
|
|
||
| """ | ||
| .. _ref_backgroundplotter: | ||
|
|
||
| ======================== | ||
| Use a PyVista Qt backend | ||
| ======================== | ||
|
|
||
| PyVista Qt is a package that extends the PyVista functionality through the | ||
| usage of Qt. Qt applications operate in a separate thread than VTK, you can | ||
| simultaneously have an active VTK plot and a non-blocking Python session. | ||
|
|
||
| This example shows how to use the PyVista Qt backend to create a plotter | ||
| """ | ||
|
|
||
| import pyvista as pv | ||
|
|
||
| from ansys.tools.visualization_interface import Plotter | ||
| from ansys.tools.visualization_interface.backends.pyvista import PyVistaBackend | ||
|
|
||
| ######################### | ||
| # Open a pyvistaqt window | ||
| # ======================= | ||
| # .. code-block:: python | ||
| # | ||
| # cube = pv.Cube() | ||
| # pv_backend = PyVistaBackend(use_qt=True) | ||
| # pl = Plotter(backend=pv_backend) | ||
| # pl.plot(cube) | ||
| # pl.show() | ||
| # | ||
|
|
||
|
|
||
| ##################### | ||
| # Parallel VTK window | ||
| # =================== | ||
|
|
||
| sphere = pv.Sphere() | ||
|
|
||
| pl_parallel = Plotter() | ||
| pl_parallel.plot(sphere) | ||
| pl_parallel.show() | ||
|
|
||
| ############################ | ||
| # Close the pyvistaqt window | ||
| # ========================== | ||
| # .. code-block:: python | ||
| # | ||
| # pv_backend.close() | ||
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RobPasMue marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -81,4 +81,4 @@ def show( | |
| screenshot=screenshot, | ||
| name_filter=name_filter, | ||
| **plotting_options | ||
| ) | ||
| ) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.