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

feat: Adapt PyMAPDL to common plotter #2799

Merged
merged 201 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from 70 commits
Commits
Show all changes
201 commits
Select commit Hold shift + click to select a range
d792fdb
feat: Adapt PyMAPDL to common plotter
AlejandroFernandezLuces Feb 20, 2024
048b0fe
fix: Remove manual test file
AlejandroFernandezLuces Feb 20, 2024
7685f2e
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 20, 2024
c82999e
doc: Add docstrings
AlejandroFernandezLuces Feb 21, 2024
0d6ff52
Merge branch 'feat/common-plotter' of https://github.com/pyansys/pyma…
AlejandroFernandezLuces Feb 21, 2024
840e59a
Merge branch 'main' into feat/common-plotter
AlejandroFernandezLuces Feb 21, 2024
6f7ba58
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 21, 2024
ce42360
fix: small changes
AlejandroFernandezLuces Feb 22, 2024
e6458ca
Merge branch 'feat/common-plotter' of https://github.com/pyansys/pyma…
AlejandroFernandezLuces Feb 22, 2024
bcbc62e
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 22, 2024
671df41
fix: set default bg color
AlejandroFernandezLuces Feb 22, 2024
2dd3349
Merge branch 'feat/common-plotter' of https://github.com/pyansys/pyma…
AlejandroFernandezLuces Feb 22, 2024
12cad3b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 22, 2024
fc704f2
Merge branch 'main' into feat/common-plotter
germa89 Feb 22, 2024
eadc5bb
Merge branch 'main' into feat/common-plotter
germa89 Feb 27, 2024
54c3a12
Merge branch 'main' of https://github.com/pyansys/pymapdl into feat/c…
AlejandroFernandezLuces May 30, 2024
15bc732
fix: Adapt to latest changes
AlejandroFernandezLuces May 30, 2024
3e7af1d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 30, 2024
9949845
Apply suggestions from code review
AlejandroFernandezLuces May 30, 2024
01a9d8a
feat: Use visualizer global variables
AlejandroFernandezLuces May 31, 2024
c9e04e7
Merge branch 'feat/common-plotter' of https://github.com/pyansys/pyma…
AlejandroFernandezLuces May 31, 2024
b777f42
Merge branch 'main' into feat/common-plotter
AlejandroFernandezLuces May 31, 2024
89d0a94
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 31, 2024
8054fed
fix: plotter calls
AlejandroFernandezLuces Jun 3, 2024
1051572
Merge branch 'feat/common-plotter' of https://github.com/pyansys/pyma…
AlejandroFernandezLuces Jun 3, 2024
df54e82
fix: Plotting calls
AlejandroFernandezLuces Jun 3, 2024
48c081e
fix: Empty labels
AlejandroFernandezLuces Jun 3, 2024
c4b3e81
fix: Plotting tests
AlejandroFernandezLuces Jun 3, 2024
ce4ac24
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 3, 2024
b45a3b6
Update the image cache
pre-commit-ci[bot] Jun 3, 2024
72f4a1e
fix: pre-commit
AlejandroFernandezLuces Jun 3, 2024
f384f00
Update the image cache
AlejandroFernandezLuces Jun 3, 2024
4c96141
fix: Remove unused import
AlejandroFernandezLuces Jun 3, 2024
ed2b534
Update the image cache
AlejandroFernandezLuces Jun 3, 2024
c73a98b
fix: codacy issues
AlejandroFernandezLuces Jun 3, 2024
444cce4
Merge branch 'feat/common-plotter' of https://github.com/pyansys/pyma…
AlejandroFernandezLuces Jun 3, 2024
8f3dcd4
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 3, 2024
2d6fc22
fix: Plotting issues
AlejandroFernandezLuces Jun 3, 2024
f1a2d8c
Merge branch 'feat/common-plotter' of https://github.com/pyansys/pyma…
AlejandroFernandezLuces Jun 3, 2024
390bee1
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 3, 2024
fcaf67d
temp: pass tests
AlejandroFernandezLuces Jun 3, 2024
94392b8
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 3, 2024
78ded5a
fix: Bugs in implementation
AlejandroFernandezLuces Jun 4, 2024
2bfc2ee
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 4, 2024
46b7094
Update the image cache
pre-commit-ci[bot] Jun 4, 2024
03c198b
fix: imports
AlejandroFernandezLuces Jun 4, 2024
ceef8a5
fix: remove off_screen
AlejandroFernandezLuces Jun 4, 2024
4cd06d4
Merge branch 'main' into feat/common-plotter
AlejandroFernandezLuces Jun 5, 2024
5916838
Merge branch 'main' into feat/common-plotter
AlejandroFernandezLuces Jun 7, 2024
6723281
fix: Doc changes
AlejandroFernandezLuces Jun 7, 2024
a87fbb9
Merge branch 'feat/common-plotter' of https://github.com/pyansys/pyma…
AlejandroFernandezLuces Jun 7, 2024
259cc02
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 7, 2024
0e1498d
fix: Add missing comma
AlejandroFernandezLuces Jun 7, 2024
6026f47
Merge branch 'feat/common-plotter' of https://github.com/pyansys/pyma…
AlejandroFernandezLuces Jun 7, 2024
1957a99
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 7, 2024
d20adb9
fix: Dependencies
AlejandroFernandezLuces Jun 7, 2024
4472874
Merge branch 'feat/common-plotter' of https://github.com/pyansys/pyma…
AlejandroFernandezLuces Jun 7, 2024
b56d218
fix: Dependencies
AlejandroFernandezLuces Jun 7, 2024
d6e26bf
fix: Add missing function in plotter
AlejandroFernandezLuces Jun 7, 2024
0896b65
Merge branch 'main' into feat/common-plotter
AlejandroFernandezLuces Jun 7, 2024
0a6d53e
fix: Wrong override
AlejandroFernandezLuces Jun 12, 2024
68f4995
Merge branch 'feat/common-plotter' of https://github.com/pyansys/pyma…
AlejandroFernandezLuces Jun 12, 2024
c1dc399
Update the image cache
AlejandroFernandezLuces Jun 12, 2024
0789765
fix: rename built in shadowing variables
AlejandroFernandezLuces Jun 12, 2024
3b58a04
Merge branch 'feat/common-plotter' of https://github.com/pyansys/pyma…
AlejandroFernandezLuces Jun 12, 2024
dc6bc54
fix: Built in shadowing
AlejandroFernandezLuces Jun 12, 2024
1d3337f
fix: more built in shadowing
AlejandroFernandezLuces Jun 12, 2024
f820825
fix: pre-commit
AlejandroFernandezLuces Jun 12, 2024
68f5b19
fix: Missed shadowing
AlejandroFernandezLuces Jun 12, 2024
eb02d17
fix: remove subplot in example
AlejandroFernandezLuces Jun 12, 2024
9eb770e
Apply suggestions from code review
AlejandroFernandezLuces Jun 13, 2024
ede6994
fix: remove pyvista import in example
AlejandroFernandezLuces Jun 13, 2024
cb88a24
fix: Docs
AlejandroFernandezLuces Jun 13, 2024
59e6f40
fix: Incorrect warning
AlejandroFernandezLuces Jun 13, 2024
2244b0b
fix: Remove import helper from __init__
AlejandroFernandezLuces Jun 13, 2024
78c1bf1
fix: Imports
AlejandroFernandezLuces Jun 13, 2024
6d98b2d
fix: import plotting if it has pyvista
AlejandroFernandezLuces Jun 14, 2024
cf45bd7
fix: minimal dependencies
AlejandroFernandezLuces Jun 14, 2024
5f3b2c2
fix: Add missing import
AlejandroFernandezLuces Jun 14, 2024
a8dda59
fix: Missing minimal setup
AlejandroFernandezLuces Jun 14, 2024
10130fe
fix: Tests
AlejandroFernandezLuces Jun 14, 2024
c357198
Merge branch 'main' into feat/common-plotter
AlejandroFernandezLuces Jun 14, 2024
9d50e8b
fix: Rework plotting imports
AlejandroFernandezLuces Jun 14, 2024
2dda084
fix: remove unneeded import
AlejandroFernandezLuces Jun 14, 2024
e28febd
fix: plotting imports
AlejandroFernandezLuces Jun 14, 2024
d548e07
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 14, 2024
81ecece
fix: plotting typing
AlejandroFernandezLuces Jun 14, 2024
ef9273d
Merge branch 'feat/common-plotter' of https://github.com/pyansys/pyma…
AlejandroFernandezLuces Jun 14, 2024
2c63038
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 14, 2024
7b2e39c
Merge branch 'main' into feat/common-plotter
AlejandroFernandezLuces Jun 18, 2024
70a16e2
Merge branch 'main' into feat/common-plotter
germa89 Jun 18, 2024
b3241a5
Adding changelog entry: 2799.miscellaneous.md
pyansys-ci-bot Jun 18, 2024
6232cc6
Update doc/source/conf.py
AlejandroFernandezLuces Jun 20, 2024
1a63640
Update src/ansys/mapdl/core/plotting/plotting.py
AlejandroFernandezLuces Jun 20, 2024
7e43cd3
Update src/ansys/mapdl/core/plotting/plotting.py
AlejandroFernandezLuces Jun 20, 2024
f4454f5
Update src/ansys/mapdl/core/plotting/plotting.py
AlejandroFernandezLuces Jun 20, 2024
89f4db1
Update tests/conftest.py
AlejandroFernandezLuces Jun 20, 2024
fc4b922
Merge branch 'main' into feat/common-plotter
AlejandroFernandezLuces Jun 20, 2024
0a9022f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 20, 2024
8a12a2d
Adding changelog entry: 2799.added.md
pyansys-ci-bot Jun 20, 2024
34d5fb2
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 20, 2024
c6049d7
fix: Revert upper limit
AlejandroFernandezLuces Jun 20, 2024
d8d1789
Merge branch 'feat/common-plotter' of https://github.com/pyansys/pyma…
AlejandroFernandezLuces Jun 20, 2024
3eaf472
fix: ratio, CHRGS
AlejandroFernandezLuces Jun 20, 2024
137fbf2
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 20, 2024
dd7a973
fix: revert opacity
AlejandroFernandezLuces Jun 20, 2024
db5e896
fix: revert deleted comment
AlejandroFernandezLuces Jun 20, 2024
e267000
Merge branch 'feat/common-plotter' of https://github.com/pyansys/pyma…
AlejandroFernandezLuces Jun 20, 2024
62d545d
fix: delete uneeded theme file
AlejandroFernandezLuces Jun 20, 2024
2c65ec0
Merge branch 'main' into feat/common-plotter
AlejandroFernandezLuces Jun 21, 2024
717da34
fix: Remove chained calls to plotter
AlejandroFernandezLuces Jun 21, 2024
a76c253
fix: Missing plotter calls
AlejandroFernandezLuces Jul 1, 2024
4445c3f
Merge branch 'feat/common-plotter' of https://github.com/pyansys/pyma…
AlejandroFernandezLuces Jul 1, 2024
13bca16
Merge branch 'main' into feat/common-plotter
AlejandroFernandezLuces Jul 1, 2024
f05423b
fix: Remove beartype
AlejandroFernandezLuces Jul 1, 2024
29f93f6
chore: adding changelog file 2799.dependencies.md
pyansys-ci-bot Jul 1, 2024
f614ebd
fix: Add lazy imports due to minimal requirements
AlejandroFernandezLuces Jul 1, 2024
63ad5dd
Merge branch 'feat/common-plotter' of https://github.com/pyansys/pyma…
AlejandroFernandezLuces Jul 1, 2024
758f721
fix: Parameter issues
AlejandroFernandezLuces Jul 1, 2024
7603612
fix: Add kwargs to plot
AlejandroFernandezLuces Jul 1, 2024
21699e0
fix: remove theme import from core
AlejandroFernandezLuces Jul 1, 2024
bfbfab4
fix: core init
AlejandroFernandezLuces Jul 1, 2024
e7d88cd
fix: Separate consts
AlejandroFernandezLuces Jul 1, 2024
5789619
fix: Consts
AlejandroFernandezLuces Jul 1, 2024
d662951
fix: wrong method
AlejandroFernandezLuces Jul 1, 2024
eafbca1
fix: Bug in screenshot
AlejandroFernandezLuces Jul 1, 2024
b4b60fa
fix: bug in assertion
AlejandroFernandezLuces Jul 1, 2024
6adf008
fix: multiple test fixes
AlejandroFernandezLuces Jul 1, 2024
917a637
fix: Warning no longer required
AlejandroFernandezLuces Jul 1, 2024
04abf6b
fix: plotter input test
AlejandroFernandezLuces Jul 1, 2024
91a59d5
Merge branch 'main' into feat/common-plotter
AlejandroFernandezLuces Jul 2, 2024
72a3786
fix: picking tests fixes
AlejandroFernandezLuces Jul 2, 2024
af81279
TEMP: Comment test
AlejandroFernandezLuces Jul 2, 2024
7489470
fix: type checking
AlejandroFernandezLuces Jul 2, 2024
bf5a08c
Update the image cache
AlejandroFernandezLuces Jul 2, 2024
34c39ee
fix: codacy issues
AlejandroFernandezLuces Jul 2, 2024
6fd5ab6
fix: Add missing docstrings
AlejandroFernandezLuces Jul 2, 2024
bce6ed2
fix: remove duplicated import
AlejandroFernandezLuces Jul 2, 2024
3afb0ef
fix: remove {} defaults
AlejandroFernandezLuces Jul 2, 2024
d42e330
tmp: remove failing test
AlejandroFernandezLuces Jul 2, 2024
e45ec30
fix: kwargs defaults
AlejandroFernandezLuces Jul 2, 2024
ee059f0
fix: default kwargs
AlejandroFernandezLuces Jul 2, 2024
8bdbee7
fix: remove pyvista dependencies
AlejandroFernandezLuces Jul 2, 2024
96aaa8e
fix: Remove uneeded plot and plot_iter
AlejandroFernandezLuces Jul 2, 2024
a1e3d1b
fix: Improve dependency management in tests
AlejandroFernandezLuces Jul 2, 2024
569b8fa
fix: Change requires pyvista to visualization tool
AlejandroFernandezLuces Jul 2, 2024
23b2891
fix: labels font
AlejandroFernandezLuces Jul 3, 2024
fa99f25
fix: Use @require_dependency decorator
AlejandroFernandezLuces Jul 3, 2024
717a7f9
fix: revert unimplemented methods
AlejandroFernandezLuces Jul 3, 2024
f82d9aa
fix: Update cache
AlejandroFernandezLuces Jul 5, 2024
aa3e82e
fix: bug in legend check
AlejandroFernandezLuces Jul 5, 2024
7d4fcac
fix: Update cache
AlejandroFernandezLuces Jul 5, 2024
fd56b45
fix: requires import
AlejandroFernandezLuces Jul 5, 2024
ce18e94
Merge branch 'main' into feat/common-plotter
AlejandroFernandezLuces Jul 8, 2024
957ccb2
Update the image cache
AlejandroFernandezLuces Jul 8, 2024
90e24d1
fix: bug in picker
AlejandroFernandezLuces Jul 8, 2024
f092f56
Merge branch 'main' into feat/common-plotter
AlejandroFernandezLuces Jul 8, 2024
888f76f
doc: Change general_plotter to MapdlPlotter
AlejandroFernandezLuces Jul 8, 2024
c845e67
doc: Fix import in docs
AlejandroFernandezLuces Jul 8, 2024
fcfeca9
fix: Several small fixes
AlejandroFernandezLuces Jul 8, 2024
b02ccc4
Merge branch 'main' into feat/common-plotter
AlejandroFernandezLuces Jul 9, 2024
f0317e6
fix: Docstring test
AlejandroFernandezLuces Jul 9, 2024
887b9cd
Merge branch 'feat/common-plotter' of https://github.com/pyansys/pyma…
AlejandroFernandezLuces Jul 9, 2024
4911c23
Update the image cache
AlejandroFernandezLuces Jul 9, 2024
2205ec5
Merge branch 'main' into feat/common-plotter
germa89 Jul 9, 2024
3eee3f1
test: printing skipped tests
germa89 Jul 9, 2024
3348249
fix: pyvista requirements
germa89 Jul 9, 2024
548eb37
test: printing all output
germa89 Jul 9, 2024
d8caeee
Update the image cache
germa89 Jul 9, 2024
649d85f
Update pyproject.toml
AlejandroFernandezLuces Jul 9, 2024
95521ff
fix: revert pick test changes, revert hook deletion
AlejandroFernandezLuces Jul 9, 2024
c00f78d
Merge branch 'feat/common-plotter' of https://github.com/pyansys/pyma…
AlejandroFernandezLuces Jul 9, 2024
ba7201e
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 9, 2024
afff6bb
fix: Theme inheritance
AlejandroFernandezLuces Jul 9, 2024
74e5ad1
feat: fully support passing plotter
AlejandroFernandezLuces Jul 9, 2024
f772c4c
Merge branch 'feat/common-plotter' of https://github.com/pyansys/pyma…
AlejandroFernandezLuces Jul 9, 2024
2cee161
fix: bad indentation
AlejandroFernandezLuces Jul 9, 2024
f84d84a
Merge branch 'main' into feat/common-plotter
AlejandroFernandezLuces Jul 9, 2024
b4694dc
fix: Force arial in labels
AlejandroFernandezLuces Jul 9, 2024
eb3ea20
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 9, 2024
8668598
fix: pre-commit
AlejandroFernandezLuces Jul 9, 2024
9fce6e6
fix: Wrong legend
AlejandroFernandezLuces Jul 9, 2024
8477436
fix: update cache
AlejandroFernandezLuces Jul 9, 2024
47a71be
Merge branch 'feat/common-plotter' of https://github.com/pyansys/pyma…
AlejandroFernandezLuces Jul 9, 2024
1537d64
Merge branch 'main' into feat/common-plotter
AlejandroFernandezLuces Jul 10, 2024
be6ac17
Merge branch 'feat/common-plotter' of https://github.com/pyansys/pyma…
AlejandroFernandezLuces Jul 10, 2024
1e35d88
Update the image cache
AlejandroFernandezLuces Jul 10, 2024
b89260e
feat: Add support for passing PyVista plotters
AlejandroFernandezLuces Jul 10, 2024
8b061d5
fix: Force arial and reset cache
AlejandroFernandezLuces Jul 10, 2024
985540a
Update the image cache
AlejandroFernandezLuces Jul 10, 2024
8108eb5
fix: Add missing docstring
AlejandroFernandezLuces Jul 10, 2024
ab67575
Merge branch 'feat/common-plotter' of https://github.com/pyansys/pyma…
AlejandroFernandezLuces Jul 10, 2024
c614ce2
Merge branch 'main' into feat/common-plotter
AlejandroFernandezLuces Jul 10, 2024
d08506a
Merge branch 'main' into feat/common-plotter
AlejandroFernandezLuces Jul 10, 2024
db760f8
Merge branch 'main' into feat/common-plotter
AlejandroFernandezLuces Jul 15, 2024
4b8b25d
fix: Simplify plotter selection
AlejandroFernandezLuces Jul 15, 2024
9b44b00
Merge branch 'feat/common-plotter' of https://github.com/pyansys/pyma…
AlejandroFernandezLuces Jul 15, 2024
d2cacd7
fix: Delete unused return, fix changelog label
AlejandroFernandezLuces Jul 15, 2024
6bc7004
chore: adding changelog file 2799.dependencies.md
pyansys-ci-bot Jul 15, 2024
fe9a6a0
chore: adding changelog file 2799.added.md
pyansys-ci-bot Jul 15, 2024
7c3bbd4
Merge branch 'main' into feat/common-plotter
AlejandroFernandezLuces Jul 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from pathlib import Path
import warnings

import ansys.tools.visualization_interface as viz_interface
from ansys_sphinx_theme import ansys_favicon, get_version_match
import numpy as np
import pyvista
Expand All @@ -14,11 +15,15 @@
from ansys.mapdl import core as pymapdl
from ansys.mapdl.core import __version__

viz_interface.DOCUMENTATION_BUILD = True
pyvista.BUILDING_GALLERY = True
pyvista.OFF_SCREEN = True
AlejandroFernandezLuces marked this conversation as resolved.
Show resolved Hide resolved

# Manage errors
pyvista.set_error_output_file("errors.txt")

# Ensure that offscreen rendering is used for docs generation
pyvista.OFF_SCREEN = True
# pyvista.OFF_SCREEN = True
AlejandroFernandezLuces marked this conversation as resolved.
Show resolved Hide resolved

# must be less than or equal to the XVFB window size
try:
Expand Down
15 changes: 3 additions & 12 deletions examples/00-mapdl-examples/3d_notch.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,30 +88,21 @@
# plate_with_hole_anum = mapdl.asba(rect_anum, circ_anum)
cut_area = mapdl.asba(rect_anum, "ALL") # cut all areas except the plate

plotter = pv.Plotter(shape=(1, 3))

plotter.subplot(0, 0)
mapdl.lsla("S")
mapdl.lplot(vtk=True, show_keypoint_numbering=True, plotter=plotter)
mapdl.lplot(vtk=True, show_keypoint_numbering=True)
mapdl.lsel("all")

# plot the area using vtk/pyvista
plotter.subplot(0, 1)
mapdl.aplot(
vtk=True, show_area_numbering=True, show_lines=True, cpos="xy", plotter=plotter
)
mapdl.aplot(vtk=True, show_area_numbering=True, show_lines=True, cpos="xy")
AlejandroFernandezLuces marked this conversation as resolved.
Show resolved Hide resolved

# Next, extrude the area to create volume
thickness = 0.01
mapdl.vext(cut_area, dz=thickness)

# Checking volume plot
plotter.subplot(0, 2)
mapdl.vplot(
vtk=True, show_lines=True, show_axes=True, smooth_shading=True, plotter=plotter
)
mapdl.vplot(vtk=True, show_lines=True, show_axes=True, smooth_shading=True)

plotter.show()

###############################################################################
# Meshing
Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ dependencies = [
"ansys-mapdl-reader>=0.51.7",
"ansys-math-core>=0.1.2",
"ansys-platform-instancemanagement~=1.0",
"ansys-tools-visualization-interface>=0.2.6<0.3.0",
AlejandroFernandezLuces marked this conversation as resolved.
Show resolved Hide resolved
"platformdirs>=3.6.0",
"click>=8.1.3", # for CLI interface
"tabulate>=0.8.0", # for cli plotting
Expand Down Expand Up @@ -54,11 +55,11 @@ classifiers = [
jupyter = [
"jupyterlab>=3",
"ipywidgets",
"pyvista[jupyter]",
AlejandroFernandezLuces marked this conversation as resolved.
Show resolved Hide resolved
]

tests = [
"ansys-dpf-core==0.10.1",
"ansys-tools-visualization-interface==0.2.6",
"autopep8==2.2.0",
"matplotlib==3.9.0",
"scipy==1.13.1",
Expand All @@ -77,6 +78,7 @@ doc = [
"sphinx==7.3.7",
"ansys-dpf-core==0.10.1",
"ansys-mapdl-reader==0.53.0",
"ansys-tools-visualization-interface==0.2.6",
"ansys-sphinx-theme==0.16.5",
"grpcio==1.64.1",
"imageio-ffmpeg==0.5.1",
Expand Down
4 changes: 2 additions & 2 deletions src/ansys/mapdl/core/mapdl_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
from ansys.mapdl.core.xpl import ansXpl

if _HAS_PYVISTA:
from ansys.mapdl.core.plotting import get_meshes_from_plotter
from ansys.mapdl.core.plotting.plotting import get_meshes_from_plotter

from ansys.mapdl.core.post import PostProcessing

Expand Down Expand Up @@ -2501,7 +2501,7 @@ def gen_text(picked_entities=None):
return text + f"Current {entity} selection: {picked_entities_str}"

def callback_points(mesh, id_):
from ansys.mapdl.core.plotting import POINT_SIZE
from ansys.mapdl.core.plotting.plotting import POINT_SIZE

point = mesh.points[id_]
node_id = selector(
Expand Down
5 changes: 4 additions & 1 deletion src/ansys/mapdl/core/mapdl_extended.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@
from ansys.mapdl.core.theme import get_ansys_colors

if _HAS_PYVISTA:
from ansys.mapdl.core.plotting import general_plotter, get_meshes_from_plotter
from ansys.mapdl.core.plotting.plotting import (
general_plotter,
get_meshes_from_plotter,
)


class _MapdlCommandExtended(_MapdlCore):
Expand Down
2 changes: 1 addition & 1 deletion src/ansys/mapdl/core/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1168,7 +1168,7 @@ def wrapper(self, *args, **kwargs):
type_, item, comp, vmin, vmax, vinc, kabs, kwargs = _get_args_xsel(
*args, **kwargs
)
from ansys.mapdl.core.plotting import POINT_SIZE
from ansys.mapdl.core.plotting.plotting import POINT_SIZE

if item == "P" and _HAS_PYVISTA:
if type_ not in ["S", "R", "A", "U"]:
Expand Down
23 changes: 23 additions & 0 deletions src/ansys/mapdl/core/plotting/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright (C) 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.

from ansys.mapdl.core.plotting.plotting import *
Loading
Loading