ansys-mechanical-core 0.10.10__py3-none-any.whl → 0.11.12__py3-none-any.whl

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 (46) hide show
  1. ansys/mechanical/core/__init__.py +11 -4
  2. ansys/mechanical/core/_version.py +48 -47
  3. ansys/mechanical/core/embedding/__init__.py +1 -1
  4. ansys/mechanical/core/embedding/addins.py +1 -7
  5. ansys/mechanical/core/embedding/app.py +610 -281
  6. ansys/mechanical/core/embedding/app_libraries.py +24 -5
  7. ansys/mechanical/core/embedding/appdata.py +16 -4
  8. ansys/mechanical/core/embedding/background.py +106 -0
  9. ansys/mechanical/core/embedding/cleanup_gui.py +61 -0
  10. ansys/mechanical/core/embedding/enum_importer.py +2 -2
  11. ansys/mechanical/core/embedding/imports.py +27 -7
  12. ansys/mechanical/core/embedding/initializer.py +105 -53
  13. ansys/mechanical/core/embedding/loader.py +19 -9
  14. ansys/mechanical/core/embedding/logger/__init__.py +219 -216
  15. ansys/mechanical/core/embedding/logger/environ.py +1 -1
  16. ansys/mechanical/core/embedding/logger/linux_api.py +1 -1
  17. ansys/mechanical/core/embedding/logger/sinks.py +1 -1
  18. ansys/mechanical/core/embedding/logger/windows_api.py +2 -2
  19. ansys/mechanical/core/embedding/poster.py +38 -4
  20. ansys/mechanical/core/embedding/resolver.py +41 -44
  21. ansys/mechanical/core/embedding/runtime.py +1 -1
  22. ansys/mechanical/core/embedding/shims.py +9 -8
  23. ansys/mechanical/core/embedding/ui.py +228 -0
  24. ansys/mechanical/core/embedding/utils.py +1 -1
  25. ansys/mechanical/core/embedding/viz/__init__.py +1 -1
  26. ansys/mechanical/core/embedding/viz/{pyvista_plotter.py → embedding_plotter.py} +24 -8
  27. ansys/mechanical/core/embedding/viz/usd_converter.py +59 -25
  28. ansys/mechanical/core/embedding/viz/utils.py +32 -2
  29. ansys/mechanical/core/embedding/warnings.py +1 -1
  30. ansys/mechanical/core/errors.py +2 -1
  31. ansys/mechanical/core/examples/__init__.py +1 -1
  32. ansys/mechanical/core/examples/downloads.py +10 -5
  33. ansys/mechanical/core/feature_flags.py +51 -0
  34. ansys/mechanical/core/ide_config.py +212 -0
  35. ansys/mechanical/core/launcher.py +9 -9
  36. ansys/mechanical/core/logging.py +14 -2
  37. ansys/mechanical/core/mechanical.py +2324 -2237
  38. ansys/mechanical/core/misc.py +176 -176
  39. ansys/mechanical/core/pool.py +712 -712
  40. ansys/mechanical/core/run.py +321 -246
  41. {ansys_mechanical_core-0.10.10.dist-info → ansys_mechanical_core-0.11.12.dist-info}/LICENSE +7 -7
  42. {ansys_mechanical_core-0.10.10.dist-info → ansys_mechanical_core-0.11.12.dist-info}/METADATA +57 -56
  43. ansys_mechanical_core-0.11.12.dist-info/RECORD +45 -0
  44. {ansys_mechanical_core-0.10.10.dist-info → ansys_mechanical_core-0.11.12.dist-info}/WHEEL +1 -1
  45. {ansys_mechanical_core-0.10.10.dist-info → ansys_mechanical_core-0.11.12.dist-info}/entry_points.txt +1 -0
  46. ansys_mechanical_core-0.10.10.dist-info/RECORD +0 -40
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates.
1
+ # Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates.
2
2
  # SPDX-License-Identifier: MIT
3
3
  #
4
4
  #
@@ -27,25 +27,30 @@ import os
27
27
  from ansys.tools.path import find_mechanical
28
28
  import appdirs
29
29
 
30
- # Setup data directory
31
30
  USER_DATA_PATH = appdirs.user_data_dir(appname="ansys_mechanical_core", appauthor="Ansys")
31
+ """User data directory."""
32
+
32
33
  if not os.path.exists(USER_DATA_PATH):
33
34
  os.makedirs(USER_DATA_PATH)
34
35
 
35
36
  EXAMPLES_PATH = os.path.join(USER_DATA_PATH, "examples")
37
+ """Examples path."""
38
+
36
39
  if not os.path.exists(EXAMPLES_PATH):
37
40
  os.makedirs(EXAMPLES_PATH)
38
41
 
39
42
  from ansys.mechanical.core.logging import Logger
40
43
 
41
- # Create logger for package level use
42
44
  LOG = Logger(level=logging.ERROR, to_file=False, to_stdout=True)
45
+ """Create logger for package level use."""
46
+
43
47
  LOG.debug("Loaded logging module as LOG")
44
48
 
45
49
  from ansys.mechanical.core._version import __version__
46
50
  from ansys.mechanical.core.mechanical import (
47
51
  change_default_mechanical_path,
48
52
  close_all_local_instances,
53
+ connect_to_mechanical,
49
54
  get_mechanical_path,
50
55
  launch_mechanical,
51
56
  )
@@ -57,12 +62,14 @@ try:
57
62
  from ansys.mechanical.core.embedding import App, global_variables
58
63
 
59
64
  HAS_EMBEDDING = True
65
+ """Whether or not Mechanical embedding is being used."""
60
66
  except:
61
67
  HAS_EMBEDDING = False
62
68
 
63
- # manage the package level ports
64
69
  LOCAL_PORTS = []
70
+ """Manage the package level ports."""
65
71
 
66
72
  from ansys.mechanical.core.pool import LocalMechanicalPool
67
73
 
68
74
  BUILDING_GALLERY = False
75
+ """Whether or not to build gallery examples."""
@@ -1,47 +1,48 @@
1
- # Copyright (C) 2022 - 2024 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
- """Version of ansys-mechanical-core module.
24
-
25
- On the ``main`` branch, use 'dev0' to denote a development version.
26
- For example:
27
-
28
- # major, minor, patch
29
- version_info = 0, 58, 'dev0'
30
-
31
- """
32
-
33
- try:
34
- import importlib.metadata as importlib_metadata
35
- except ModuleNotFoundError: # pragma: no cover
36
- import importlib_metadata
37
-
38
- # Read from the pyproject.toml
39
- # major, minor, patch
40
- __version__ = importlib_metadata.version("ansys-mechanical-core")
41
-
42
- # In descending order
43
- SUPPORTED_MECHANICAL_VERSIONS = {
44
- 241: "2024R1",
45
- 232: "2023R2",
46
- 231: "2023R1",
47
- }
1
+ # Copyright (C) 2022 - 2025 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
+ """Version of ansys-mechanical-core module.
24
+
25
+ On the ``main`` branch, use 'dev0' to denote a development version.
26
+ For example:
27
+
28
+ # major, minor, patch
29
+ version_info = 0, 58, 'dev0'
30
+
31
+ """
32
+
33
+ try:
34
+ import importlib.metadata as importlib_metadata
35
+ except ModuleNotFoundError: # pragma: no cover
36
+ import importlib_metadata
37
+
38
+ # Read from the pyproject.toml
39
+ # major, minor, patch
40
+ __version__ = importlib_metadata.version("ansys-mechanical-core")
41
+
42
+ SUPPORTED_MECHANICAL_VERSIONS = {
43
+ 251: "2025R1",
44
+ 242: "2024R2",
45
+ 241: "2024R1",
46
+ 232: "2023R2",
47
+ }
48
+ """Supported mechanical versions in descending order."""
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates.
1
+ # Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates.
2
2
  # SPDX-License-Identifier: MIT
3
3
  #
4
4
  #
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates.
1
+ # Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates.
2
2
  # SPDX-License-Identifier: MIT
3
3
  #
4
4
  #
@@ -52,9 +52,3 @@ class AddinConfiguration:
52
52
  @addin_configuration.setter
53
53
  def addin_configuration(self, value: str):
54
54
  self._addin_configuration = value
55
-
56
-
57
- def configure(configuration: AddinConfiguration):
58
- """Apply the given configuration."""
59
- if configuration.no_act_addins:
60
- os.environ["ANSYS_MECHANICAL_STANDALONE_NO_ACT_EXTENSIONS"] = "1"