ansys-pyensight-core 0.8.1__py3-none-any.whl → 0.8.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.

@@ -1081,7 +1081,7 @@ class Parts:
1081
1081
  Returns
1082
1082
  -------
1083
1083
  list
1084
- list of part objects selected or None if error.
1084
+ A list of part objects selected or None if error.
1085
1085
 
1086
1086
 
1087
1087
  NOTE: If you do not want a measured part in your
@@ -1116,7 +1116,7 @@ class Parts:
1116
1116
  ret_flag="id",
1117
1117
  ) -> Union[Optional[List[int]], Optional[List[str]], Optional[List["ENS_PART"]]]:
1118
1118
  """
1119
- input a part or a list of parts and return an id, object, or name
1119
+ Input a part or a list of parts and return an id, object, or name
1120
1120
  or a list of ids, objects, or names.
1121
1121
 
1122
1122
  Parameters
@@ -1125,13 +1125,13 @@ class Parts:
1125
1125
  The list of part objects to compute the forces on. It can either be a list of names
1126
1126
  a list of IDs (integers or strings) or directly a list of ENS_PART objects
1127
1127
 
1128
- ret_flag: string
1129
- a string that determines what is returned
1128
+ ret_flag: str
1129
+ A string that determines what is returned
1130
1130
 
1131
1131
  Returns
1132
1132
  -------
1133
1133
  list
1134
- either a list of part IDs, or a list of names or a list of ENS_PART objects
1134
+ Either a list of part IDs, or a list of names or a list of ENS_PART objects
1135
1135
  depending on the requested ret_flag value
1136
1136
  """
1137
1137
  # To not change the interface I didn't move ret_flag to be a required argument,
@@ -26,7 +26,7 @@ class Readers:
26
26
  self._dvs = DVS(self._ensight)
27
27
 
28
28
  @property
29
- def dvs(self):
29
+ def dvs(self) -> "DVS":
30
30
  return self._dvs
31
31
 
32
32
 
@@ -54,7 +54,42 @@ class Variables:
54
54
 
55
55
  @property
56
56
  def calculator(self) -> "ens_calculator":
57
- """Return the instance of the calculator functions class"""
57
+ """
58
+ The calculator interface presents a Pythonic mechanism to access all the
59
+ EnSight calculator functions: :doc:`Calculator Functions <../calc_functions>`.
60
+
61
+ Unlike the native API function :func:`pyensight.ensight_api.variables.evaluate`
62
+ and the object API function :func:`pyensight.ens_globals.ENS_GLOBALS.create_variable`
63
+ which take a string as the function definition, the methods on the calculator
64
+ object take natural Python objects and return any newly created ``ENS_VARIABLE``
65
+ object.
66
+
67
+ Returns
68
+ -------
69
+ ens_calculator
70
+ An object supporting a method for each EnSight calculator function.
71
+
72
+ Examples
73
+ --------
74
+ The following are equavalent:
75
+
76
+ >>> # Native API
77
+ >>> session.ensight.part.select_all()
78
+ >>> session.ensight.variables.evaluate("EleSize = EleSize(plist)")
79
+ >>> var1 = session.ensight.objs.core.VARIABLES["EleSize"][0]
80
+ >>> session.ensight.variables.evaluate("OffsetVar = OffsetVar(plist,Momentum,2e-05)")
81
+ >>> var2 = session.ensight.objs.core.VARIABLES["OffsetVar"][0]
82
+ >>> # Object API
83
+ >>> parts = session.ensight.objs.core.PARTS
84
+ >>> var1 = session.ensight.objs.core.create_variable("EleSize", "EleSize(plist)", sources=parts)
85
+ >>> var2 = session.ensight.objs.core.create_variable("OffsetVar", "OffsetVar(plist,Momentum,2e-05)", sources=parts)
86
+ >>> # ens_calculator API
87
+ >>> parts = session.ensight.objs.core.PARTS
88
+ >>> var1 = session.ensight.utils.variables.calculator.elesize(parts, output_varname="EleSize")
89
+ >>> momentum = session.objs.core.PARTS["Momentum"]
90
+ >>> var2 = session.ensight.utils.variables.calculator.offsetvar(parts, momentum[0], 2.e-5, output_varname="OffsetVar")
91
+
92
+ """
58
93
  return self._calculator
59
94
 
60
95
  def _check_for_var_elem(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ansys-pyensight-core
3
- Version: 0.8.1
3
+ Version: 0.8.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>
@@ -16,7 +16,7 @@ Classifier: Programming Language :: Python :: 3.10
16
16
  Classifier: Programming Language :: Python :: 3.11
17
17
  Classifier: Programming Language :: Python :: 3.12
18
18
  Requires-Dist: importlib-metadata>=4.0; python_version<='3.8'
19
- Requires-Dist: ansys-api-pyensight==0.4.0
19
+ Requires-Dist: ansys-api-pyensight==0.4.1
20
20
  Requires-Dist: requests>=2.28.2
21
21
  Requires-Dist: docker>=6.1.0
22
22
  Requires-Dist: urllib3<2
@@ -10,26 +10,27 @@ ansys/pyensight/core/launcher.py,sha256=nnNXKEsV82Eu1S9eSp8UzZI7YmSVHWyLhhOEbiYh
10
10
  ansys/pyensight/core/listobj.py,sha256=Trw87IxIMXtmUd1DzywRmMzORU704AG4scX4fqYmO6M,9340
11
11
  ansys/pyensight/core/locallauncher.py,sha256=sgaPrG-7ctXZ_ytGuHeriiVmgvI0kUeX6nKVJ4OiDUs,13984
12
12
  ansys/pyensight/core/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
- ansys/pyensight/core/renderable.py,sha256=9jhkCBl9pKhTv_vukuk63hpfPCzt0DQNNJ-86CTN0yA,34557
13
+ ansys/pyensight/core/renderable.py,sha256=hm4sXV-ZcpdfC_AJexycAX8zdsbWnsd-tMeUvewGekE,35003
14
14
  ansys/pyensight/core/session.py,sha256=AHTRbX0sDlvtUf8lyRoXetiICmLWO7n26Ni9lMy7tBY,74363
15
15
  ansys/pyensight/core/sgeo_poll.html,sha256=1M4BIc5CZpYA3b40qzk22NcPCLhjFnWdoS2PrS6Rhn4,752
16
16
  ansys/pyensight/core/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
17
  ansys/pyensight/core/utils/adr.py,sha256=XslZhlwcrSGzOlnhzprOv3ju_ppxxsWBjCnQL5KiNms,3570
18
+ ansys/pyensight/core/utils/dsg_server.py,sha256=NbJ_ZxFo89S0qzR1gnRvEAfQasbL_2Be5PJ0LrEYB_I,29159
18
19
  ansys/pyensight/core/utils/export.py,sha256=ZNpU3earAnRMBHZa6I8nTwMYY54WctXApJfMTkREBNA,23189
19
- ansys/pyensight/core/utils/omniverse.py,sha256=vKAl3rsUiL2pfaNk86bGH_PuZ6kB2DtXNqrsDJqjcqw,9456
20
- ansys/pyensight/core/utils/omniverse_dsg_server.py,sha256=Jzqt8fCwieSdkK7X7TynCmtXkQwhdNL5NPPWFHuRCTU,53281
21
- ansys/pyensight/core/utils/parts.py,sha256=0Qt54in6JoMrHksDa8wslZwcFH-miI1pB3BOFTn9x6Q,53373
20
+ ansys/pyensight/core/utils/omniverse.py,sha256=YC5Uw2l2je462ysBGGd-a0Ncs2kWwaFYQi8YWjshZZs,9460
21
+ ansys/pyensight/core/utils/omniverse_dsg_server.py,sha256=BVrSJILQWvUGQ0DI30CdYLmt3zD3VtYBPW52I_H23mA,32629
22
+ ansys/pyensight/core/utils/parts.py,sha256=zST00r76kjsLLclBaKoOtuYhDUSdQr0vAooOG7AUea0,53372
22
23
  ansys/pyensight/core/utils/query.py,sha256=OXKDbf1sOTX0sUvtKcp64LhVl-BcrEsE43w8uMxLOYI,19828
23
- ansys/pyensight/core/utils/readers.py,sha256=DSCD36uHo6FaXcAP8vo-1H_FB95JkOsPFNu7tXWSN6o,11755
24
+ ansys/pyensight/core/utils/readers.py,sha256=WUpmCtMo9BHlUOwGtIrD5jjyS9HE9wDak8eEjrYeR2Y,11764
24
25
  ansys/pyensight/core/utils/support.py,sha256=QI3z9ex7zJxjFbkCPba9DWqWgPFIThORqr0nvRfVjuc,4089
25
- ansys/pyensight/core/utils/variables.py,sha256=fXt-cwK1DX_Kt5Nbj4_tA_U7-hFCRE45VX-gJAZIoa0,93364
26
+ ansys/pyensight/core/utils/variables.py,sha256=T96aL-qR2FtxH6QafeD9ddcWL9BB6IRSOYs2JauRTlg,95133
26
27
  ansys/pyensight/core/utils/views.py,sha256=ZKhJ6vMT7Rdd4bwJ0egMYTV7-D7Q7I19fF2_j_CMQ0o,12489
27
28
  ansys/pyensight/core/utils/resources/Materials/000_sky.exr,sha256=xAR1gFd2uxPZDnvgfegdhEhRaqKtZldQDiR_-1rHKO0,8819933
28
29
  ansys/pyensight/core/utils/resources/Materials/Fieldstone.mdl,sha256=_7z4BzzrRGUH_x3urV4sc7t7WJBjJn4jWLOw1AQObgY,2035
29
30
  ansys/pyensight/core/utils/resources/Materials/Fieldstone/Fieldstone_BaseColor.png,sha256=CyxY5YrvbJxFzUUI-8Q90zOd6xwd85JPzjnUB-vPJ0s,501090
30
31
  ansys/pyensight/core/utils/resources/Materials/Fieldstone/Fieldstone_N.png,sha256=Az1m4bK-PWecsErsuZh4-kkUnui9w4TrCxrGwwI091I,795424
31
32
  ansys/pyensight/core/utils/resources/Materials/Fieldstone/Fieldstone_ORM.png,sha256=x0tUgUxjk53nsnleEy95tI1tUvFFQHGrB3pZVkd7b00,549202
32
- ansys_pyensight_core-0.8.1.dist-info/LICENSE,sha256=qQWivZ12ETN5l3QxvTARY-QI5eoRRlyHdwLlAj0Bg5I,1089
33
- ansys_pyensight_core-0.8.1.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
34
- ansys_pyensight_core-0.8.1.dist-info/METADATA,sha256=GJXaER5Dd2EG2FwdSBjRTMW8bbuHcd7tFAwH_V6h_w4,11830
35
- ansys_pyensight_core-0.8.1.dist-info/RECORD,,
33
+ ansys_pyensight_core-0.8.4.dist-info/LICENSE,sha256=qQWivZ12ETN5l3QxvTARY-QI5eoRRlyHdwLlAj0Bg5I,1089
34
+ ansys_pyensight_core-0.8.4.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
35
+ ansys_pyensight_core-0.8.4.dist-info/METADATA,sha256=K5zU49tOXNW0xyQ0BvzKtm7Fr29OqNsAj2wvetO73Sk,11830
36
+ ansys_pyensight_core-0.8.4.dist-info/RECORD,,