ansys-pyensight-core 0.10.3__py3-none-any.whl → 0.10.4__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.

Potentially problematic release.


This version of ansys-pyensight-core might be problematic. Click here for more details.

@@ -110,15 +110,10 @@ class LocalLauncher(Launcher):
110
110
  path_to_webui, f"nexus{version}", f"ansys{version}", "ensight", "WebUI", "web", "ui"
111
111
  )
112
112
  # Ansys environment
113
- paths_to_webui_ansys = [
114
- os.path.join(os.path.dirname(path_to_webui), "simcfd", "web", "ui"),
115
- os.path.join(os.path.dirname(path_to_webui), "fluidsone", "web", "ui"),
116
- ]
113
+ path_to_webui_ansys = os.path.join(os.path.dirname(path_to_webui), "FluidsOne", "web", "ui")
117
114
  path_to_webui = path_to_webui_internal
118
- for path in paths_to_webui_ansys:
119
- if os.path.exists(path):
120
- path_to_webui = path
121
- break
115
+ if os.path.exists(path_to_webui_ansys):
116
+ path_to_webui = path_to_webui_ansys
122
117
  cmd += ["--server-listen-port", str(self._ports[5])]
123
118
  cmd += ["--server-web-roots", path_to_webui]
124
119
  cmd += ["--ensight-grpc-port", str(self._ports[0])]
@@ -175,7 +175,7 @@ class Export:
175
175
  """
176
176
  if array is None:
177
177
  return None
178
- return dict(shape=array.shape, dtype=array.dtype.str, data=array.tostring())
178
+ return dict(shape=array.shape, dtype=array.dtype.str, data=array.tobytes())
179
179
 
180
180
  @staticmethod
181
181
  def _numpy_from_dict(obj: Optional[dict]) -> Any:
@@ -18,6 +18,14 @@ if TYPE_CHECKING:
18
18
  from ansys.api.pyensight import ensight_api
19
19
 
20
20
 
21
+ def _handle_fluids_one(install_path):
22
+ cei_path = install_path
23
+ interpreter = os.path.join(cei_path, "bin", "cpython")
24
+ if platform.system() == "Windows":
25
+ interpreter += ".bat"
26
+ return interpreter
27
+
28
+
21
29
  class OmniverseKitInstance:
22
30
  """Interface to an Omniverse application instance
23
31
 
@@ -212,8 +220,17 @@ def launch_kit_instance(
212
220
  return OmniverseKitInstance(p.pid)
213
221
 
214
222
 
215
- def find_app() -> Optional[str]:
223
+ def find_app(ansys_installation: Optional[str] = None) -> Optional[str]:
216
224
  dirs_to_check = []
225
+ if ansys_installation:
226
+ # Given a different Ansys install
227
+ local_tp = os.path.join(os.path.join(ansys_installation, "tp", "omni_viewer"))
228
+ if os.path.exists(local_tp):
229
+ dirs_to_check.append(local_tp)
230
+ # Dev Folder
231
+ local_dev_omni = os.path.join(ansys_installation, "omni_build")
232
+ if os.path.exists(local_dev_omni):
233
+ dirs_to_check.append(local_dev_omni)
217
234
  if "PYENSIGHT_ANSYS_INSTALLATION" in os.environ:
218
235
  env_inst = os.environ["PYENSIGHT_ANSYS_INSTALLATION"]
219
236
  dirs_to_check.append(os.path.join(env_inst, "tp", "omni_viewer"))
@@ -243,6 +260,8 @@ def launch_app(
243
260
  log_file: Optional[str] = None,
244
261
  log_level: Optional[str] = "warn",
245
262
  cli_options: Optional[List[str]] = None,
263
+ ansys_installation: Optional[str] = None,
264
+ interpreter: Optional[str] = None,
246
265
  ) -> "OmniverseKitInstance":
247
266
  """Launch the Ansys Omniverse application
248
267
 
@@ -278,7 +297,9 @@ def launch_app(
278
297
 
279
298
  """
280
299
  cmd = [sys.executable]
281
- app = find_app()
300
+ if interpreter:
301
+ cmd = [interpreter]
302
+ app = find_app(ansys_installation=ansys_installation)
282
303
  if not app:
283
304
  raise RuntimeError("Unable to find the Ansys Omniverse app")
284
305
  cmd.extend([app])
@@ -379,6 +400,8 @@ class Omniverse:
379
400
  pass
380
401
  # Using the python interpreter running this code
381
402
  self._interpreter = sys.executable
403
+ if "fluids_one" in self._interpreter: # compiled simba-app
404
+ self._interpreter = _handle_fluids_one(self._ensight._session._install_path)
382
405
  if is_omni:
383
406
  kit_path = os.path.dirname(sys.executable)
384
407
  self._interpreter = os.path.join(kit_path, "python")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ansys-pyensight-core
3
- Version: 0.10.3
3
+ Version: 0.10.4
4
4
  Summary: A python wrapper for Ansys EnSight
5
5
  Author-email: "ANSYS, Inc." <pyansys.core@ansys.com>
6
6
  Maintainer-email: "ANSYS, Inc." <pyansys.core@ansys.com>
@@ -17,7 +17,7 @@ Classifier: Programming Language :: Python :: 3.12
17
17
  Classifier: Programming Language :: Python :: 3.13
18
18
  License-File: LICENSE
19
19
  Requires-Dist: importlib-metadata>=4.0; python_version<='3.8'
20
- Requires-Dist: ansys-api-pyensight==0.4.7
20
+ Requires-Dist: ansys-api-pyensight==0.4.8
21
21
  Requires-Dist: requests>=2.28.2
22
22
  Requires-Dist: docker>=6.1.0
23
23
  Requires-Dist: urllib3<2.4.0
@@ -11,7 +11,7 @@ ansys/pyensight/core/launch_ensight.py,sha256=iZJM6GdpzGRDLzrv1V2QZ5veIOpNSB5xPp
11
11
  ansys/pyensight/core/launcher.py,sha256=x6L1E6OGpqL2jrDdIGI0p4BxQZhHt93yl1Pwj_2lAiQ,13143
12
12
  ansys/pyensight/core/libuserd.py,sha256=er49fOZJ050OU122cYQgtdDSFr2YNNvKoqFk7Ogjiro,76018
13
13
  ansys/pyensight/core/listobj.py,sha256=Trw87IxIMXtmUd1DzywRmMzORU704AG4scX4fqYmO6M,9340
14
- ansys/pyensight/core/locallauncher.py,sha256=1zrBK2NTdodMaKYI2588a8HR7_SqMVmoUW7ItqwxMEI,17039
14
+ ansys/pyensight/core/locallauncher.py,sha256=SokWJoRkiyBs6WXbPN58zGQYm1_1voiT_LX8s2RJW18,16890
15
15
  ansys/pyensight/core/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
16
  ansys/pyensight/core/renderable.py,sha256=KidVTVCZ4hKYq54pP9KoJ8OCxeWBXNUJYyKSwMZ2Sls,36362
17
17
  ansys/pyensight/core/session.py,sha256=nNYKzbmVRELUHtj0XRU80JNiAVcuXsOeXXh3CbJLsLA,74450
@@ -19,8 +19,8 @@ ansys/pyensight/core/sgeo_poll.html,sha256=1M4BIc5CZpYA3b40qzk22NcPCLhjFnWdoS2Pr
19
19
  ansys/pyensight/core/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
20
20
  ansys/pyensight/core/utils/adr.py,sha256=XslZhlwcrSGzOlnhzprOv3ju_ppxxsWBjCnQL5KiNms,3570
21
21
  ansys/pyensight/core/utils/dsg_server.py,sha256=2jCPhOplPrlDaQNSKSk9qo7bEgfcrhx0rHS_cqW2zAY,47003
22
- ansys/pyensight/core/utils/export.py,sha256=UAJQcrElo3esQD0CWdxxjMQ8yE1vB4cdAhF33_uZfQw,22605
23
- ansys/pyensight/core/utils/omniverse.py,sha256=j8yB5776Nd42skVZSARRx-zJxODUODhdYgg8OryADlc,22208
22
+ ansys/pyensight/core/utils/export.py,sha256=GC0NbVl0_CXvUUfkbJl49yjTsP_58bJZyjE95q6ATUo,22604
23
+ ansys/pyensight/core/utils/omniverse.py,sha256=7NNxns3enZHGQcwDEN5xYONFsdbYLh5T2z-e-l1Nw3E,23215
24
24
  ansys/pyensight/core/utils/omniverse_cli.py,sha256=ujoBbBGMYsYUn83nrk2dFkOd7kn7-6cs7ljBmmSXodw,20578
25
25
  ansys/pyensight/core/utils/omniverse_dsg_server.py,sha256=pyZTZ63xMUmjR5PQNp5M-ab0iofLveCo3WR3f7Ibgus,40404
26
26
  ansys/pyensight/core/utils/omniverse_glb_server.py,sha256=dx2cfR036d3DY6meooNfLZOQpOMaiaLKqBjztpew2_Q,32167
@@ -31,7 +31,7 @@ ansys/pyensight/core/utils/support.py,sha256=QI3z9ex7zJxjFbkCPba9DWqWgPFIThORqr0
31
31
  ansys/pyensight/core/utils/variables.py,sha256=ZUiJdDIeRcowrnLXaJQqGwA0RbrfXhc1s4o4v9A4PiY,95133
32
32
  ansys/pyensight/core/utils/views.py,sha256=ZKhJ6vMT7Rdd4bwJ0egMYTV7-D7Q7I19fF2_j_CMQ0o,12489
33
33
  ansys/pyensight/core/utils/resources/Materials/000_sky.exr,sha256=xAR1gFd2uxPZDnvgfegdhEhRaqKtZldQDiR_-1rHKO0,8819933
34
- ansys_pyensight_core-0.10.3.dist-info/licenses/LICENSE,sha256=K6LiJHOa9IbWFelXmXNRzFr3zG45SOGZIN7vdLdURGU,1097
35
- ansys_pyensight_core-0.10.3.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
36
- ansys_pyensight_core-0.10.3.dist-info/METADATA,sha256=mN7adXDQiyjNjDdBdybX_yZDHlUDkP0iewgw3ucHmWY,12203
37
- ansys_pyensight_core-0.10.3.dist-info/RECORD,,
34
+ ansys_pyensight_core-0.10.4.dist-info/licenses/LICENSE,sha256=K6LiJHOa9IbWFelXmXNRzFr3zG45SOGZIN7vdLdURGU,1097
35
+ ansys_pyensight_core-0.10.4.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
36
+ ansys_pyensight_core-0.10.4.dist-info/METADATA,sha256=BJxvtWh71aMqlx6SkZ7yCag_RNp546cbNg8Os_Ey1dQ,12203
37
+ ansys_pyensight_core-0.10.4.dist-info/RECORD,,