ansys-mechanical-core 0.11.9__py3-none-any.whl → 0.11.11__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 +2 -1
  2. ansys/mechanical/core/_version.py +1 -1
  3. ansys/mechanical/core/embedding/__init__.py +1 -1
  4. ansys/mechanical/core/embedding/addins.py +1 -1
  5. ansys/mechanical/core/embedding/app.py +143 -52
  6. ansys/mechanical/core/embedding/app_libraries.py +2 -2
  7. ansys/mechanical/core/embedding/appdata.py +6 -5
  8. ansys/mechanical/core/embedding/background.py +5 -5
  9. ansys/mechanical/core/embedding/cleanup_gui.py +1 -1
  10. ansys/mechanical/core/embedding/enum_importer.py +1 -1
  11. ansys/mechanical/core/embedding/imports.py +1 -1
  12. ansys/mechanical/core/embedding/initializer.py +11 -12
  13. ansys/mechanical/core/embedding/loader.py +1 -1
  14. ansys/mechanical/core/embedding/logger/__init__.py +5 -5
  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 +1 -1
  20. ansys/mechanical/core/embedding/resolver.py +1 -1
  21. ansys/mechanical/core/embedding/runtime.py +1 -1
  22. ansys/mechanical/core/embedding/shims.py +1 -1
  23. ansys/mechanical/core/embedding/ui.py +2 -2
  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/embedding_plotter.py +1 -1
  27. ansys/mechanical/core/embedding/viz/usd_converter.py +1 -1
  28. ansys/mechanical/core/embedding/viz/utils.py +1 -1
  29. ansys/mechanical/core/embedding/warnings.py +1 -1
  30. ansys/mechanical/core/errors.py +1 -1
  31. ansys/mechanical/core/examples/__init__.py +1 -1
  32. ansys/mechanical/core/examples/downloads.py +1 -1
  33. ansys/mechanical/core/feature_flags.py +1 -1
  34. ansys/mechanical/core/ide_config.py +1 -1
  35. ansys/mechanical/core/launcher.py +1 -1
  36. ansys/mechanical/core/logging.py +1 -1
  37. ansys/mechanical/core/mechanical.py +92 -12
  38. ansys/mechanical/core/misc.py +2 -2
  39. ansys/mechanical/core/pool.py +4 -4
  40. ansys/mechanical/core/run.py +2 -2
  41. {ansys_mechanical_core-0.11.9.dist-info → ansys_mechanical_core-0.11.11.dist-info}/LICENSE +1 -1
  42. {ansys_mechanical_core-0.11.9.dist-info → ansys_mechanical_core-0.11.11.dist-info}/METADATA +16 -15
  43. ansys_mechanical_core-0.11.11.dist-info/RECORD +45 -0
  44. {ansys_mechanical_core-0.11.9.dist-info → ansys_mechanical_core-0.11.11.dist-info}/WHEEL +1 -1
  45. ansys_mechanical_core-0.11.9.dist-info/RECORD +0 -45
  46. {ansys_mechanical_core-0.11.9.dist-info → ansys_mechanical_core-0.11.11.dist-info}/entry_points.txt +0 -0
@@ -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
  #
@@ -50,6 +50,7 @@ from ansys.mechanical.core._version import __version__
50
50
  from ansys.mechanical.core.mechanical import (
51
51
  change_default_mechanical_path,
52
52
  close_all_local_instances,
53
+ connect_to_mechanical,
53
54
  get_mechanical_path,
54
55
  launch_mechanical,
55
56
  )
@@ -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
  #
@@ -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
  #
@@ -25,6 +25,7 @@ from __future__ import annotations
25
25
 
26
26
  import atexit
27
27
  import os
28
+ from pathlib import Path
28
29
  import shutil
29
30
  import typing
30
31
  import warnings
@@ -47,7 +48,7 @@ try:
47
48
 
48
49
  HAS_ANSYS_VIZ = True
49
50
  """Whether or not PyVista exists."""
50
- except:
51
+ except ImportError:
51
52
  HAS_ANSYS_VIZ = False
52
53
 
53
54
 
@@ -112,18 +113,45 @@ class GetterWrapper(object):
112
113
 
113
114
 
114
115
  class App:
115
- """Mechanical embedding Application."""
116
+ """Mechanical embedding Application.
116
117
 
117
- def __init__(self, db_file=None, private_appdata=False, **kwargs):
118
- """Construct an instance of the mechanical Application.
118
+ Parameters
119
+ ----------
120
+ db_file : str, optional
121
+ Path to a mechanical database file (.mechdat or .mechdb).
122
+ version : int, optional
123
+ Version number of the Mechanical application.
124
+ private_appdata : bool, optional
125
+ Setting for a temporary AppData directory. Default is False.
126
+ Enables running parallel instances of Mechanical.
127
+ config : AddinConfiguration, optional
128
+ Configuration for addins. By default "Mechanical" is used and ACT Addins are disabled.
129
+ copy_profile : bool, optional
130
+ Whether to copy the user profile when private_appdata is True. Default is True.
119
131
 
120
- db_file is an optional path to a mechanical database file (.mechdat or .mechdb)
121
- you may set a version number with the `version` keyword argument.
132
+ Examples
133
+ --------
134
+ Create App with Mechanical project file and version:
122
135
 
123
- private_appdata is an optional setting for a temporary AppData directory.
124
- By default, private_appdata is False. This enables you to run parallel
125
- instances of Mechanical.
126
- """
136
+ >>> from ansys.mechanical.core import App
137
+ >>> app = App(db_file="path/to/file.mechdat", version=241, pri)
138
+
139
+
140
+ Disable copying the user profile when private appdata is enabled
141
+
142
+ >>> app = App(private_appdata=True, copy_profile=False)
143
+
144
+ Create App with "Mechanical" configuration and no ACT Addins
145
+
146
+ >>> from ansys.mechanical.core.embedding import AddinConfiguration
147
+ >>> from ansys.mechanical.core import App
148
+ >>> config = AddinConfiguration("Mechanical")
149
+ >>> config.no_act_addins = True
150
+ >>> app = App(config=config)
151
+ """
152
+
153
+ def __init__(self, db_file=None, private_appdata=False, **kwargs):
154
+ """Construct an instance of the mechanical Application."""
127
155
  global INSTANCES
128
156
  from ansys.mechanical.core import BUILDING_GALLERY
129
157
 
@@ -131,18 +159,26 @@ class App:
131
159
  if len(INSTANCES) != 0:
132
160
  instance: App = INSTANCES[0]
133
161
  instance._share(self)
134
- if db_file != None:
162
+ if db_file is not None:
135
163
  self.open(db_file)
136
164
  return
137
165
  if len(INSTANCES) > 0:
138
166
  raise Exception("Cannot have more than one embedded mechanical instance!")
139
167
  version = kwargs.get("version")
168
+ if version is not None:
169
+ try:
170
+ version = int(version)
171
+ except ValueError:
172
+ raise ValueError(
173
+ "The version must be an integer or of type that can be converted to an integer."
174
+ )
140
175
  self._version = initializer.initialize(version)
141
176
  configuration = kwargs.get("config", _get_default_addin_configuration())
142
177
 
143
178
  if private_appdata:
179
+ copy_profile = kwargs.get("copy_profile", True)
144
180
  new_profile_name = f"PyMechanical-{os.getpid()}"
145
- profile = UniqueUserProfile(new_profile_name)
181
+ profile = UniqueUserProfile(new_profile_name, copy_profile=copy_profile)
146
182
  profile.update_environment(os.environ)
147
183
  atexit.register(_cleanup_private_appdata, profile)
148
184
 
@@ -159,8 +195,6 @@ class App:
159
195
 
160
196
  def __repr__(self):
161
197
  """Get the product info."""
162
- if self._version < 232: # pragma: no cover
163
- return "Ansys Mechanical"
164
198
  import clr
165
199
 
166
200
  clr.AddReference("Ansys.Mechanical.Application")
@@ -184,8 +218,28 @@ class App:
184
218
  self._app.Dispose()
185
219
  self._disposed = True
186
220
 
187
- def open(self, db_file):
188
- """Open the db file."""
221
+ def open(self, db_file, remove_lock=False):
222
+ """Open the db file.
223
+
224
+ Parameters
225
+ ----------
226
+ db_file : str
227
+ Path to a Mechanical database file (.mechdat or .mechdb).
228
+ remove_lock : bool, optional
229
+ Whether or not to remove the lock file if it exists before opening the project file.
230
+ """
231
+ if remove_lock:
232
+ lock_file = Path(self.DataModel.Project.ProjectDirectory) / ".mech_lock"
233
+ # Remove the lock file if it exists before opening the project file
234
+ if lock_file.exists():
235
+ warnings.warn(
236
+ f"Removing the lock file, {lock_file}, before opening the project. \
237
+ This may corrupt the project file.",
238
+ UserWarning,
239
+ stacklevel=2,
240
+ )
241
+ lock_file.unlink()
242
+
189
243
  self.DataModel.Project.Open(db_file)
190
244
 
191
245
  def save(self, path=None):
@@ -196,18 +250,27 @@ class App:
196
250
  self.DataModel.Project.Save()
197
251
 
198
252
  def save_as(self, path: str, overwrite: bool = False):
199
- """Save the project as a new file.
253
+ """
254
+ Save the project as a new file.
200
255
 
201
- If the `overwrite` flag is enabled, the current saved file is temporarily moved
202
- to a backup location. The new file is then saved in its place. If the process fails,
203
- the backup file is restored to its original location.
256
+ If the `overwrite` flag is enabled, the current saved file is replaced with the new file.
204
257
 
205
258
  Parameters
206
259
  ----------
207
- path: int, optional
208
- The path where file needs to be saved.
209
- overwrite: bool, optional
260
+ path : str
261
+ The path where the file needs to be saved.
262
+ overwrite : bool, optional
210
263
  Whether the file should be overwritten if it already exists (default is False).
264
+
265
+ Raises
266
+ ------
267
+ Exception
268
+ If the file already exists at the specified path and `overwrite` is False.
269
+
270
+ Notes
271
+ -----
272
+ For version 232, if `overwrite` is True, the existing file and its associated directory
273
+ (if any) will be removed before saving the new file.
211
274
  """
212
275
  if not os.path.exists(path):
213
276
  self.DataModel.Project.SaveAs(path)
@@ -218,17 +281,19 @@ class App:
218
281
  f"File already exists in {path}, Use ``overwrite`` flag to "
219
282
  "replace the existing file."
220
283
  )
221
-
222
- file_name = os.path.basename(path)
223
- file_dir = os.path.dirname(path)
224
- associated_dir = os.path.join(file_dir, os.path.splitext(file_name)[0] + "_Mech_Files")
225
-
226
- # Remove existing files and associated folder
227
- os.remove(path)
228
- if os.path.exists(associated_dir):
229
- shutil.rmtree(associated_dir)
230
- # Save the new file
231
- self.DataModel.Project.SaveAs(path)
284
+ if self.version < 241: # pragma: no cover
285
+ file_name = os.path.basename(path)
286
+ file_dir = os.path.dirname(path)
287
+ associated_dir = os.path.join(file_dir, os.path.splitext(file_name)[0] + "_Mech_Files")
288
+
289
+ # Remove existing files and associated folder
290
+ os.remove(path)
291
+ if os.path.exists(associated_dir):
292
+ shutil.rmtree(associated_dir)
293
+ # Save the new file
294
+ self.DataModel.Project.SaveAs(path)
295
+ else:
296
+ self.DataModel.Project.SaveAs(path, overwrite)
232
297
 
233
298
  def launch_gui(self, delete_tmp_on_close: bool = True, dry_run: bool = False):
234
299
  """Launch the GUI."""
@@ -309,6 +374,13 @@ class App:
309
374
 
310
375
  Requires installation using the viz option. E.g.
311
376
  pip install ansys-mechanical-core[viz]
377
+
378
+ Examples
379
+ --------
380
+ >>> from ansys.mechanical.core import App
381
+ >>> app = App()
382
+ >>> app.open("path/to/file.mechdat")
383
+ >>> app.plot()
312
384
  """
313
385
  _plotter = self.plotter()
314
386
 
@@ -320,12 +392,12 @@ class App:
320
392
  @property
321
393
  def poster(self) -> Poster:
322
394
  """Returns an instance of Poster."""
323
- if self._poster == None:
395
+ if self._poster is None:
324
396
  self._poster = Poster()
325
397
  return self._poster
326
398
 
327
399
  @property
328
- def DataModel(self):
400
+ def DataModel(self) -> Ansys.Mechanical.DataModel.Interfaces.DataModelObject:
329
401
  """Return the DataModel."""
330
402
  return GetterWrapper(self._app, lambda app: app.DataModel)
331
403
 
@@ -361,6 +433,11 @@ class App:
361
433
  """Returns the version of the app."""
362
434
  return self._version
363
435
 
436
+ @property
437
+ def project_directory(self):
438
+ """Returns the current project directory."""
439
+ return self.DataModel.Project.ProjectDirectory
440
+
364
441
  def _share(self, other) -> None:
365
442
  """Shares the state of self with other.
366
443
 
@@ -413,15 +490,20 @@ class App:
413
490
  def update_globals(
414
491
  self, globals_dict: typing.Dict[str, typing.Any], enums: bool = True
415
492
  ) -> None:
416
- """Use to update globals variables.
493
+ """Update global variables.
417
494
 
418
- When scripting inside Mechanical, the Mechanical UI will automatically
419
- set global variables in python. PyMechanical can not do that automatically,
495
+ When scripting inside Mechanical, the Mechanical UI automatically
496
+ sets global variables in Python. PyMechanical cannot do that automatically,
420
497
  but this method can be used.
421
- `app.update_globals(globals())`
422
498
 
423
499
  By default, all enums will be imported too. To avoid including enums, set
424
500
  the `enums` argument to False.
501
+
502
+ Examples
503
+ --------
504
+ >>> from ansys.mechanical.core import App
505
+ >>> app = App()
506
+ >>> app.update_globals(globals())
425
507
  """
426
508
  self._updated_scopes.append(globals_dict)
427
509
  globals_dict.update(global_variables(self, enums))
@@ -456,6 +538,15 @@ class App:
456
538
  node_name = node.Name
457
539
  if hasattr(node, "Suppressed") and node.Suppressed is True:
458
540
  node_name += " (Suppressed)"
541
+ if hasattr(node, "ObjectState"):
542
+ if str(node.ObjectState) == "UnderDefined":
543
+ node_name += " (?)"
544
+ elif str(node.ObjectState) == "Solved" or str(node.ObjectState) == "FullyDefined":
545
+ node_name += " (✓)"
546
+ elif str(node.ObjectState) == "NotSolved" or str(node.ObjectState) == "Obsolete":
547
+ node_name += " (⚡︎)"
548
+ elif str(node.ObjectState) == "SolveFailed":
549
+ node_name += " (✕)"
459
550
  print(f"{indentation}├── {node_name}")
460
551
  lines_count += 1
461
552
 
@@ -489,24 +580,24 @@ class App:
489
580
 
490
581
  Examples
491
582
  --------
492
- >>> import ansys.mechanical.core as mech
493
- >>> app = mech.App()
583
+ >>> from ansys.mechanical.core import App
584
+ >>> app = App()
494
585
  >>> app.update_globals(globals())
495
586
  >>> app.print_tree()
496
587
  ... ├── Project
497
588
  ... | ├── Model
498
- ... | | ├── Geometry Imports
499
- ... | | ├── Geometry
500
- ... | | ├── Materials
501
- ... | | ├── Coordinate Systems
502
- ... | | | ├── Global Coordinate System
503
- ... | | ├── Remote Points
504
- ... | | ├── Mesh
589
+ ... | | ├── Geometry Imports (⚡︎)
590
+ ... | | ├── Geometry (?)
591
+ ... | | ├── Materials (✓)
592
+ ... | | ├── Coordinate Systems (✓)
593
+ ... | | | ├── Global Coordinate System (✓)
594
+ ... | | ├── Remote Points (✓)
595
+ ... | | ├── Mesh (?)
505
596
 
506
597
  >>> app.print_tree(Model, 3)
507
598
  ... ├── Model
508
- ... | ├── Geometry Imports
509
- ... | ├── Geometry
599
+ ... | ├── Geometry Imports (⚡︎)
600
+ ... | ├── Geometry (?)
510
601
  ... ... truncating after 3 lines
511
602
 
512
603
  >>> app.print_tree(max_lines=2)
@@ -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
  #
@@ -74,7 +74,7 @@ def add_mechanical_python_libraries(app_or_version):
74
74
  elif isinstance(app_or_version, App):
75
75
  installdir.append(os.environ[f"AWP_ROOT{app_or_version.version}"])
76
76
  else:
77
- raise ValueError(f"Invalid input: expected an integer (version) or an instance of App().")
77
+ raise ValueError("Invalid input: expected an integer (version) or an instance of App().")
78
78
 
79
79
  location = os.path.join(installdir[0], "Addins", "ACT", "libraries", "Mechanical")
80
80
  sys.path.append(location)
@@ -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
  #
@@ -31,26 +31,27 @@ import warnings
31
31
  class UniqueUserProfile:
32
32
  """Create Unique User Profile (for AppData)."""
33
33
 
34
- def __init__(self, profile_name: str, dry_run: bool = False):
34
+ def __init__(self, profile_name: str, copy_profile: bool = True, dry_run: bool = False):
35
35
  """Initialize UniqueUserProfile class."""
36
36
  self._default_profile = os.path.expanduser("~")
37
37
  self._location = os.path.join(self._default_profile, "PyMechanical-AppData", profile_name)
38
38
  self._dry_run = dry_run
39
+ self.copy_profile = copy_profile
39
40
  self.initialize()
40
41
 
41
- def initialize(self, copy_profiles=True) -> None:
42
+ def initialize(self) -> None:
42
43
  """
43
44
  Initialize the new profile location.
44
45
 
45
46
  Args:
46
- copy_profiles (bool): If False, the copy_profiles method will be skipped.
47
+ copy_profile (bool): If False, the copy_profile method will be skipped.
47
48
  """
48
49
  if self._dry_run:
49
50
  return
50
51
  if self.exists():
51
52
  self.cleanup()
52
53
  self.mkdirs()
53
- if copy_profiles:
54
+ if self.copy_profile:
54
55
  self.copy_profiles()
55
56
 
56
57
  def cleanup(self) -> None:
@@ -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
  #
@@ -28,6 +28,7 @@ import time
28
28
  import typing
29
29
 
30
30
  import ansys.mechanical.core as mech
31
+ from ansys.mechanical.core.embedding import initializer
31
32
  from ansys.mechanical.core.embedding.poster import Poster
32
33
  import ansys.mechanical.core.embedding.utils as utils
33
34
 
@@ -35,7 +36,6 @@ import ansys.mechanical.core.embedding.utils as utils
35
36
  def _exit(background_app: "BackgroundApp"):
36
37
  """Stop the thread serving the Background App."""
37
38
  background_app.stop()
38
- atexit.unregister(_exit)
39
39
 
40
40
 
41
41
  class BackgroundApp:
@@ -49,7 +49,8 @@ class BackgroundApp:
49
49
 
50
50
  def __init__(self, **kwargs):
51
51
  """Construct an instance of BackgroundApp."""
52
- if BackgroundApp.__app_thread == None:
52
+ if BackgroundApp.__app_thread is None:
53
+ initializer.initialize(kwargs.get("version"))
53
54
  BackgroundApp.__app_thread = threading.Thread(
54
55
  target=self._start_app, kwargs=kwargs, daemon=True
55
56
  )
@@ -67,8 +68,6 @@ class BackgroundApp:
67
68
 
68
69
  self.post(new)
69
70
 
70
- atexit.register(_exit, self)
71
-
72
71
  @property
73
72
  def app(self) -> mech.App:
74
73
  """Get the App instance of the background thread.
@@ -96,6 +95,7 @@ class BackgroundApp:
96
95
  def _start_app(self, **kwargs) -> None:
97
96
  BackgroundApp.__app = mech.App(**kwargs)
98
97
  BackgroundApp.__poster = BackgroundApp.__app.poster
98
+ atexit.register(_exit, self)
99
99
  while True:
100
100
  if BackgroundApp.__stop_signaled:
101
101
  break
@@ -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
  #
@@ -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
  #
@@ -138,7 +138,7 @@ def __is_lib_loaded(libname: str): # pragma: no cover
138
138
  RTLD_NOLOAD = 4
139
139
  try:
140
140
  ctypes.CDLL(libname, RTLD_NOLOAD)
141
- except:
141
+ except OSError:
142
142
  return False
143
143
  return True
144
144
 
@@ -162,24 +162,22 @@ def __check_loaded_libs(version: int = None): # pragma: no cover
162
162
 
163
163
  def initialize(version: int = None):
164
164
  """Initialize Mechanical embedding."""
165
- __check_python_interpreter_architecture() # blocks 32 bit python
166
- __check_for_mechanical_env() # checks for mechanical-env in linux embedding
167
-
168
165
  global INITIALIZED_VERSION
166
+ if version is None:
167
+ version = _get_latest_default_version()
168
+
169
+ version = __check_for_supported_version(version=version)
170
+
169
171
  if INITIALIZED_VERSION is not None:
170
172
  if INITIALIZED_VERSION != version:
171
173
  raise ValueError(
172
174
  f"Initialized version {INITIALIZED_VERSION} "
173
175
  f"does not match the expected version {version}."
174
176
  )
175
- return
177
+ return INITIALIZED_VERSION
176
178
 
177
- if version == None:
178
- version = _get_latest_default_version()
179
-
180
- version = __check_for_supported_version(version=version)
181
-
182
- INITIALIZED_VERSION = version
179
+ __check_python_interpreter_architecture() # blocks 32 bit python
180
+ __check_for_mechanical_env() # checks for mechanical-env in linux embedding
183
181
 
184
182
  __set_environment(version)
185
183
 
@@ -212,4 +210,5 @@ def initialize(version: int = None):
212
210
  # attach the resolver
213
211
  resolve(version)
214
212
 
213
+ INITIALIZED_VERSION = version
215
214
  return version
@@ -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
  #
@@ -78,7 +78,7 @@ def _get_backend() -> (
78
78
  Actually logging a message or flushing the log only works after initializing.
79
79
  """
80
80
  # TODO - use abc instead of a union type?
81
- embedding_initialized = initializer.INITIALIZED_VERSION != None
81
+ embedding_initialized = initializer.INITIALIZED_VERSION is not None
82
82
  if not embedding_initialized:
83
83
  return environ.EnvironBackend()
84
84
  if os.name == "nt":
@@ -115,7 +115,7 @@ class Configuration:
115
115
 
116
116
  # Set up the sink-specific log configuration and store to global state.
117
117
  cls._store_stdout_sink_enabled(to_stdout)
118
- file_sink_enabled = directory != None or base_directory != None
118
+ file_sink_enabled = directory is not None or base_directory is not None
119
119
  cls._store_file_sink_enabled(file_sink_enabled)
120
120
 
121
121
  # Commit the sink-specific log configuration global state to the backend.
@@ -144,14 +144,14 @@ class Configuration:
144
144
  @classmethod
145
145
  def set_log_directory(cls, value: str) -> None:
146
146
  """Configure logging to write to a directory."""
147
- if value == None:
147
+ if value is None:
148
148
  return
149
149
  _get_backend().set_directory(value)
150
150
 
151
151
  @classmethod
152
152
  def set_log_base_directory(cls, directory: str) -> None:
153
153
  """Configure logging to write in a time-stamped subfolder in this directory."""
154
- if directory == None:
154
+ if directory is None:
155
155
  return
156
156
  _get_backend().set_base_directory(directory)
157
157
 
@@ -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
  #
@@ -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
  #
@@ -41,7 +41,7 @@ def _get_logger():
41
41
  import Ansys
42
42
 
43
43
  return Ansys.Common.WB1ManagedUtils.Logger
44
- except:
44
+ except (ImportError, RuntimeError):
45
45
  raise Exception("Logging cannot be used until after Mechanical embedding is initialized.")
46
46
 
47
47
 
@@ -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
  #
@@ -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
  #
@@ -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
  #
@@ -59,7 +59,7 @@ class UILauncher:
59
59
  A Mechanical embedding application.
60
60
  """
61
61
  # Identify the mechdb of the saved session from save_original()
62
- project_directory = Path(app.DataModel.Project.ProjectDirectory)
62
+ project_directory = Path(app.project_directory)
63
63
  project_directory_parent = project_directory.parent
64
64
  mechdb_file = (
65
65
  project_directory_parent / f"{project_directory.parts[-1].split('_')[0]}.mechdb"
@@ -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
  #
@@ -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
  #
@@ -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
  #
@@ -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
  #
@@ -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
  #
@@ -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
  #
@@ -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
  #
@@ -243,7 +243,7 @@ def check_valid_mechanical():
243
243
 
244
244
  """
245
245
  mechanical_path = atp.get_mechanical_path(False)
246
- if mechanical_path == None:
246
+ if mechanical_path is None:
247
247
  return False
248
248
  mechanical_version = atp.version_from_path("mechanical", mechanical_path)
249
249
  return not (mechanical_version < 232 and os.name != "posix")
@@ -444,14 +444,14 @@ class Mechanical(object):
444
444
  self._disable_logging = False
445
445
 
446
446
  if self._local:
447
- self.log_info(f"Mechanical connection is treated as local.")
447
+ self.log_info("Mechanical connection is treated as local.")
448
448
  else:
449
- self.log_info(f"Mechanical connection is treated as remote.")
449
+ self.log_info("Mechanical connection is treated as remote.")
450
450
 
451
451
  # connect and validate to the channel
452
452
  self._multi_connect(timeout=timeout)
453
453
 
454
- self.log_info("Mechanical is ready to accept grpc calls")
454
+ self.log_info("Mechanical is ready to accept grpc calls.")
455
455
 
456
456
  def __del__(self): # pragma: no cover
457
457
  """Clean up on exit."""
@@ -480,9 +480,8 @@ class Mechanical(object):
480
480
 
481
481
  >>> mechanical.version
482
482
  '242'
483
-
484
483
  """
485
- if self._version == None:
484
+ if self._version is None:
486
485
  try:
487
486
  self._disable_logging = True
488
487
  script = (
@@ -537,7 +536,6 @@ class Mechanical(object):
537
536
  timeout : float, optional
538
537
  Maximum allowable time in seconds for establishing a connection.
539
538
  The default is ``60``.
540
-
541
539
  """
542
540
  # This prevents a single failed connection from blocking other attempts
543
541
  connected = False
@@ -1399,7 +1397,7 @@ class Mechanical(object):
1399
1397
 
1400
1398
  if chunk_size > 4 * 1024 * 1024: # 4MB
1401
1399
  raise ValueError(
1402
- f"Chunk sizes bigger than 4 MB can generate unstable behaviour in PyMechanical. "
1400
+ "Chunk sizes bigger than 4 MB can generate unstable behaviour in PyMechanical. "
1403
1401
  "Decrease the ``chunk_size`` value."
1404
1402
  )
1405
1403
 
@@ -1518,8 +1516,8 @@ class Mechanical(object):
1518
1516
  if progress_bar:
1519
1517
  if not _HAS_TQDM: # pragma: no cover
1520
1518
  raise ModuleNotFoundError(
1521
- f"To use the keyword argument 'progress_bar', you need to have installed "
1522
- f"the 'tqdm' package.To avoid this message you can set 'progress_bar=False'."
1519
+ "To use the keyword argument 'progress_bar', you need to have installed "
1520
+ "the 'tqdm' package.To avoid this message you can set 'progress_bar=False'."
1523
1521
  )
1524
1522
 
1525
1523
  file_size = 0
@@ -1572,7 +1570,6 @@ class Mechanical(object):
1572
1570
  Download all the files in the project.
1573
1571
 
1574
1572
  >>> local_file_path_list = mechanical.download_project()
1575
-
1576
1573
  """
1577
1574
  destination_directory = target_dir.rstrip("\\/")
1578
1575
 
@@ -2242,3 +2239,86 @@ def launch_mechanical(
2242
2239
  raise exception
2243
2240
 
2244
2241
  return mechanical
2242
+
2243
+
2244
+ def connect_to_mechanical(
2245
+ ip=None,
2246
+ port=None,
2247
+ loglevel="ERROR",
2248
+ log_file=False,
2249
+ log_mechanical=None,
2250
+ connect_timeout=120,
2251
+ clear_on_connect=False,
2252
+ cleanup_on_exit=False,
2253
+ keep_connection_alive=True,
2254
+ ) -> Mechanical:
2255
+ """Connect to an existing Mechanical server instance.
2256
+
2257
+ Parameters
2258
+ ----------
2259
+ ip : str, optional
2260
+ IP address for connecting to an existing Mechanical instance. The
2261
+ IP address defaults to ``"127.0.0.1"``.
2262
+ port : int, optional
2263
+ Port to listen on for an existing Mechanical instance. The default is ``None``,
2264
+ in which case ``10000`` is used. You can override the
2265
+ default behavior of this parameter with the
2266
+ ``PYMECHANICAL_PORT=<VALID PORT>`` environment variable.
2267
+ loglevel : str, optional
2268
+ Level of messages to print to the console.
2269
+ Options are:
2270
+
2271
+ - ``"WARNING"``: Prints only Ansys warning messages.
2272
+ - ``"ERROR"``: Prints only Ansys error messages.
2273
+ - ``"INFO"``: Prints all Ansys messages.
2274
+
2275
+ The default is ``WARNING``.
2276
+ log_file : bool, optional
2277
+ Whether to copy the messages to a file named ``logs.log``, which is
2278
+ located where the Python script is executed. The default is ``False``.
2279
+ log_mechanical : str, optional
2280
+ Path to the output file on the local disk to write every script
2281
+ command to. The default is ``None``. However, you might set
2282
+ ``"log_mechanical='pymechanical_log.txt'"`` to write all commands that are
2283
+ sent to Mechanical via PyMechanical to this file. You can then use these
2284
+ commands to run a script within Mechanical without PyMechanical.
2285
+ connect_timeout : float, optional
2286
+ Maximum allowable time in seconds to connect to the Mechanical server.
2287
+ The default is ``120``.
2288
+ clear_on_connect : bool, optional
2289
+ Whether to clear the Mechanical instance when connecting. The default is ``False``.
2290
+ When ``True``, a fresh environment is provided when you connect to Mechanical.
2291
+ cleanup_on_exit : bool, optional
2292
+ Whether to exit Mechanical when Python exits. The default is ``False``.
2293
+ When ``False``, Mechanical is not exited when the garbage for this Mechanical
2294
+ instance is collected.
2295
+ keep_connection_alive : bool, optional
2296
+ Whether to keep the gRPC connection alive by running a background thread
2297
+ and making dummy calls for remote connections. The default is ``True``.
2298
+
2299
+ Returns
2300
+ -------
2301
+ ansys.mechanical.core.mechanical.Mechanical
2302
+ Instance of Mechanical.
2303
+
2304
+ Examples
2305
+ --------
2306
+ Connect to an existing Mechanical instance at IP address ``192.168.1.30`` on port
2307
+ ``50001``..
2308
+
2309
+
2310
+ >>> from ansys.mechanical.core import connect_to_mechanical
2311
+ >>> pymech = connect_to_mechanical(ip='192.168.1.30', port=50001)
2312
+ """
2313
+ return launch_mechanical(
2314
+ start_instance=False,
2315
+ loglevel=loglevel,
2316
+ log_file=log_file,
2317
+ log_mechanical=log_mechanical,
2318
+ start_timeout=connect_timeout,
2319
+ port=port,
2320
+ ip=ip,
2321
+ clear_on_connect=clear_on_connect,
2322
+ cleanup_on_exit=cleanup_on_exit,
2323
+ keep_connection_alive=keep_connection_alive,
2324
+ )
@@ -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
  #
@@ -150,7 +150,7 @@ def check_valid_start_instance(start_instance):
150
150
 
151
151
  if start_instance.lower() not in ["true", "false"]:
152
152
  raise ValueError(
153
- f"The value for 'start_instance' should be 'True' or 'False' (case insensitive)."
153
+ "The value for 'start_instance' should be 'True' or 'False' (case insensitive)."
154
154
  )
155
155
 
156
156
  return start_instance.lower() == "true"
@@ -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
  #
@@ -342,8 +342,8 @@ class LocalMechanicalPool:
342
342
  if progress_bar:
343
343
  if not _HAS_TQDM: # pragma: no cover
344
344
  raise ModuleNotFoundError(
345
- f"To use the keyword argument 'progress_bar', you must have installed "
346
- f"the 'tqdm' package. To avoid this message, you can set 'progress_bar=False'."
345
+ "To use the keyword argument 'progress_bar', you must have installed "
346
+ "the 'tqdm' package. To avoid this message, you can set 'progress_bar=False'."
347
347
  )
348
348
 
349
349
  pbar = tqdm(total=jobs_count, desc="Mechanical Running")
@@ -386,7 +386,7 @@ class LocalMechanicalPool:
386
386
  else:
387
387
  run_thread.join()
388
388
  if not complete[0]: # pragma: no cover
389
- LOG.error(f"Stopped instance because running failed.")
389
+ LOG.error("Stopped instance because running failed.")
390
390
  try:
391
391
  obj.exit()
392
392
  except Exception as e:
@@ -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
  #
@@ -172,7 +172,7 @@ def _cli_impl(
172
172
  profile: UniqueUserProfile = None
173
173
  if private_appdata:
174
174
  new_profile_name = f"Mechanical-{os.getpid()}"
175
- profile = UniqueUserProfile(new_profile_name, DRY_RUN)
175
+ profile = UniqueUserProfile(new_profile_name, dry_run=DRY_RUN)
176
176
  profile.update_environment(env)
177
177
 
178
178
  if not DRY_RUN:
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2022 - 2024 ANSYS, Inc. and/or its affiliates.
3
+ Copyright (c) 2022 - 2025 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
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.3
2
2
  Name: ansys-mechanical-core
3
- Version: 0.11.9
3
+ Version: 0.11.11
4
4
  Summary: A python wrapper for Ansys Mechanical
5
5
  Keywords: pymechanical,mechanical,ansys,pyansys
6
6
  Author-email: "ANSYS, Inc." <pyansys.core@ansys.com>
@@ -13,51 +13,52 @@ Classifier: Topic :: Scientific/Engineering :: Information Analysis
13
13
  Classifier: Programming Language :: Python :: 3.10
14
14
  Classifier: Programming Language :: Python :: 3.11
15
15
  Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
16
17
  Classifier: License :: OSI Approved :: MIT License
17
18
  Classifier: Operating System :: OS Independent
18
19
  Requires-Dist: ansys-api-mechanical==0.1.2
19
20
  Requires-Dist: ansys-mechanical-env==0.1.8
20
- Requires-Dist: ansys-mechanical-stubs==0.1.4
21
+ Requires-Dist: ansys-mechanical-stubs==0.1.5
21
22
  Requires-Dist: ansys-platform-instancemanagement>=1.0.1
22
23
  Requires-Dist: ansys-pythonnet>=3.1.0rc2
23
24
  Requires-Dist: ansys-tools-path>=0.3.1
24
25
  Requires-Dist: appdirs>=1.4.0
25
26
  Requires-Dist: click>=8.1.3
26
- Requires-Dist: clr-loader==0.2.6
27
+ Requires-Dist: clr-loader==0.2.7.post0
27
28
  Requires-Dist: grpcio>=1.30.0
28
29
  Requires-Dist: protobuf>=3.12.2,<6
29
- Requires-Dist: psutil==6.1.0
30
+ Requires-Dist: psutil==6.1.1
30
31
  Requires-Dist: tqdm>=4.45.0
31
32
  Requires-Dist: requests>=2,<3
32
33
  Requires-Dist: sphinx==8.1.3 ; extra == "doc"
33
- Requires-Dist: ansys-sphinx-theme[autoapi]==1.1.7 ; extra == "doc"
34
- Requires-Dist: grpcio==1.67.0 ; extra == "doc"
34
+ Requires-Dist: ansys-sphinx-theme[autoapi]==1.2.4 ; extra == "doc"
35
+ Requires-Dist: grpcio==1.69.0 ; extra == "doc"
35
36
  Requires-Dist: imageio-ffmpeg==0.5.1 ; extra == "doc"
36
- Requires-Dist: imageio==2.36.0 ; extra == "doc"
37
+ Requires-Dist: imageio==2.36.1 ; extra == "doc"
37
38
  Requires-Dist: jupyter_sphinx==0.5.3 ; extra == "doc"
38
39
  Requires-Dist: jupyterlab>=3.2.8 ; extra == "doc"
39
- Requires-Dist: matplotlib==3.9.2 ; extra == "doc"
40
- Requires-Dist: numpy==2.1.2 ; extra == "doc"
40
+ Requires-Dist: matplotlib==3.10.0 ; extra == "doc"
41
+ Requires-Dist: numpy==2.2.1 ; extra == "doc"
41
42
  Requires-Dist: numpydoc==1.8.0 ; extra == "doc"
42
43
  Requires-Dist: pandas==2.2.3 ; extra == "doc"
43
- Requires-Dist: panel==1.5.3 ; extra == "doc"
44
+ Requires-Dist: panel==1.5.5 ; extra == "doc"
44
45
  Requires-Dist: plotly==5.24.1 ; extra == "doc"
45
46
  Requires-Dist: pypandoc==1.14 ; extra == "doc"
46
47
  Requires-Dist: pytest-sphinx==0.6.3 ; extra == "doc"
47
48
  Requires-Dist: pythreejs==2.4.2 ; extra == "doc"
48
49
  Requires-Dist: pyvista>=0.39.1 ; extra == "doc"
49
50
  Requires-Dist: sphinx-autobuild==2024.10.3 ; extra == "doc"
50
- Requires-Dist: sphinx-autodoc-typehints==2.5.0 ; extra == "doc"
51
+ Requires-Dist: sphinx-autodoc-typehints==3.0.0 ; extra == "doc"
51
52
  Requires-Dist: sphinx-copybutton==0.5.2 ; extra == "doc"
52
53
  Requires-Dist: sphinx_design==0.6.1 ; extra == "doc"
53
54
  Requires-Dist: sphinx-gallery==0.18.0 ; extra == "doc"
54
55
  Requires-Dist: sphinx-notfound-page==1.0.4 ; extra == "doc"
55
56
  Requires-Dist: sphinxcontrib-websupport==2.0.0 ; extra == "doc"
56
57
  Requires-Dist: sphinxemoji==0.3.1 ; extra == "doc"
57
- Requires-Dist: pytest==8.3.3 ; extra == "tests"
58
- Requires-Dist: pytest-cov==5.0.0 ; extra == "tests"
58
+ Requires-Dist: pytest==8.3.4 ; extra == "tests"
59
+ Requires-Dist: pytest-cov==6.0.0 ; extra == "tests"
59
60
  Requires-Dist: pytest-print==1.0.2 ; extra == "tests"
60
- Requires-Dist: psutil==6.1.0 ; extra == "tests"
61
+ Requires-Dist: psutil==6.1.1 ; extra == "tests"
61
62
  Requires-Dist: ansys-tools-visualization-interface>=0.2.6 ; extra == "viz"
62
63
  Requires-Dist: usd-core==24.11 ; extra == "viz"
63
64
  Project-URL: Changelog, https://mechanical.docs.pyansys.com/version/stable/changelog.html
@@ -0,0 +1,45 @@
1
+ ansys/mechanical/core/__init__.py,sha256=u0OpMtxVeEO9GvfxzUN0yf0x3mtox0Gjn4f0kO1qk7A,2564
2
+ ansys/mechanical/core/_version.py,sha256=hjq2gRZGObk3YUw82klS7VNAmieL8GLFbuh0hd5gts4,1744
3
+ ansys/mechanical/core/errors.py,sha256=k0hJ89FwbFexLsjVApCbqfy2K7d-MekTPf3-QdtXZK4,4508
4
+ ansys/mechanical/core/feature_flags.py,sha256=W-0QFcMJ2UIcq61t-PpK0KJL6olrajPNAYvvQwO0HIc,2032
5
+ ansys/mechanical/core/ide_config.py,sha256=_csLQZN_AAVwLNa-eZiBY8kFXYpVCZb2jrGFYNDsM1s,7334
6
+ ansys/mechanical/core/launcher.py,sha256=Rd5kDcC58MZIjsk2d40Bx4qc0DVHzrYuNA3irDvsFKA,6675
7
+ ansys/mechanical/core/logging.py,sha256=TmIY5L-IrkyAQMKszotcbVCxyHLsMZQDAwbvcrSKwfs,24554
8
+ ansys/mechanical/core/mechanical.py,sha256=9ZiSL8QqjVqv-KyyLcwtkKA_7t-SfgPaypvgDW4HX6o,83198
9
+ ansys/mechanical/core/misc.py,sha256=KALlmizXJ2HPedvPba8nEvw1mMlakHTI3pIx7D-bu9E,5369
10
+ ansys/mechanical/core/pool.py,sha256=aDt0E3PjG9Yi-Z1AxHvZHbsALBqMqBLZcRlODoqes78,26583
11
+ ansys/mechanical/core/run.py,sha256=VNcKUYUomPb7UlCahBTXItTsVRTKQyMhRaBDG3IZsAQ,9928
12
+ ansys/mechanical/core/embedding/__init__.py,sha256=QAUe-offKZZDPz0IYBIUtYi4Dgt02_U93yTeSWXO9fU,1356
13
+ ansys/mechanical/core/embedding/addins.py,sha256=6n3wCaD36cBbXWCbpniuABgvW6uBSN6xYXA5KkNgfLg,2167
14
+ ansys/mechanical/core/embedding/app.py,sha256=K5vsTkm-_HbXgFB70XVB1vwZqDkSQyTvJwpePpFQZXI,22090
15
+ ansys/mechanical/core/embedding/app_libraries.py,sha256=_czRZ5cPwRo9SIZNitlgmBf2riLdzlGmmD4BJt9Nvng,2922
16
+ ansys/mechanical/core/embedding/appdata.py,sha256=98BYek_AKH5LaN5J3o8Mx8QDy23_6EpwKyBSiQpiu0E,4273
17
+ ansys/mechanical/core/embedding/background.py,sha256=MCE8MnVYLO49t2peJdmwI_PoLLjHHPXUkTgvtUm7SVQ,3815
18
+ ansys/mechanical/core/embedding/cleanup_gui.py,sha256=TEF3l4A7UxMacmlkUwBBymTdqM6h8Be9piID4Hpn_jg,2354
19
+ ansys/mechanical/core/embedding/enum_importer.py,sha256=tHSL5rjr3av_llISLqNnlAdo9llx4izudL-Kb82fpmU,1543
20
+ ansys/mechanical/core/embedding/imports.py,sha256=0_4Jtxa9ARxrfyCdiiJwXOPpId7nUVBIgSTGxDxq3lQ,4287
21
+ ansys/mechanical/core/embedding/initializer.py,sha256=A9YszopNAArxWmP7cgjPQOgWmt-ylkU1P_uTnCA3ZJ0,8052
22
+ ansys/mechanical/core/embedding/loader.py,sha256=e2KWBrVv5001MP6DPJWI0UwrEauUnlTLpz9X6WYFdhk,2503
23
+ ansys/mechanical/core/embedding/poster.py,sha256=5j5t3j6xZ4y2GRpBbEbhTfQT131dnnYvjeuAIawIhK8,2107
24
+ ansys/mechanical/core/embedding/resolver.py,sha256=UN_WELZADHOJoRu3TSb-ZEDxGPENqsoNO0J2KEpHls8,1878
25
+ ansys/mechanical/core/embedding/runtime.py,sha256=T0cikodMaI7mi1Xpa1dbLQIPZbz8SHfv7vammQT8A7Y,2285
26
+ ansys/mechanical/core/embedding/shims.py,sha256=LP5px-ED4JNbqFEpYnmBkGiGDdfDkLQ-v1tNnPbz3E8,1732
27
+ ansys/mechanical/core/embedding/ui.py,sha256=1XXkKSvui9iHKGqFROJQZMW-3iY-Hh2i1Ixq8Iav8cY,8480
28
+ ansys/mechanical/core/embedding/utils.py,sha256=7KSFCl9VM_WhrQEtI3Jc9OwhmH9wI7PH0n17ab_ytfo,1900
29
+ ansys/mechanical/core/embedding/warnings.py,sha256=Iyo95YOneMdCxOImXjnohhQZ86tD3xcnvJPUstlvHy0,3071
30
+ ansys/mechanical/core/embedding/logger/__init__.py,sha256=EiGGnYh9vHd7V4LhcxJiUMtppiUvQq7CEcf2AIX71t0,7998
31
+ ansys/mechanical/core/embedding/logger/environ.py,sha256=Jo9OEyag2ub_DIshxEX6Re8UzIrXCfmge5hFrn3exKk,5757
32
+ ansys/mechanical/core/embedding/logger/linux_api.py,sha256=wM95m4ArlF3gvqKFvKP7DzWWRHSngB3fe51D26CUD3Y,5988
33
+ ansys/mechanical/core/embedding/logger/sinks.py,sha256=-lAS-M7k3WHAblbrM7nzpOBJiCjN8e6i52GoEeQo_gE,1392
34
+ ansys/mechanical/core/embedding/logger/windows_api.py,sha256=GoFPfO-_umcCRAQeYrEdYQCTYpeNLB_IrY4hHh_LmTo,5276
35
+ ansys/mechanical/core/embedding/viz/__init__.py,sha256=KHZQAzlfgEVhi-G0msA6ca1o-2RecoNGzkpYfBIoCTA,1206
36
+ ansys/mechanical/core/embedding/viz/embedding_plotter.py,sha256=d2GjQiQgDHXfNTgETEIKRZYymkvB8-3KBHs7fF9PW_c,3689
37
+ ansys/mechanical/core/embedding/viz/usd_converter.py,sha256=kMKmGLThbWf7iR9bYn24mdmgKBkLDdkwdHrOokFvg_U,5329
38
+ ansys/mechanical/core/embedding/viz/utils.py,sha256=AYvp0okbEk3y9611eGAtvhgh65ytfpHkywVT7qk_liQ,3660
39
+ ansys/mechanical/core/examples/__init__.py,sha256=Y0T8CKmaALL3diLfhsz3opfBgckD85DfHdzDrVsSwzg,1267
40
+ ansys/mechanical/core/examples/downloads.py,sha256=5_Krq3HqVeAeD4z3dx9uujLk1u6rPFoAuwQus9eYWjg,4295
41
+ ansys_mechanical_core-0.11.11.dist-info/entry_points.txt,sha256=tErx6bIM27HGgwyM6ryyTUTw30Ab2F9J3FFkX2TPkhI,130
42
+ ansys_mechanical_core-0.11.11.dist-info/LICENSE,sha256=AVOPDv4UX26lKidhDvFf_fMR13Pr-n4wVAYSVyvD7Ww,1098
43
+ ansys_mechanical_core-0.11.11.dist-info/WHEEL,sha256=CpUCUxeHQbRN5UGRQHYRJorO5Af-Qy_fHMctcQ8DSGI,82
44
+ ansys_mechanical_core-0.11.11.dist-info/METADATA,sha256=41C5gBSkuaE04tt7101vmKq2IihMqsAzIEMGw9d4MUI,9946
45
+ ansys_mechanical_core-0.11.11.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: flit 3.9.0
2
+ Generator: flit 3.10.1
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,45 +0,0 @@
1
- ansys/mechanical/core/__init__.py,sha256=91oPPatmqRyry_kzusIq522MQNiBgN5Of54zDMIuJ58,2537
2
- ansys/mechanical/core/_version.py,sha256=V2aPQlSX4bCe1N1hLIkQaed84WN4s9wl6Q7890ZihNU,1744
3
- ansys/mechanical/core/errors.py,sha256=oGaBH-QZxen3YV3IChAFv8bwW5rK_IXTYgDqbX5lp1E,4508
4
- ansys/mechanical/core/feature_flags.py,sha256=L88vHrI2lRjZPPUTW5sqcdloeK3Ouh8vt1VPfZLs5Wc,2032
5
- ansys/mechanical/core/ide_config.py,sha256=Sbzax5Pf7FK0XAMhzcsBJu_8CclABLKuebDCqlvHN_0,7334
6
- ansys/mechanical/core/launcher.py,sha256=dS3hN8RwiRh_c2RlXV5MVL7pgKZG5ZiNWreWQf3E800,6675
7
- ansys/mechanical/core/logging.py,sha256=wQ8QwKd2k0R6SkN7cv2nHAO7V5-BrElEOespDNMpSLo,24554
8
- ansys/mechanical/core/mechanical.py,sha256=tLvmQ8gaFIFbiDdKT300uX8U32g8qC731zB0GWpwIKQ,79972
9
- ansys/mechanical/core/misc.py,sha256=edm2UnklbooYW_hQUgk4n_UFCtlSGAVYJmC2gag74vw,5370
10
- ansys/mechanical/core/pool.py,sha256=F-Ckbc5c0V8OvYLOxoV2oJ3E8QOmPG0hH9XA07h3eAU,26586
11
- ansys/mechanical/core/run.py,sha256=KgSL2XEyCxK7iq_XVDNEv6fx7SN56RA-ihNg2dLyuZc,9920
12
- ansys/mechanical/core/embedding/__init__.py,sha256=y0yp3dnBW2oj9Jh_L_qfZstAbpON974EMmpV9w3kT3g,1356
13
- ansys/mechanical/core/embedding/addins.py,sha256=2-de-sIOWjO5MCKdBHC2LFxTItr1DUztABIONTQhiWc,2167
14
- ansys/mechanical/core/embedding/app.py,sha256=WKMN_2UQHEo-fsE0yqtVCZwA4ItSq13NvRz22r7QS1g,18708
15
- ansys/mechanical/core/embedding/app_libraries.py,sha256=RiTO23AzjssAylIH2DaTa6mcJmxhfrlHW-yYvHpIkt0,2923
16
- ansys/mechanical/core/embedding/appdata.py,sha256=krcmcgHhraHIlORFr43QvUXlAiXg231g_2iOIxkW_aQ,4223
17
- ansys/mechanical/core/embedding/background.py,sha256=QxR5QE1Q2gdcVy6QTy-PYmTOyXAhgYV7wqLV2bxUV4I,3731
18
- ansys/mechanical/core/embedding/cleanup_gui.py,sha256=GvWX2ylGBb5k1Hgz9vUywXNgWpDVwZ6L2M4gaOXyxl4,2354
19
- ansys/mechanical/core/embedding/enum_importer.py,sha256=3REw7SI_WmfPuzD0i9mdC7k53S-1jxhowqSxjzw7UGk,1543
20
- ansys/mechanical/core/embedding/imports.py,sha256=FcpePAi867YCuCH_lJotrLzYc1MW5VSAaLpYz7RejcA,4287
21
- ansys/mechanical/core/embedding/initializer.py,sha256=I09XzY7QFhCvaHlrLDrx9U-8Bib9vS9yvFQnWOscSzw,8025
22
- ansys/mechanical/core/embedding/loader.py,sha256=UgWN7C4hGMWiHhoMUdRKRyWaOwcsgw5auoW1ZqLtZDs,2503
23
- ansys/mechanical/core/embedding/poster.py,sha256=V0-cm229HgpOgcYXa0bnz0U5BDGw8_AVE6LKXyPCEjo,2107
24
- ansys/mechanical/core/embedding/resolver.py,sha256=95jUvZhNFEJBlbAbclzpK1Wgk51KsnYOKa5HvC7Oeco,1878
25
- ansys/mechanical/core/embedding/runtime.py,sha256=zDxwKDTc23cR_kc63M9u4zDWVoJ2efEtF3djHGwicG4,2285
26
- ansys/mechanical/core/embedding/shims.py,sha256=IJHhUmfsCtYEUFmuf2LGgozTiu03D0OZn1Qq1nCxXiI,1732
27
- ansys/mechanical/core/embedding/ui.py,sha256=6LRLzfPZq2ktdToo8V-pCwoha_GzFZen_VdQeFmW0DE,8497
28
- ansys/mechanical/core/embedding/utils.py,sha256=UObL4XBvx19aAYV8iVM4eCQR9vfqNSDsdwqkb1VFwTY,1900
29
- ansys/mechanical/core/embedding/warnings.py,sha256=igXfTCkDb8IDQqYP02Cynsqr7ewnueR12Dr0zpku7Kw,3071
30
- ansys/mechanical/core/embedding/logger/__init__.py,sha256=XgC05i7r-YzotLtcZ5_rGtA0jDKzeuZiDB88d2pIL7o,7986
31
- ansys/mechanical/core/embedding/logger/environ.py,sha256=UR9-fVxUEzwlVX-s0XnX5FrnSJc_ygRQwk-LE5tSEhE,5757
32
- ansys/mechanical/core/embedding/logger/linux_api.py,sha256=VrsO9F4NwHFWYJJE6F7biOzZUiRTvQOxYqk2R2c1Ymw,5988
33
- ansys/mechanical/core/embedding/logger/sinks.py,sha256=FYmV2iWt-7KuGw40E5WcNm4AnDsWqw6aQKSMKlivYoo,1392
34
- ansys/mechanical/core/embedding/logger/windows_api.py,sha256=OCJ-SJEY7EjigZiW6H5qufQ39N_mL7sXeoivOVl9FHc,5248
35
- ansys/mechanical/core/embedding/viz/__init__.py,sha256=xgpBdf3yfEq3sn0bNewLwtje-SCH6vVWEmHfCdh6078,1206
36
- ansys/mechanical/core/embedding/viz/embedding_plotter.py,sha256=ausbFhezwmLCGhu61JZJDM_uxwpRRuM-XWw9mk4i0GQ,3689
37
- ansys/mechanical/core/embedding/viz/usd_converter.py,sha256=feDq2KrZhYL-RR1miECQL-y0VNDhnZQ9Wke5UOkYmp4,5329
38
- ansys/mechanical/core/embedding/viz/utils.py,sha256=FuGDh7a5mUqs2UZOaXZLD0vONdmDXl5JfDRilIVbjds,3660
39
- ansys/mechanical/core/examples/__init__.py,sha256=A1iS8nknTU1ylafHZpYC9LQJ0sY83x8m1cDXsgvFOBo,1267
40
- ansys/mechanical/core/examples/downloads.py,sha256=rYFsq8U3YpXi_DVx_Uu5sRFFUS85ks6rMJfcgyvBat0,4295
41
- ansys_mechanical_core-0.11.9.dist-info/entry_points.txt,sha256=tErx6bIM27HGgwyM6ryyTUTw30Ab2F9J3FFkX2TPkhI,130
42
- ansys_mechanical_core-0.11.9.dist-info/LICENSE,sha256=gBJ2GQ6oDJwAWxcxmjx_0uXc-N0P4sHhA7BXsdPTfco,1098
43
- ansys_mechanical_core-0.11.9.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
44
- ansys_mechanical_core-0.11.9.dist-info/METADATA,sha256=y7oWZjaJBccSx1Lx1mEMaIvJ6S6muD8OMmU29NIzn3o,9887
45
- ansys_mechanical_core-0.11.9.dist-info/RECORD,,