ansys-tools-visualization-interface 0.12.1__tar.gz → 1.0.0a1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/LICENSE +1 -1
  2. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/PKG-INFO +34 -19
  3. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/README.rst +9 -4
  4. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/pyproject.toml +32 -15
  5. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/__init__.py +1 -1
  6. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/__init__.py +1 -1
  7. ansys_tools_visualization_interface-1.0.0a1/src/ansys/tools/visualization_interface/backends/_base.py +223 -0
  8. ansys_tools_visualization_interface-1.0.0a1/src/ansys/tools/visualization_interface/backends/plotly/__init__.py +22 -0
  9. ansys_tools_visualization_interface-1.0.0a1/src/ansys/tools/visualization_interface/backends/plotly/plotly_dash.py +225 -0
  10. ansys_tools_visualization_interface-1.0.0a1/src/ansys/tools/visualization_interface/backends/plotly/plotly_interface.py +548 -0
  11. ansys_tools_visualization_interface-1.0.0a1/src/ansys/tools/visualization_interface/backends/plotly/widgets/__init__.py +22 -0
  12. ansys_tools_visualization_interface-1.0.0a1/src/ansys/tools/visualization_interface/backends/plotly/widgets/button_manager.py +486 -0
  13. ansys_tools_visualization_interface-1.0.0a1/src/ansys/tools/visualization_interface/backends/plotly/widgets/dropdown_manager.py +89 -0
  14. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/__init__.py +7 -1
  15. ansys_tools_visualization_interface-1.0.0a1/src/ansys/tools/visualization_interface/backends/pyvista/animation.py +532 -0
  16. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/picker.py +1 -1
  17. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/pyvista.py +443 -34
  18. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/pyvista_interface.py +100 -3
  19. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/trame_local.py +21 -1
  20. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/trame_remote.py +1 -1
  21. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/trame_service.py +1 -1
  22. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/widgets/__init__.py +1 -1
  23. ansys_tools_visualization_interface-1.0.0a1/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/next.png +0 -0
  24. ansys_tools_visualization_interface-1.0.0a1/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/next_inv.png +0 -0
  25. ansys_tools_visualization_interface-1.0.0a1/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/parallel_projection.png +0 -0
  26. ansys_tools_visualization_interface-1.0.0a1/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/parallel_projection_inv.png +0 -0
  27. ansys_tools_visualization_interface-1.0.0a1/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/pause.png +0 -0
  28. ansys_tools_visualization_interface-1.0.0a1/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/pause_inv.png +0 -0
  29. ansys_tools_visualization_interface-1.0.0a1/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/play.png +0 -0
  30. ansys_tools_visualization_interface-1.0.0a1/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/play_inv.png +0 -0
  31. ansys_tools_visualization_interface-1.0.0a1/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/previous.png +0 -0
  32. ansys_tools_visualization_interface-1.0.0a1/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/previous_inv.png +0 -0
  33. ansys_tools_visualization_interface-1.0.0a1/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/save.png +0 -0
  34. ansys_tools_visualization_interface-1.0.0a1/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/save_inv.png +0 -0
  35. ansys_tools_visualization_interface-1.0.0a1/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/stop.png +0 -0
  36. ansys_tools_visualization_interface-1.0.0a1/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/stop_inv.png +0 -0
  37. ansys_tools_visualization_interface-1.0.0a1/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/tree.png +0 -0
  38. ansys_tools_visualization_interface-1.0.0a1/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/tree_inv.png +0 -0
  39. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/widgets/button.py +1 -1
  40. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/widgets/dark_mode.py +1 -1
  41. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/widgets/displace_arrows.py +1 -1
  42. ansys_tools_visualization_interface-1.0.0a1/src/ansys/tools/visualization_interface/backends/pyvista/widgets/dynamic_tree_menu.py +394 -0
  43. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/widgets/hide_buttons.py +13 -5
  44. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/widgets/measure.py +1 -1
  45. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/widgets/mesh_slider.py +1 -1
  46. ansys_tools_visualization_interface-1.0.0a1/src/ansys/tools/visualization_interface/backends/pyvista/widgets/next_button.py +70 -0
  47. ansys_tools_visualization_interface-1.0.0a1/src/ansys/tools/visualization_interface/backends/pyvista/widgets/parallel_projection.py +91 -0
  48. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/widgets/pick_rotation_center.py +1 -1
  49. ansys_tools_visualization_interface-1.0.0a1/src/ansys/tools/visualization_interface/backends/pyvista/widgets/play_pause_button.py +103 -0
  50. ansys_tools_visualization_interface-1.0.0a1/src/ansys/tools/visualization_interface/backends/pyvista/widgets/previous_button.py +70 -0
  51. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/widgets/ruler.py +1 -1
  52. ansys_tools_visualization_interface-1.0.0a1/src/ansys/tools/visualization_interface/backends/pyvista/widgets/save_gif_button.py +111 -0
  53. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/widgets/screenshot.py +11 -3
  54. ansys_tools_visualization_interface-1.0.0a1/src/ansys/tools/visualization_interface/backends/pyvista/widgets/stop_button.py +87 -0
  55. ansys_tools_visualization_interface-1.0.0a1/src/ansys/tools/visualization_interface/backends/pyvista/widgets/tree_menu_toggle.py +117 -0
  56. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/widgets/view_button.py +1 -1
  57. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/widgets/widget.py +1 -1
  58. ansys_tools_visualization_interface-1.0.0a1/src/ansys/tools/visualization_interface/plotter.py +552 -0
  59. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/types/__init__.py +1 -1
  60. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/types/edge_plot.py +6 -4
  61. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/types/mesh_object_plot.py +120 -7
  62. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/utils/__init__.py +1 -1
  63. ansys_tools_visualization_interface-1.0.0a1/src/ansys/tools/visualization_interface/utils/_kwargs_manager.py +146 -0
  64. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/utils/clip_plane.py +1 -1
  65. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/utils/color.py +1 -1
  66. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/utils/logger.py +1 -1
  67. ansys_tools_visualization_interface-1.0.0a1/src/ansys/tools/visualization_interface/utils/vtkhdf_converter.py +117 -0
  68. ansys_tools_visualization_interface-0.12.1/src/ansys/tools/visualization_interface/backends/_base.py +0 -44
  69. ansys_tools_visualization_interface-0.12.1/src/ansys/tools/visualization_interface/plotter.py +0 -94
  70. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/+xy.png +0 -0
  71. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/+xy_inv.png +0 -0
  72. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/+xz.png +0 -0
  73. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/+xz_inv.png +0 -0
  74. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/+yz.png +0 -0
  75. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/+yz_inv.png +0 -0
  76. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/-xy.png +0 -0
  77. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/-xy_inv.png +0 -0
  78. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/-xz.png +0 -0
  79. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/-xz_inv.png +0 -0
  80. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/-yz.png +0 -0
  81. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/-yz_inv.png +0 -0
  82. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/center_pick.png +0 -0
  83. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/center_pick_inv.png +0 -0
  84. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/dark_mode.png +0 -0
  85. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/dark_mode_inv.png +0 -0
  86. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/downarrow.png +0 -0
  87. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/downarrow_inv.png +0 -0
  88. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/isometric.png +0 -0
  89. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/isometric_inv.png +0 -0
  90. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/measurement.png +0 -0
  91. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/measurement_inv.png +0 -0
  92. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/planecut.png +0 -0
  93. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/planecut_inv.png +0 -0
  94. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/ruler.png +0 -0
  95. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/ruler_inv.png +0 -0
  96. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/screenshot.png +0 -0
  97. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/screenshot_inv.png +0 -0
  98. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/upxarrow.png +0 -0
  99. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/upxarrow_inv.png +0 -0
  100. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/upyarrow.png +0 -0
  101. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/upyarrow_inv.png +0 -0
  102. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/upzarrow.png +0 -0
  103. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/upzarrow_inv.png +0 -0
  104. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/visibilityoff.png +0 -0
  105. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/visibilityoff_inv.png +0 -0
  106. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/visibilityon.png +0 -0
  107. {ansys_tools_visualization_interface-0.12.1 → ansys_tools_visualization_interface-1.0.0a1}/src/ansys/tools/visualization_interface/backends/pyvista/widgets/_images/visibilityon_inv.png +0 -0
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2024 - 2025 ANSYS, Inc. and/or its affiliates.
3
+ Copyright (c) 2024 - 2026 ANSYS, Inc. and/or its affiliates.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy of
6
6
  this software and associated documentation files (the "Software"), to deal in
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: ansys-tools-visualization-interface
3
- Version: 0.12.1
3
+ Version: 1.0.0a1
4
4
  Summary: A Python visualization interface for PyAnsys libraries
5
5
  Author-email: "ANSYS, Inc." <pyansys.core@ansys.com>
6
6
  Maintainer-email: "ANSYS, Inc." <pyansys.core@ansys.com>
@@ -16,36 +16,46 @@ Classifier: Programming Language :: Python :: 3.11
16
16
  Classifier: Programming Language :: Python :: 3.12
17
17
  Classifier: Programming Language :: Python :: 3.13
18
18
  Requires-Dist: pyvista >= 0.43.0,<1
19
- Requires-Dist: websockets >= 12.0,< 16
19
+ Requires-Dist: websockets >= 12.0,< 17
20
20
  Requires-Dist: trame >= 3.6.0,<4
21
- Requires-Dist: trame-vtk >= 2.8.7,<3,!=2.8.16
21
+ Requires-Dist: trame-vtk >= 2.8.7,!= 2.8.16,< 2.11.2
22
22
  Requires-Dist: trame-vuetify >= 2.4.3,< 4
23
23
  Requires-Dist: trame-router >= 2.3.0,<3
24
- Requires-Dist: pyvista==0.46.3 ; extra == "doc"
25
- Requires-Dist: ansys-sphinx-theme[autoapi]==1.6.1 ; extra == "doc"
24
+ Requires-Dist: pyside6 >= 6.8.0,<7 ; extra == "all"
25
+ Requires-Dist: pyvistaqt >= 0.11.1,<1 ; extra == "all"
26
+ Requires-Dist: plotly >= 6.3.1,<7 ; extra == "all"
27
+ Requires-Dist: kaleido >= 1.1.0,<2 ; extra == "all"
28
+ Requires-Dist: dash >= 3.2.0,< 5 ; extra == "all"
29
+ Requires-Dist: imageio[ffmpeg] >= 2.37.2 ; extra == "all"
30
+ Requires-Dist: dash >= 3.2.0,< 5 ; extra == "dash"
31
+ Requires-Dist: pyvista==0.47.0 ; extra == "doc"
32
+ Requires-Dist: ansys-sphinx-theme[autoapi]==1.7.0 ; extra == "doc"
26
33
  Requires-Dist: jupyter_sphinx==0.5.3 ; extra == "doc"
27
- Requires-Dist: jupytext==1.17.3 ; extra == "doc"
34
+ Requires-Dist: jupytext==1.19.1 ; extra == "doc"
28
35
  Requires-Dist: nbsphinx==0.9.6 ; extra == "doc"
29
- Requires-Dist: numpydoc==1.9.0 ; extra == "doc"
30
- Requires-Dist: sphinx==8.2.3 ; extra == "doc"
36
+ Requires-Dist: numpydoc==1.10.0 ; extra == "doc"
31
37
  Requires-Dist: sphinx-copybutton==0.5.2 ; extra == "doc"
32
- Requires-Dist: sphinx_design==0.6.1 ; extra == "doc"
33
- Requires-Dist: sphinx-gallery==0.19.0 ; extra == "doc"
38
+ Requires-Dist: sphinx-gallery==0.20.0 ; extra == "doc"
34
39
  Requires-Dist: sphinx-jinja==2.0.2 ; extra == "doc"
35
- Requires-Dist: ansys-fluent-core==0.35.0 ; extra == "doc"
40
+ Requires-Dist: ansys-fluent-core==0.37.2 ; extra == "doc"
41
+ Requires-Dist: plotly >= 6.3.1,<7 ; extra == "plotly"
42
+ Requires-Dist: kaleido >= 1.1.0,<2 ; extra == "plotly"
36
43
  Requires-Dist: pyside6 >= 6.8.0,<7 ; extra == "pyvistaqt"
37
44
  Requires-Dist: pyvistaqt >= 0.11.1,<1 ; extra == "pyvistaqt"
38
- Requires-Dist: pytest==8.4.2 ; extra == "tests"
39
- Requires-Dist: pyvista==0.46.3 ; extra == "tests"
40
- Requires-Dist: pytest-pyvista==0.2.0 ; extra == "tests"
45
+ Requires-Dist: pytest==9.0.2 ; extra == "tests"
46
+ Requires-Dist: pyvista==0.47.0 ; extra == "tests"
47
+ Requires-Dist: pytest-pyvista==0.3.2 ; extra == "tests"
41
48
  Requires-Dist: pytest-cov==7.0.0 ; extra == "tests"
42
- Requires-Dist: pyside6==6.9.3 ; extra == "tests"
49
+ Requires-Dist: pyside6==6.10.2 ; extra == "tests"
43
50
  Project-URL: Discussions, https://github.com/ansys/ansys-tools-visualization-interface/discussions
44
51
  Project-URL: Documentation, https://visualization-interface.tools.docs.pyansys.com/
45
52
  Project-URL: Issues, https://github.com/ansys/ansys-tools-visualization-interface/issues
46
53
  Project-URL: Releases, https://github.com/ansys/ansys-tools-visualization-interface/releases/
47
54
  Project-URL: Source, https://github.com/ansys/ansys-tools-visualization-interface
55
+ Provides-Extra: all
56
+ Provides-Extra: dash
48
57
  Provides-Extra: doc
58
+ Provides-Extra: plotly
49
59
  Provides-Extra: pyvistaqt
50
60
  Provides-Extra: tests
51
61
 
@@ -87,10 +97,15 @@ different plotting backends.
87
97
 
88
98
  The Visualization Interface Tool offers these main features:
89
99
 
90
- * Serves as an interface between PyAnsys and other plotting libraries (although only
91
- `PyVista <https://docs.pyvista.org/version/stable/>`_ is supported currently).
92
- * Provides out-of-the box picking, viewing, and measuring functionalities.
93
- * Supplies an extensible class for adding custom functionalities.
100
+ - Serves as an interface between PyAnsys and other plotting libraries.
101
+ - Provides out-of-the box picking, viewing, and measuring functionalities.
102
+ - Supplies an extensible class for adding custom functionalities.
103
+
104
+ Currently, the following plotting libraries are supported.
105
+
106
+ - `PyVista <https://docs.pyvista.org/index.html>`_.
107
+ - `Trame <https://www.kitware.com/trame/>`_, a web view for PyVista.
108
+ - `Plotly <https://plotly.com/>`_.
94
109
 
95
110
  Documentation and issues
96
111
  ------------------------
@@ -36,10 +36,15 @@ different plotting backends.
36
36
 
37
37
  The Visualization Interface Tool offers these main features:
38
38
 
39
- * Serves as an interface between PyAnsys and other plotting libraries (although only
40
- `PyVista <https://docs.pyvista.org/version/stable/>`_ is supported currently).
41
- * Provides out-of-the box picking, viewing, and measuring functionalities.
42
- * Supplies an extensible class for adding custom functionalities.
39
+ - Serves as an interface between PyAnsys and other plotting libraries.
40
+ - Provides out-of-the box picking, viewing, and measuring functionalities.
41
+ - Supplies an extensible class for adding custom functionalities.
42
+
43
+ Currently, the following plotting libraries are supported.
44
+
45
+ - `PyVista <https://docs.pyvista.org/index.html>`_.
46
+ - `Trame <https://www.kitware.com/trame/>`_, a web view for PyVista.
47
+ - `Plotly <https://plotly.com/>`_.
43
48
 
44
49
  Documentation and issues
45
50
  ------------------------
@@ -4,7 +4,7 @@ build-backend = "flit_core.buildapi"
4
4
 
5
5
  [project]
6
6
  name = "ansys-tools-visualization-interface"
7
- version = "0.12.1"
7
+ version = "1.0.0a1"
8
8
  description = "A Python visualization interface for PyAnsys libraries"
9
9
  readme = "README.rst"
10
10
  requires-python = ">=3.10,<4"
@@ -24,9 +24,9 @@ classifiers = [
24
24
  ]
25
25
  dependencies = [
26
26
  "pyvista >= 0.43.0,<1",
27
- "websockets >= 12.0,< 16",
27
+ "websockets >= 12.0,< 17",
28
28
  "trame >= 3.6.0,<4",
29
- "trame-vtk >= 2.8.7,<3,!=2.8.16",
29
+ "trame-vtk >= 2.8.7,!= 2.8.16,< 2.11.2",
30
30
  "trame-vuetify >= 2.4.3,< 4",
31
31
  "trame-router >= 2.3.0,<3",
32
32
  ]
@@ -36,27 +36,44 @@ pyvistaqt = [
36
36
  "pyside6 >= 6.8.0,<7",
37
37
  "pyvistaqt >= 0.11.1,<1",
38
38
  ]
39
+
40
+ plotly = [
41
+ "plotly >= 6.3.1,<7",
42
+ "kaleido >= 1.1.0,<2",
43
+ ]
44
+
45
+ dash = [
46
+ "dash >= 3.2.0,< 5"
47
+ ]
48
+
49
+ all = [
50
+ "pyside6 >= 6.8.0,<7",
51
+ "pyvistaqt >= 0.11.1,<1",
52
+ "plotly >= 6.3.1,<7",
53
+ "kaleido >= 1.1.0,<2",
54
+ "dash >= 3.2.0,< 5",
55
+ "imageio[ffmpeg] >= 2.37.2"
56
+ ]
57
+
39
58
  tests = [
40
- "pytest==8.4.2",
41
- "pyvista==0.46.3",
42
- "pytest-pyvista==0.2.0",
59
+ "pytest==9.0.2",
60
+ "pyvista==0.47.0",
61
+ "pytest-pyvista==0.3.2",
43
62
  "pytest-cov==7.0.0",
44
- "pyside6==6.9.3",
63
+ "pyside6==6.10.2",
45
64
  ]
46
65
 
47
66
  doc = [
48
- "pyvista==0.46.3",
49
- "ansys-sphinx-theme[autoapi]==1.6.1",
67
+ "pyvista==0.47.0",
68
+ "ansys-sphinx-theme[autoapi]==1.7.0",
50
69
  "jupyter_sphinx==0.5.3",
51
- "jupytext==1.17.3",
70
+ "jupytext==1.19.1",
52
71
  "nbsphinx==0.9.6",
53
- "numpydoc==1.9.0",
54
- "sphinx==8.2.3",
72
+ "numpydoc==1.10.0",
55
73
  "sphinx-copybutton==0.5.2",
56
- "sphinx_design==0.6.1",
57
- "sphinx-gallery==0.19.0",
74
+ "sphinx-gallery==0.20.0",
58
75
  "sphinx-jinja==2.0.2",
59
- "ansys-fluent-core==0.35.0",
76
+ "ansys-fluent-core==0.37.2",
60
77
  ]
61
78
 
62
79
  [project.urls]
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates.
1
+ # Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates.
2
2
  # SPDX-License-Identifier: MIT
3
3
  #
4
4
  #
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates.
1
+ # Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates.
2
2
  # SPDX-License-Identifier: MIT
3
3
  #
4
4
  #
@@ -0,0 +1,223 @@
1
+ # Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates.
2
+ # SPDX-License-Identifier: MIT
3
+ #
4
+ #
5
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ # of this software and associated documentation files (the "Software"), to deal
7
+ # in the Software without restriction, including without limitation the rights
8
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ # copies of the Software, and to permit persons to whom the Software is
10
+ # furnished to do so, subject to the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be included in all
13
+ # copies or substantial portions of the Software.
14
+ #
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ # SOFTWARE.
22
+
23
+ """Module for the backend base class."""
24
+ from abc import ABC, abstractmethod
25
+ from typing import Any, Iterable, List, Optional, Tuple, Union
26
+
27
+
28
+ class BaseBackend(ABC):
29
+ """Base class for plotting backends."""
30
+
31
+ @abstractmethod
32
+ def plot(self, plottable_object: Any, **plotting_options):
33
+ """Plot the specified object."""
34
+ raise NotImplementedError("plot method must be implemented")
35
+
36
+ @abstractmethod
37
+ def plot_iter(self, plotting_list: Iterable):
38
+ """Plot the elements of an iterable."""
39
+ raise NotImplementedError("plot_iter method must be implemented")
40
+
41
+ @abstractmethod
42
+ def show(self):
43
+ """Show the plotted objects."""
44
+ raise NotImplementedError("show method must be implemented")
45
+
46
+ @abstractmethod
47
+ def add_points(
48
+ self,
49
+ points: Union[List, Any],
50
+ color: str = "red",
51
+ size: float = 10.0,
52
+ **kwargs
53
+ ) -> Any:
54
+ """Add point markers to the scene.
55
+
56
+ Parameters
57
+ ----------
58
+ points : Union[List, Any]
59
+ Points to add. Can be a list of coordinates or array-like object.
60
+ Expected format: [[x1, y1, z1], [x2, y2, z2], ...] or Nx3 array.
61
+ color : str, default: "red"
62
+ Color of the points.
63
+ size : float, default: 10.0
64
+ Size of the point markers.
65
+ **kwargs : dict
66
+ Additional backend-specific keyword arguments.
67
+
68
+ Returns
69
+ -------
70
+ Any
71
+ Backend-specific actor or object representing the added points.
72
+ """
73
+ raise NotImplementedError("add_points method must be implemented")
74
+
75
+ @abstractmethod
76
+ def add_lines(
77
+ self,
78
+ points: Union[List, Any],
79
+ connections: Optional[Union[List, Any]] = None,
80
+ color: str = "white",
81
+ width: float = 1.0,
82
+ **kwargs
83
+ ) -> Any:
84
+ """Add line segments to the scene.
85
+
86
+ Parameters
87
+ ----------
88
+ points : Union[List, Any]
89
+ Points defining the lines. Can be a list of coordinates or array-like object.
90
+ Expected format: [[x1, y1, z1], [x2, y2, z2], ...] or Nx3 array.
91
+ connections : Optional[Union[List, Any]], default: None
92
+ Line connectivity. If None, connects points sequentially.
93
+ Expected format: [[start_idx1, end_idx1], [start_idx2, end_idx2], ...]
94
+ or Mx2 array where M is the number of lines.
95
+ color : str, default: "white"
96
+ Color of the lines.
97
+ width : float, default: 1.0
98
+ Width of the lines.
99
+ **kwargs : dict
100
+ Additional backend-specific keyword arguments.
101
+
102
+ Returns
103
+ -------
104
+ Any
105
+ Backend-specific actor or object representing the added lines.
106
+ """
107
+ raise NotImplementedError("add_lines method must be implemented")
108
+
109
+ @abstractmethod
110
+ def add_planes(
111
+ self,
112
+ center: Tuple[float, float, float] = (0.0, 0.0, 0.0),
113
+ normal: Tuple[float, float, float] = (0.0, 0.0, 1.0),
114
+ i_size: float = 1.0,
115
+ j_size: float = 1.0,
116
+ **kwargs
117
+ ) -> Any:
118
+ """Add a plane to the scene.
119
+
120
+ Parameters
121
+ ----------
122
+ center : Tuple[float, float, float], default: (0.0, 0.0, 0.0)
123
+ Center point of the plane (x, y, z).
124
+ normal : Tuple[float, float, float], default: (0.0, 0.0, 1.0)
125
+ Normal vector of the plane (x, y, z).
126
+ i_size : float, default: 1.0
127
+ Size of the plane in the i direction.
128
+ j_size : float, default: 1.0
129
+ Size of the plane in the j direction.
130
+ **kwargs : dict
131
+ Additional backend-specific keyword arguments.
132
+
133
+ Returns
134
+ -------
135
+ Any
136
+ Backend-specific actor or object representing the added plane.
137
+ """
138
+ raise NotImplementedError("add_planes method must be implemented")
139
+
140
+ @abstractmethod
141
+ def add_text(
142
+ self,
143
+ text: str,
144
+ position: Union[Tuple[float, float], Tuple[float, float, float], str],
145
+ font_size: int = 12,
146
+ color: str = "white",
147
+ **kwargs
148
+ ) -> Any:
149
+ """Add text to the scene.
150
+
151
+ Parameters
152
+ ----------
153
+ text : str
154
+ Text string to display.
155
+ position : Union[Tuple[float, float], Tuple[float, float, float], str]
156
+ Position for the text. Can be 2D (x, y) for screen coordinates,
157
+ 3D (x, y, z) for world coordinates, or a string position like
158
+ 'upper_left', 'upper_right', 'lower_left', 'lower_right',
159
+ 'upper_edge', 'lower_edge' (backend-dependent support).
160
+ font_size : int, default: 12
161
+ Font size for the text.
162
+ color : str, default: "white"
163
+ Color of the text.
164
+ **kwargs : dict
165
+ Additional backend-specific keyword arguments.
166
+
167
+ Returns
168
+ -------
169
+ Any
170
+ Backend-specific actor or object representing the added text.
171
+ """
172
+ raise NotImplementedError("add_text method must be implemented")
173
+
174
+ @abstractmethod
175
+ def add_labels(
176
+ self,
177
+ points: Union[List, Any],
178
+ labels: List[str],
179
+ font_size: int = 12,
180
+ point_size: float = 5.0,
181
+ **kwargs
182
+ ) -> Any:
183
+ """Add labels at 3D point locations.
184
+
185
+ Parameters
186
+ ----------
187
+ points : Union[List, Any]
188
+ Points where labels should be placed. Can be a list of coordinates
189
+ or array-like object. Expected format: [[x1, y1, z1], ...] or Nx3 array.
190
+ labels : List[str]
191
+ List of label strings to display at each point.
192
+ font_size : int, default: 12
193
+ Font size for the labels.
194
+ point_size : float, default: 5.0
195
+ Size of the point markers shown with labels.
196
+ **kwargs : dict
197
+ Additional backend-specific keyword arguments.
198
+
199
+ Returns
200
+ -------
201
+ Any
202
+ Backend-specific actor or object representing the added labels.
203
+ """
204
+ raise NotImplementedError("add_labels method must be implemented")
205
+
206
+ @abstractmethod
207
+ def clear(self) -> None:
208
+ """Clear all actors from the scene.
209
+
210
+ This method removes all previously added objects (meshes, points, lines,
211
+ text, etc.) from the visualization scene, therefore allowing
212
+ the plotter to be reused after ``show()`` has been called.
213
+
214
+ Notes
215
+ -----
216
+ Both PyVista and Plotly backends support clearing and reusing the
217
+ plotter after ``show()`` has been called. This enables workflows like:
218
+
219
+ 1. Add objects and call ``show()``
220
+ 2. Call ``clear()`` to reset
221
+ 3. Add new objects and call ``show()`` again
222
+ """
223
+ raise NotImplementedError("clear method must be implemented")
@@ -0,0 +1,22 @@
1
+ # Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates.
2
+ # SPDX-License-Identifier: MIT
3
+ #
4
+ #
5
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ # of this software and associated documentation files (the "Software"), to deal
7
+ # in the Software without restriction, including without limitation the rights
8
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ # copies of the Software, and to permit persons to whom the Software is
10
+ # furnished to do so, subject to the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be included in all
13
+ # copies or substantial portions of the Software.
14
+ #
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ # SOFTWARE.
22
+ """Plotly initialization."""
@@ -0,0 +1,225 @@
1
+ # Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates.
2
+ # SPDX-License-Identifier: MIT
3
+ #
4
+ #
5
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ # of this software and associated documentation files (the "Software"), to deal
7
+ # in the Software without restriction, including without limitation the rights
8
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ # copies of the Software, and to permit persons to whom the Software is
10
+ # furnished to do so, subject to the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be included in all
13
+ # copies or substantial portions of the Software.
14
+ #
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ # SOFTWARE.
22
+ """Module for dash plotly."""
23
+ from typing import TYPE_CHECKING, Union
24
+
25
+ from dash import Dash, Input, Output, dcc, html
26
+
27
+ from ansys.tools.visualization_interface.backends.plotly.plotly_interface import PlotlyBackend
28
+ from ansys.tools.visualization_interface.backends.plotly.widgets.dropdown_manager import DashDropdownManager
29
+
30
+ if TYPE_CHECKING:
31
+ import plotly.graph_objects as go
32
+
33
+
34
+ class PlotlyDashBackend(PlotlyBackend):
35
+ """Plotly Dash interface for visualization."""
36
+
37
+ def __init__(self, app: Dash = None) -> None:
38
+ """Initialize the Plotly Dash backend.
39
+
40
+ Parameters
41
+ ----------
42
+ app : Dash
43
+ The Dash application instance.
44
+ """
45
+ super().__init__()
46
+ self._app = app or Dash(__name__)
47
+ self._dropdown_manager = DashDropdownManager(self._fig)
48
+ self._setup_callbacks()
49
+
50
+ @property
51
+ def dropdown_manager(self) -> DashDropdownManager:
52
+ """Get the dropdown manager for this backend.
53
+
54
+ Returns
55
+ -------
56
+ DashDropdownManager
57
+ The dropdown manager instance.
58
+ """
59
+ return self._dropdown_manager
60
+
61
+ def plot(self, plottable_object, name: str = None, **plotting_options) -> None:
62
+ """Plot a single object using Plotly and track mesh names for dropdown.
63
+
64
+ Parameters
65
+ ----------
66
+ plottable_object : Any
67
+ The object to plot.
68
+ name : str, optional
69
+ Name of the mesh for labeling in Plotly.
70
+ plotting_options : dict
71
+ Additional plotting options.
72
+ """
73
+ # Call parent plot method
74
+ super().plot(plottable_object, name=name, **plotting_options)
75
+
76
+ # Track mesh names for dropdown functionality
77
+ if name:
78
+ self._dropdown_manager.add_mesh_name(name)
79
+ else:
80
+ # Try to get name from the latest trace added
81
+ if self._fig.data:
82
+ latest_trace = self._fig.data[-1]
83
+ trace_name = getattr(latest_trace, 'name', None)
84
+ if trace_name:
85
+ self._dropdown_manager.add_mesh_name(trace_name)
86
+
87
+ def _setup_callbacks(self) -> None:
88
+ """Setup Dash callbacks for mesh visibility control."""
89
+ # Store reference to self for use in callback
90
+ backend_instance = self
91
+
92
+ @self._app.callback(
93
+ Output('mesh-graph', 'figure'),
94
+ Input('mesh-visibility-dropdown', 'value'),
95
+ prevent_initial_call=True
96
+ )
97
+ def update_mesh_visibility(hidden_meshes):
98
+ """Update mesh visibility based on dropdown selection.
99
+
100
+ Parameters
101
+ ----------
102
+ hidden_meshes : List[str]
103
+ List of mesh names to hide.
104
+
105
+ Returns
106
+ -------
107
+ go.Figure
108
+ Updated figure with modified mesh visibility.
109
+ """
110
+ if hidden_meshes is None:
111
+ hidden_meshes = []
112
+
113
+ # Get all mesh names
114
+ all_mesh_names = backend_instance.dropdown_manager.get_mesh_names()
115
+ visible_mesh_names = [name for name in all_mesh_names if name not in hidden_meshes]
116
+
117
+ # Create a copy of the figure to avoid modifying the original
118
+ import plotly.graph_objects as go
119
+ updated_fig = go.Figure(backend_instance._fig)
120
+
121
+ # Update visibility for each trace
122
+ for i, trace in enumerate(updated_fig.data):
123
+ trace_name = getattr(trace, 'name', None)
124
+ is_visible = trace_name in visible_mesh_names
125
+ updated_fig.data[i].visible = is_visible
126
+
127
+ return updated_fig
128
+
129
+ def create_dash_layout(self) -> html.Div:
130
+ """Create the Dash layout with optional dropdown for mesh visibility.
131
+
132
+ Returns
133
+ -------
134
+ html.Div
135
+ The Dash layout component.
136
+ """
137
+ components = []
138
+
139
+ if self.dropdown_manager.get_mesh_names():
140
+ # Add dropdown for mesh visibility control
141
+ mesh_names = self.dropdown_manager.get_mesh_names()
142
+ components.append(
143
+ dcc.Dropdown(
144
+ id='mesh-visibility-dropdown',
145
+ options=[{'label': name, 'value': name} for name in mesh_names],
146
+ multi=True,
147
+ placeholder="Select meshes to hide",
148
+ searchable=True,
149
+ style={
150
+ 'width': '280px',
151
+ 'fontSize': '14px'
152
+ }
153
+ )
154
+
155
+ )
156
+
157
+ # Add the main graph
158
+ components.append(dcc.Graph(
159
+ id='mesh-graph',
160
+ figure=self._fig,
161
+ style={
162
+ 'height': '100vh',
163
+ 'width': '100%',
164
+ 'margin': '0',
165
+ 'padding': '0'
166
+ },
167
+ config={
168
+ 'responsive': True,
169
+ 'displayModeBar': True,
170
+ 'displaylogo': False
171
+ }
172
+ ))
173
+
174
+ return html.Div(components, style={
175
+ 'fontFamily': '"Open Sans", verdana, arial, sans-serif',
176
+ 'backgroundColor': '#ffffff',
177
+ 'minHeight': '100vh',
178
+ 'width': '100%',
179
+ 'margin': '0',
180
+ 'padding': '0',
181
+ 'position': 'relative'
182
+ })
183
+
184
+ def show(self,
185
+ plottable_object=None,
186
+ screenshot: str = None,
187
+ name_filter=None,
188
+ **kwargs) -> Union["go.Figure", None]:
189
+ """Render the Plotly scene.
190
+
191
+ Parameters
192
+ ----------
193
+ plottable_object : Any, optional
194
+ Object to show, by default None.
195
+ screenshot : str, optional
196
+ Path to save a screenshot, by default None.
197
+ name_filter : bool, optional
198
+ Flag to filter the object, by default None.
199
+ kwargs : dict
200
+ Additional options the selected backend accepts.
201
+
202
+ Returns
203
+ -------
204
+ Union[go.Figure, None]
205
+ The figure of the plot if in doc building environment. Else, None.
206
+ """
207
+ import os
208
+ if os.environ.get("PYANSYS_VISUALIZER_DOC_MODE"):
209
+ return self._fig
210
+
211
+ if plottable_object is not None:
212
+ self.plot(plottable_object)
213
+
214
+ # Only show in browser if no screenshot is being taken
215
+ if not screenshot:
216
+ # Always use the create_dash_layout method to ensure dropdown is included when enabled
217
+ self._app.layout = self.create_dash_layout()
218
+ self._app.run()
219
+
220
+ else:
221
+ screenshot_str = str(screenshot)
222
+ if screenshot_str.endswith('.html'):
223
+ self._fig.write_html(screenshot_str)
224
+ else:
225
+ self._fig.write_image(screenshot_str)