Conversation
ba450bd to
4358e39
Compare
|
Thanks for moving the changes here! On the For the clear method, I still think it kind of leads to confusion for users. I think it leads to think that the flow would be something like this: plotter.plot(mesh)
plotter.show()
plotter.clear()
plotter.plot(mesh)which breaks for PyVista, our major backend. We could make a workaround in the PyVista backend by recreating the plotter instance after a I understand your interactive argument, but it compromises scripting and coding in my opinion. What do yout think? Do you see any way of clarifying this for the users elegantly? |
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
c01d1db to
82279ed
Compare
Hello @AlejandroFernandezLuces (You owe me one La Casera 🍹 when next we meet, I faced a rebasing hell this morning due to not syncing on time with all the subsequent changes you made to your PR):
|
|
Sorry about that 😄 Let's keep the clear method and add specific documentation in the PyVista docs clarifying this issue. After discussing with @RobPasMue , we came to the conclusion that most of the backends we may end up implementing will benefit from it anyway. I know that the PR is still in draft, but if you could add use examples for the new APIs, it would be great. Thanks for the hard work 🙂 |
Picking sides... |
Added! |
src/ansys/tools/visualization_interface/backends/plotly/plotly_interface.py
Outdated
Show resolved
Hide resolved
AlejandroFernandezLuces
left a comment
There was a problem hiding this comment.
LGTM, couple of comments.
src/ansys/tools/visualization_interface/backends/pyvista/pyvista.py
Outdated
Show resolved
Hide resolved
src/ansys/tools/visualization_interface/backends/pyvista/pyvista.py
Outdated
Show resolved
Hide resolved
src/ansys/tools/visualization_interface/backends/pyvista/pyvista.py
Outdated
Show resolved
Hide resolved
|
@AlejandroFernandezLuces I added e27ef09. |
AlejandroFernandezLuces
left a comment
There was a problem hiding this comment.
Other that the renaming of helpers, LGTM. Thanks a lot for the contribution @moe-ad ! 🚀
fd7f8a0 to
abfa1de
Compare
src/ansys/tools/visualization_interface/backends/pyvista/pyvista.py
Outdated
Show resolved
Hide resolved
4e0a178 to
67e6a1c
Compare

See #465 for context.
Summary of changes.
PyVistaBackendInterface._extract_kwargsto an helper module. The rationale is that we might need it in a lot more places in the future (if lessons frompydpf-coreare anything to go by, there is a similar method that has found utility all over the place in the project's plotting classes).add_point_labels: a new API you can pass points and labels lists to annotate 3D point locations:clear: a new API to remove all actors from scenes, workaround to achieve consistent behavior added to the PyVista backend.add_textwas used in pyvista examples (using pixel coordinates is tricky):