ansys-pyensight-core 0.9.13__tar.gz → 0.9.16__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of ansys-pyensight-core might be problematic. Click here for more details.
- {ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/PKG-INFO +3 -3
- {ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/pyproject.toml +3 -3
- {ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/src/ansys/pyensight/core/dockerlauncher.py +2 -3
- {ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/src/ansys/pyensight/core/locallauncher.py +4 -6
- {ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/src/ansys/pyensight/core/utils/dsg_server.py +15 -0
- {ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/src/ansys/pyensight/core/utils/omniverse_glb_server.py +33 -3
- {ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/src/ansys/pyensight/core/utils/readers.py +4 -0
- {ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/LICENSE +0 -0
- {ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/README.rst +0 -0
- {ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/src/ansys/pyensight/core/__init__.py +0 -0
- {ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/src/ansys/pyensight/core/common.py +0 -0
- {ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/src/ansys/pyensight/core/deep_pixel_view.html +0 -0
- {ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/src/ansys/pyensight/core/dvs.py +0 -0
- {ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/src/ansys/pyensight/core/enscontext.py +0 -0
- {ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/src/ansys/pyensight/core/enshell_grpc.py +0 -0
- {ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/src/ansys/pyensight/core/ensight_grpc.py +0 -0
- {ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/src/ansys/pyensight/core/ensobj.py +0 -0
- {ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/src/ansys/pyensight/core/launch_ensight.py +0 -0
- {ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/src/ansys/pyensight/core/launcher.py +0 -0
- {ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/src/ansys/pyensight/core/libuserd.py +0 -0
- {ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/src/ansys/pyensight/core/listobj.py +0 -0
- {ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/src/ansys/pyensight/core/py.typed +0 -0
- {ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/src/ansys/pyensight/core/renderable.py +0 -0
- {ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/src/ansys/pyensight/core/session.py +0 -0
- {ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/src/ansys/pyensight/core/sgeo_poll.html +0 -0
- {ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/src/ansys/pyensight/core/utils/__init__.py +0 -0
- {ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/src/ansys/pyensight/core/utils/adr.py +0 -0
- {ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/src/ansys/pyensight/core/utils/export.py +0 -0
- {ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/src/ansys/pyensight/core/utils/omniverse.py +0 -0
- {ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/src/ansys/pyensight/core/utils/omniverse_cli.py +0 -0
- {ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/src/ansys/pyensight/core/utils/omniverse_dsg_server.py +0 -0
- {ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/src/ansys/pyensight/core/utils/parts.py +0 -0
- {ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/src/ansys/pyensight/core/utils/query.py +0 -0
- {ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/src/ansys/pyensight/core/utils/resources/Materials/000_sky.exr +0 -0
- {ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/src/ansys/pyensight/core/utils/support.py +0 -0
- {ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/src/ansys/pyensight/core/utils/variables.py +0 -0
- {ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/src/ansys/pyensight/core/utils/views.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ansys-pyensight-core
|
|
3
|
-
Version: 0.9.
|
|
3
|
+
Version: 0.9.16
|
|
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>
|
|
@@ -19,7 +19,7 @@ Requires-Dist: importlib-metadata>=4.0; python_version<='3.8'
|
|
|
19
19
|
Requires-Dist: ansys-api-pyensight==0.4.7
|
|
20
20
|
Requires-Dist: requests>=2.28.2
|
|
21
21
|
Requires-Dist: docker>=6.1.0
|
|
22
|
-
Requires-Dist: urllib3<
|
|
22
|
+
Requires-Dist: urllib3<2.4.0
|
|
23
23
|
Requires-Dist: numpy>=1.21.0,<3
|
|
24
24
|
Requires-Dist: Pillow>=9.3.0
|
|
25
25
|
Requires-Dist: pypng>=0.0.20
|
|
@@ -55,7 +55,7 @@ Requires-Dist: urllib3==2.3.0 ; extra == "tests"
|
|
|
55
55
|
Requires-Dist: requests>=2.28.2 ; extra == "tests"
|
|
56
56
|
Requires-Dist: docker>=6.1.0 ; extra == "tests"
|
|
57
57
|
Requires-Dist: pytest-xdist==3.6.1 ; extra == "tests"
|
|
58
|
-
Requires-Dist: pytest-rerunfailures
|
|
58
|
+
Requires-Dist: pytest-rerunfailures>=14,<16 ; extra == "tests"
|
|
59
59
|
Project-URL: Changelog, https://github.com/ansys/pyensight/blob/main/CHANGELOG.rst
|
|
60
60
|
Project-URL: Documentation, https://ensight.docs.pyansys.com/
|
|
61
61
|
Project-URL: Homepage, https://github.com/ansys/pyensight
|
|
@@ -6,7 +6,7 @@ build-backend = "flit_core.buildapi"
|
|
|
6
6
|
|
|
7
7
|
[project]
|
|
8
8
|
name = "ansys-pyensight-core"
|
|
9
|
-
version = "0.9.
|
|
9
|
+
version = "0.9.16"
|
|
10
10
|
description = "A python wrapper for Ansys EnSight"
|
|
11
11
|
readme = "README.rst"
|
|
12
12
|
requires-python = ">=3.10,<3.14"
|
|
@@ -29,7 +29,7 @@ dependencies = [
|
|
|
29
29
|
"ansys-api-pyensight==0.4.7",
|
|
30
30
|
"requests>=2.28.2",
|
|
31
31
|
"docker>=6.1.0",
|
|
32
|
-
"urllib3<
|
|
32
|
+
"urllib3<2.4.0",
|
|
33
33
|
"numpy>=1.21.0,<3",
|
|
34
34
|
"Pillow>=9.3.0",
|
|
35
35
|
"pypng>=0.0.20",
|
|
@@ -56,7 +56,7 @@ tests = [
|
|
|
56
56
|
"requests>=2.28.2",
|
|
57
57
|
"docker>=6.1.0",
|
|
58
58
|
"pytest-xdist==3.6.1",
|
|
59
|
-
"pytest-rerunfailures
|
|
59
|
+
"pytest-rerunfailures>=14,<16",
|
|
60
60
|
]
|
|
61
61
|
doc = [
|
|
62
62
|
"Sphinx==8.1.3",
|
|
@@ -384,8 +384,7 @@ class DockerLauncher(Launcher):
|
|
|
384
384
|
|
|
385
385
|
def launch_webui(self, container_env_str):
|
|
386
386
|
# Run websocketserver
|
|
387
|
-
cmd =
|
|
388
|
-
cmd += f"nexus{self._ansys_version}/nexus_launcher/webui_launcher.py"
|
|
387
|
+
cmd = "cpython -m ansys.simba.plugin.post.simba_post"
|
|
389
388
|
# websocket port - this needs to come first since we now have
|
|
390
389
|
# --add_header as a optional arg that can take an arbitrary
|
|
391
390
|
# number of optional headers.
|
|
@@ -403,7 +402,7 @@ class DockerLauncher(Launcher):
|
|
|
403
402
|
cmd += f" --ensight-ws-port {ws_port}"
|
|
404
403
|
cmd += f" --ensight-session-directory {self._session_directory}"
|
|
405
404
|
cmd += f" --ensight-secret-key {self._secret_key}"
|
|
406
|
-
cmd += "--main-show-gui 'False'"
|
|
405
|
+
cmd += " --main-show-gui 'False'"
|
|
407
406
|
logging.debug(f"Starting WebUI: {cmd}\n")
|
|
408
407
|
ret = self._enshell.start_other(cmd, extra_env=container_env_str)
|
|
409
408
|
if ret[0] != 0: # pragma: no cover
|
|
@@ -102,10 +102,8 @@ class LocalLauncher(Launcher):
|
|
|
102
102
|
"""Type of app to launch. Options are ``ensight`` and ``envision``."""
|
|
103
103
|
return self._application
|
|
104
104
|
|
|
105
|
-
def launch_webui(self, cpython,
|
|
106
|
-
cmd = [cpython]
|
|
107
|
-
cmd += [webui_script]
|
|
108
|
-
version = re.findall(r"nexus(\d+)", webui_script)[0]
|
|
105
|
+
def launch_webui(self, cpython, version, popen_common):
|
|
106
|
+
cmd = [cpython, "-m", "ansys.simba.plugin.post.simba_post"]
|
|
109
107
|
path_to_webui = self._install_path
|
|
110
108
|
# Dev environment
|
|
111
109
|
path_to_webui_internal = os.path.join(
|
|
@@ -267,7 +265,7 @@ class LocalLauncher(Launcher):
|
|
|
267
265
|
except Exception:
|
|
268
266
|
pass
|
|
269
267
|
websocket_script = found_scripts[idx]
|
|
270
|
-
|
|
268
|
+
version = re.findall(r"nexus(\d+)", websocket_script)[0]
|
|
271
269
|
# build the commandline
|
|
272
270
|
cmd = [os.path.join(self._install_path, "bin", "cpython"), websocket_script]
|
|
273
271
|
if is_windows:
|
|
@@ -319,7 +317,7 @@ class LocalLauncher(Launcher):
|
|
|
319
317
|
self._sessions.append(session)
|
|
320
318
|
|
|
321
319
|
if self._launch_webui:
|
|
322
|
-
self.launch_webui(ensight_python,
|
|
320
|
+
self.launch_webui(ensight_python, version, popen_common)
|
|
323
321
|
return session
|
|
324
322
|
|
|
325
323
|
def stop(self) -> None:
|
|
@@ -1084,6 +1084,21 @@ class DSGSession(object):
|
|
|
1084
1084
|
self._finish_part()
|
|
1085
1085
|
self._part.reset(part_cmd)
|
|
1086
1086
|
|
|
1087
|
+
def find_group_pb(self, group_id: int) -> Any:
|
|
1088
|
+
"""Return the group command protobuffer for a specific group id.
|
|
1089
|
+
|
|
1090
|
+
Parameters
|
|
1091
|
+
----------
|
|
1092
|
+
group_id: int
|
|
1093
|
+
The group DSG protocol entity id.
|
|
1094
|
+
|
|
1095
|
+
Returns
|
|
1096
|
+
-------
|
|
1097
|
+
any
|
|
1098
|
+
The group command protobuffer or None.
|
|
1099
|
+
"""
|
|
1100
|
+
return self._groups.get(group_id, None)
|
|
1101
|
+
|
|
1087
1102
|
def _handle_group(self, group: Any) -> None:
|
|
1088
1103
|
"""Handle a DSG UPDATE_GROUP command
|
|
1089
1104
|
|
|
@@ -156,6 +156,7 @@ class GLBSession(dsg_server.DSGSession):
|
|
|
156
156
|
cmd, part_pb = self._create_pb("PART", parent_id=parentid, name=part_name)
|
|
157
157
|
if mode == pygltflib.POINTS:
|
|
158
158
|
part_pb.render = dynamic_scene_graph_pb2.UpdatePart.RenderingMode.NODES
|
|
159
|
+
# Size of the spheres
|
|
159
160
|
part_pb.node_size_default = line_width
|
|
160
161
|
else:
|
|
161
162
|
part_pb.render = dynamic_scene_graph_pb2.UpdatePart.RenderingMode.CONNECTIVITY
|
|
@@ -404,10 +405,39 @@ class GLBSession(dsg_server.DSGSession):
|
|
|
404
405
|
# GLB node -> DSG Group
|
|
405
406
|
cmd, group_pb = self._create_pb("GROUP", parent_id=parentid, name=name)
|
|
406
407
|
group_pb.matrix4x4.extend(matrix)
|
|
407
|
-
self._handle_update_command(cmd)
|
|
408
|
-
|
|
409
408
|
if node.mesh is not None:
|
|
409
|
+
# This is a little ugly, but spheres have a size that is part of the PART
|
|
410
|
+
# protobuffer. So, if the current mesh has the "ANSYS_linewidth" extension,
|
|
411
|
+
# we need to temporally change the line width. However, if this is a lines
|
|
412
|
+
# object, then we need to set the ANSYS_linewidth attribute. Unfortunately,
|
|
413
|
+
# this is only available on the GROUP protobuffer, thus we will try to set
|
|
414
|
+
# both here.
|
|
415
|
+
# Note: in the EnSight push, ANSYS_linewidth will only ever be set on the
|
|
416
|
+
# top level node. In the GLB case, we will scope it to the group. Thus,
|
|
417
|
+
# every "mesh" protobuffer sequence will have an explicit line width in
|
|
418
|
+
# the group above the part.
|
|
419
|
+
|
|
420
|
+
# save/restore the current line_width
|
|
421
|
+
orig_width = self._callback_handler._omni.line_width
|
|
422
|
+
mesh = self._gltf.meshes[node.mesh]
|
|
423
|
+
try:
|
|
424
|
+
# check for line_width on the mesh object
|
|
425
|
+
width = float(mesh.extensions["ANSYS_linewidth"]["linewidth"])
|
|
426
|
+
# make sure spheres work
|
|
427
|
+
self._callback_handler._omni.line_width = width
|
|
428
|
+
except (KeyError, ValueError):
|
|
429
|
+
pass
|
|
430
|
+
# make sure lines work (via the group attributes map)
|
|
431
|
+
group_pb.attributes["ANSYS_linewidth"] = str(self._callback_handler._omni.line_width)
|
|
432
|
+
# send the group protobuffer
|
|
433
|
+
self._handle_update_command(cmd)
|
|
434
|
+
# Export the mesh
|
|
410
435
|
self._parse_mesh(node.mesh, group_pb.id, name)
|
|
436
|
+
# restore the old line_width
|
|
437
|
+
self._callback_handler._omni.line_width = orig_width
|
|
438
|
+
else:
|
|
439
|
+
# send the group protobuffer
|
|
440
|
+
self._handle_update_command(cmd)
|
|
411
441
|
|
|
412
442
|
# Handle node.rotation, node.translation, node.scale, node.matrix
|
|
413
443
|
for child_id in node.children:
|
|
@@ -583,7 +613,7 @@ class GLBSession(dsg_server.DSGSession):
|
|
|
583
613
|
view_pb.fieldofview = camera.perspective.yfov
|
|
584
614
|
view_pb.aspectratio = camera.aspectratio.aspectRatio
|
|
585
615
|
self._handle_update_command(cmd)
|
|
586
|
-
# walk the scene nodes
|
|
616
|
+
# walk the scene nodes
|
|
587
617
|
scene = self._gltf.scenes[scene_idx]
|
|
588
618
|
try:
|
|
589
619
|
if self._callback_handler._omni.line_width == 0.0:
|
|
@@ -68,6 +68,7 @@ class DVS:
|
|
|
68
68
|
if monitor_new_timesteps:
|
|
69
69
|
cmd += f'ensight.solution_time.monitor_for_new_steps("{monitor_new_timesteps}")\n'
|
|
70
70
|
cmd += 'ensight.part.elt_representation("3D_feature_2D_full")\n'
|
|
71
|
+
cmd += 'ensight.data.format("DVS")\n'
|
|
71
72
|
cmd += 'err = ensight.data.replace("notexisting.dvs")\n'
|
|
72
73
|
return cmd
|
|
73
74
|
|
|
@@ -96,6 +97,7 @@ class DVS:
|
|
|
96
97
|
cmd += f"{indent}dvsfile.write(f'SERVER_SECURITY_SECRET={secret_key}\\n')\n"
|
|
97
98
|
cmd += f'ensight.solution_time.monitor_for_new_steps("{monitor_new_timesteps}")\n'
|
|
98
99
|
cmd += 'ensight.part.elt_representation("3D_feature_2D_full")\n'
|
|
100
|
+
cmd += 'ensight.data.format("DVS")\n'
|
|
99
101
|
cmd += "ensight.data.replace(path)\n"
|
|
100
102
|
return cmd
|
|
101
103
|
|
|
@@ -154,6 +156,7 @@ class DVS:
|
|
|
154
156
|
raise RuntimeError(f"Couldn't write allocated DVS port to {filename}")
|
|
155
157
|
ensight.part.elt_representation("3D_feature_2D_full")
|
|
156
158
|
ensight.solution_time.monitor_for_new_steps(f"{monitor_new_timesteps}")
|
|
159
|
+
ensight.data.format("DVS")
|
|
157
160
|
ensight.data.replace(path)
|
|
158
161
|
else:
|
|
159
162
|
|
|
@@ -180,6 +183,7 @@ class DVS:
|
|
|
180
183
|
ensight.objs.core.CURRENTCASE[0].client_command_callback(dvs_callback)
|
|
181
184
|
ensight.solution_time.monitor_for_new_steps(f"{monitor_new_timesteps}")
|
|
182
185
|
ensight.part.elt_representation("3D_feature_2D_full")
|
|
186
|
+
ensight.data.format("DVS")
|
|
183
187
|
ensight.data.replace("notexisting.dvs")
|
|
184
188
|
|
|
185
189
|
def launch_live_dvs(
|
|
File without changes
|
|
File without changes
|
{ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/src/ansys/pyensight/core/__init__.py
RENAMED
|
File without changes
|
{ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/src/ansys/pyensight/core/common.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/src/ansys/pyensight/core/enscontext.py
RENAMED
|
File without changes
|
{ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/src/ansys/pyensight/core/enshell_grpc.py
RENAMED
|
File without changes
|
{ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/src/ansys/pyensight/core/ensight_grpc.py
RENAMED
|
File without changes
|
{ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/src/ansys/pyensight/core/ensobj.py
RENAMED
|
File without changes
|
|
File without changes
|
{ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/src/ansys/pyensight/core/launcher.py
RENAMED
|
File without changes
|
{ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/src/ansys/pyensight/core/libuserd.py
RENAMED
|
File without changes
|
{ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/src/ansys/pyensight/core/listobj.py
RENAMED
|
File without changes
|
{ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/src/ansys/pyensight/core/py.typed
RENAMED
|
File without changes
|
{ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/src/ansys/pyensight/core/renderable.py
RENAMED
|
File without changes
|
{ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/src/ansys/pyensight/core/session.py
RENAMED
|
File without changes
|
{ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/src/ansys/pyensight/core/sgeo_poll.html
RENAMED
|
File without changes
|
|
File without changes
|
{ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/src/ansys/pyensight/core/utils/adr.py
RENAMED
|
File without changes
|
{ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/src/ansys/pyensight/core/utils/export.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/src/ansys/pyensight/core/utils/parts.py
RENAMED
|
File without changes
|
{ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/src/ansys/pyensight/core/utils/query.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ansys_pyensight_core-0.9.13 → ansys_pyensight_core-0.9.16}/src/ansys/pyensight/core/utils/views.py
RENAMED
|
File without changes
|