pytecplot 1.6.3__py3-none-any.whl → 1.7.1__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.
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: pytecplot
3
- Version: 1.6.3
3
+ Version: 1.7.1
4
4
  Summary: A Python interface to Tecplot 360
5
5
  Author-email: "Tecplot, Inc." <support@tecplot.com>
6
6
  Project-URL: homepage, https://www.tecplot.com/docs/pytecplot
@@ -26,10 +26,10 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
26
26
  Classifier: License :: Other/Proprietary License
27
27
  Classifier: Programming Language :: Python
28
28
  Classifier: Programming Language :: Python :: 3
29
- Classifier: Programming Language :: Python :: 3.8
30
- Classifier: Programming Language :: Python :: 3.9
31
29
  Classifier: Programming Language :: Python :: 3.10
32
30
  Classifier: Programming Language :: Python :: 3.11
31
+ Classifier: Programming Language :: Python :: 3.12
32
+ Classifier: Programming Language :: Python :: 3.13
33
33
  Requires-Python: >=3.8
34
34
  Description-Content-Type: text/x-rst
35
35
  License-File: LICENSE.html
@@ -49,6 +49,7 @@ Requires-Dist: pillow; extra == "test"
49
49
  Requires-Dist: coverage; extra == "test"
50
50
  Requires-Dist: scipy; extra == "test"
51
51
  Requires-Dist: tox; extra == "test"
52
+ Requires-Dist: filetype; extra == "test"
52
53
  Provides-Extra: all
53
54
  Requires-Dist: ipython; extra == "all"
54
55
  Requires-Dist: numpy; extra == "all"
@@ -58,6 +59,7 @@ Requires-Dist: pyyaml; extra == "all"
58
59
  Requires-Dist: coverage; extra == "all"
59
60
  Requires-Dist: scipy; extra == "all"
60
61
  Requires-Dist: tox; extra == "all"
62
+ Dynamic: license-file
61
63
 
62
64
  PyTecplot
63
65
  =========
@@ -106,6 +108,17 @@ For more information, see |Tecplot 360s release notes|.
106
108
 
107
109
  .. |Tecplot 360s release notes| replace:: `Tecplot 360's release notes <https://tecplot.com/products/tecplot-360/new-in-tecplot-360>`__
108
110
 
111
+ PyTecplot 1.7.1
112
+ ^^^^^^^^^^^^^^^
113
+
114
+ Released with Tecplot 360 2025 R1
115
+
116
+ * `slice.extract()` now documents and tests potential to return single zone rather than generator.
117
+ Gives warning that generator will be returned in all cases in future.
118
+ * Fixed: `extract_slice()` now obeys the `resulting_1d_zone_type` argument.
119
+ * Added `tp.session.redraw()` to force a display refresh when in connected mode.
120
+ * Fixed a rare bug regarding queries of passive field data from a non-active frame.
121
+
109
122
  PyTecplot 1.6.3
110
123
  ^^^^^^^^^^^^^^^
111
124
 
@@ -1,8 +1,9 @@
1
+ pytecplot-1.7.1.dist-info/licenses/LICENSE.html,sha256=I240fAHgxqlSQn_eSmb9ktcS4hgugObDnHYQnlEPzt8,28492
1
2
  tecplot/__init__.py,sha256=iHAPbGDgIh7HtLWaWcDYfVS4TOsNrRSHyQa-H_6Li3g,3550
2
3
  tecplot/constant.py,sha256=_Ws6ldiZAkkOJjGWM9PEAMR0mHZ49qcYjJVpK51E99o,8531
3
4
  tecplot/exception.py,sha256=YB4zeL0-07yCy4pyUqeFdNQ98nK11h2n3ZHHe58Od6s,6493
4
5
  tecplot/macro.py,sha256=uE29ftjdr2HdlFVa9SS-1uBU8Di4W3PwquhI75LnvhM,13307
5
- tecplot/version.py,sha256=BmBl2yynwg4M3ZHmogSlWcZA1-EBIRi2vB_eRajat68,1544
6
+ tecplot/version.py,sha256=sbKcDlh7s_cFIMAuR2K0jUXLj2tLP5xSw6C3Z91mKmk,1544
6
7
  tecplot/annotation/__init__.py,sha256=FfL8JhlO6T9NTajVRtgXHp6A6PhjpO51gnVKlHMkzWA,333
7
8
  tecplot/annotation/annotation.py,sha256=B7G-BkrQ4lYBpak9RR3u7Pvdci5MGLUvNo_MnJidyY4,8481
8
9
  tecplot/annotation/geometry.py,sha256=3jnp_Ut1AQdhSUCMAJ1yFuL_epoGUoTny03cv0kl09k,12516
@@ -12,10 +13,10 @@ tecplot/annotation/iter.py,sha256=s9rFJLhKgJKApxxTghRFBjT6Pmu6BAEfvB5QgBI4mNI,37
12
13
  tecplot/annotation/polyline.py,sha256=bw-1LfpjfcHK7VZGTf7xrvHtzjlFJAegIYrU5GVdse0,12390
13
14
  tecplot/annotation/text.py,sha256=JFaaOJR1h6LyLt9vUVanQmakXtGZOguVdA-3oT8tWhQ,26471
14
15
  tecplot/data/__init__.py,sha256=apkztrNGBSS5cfyYSIYkrwU1eeRiO0GP4sHvryPJfVA,1937
15
- tecplot/data/array.py,sha256=kx_UPZ4MgzydzEkHhdV8YyssOuy4EzP-i4gXvvTAaxM,23885
16
+ tecplot/data/array.py,sha256=wcGIaoVbSjSdwQP3DpXAOECHAmjTBurbmZvTodF5h1E,24246
16
17
  tecplot/data/create.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
17
- tecplot/data/dataset.py,sha256=sXQFB3ZX9CyZPMW__uR0AmBZw8g4F0OSfkpQd5cOk_M,80705
18
- tecplot/data/extract.py,sha256=hVVxbU_zqlW9ZBDHuYxm5Nu2fzjvxkwsRozosTNkm60,21891
18
+ tecplot/data/dataset.py,sha256=psNqhCXa6dfm05Rs7c8YvK6QwHOCDxQZjSphCkvOeAU,82337
19
+ tecplot/data/extract.py,sha256=VqDqe_-VcQSKD-rRo4DSqohZElUan2dxuNlLRM_qE54,21891
19
20
  tecplot/data/face_neighbors.py,sha256=Bm77F87qtDcw2u1BWFNE9cRTc8FI9MS3Cw8YlaJsdkc,19440
20
21
  tecplot/data/facemap.py,sha256=Xhn77cZndfgUA9U014I4M_ecwj8bI98_A7DZC24-Jwk,31287
21
22
  tecplot/data/fe_cell_type.py,sha256=G2U0c1RBHvUP03_YjHGHaMk1JOkF-g9SlBlLkWXH2Yg,3911
@@ -35,7 +36,7 @@ tecplot/export/time_animation.py,sha256=lpy7mq4zQG0Wj5Q3pezHSqGbdaiX2fTOdqf3-s9t
35
36
  tecplot/extension/__init__.py,sha256=3bDQNm1kqkiWsU7MkbturRl7YuRGSv4fjvGIN_XW5no,425
36
37
  tecplot/extension/ipython.py,sha256=glcANfhj8pG5Pv_kF4NSfuyQXwgBKowQ1-nJbJGepgc,2229
37
38
  tecplot/layout/__init__.py,sha256=HvlOnhPIsFHSRDACEPN3rlOUmk9tpLNPttReGq3P3_8,1218
38
- tecplot/layout/frame.py,sha256=mV6l1msr-uqOCGHAfgOI-cNsiFwhjUHXYmAsukZpfSw,51606
39
+ tecplot/layout/frame.py,sha256=B7KGjc8JdpKeojGZyH6oBI4ZQQmpbaL0IJtlh7HkFRY,51813
39
40
  tecplot/layout/layout.py,sha256=vcrqWgOkcEW90VCbLG2-7xSWajPhP3cRsLnRIrcuO4c,16025
40
41
  tecplot/layout/page.py,sha256=MqX3jJAd3o2xkfaSGXU7TD4gnXv-9CQcDj5WJnlIisU,18264
41
42
  tecplot/legend/__init__.py,sha256=zj94bHuUKvgWxn5dddEuahKCXVDMOFonQNgKxtuNSTQ,185
@@ -60,17 +61,17 @@ tecplot/plot/linking.py,sha256=HyetVeDsnUsGJtmWLURg6ylyCom0zR-0UubrVynB_fs,16775
60
61
  tecplot/plot/plot.py,sha256=WB2S4cHc0JB2wQrZSoEISpjvuXuQRZ_QXLuFaBNJuhk,60658
61
62
  tecplot/plot/rgb_coloring.py,sha256=OfcIvhQ9Tm5TQylOUttX7QcNu3CHtETBpIz7gqa9GwY,9417
62
63
  tecplot/plot/scatter.py,sha256=SFjxZThZFbJwx0q-McjvSekQ8EdepMtLVurCFo_dKZk,12609
63
- tecplot/plot/slice.py,sha256=cTfynvrTijZFfZyk9Y3t1Tm3LuqCqHWh7xUu_i0Zf5s,52018
64
+ tecplot/plot/slice.py,sha256=hebSpbQYdgjmIJkI-1mUzI4Ud6eahKPiaC3ooWke9SE,52285
64
65
  tecplot/plot/streamtrace.py,sha256=kL_3SFhYnmEIdLX2OmcP4tcxysdG41e2LZ4URZEshIA,64686
65
66
  tecplot/plot/symbol.py,sha256=6p28udpGG-rOKCAb9bgsk6kWHqXYPfAQ7W-jBrtmPaA,18422
66
67
  tecplot/plot/ticks.py,sha256=Wx3myMFWJYqeE8uefTv3sZYBBAAcaK2Pg6v-0pBk56M,19252
67
68
  tecplot/plot/title.py,sha256=Eg4T5i_Z_thuISW8CJi0gh_tGwfQ84zD6J0VZcaUnP8,11162
68
69
  tecplot/plot/vector.py,sha256=soEpzmqaii-FnMUWALgWCViJp1agXh54YxIaiZZExD0,21490
69
70
  tecplot/plot/view.py,sha256=MsafFR3G2_bPMPPdtINXk_Q0h2rfW-8XzubT7ahFC6A,29473
70
- tecplot/session/__init__.py,sha256=MnOgbLJNEx2r8_AUEUbWws5S-IBKycXjXYa_j1fpJVU,4431
71
+ tecplot/session/__init__.py,sha256=Kq5On_E0J0h9CbATQfI7tQShVtlubOwGFWRNE05651U,4439
71
72
  tecplot/session/aux_data.py,sha256=79910rsjRBD2ZAzlG8SYoPxYoxoJuYtGpeMaCwzUB8s,9192
72
73
  tecplot/session/config.py,sha256=UrKiaP1HIZSO1J-eV-SEPZa0LvxK80eDcQanEZNeMtw,2952
73
- tecplot/session/session.py,sha256=1LHd7u1oib9Sm4LPp9y2CjTdaU1k190rgBpEzf12AWc,15586
74
+ tecplot/session/session.py,sha256=xBvfy90k6WBbUTQEFBWLm4F53_DtKp14gC-uMO8q5Xs,17908
74
75
  tecplot/session/state_changed.py,sha256=qefZrJDIO5gT8hvkrrRmq75rQwIFXKA12qrXx6TPiD4,7961
75
76
  tecplot/session/style.py,sha256=djEwXG3H8_izU1Zsk5b7FlJo-WsxgLzb3N78YHCC7Us,17619
76
77
  tecplot/tecutil/__init__.py,sha256=tvHnjGACyMsVN7WbYrtp8Lo9qRBQymYZlQ5BuyiBMQg,748
@@ -84,16 +85,15 @@ tecplot/tecutil/preamble.py,sha256=wzpTPY3xyv8-cnWpp5q1ay0jlXRNmMEmC0UXN-xu0aU,2
84
85
  tecplot/tecutil/stringlist.py,sha256=GMuwiP0scuyLxEUbcJFIz4DU9TLAhNdjGHDWawGGT-o,3533
85
86
  tecplot/tecutil/sv.py,sha256=8EUln_hn7c2FZ3QMiK9zWMSxAQdhbKmKlTLvU-9lZ-4,54100
86
87
  tecplot/tecutil/tecutil.py,sha256=Zmz8LvQ3l25QAbIZgMjZQQHgnA-r6lgYu5n-lYwNMeo,691565
87
- tecplot/tecutil/tecutil_client.py,sha256=pQKqImoPQRM5K_TdyHCGHwZQr0OycIeIAjRfp5l3L7o,23671
88
- tecplot/tecutil/tecutil_connector.py,sha256=jYUye5JoB9643FzO7UWJD72SgLOZLCimrbzT7Jm2h4k,37242
88
+ tecplot/tecutil/tecutil_client.py,sha256=j3qzB9e4h07w8cO3d1Z4vDH5ZqxXcmld9reL73Wj9vg,23749
89
+ tecplot/tecutil/tecutil_connector.py,sha256=HW05xfxIbSrnnpXic3DNUkXmMmo0e9Z-HhT3EoC_Mzg,37059
89
90
  tecplot/tecutil/tecutil_rpc.py,sha256=sHX6JjNXQcVjSNasH9auydbfyZoJMF56lJF0j6TxQMM,285726
90
91
  tecplot/tecutil/util.py,sha256=C8nNB3gFK6XY6l9Ue18zcPZXFrX5JJ9vO-kcA9R53U8,12038
91
92
  tecplot/text/__init__.py,sha256=hXk-XwewRyS-yxif3Wx5FS1wO5Uh6WQpRgtUiUfjNo0,112
92
93
  tecplot/text/font.py,sha256=tHMT2NGJC8rLCVCUdmxK0YN_f4hZpTevWIofwjAp7cs,6722
93
94
  tecplot/text/label_format.py,sha256=24MOvWtVZ_SKdcU16i5yEfxC-hBipmNOLQwJ_kzDr3k,12328
94
95
  tecplot/text/textbox.py,sha256=nwr0ReRC56MY5gB7Ie6UdDxrd_Os_ZI1_3n4bmOzalU,2882
95
- pytecplot-1.6.3.dist-info/LICENSE.html,sha256=SB6NHYAw2pnpGIjyaVCyuarotJKB1OQlgIiYq-09FiM,27908
96
- pytecplot-1.6.3.dist-info/METADATA,sha256=W4It_B4OttOq3ha-QuF4RM6dME37rMWhxmPQBnDsqUw,21749
97
- pytecplot-1.6.3.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
98
- pytecplot-1.6.3.dist-info/top_level.txt,sha256=gU7HYnAb3AVBIKRUOASdYO0QRI6hg1raLt8aN5E4o7s,8
99
- pytecplot-1.6.3.dist-info/RECORD,,
96
+ pytecplot-1.7.1.dist-info/METADATA,sha256=s_cRVL5ZILyULPUI4dskXTE2tfDzEsqLaE1Pg-igH44,22295
97
+ pytecplot-1.7.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
98
+ pytecplot-1.7.1.dist-info/top_level.txt,sha256=gU7HYnAb3AVBIKRUOASdYO0QRI6hg1raLt8aN5E4o7s,8
99
+ pytecplot-1.7.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.6.0)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -4,7 +4,7 @@
4
4
  <meta property="og:title" content="Tecplot License Agreement" />
5
5
  <meta property="og:type" content="website" />
6
6
  <meta property="og:description" content="" />
7
-
7
+ <meta charset="UTF-8">
8
8
  </head>
9
9
  <body style="font-family:Arial">
10
10
 
@@ -66,11 +66,11 @@
66
66
 
67
67
  <h4><span>14. Indemnity.</span></h4><p><span>Tecplot, Inc. will defend, indemnify and hold Licensee harmless from any claims, actions, suits or proceedings (each a "Claim") brought against Licensee by a third party to the extent such Claim is based on an allegation that the Software, when used in accordance with this Agreement, infringes the intellectual property rights of third parties, provided that (i) Licensee gives Tecplot, Inc. written notice of any such Claim within ten (10) business days of said claim coming to its attention, and promptly provides all authority and information required for the defense thereof, (ii) Licensee cooperates with Tecplot, Inc. in the defense of the Claim, and (iii) such Claim does not arise due to the unauthorized acts or misconduct of Licensee, any modification of the Software by Licensee, any failure by Licensee to use corrections or enhancements provided by or on behalf of Tecplot, Inc. that would rectify such infringement, or the combination of the Software with software, hardware, information, data or other materials not furnished by Tecplot, Inc. to the extent such infringement would not have occurred but for such combination. In the event that a successful Claim is brought against Licensee and Licensee's use thereof is enjoined (or if Tecplot, Inc. otherwise elects), Tecplot, Inc., at its option, shall (i) procure for Licensee the right to continue to use the Software, (ii) replace the Software with non-infringing software, or (iii) terminate this Agreement with respect to the enjoined Software and return to Licensee a pro-rated portion of the fees paid to Tecplot, Inc.&nbsp;&nbsp;</span></p>
68
68
  <h4><span>15. Confidentiality.</span></h4><p><span>The Software contains proprietary trade secrets of Tecplot, Inc., and Licensee and any unlicensed user agrees to maintain the confidentiality of the Software using at least as great a degree of care as they use to maintain the confidentiality of their own most confidential information. Licensee agrees to reasonably communicate the terms and conditions of this Agreement to those persons employed by Licensee who come into contact with the Software, and to use reasonable best efforts to ensure their compliance with such terms and conditions, including, without limitation, not knowingly permitting such persons to Use any portion of the Software for the purpose of deriving the source code of the Software or defeating any passcode.&nbsp;&nbsp;</span></p>
69
-
70
- <h4><span>16. Entire Agreement; Interpretation.</span></h4><p><span>This Agreement constitutes the entire agreement between parties pertaining to the subject matter hereof and supersedes all prior representations, warranties, conditions, agreements, and understandings, whether oral or written, express or implied, relating to this Agreement. No supplement, modification, or waiver of this Agreement shall be effective unless it is provided or approved by Tecplot, Inc. in writing. Any waiver or modification of this Agreement shall only be effective if it is in writing and signed by both parties hereto. The terms of purchase orders, payment documents, or similar documents you submit to Tecplot will not amend or become part of this Agreement and will not be binding on Tecplot. All such terms are hereby rejected. If any part of this Agreement is found invalid or unenforceable by a Court of competent jurisdiction, the remainder shall be interpreted so as to reasonably effect the intention of the parties.&nbsp;&nbsp;</span></p>
69
+ <h4><span>16. Marketing.</span></h4><p><span> Licensee hereby grants to Tecplot, Inc. a non-exclusive license to use Licensee's name, logo, trademarks, and trade names (collectively, the "Licensee Marks") in Tecplot, Inc.'s promotional and marketing material from time to time for the purpose of identifying Licensee as a customer. Tecplot, Inc. shall obtain the Licensee's written consent for any other specific use not previously approved under this Agreement. Licensee retains all rights, title, and interest in and to the Licensee Marks.&nbsp;&nbsp;</span></p>
70
+ <h4><span>17. Entire Agreement; Interpretation.</span></h4><p><span>This Agreement constitutes the entire agreement between parties pertaining to the subject matter hereof and supersedes all prior representations, warranties, conditions, agreements, and understandings, whether oral or written, express or implied, relating to this Agreement. No supplement, modification, or waiver of this Agreement shall be effective unless it is provided or approved by Tecplot, Inc. in writing. Any waiver or modification of this Agreement shall only be effective if it is in writing and signed by both parties hereto. The terms of purchase orders, payment documents, or similar documents you submit to Tecplot will not amend or become part of this Agreement and will not be binding on Tecplot. All such terms are hereby rejected. If any part of this Agreement is found invalid or unenforceable by a Court of competent jurisdiction, the remainder shall be interpreted so as to reasonably effect the intention of the parties.&nbsp;&nbsp;</span></p>
71
71
 
72
72
  <div><p>&nbsp;</p></div>
73
- <p><span>Last update: February 2024</span></p>
73
+ <p><span>Last update: May 2025</span></p>
74
74
 
75
75
  </div>
76
76
  </body>
tecplot/data/array.py CHANGED
@@ -4,8 +4,19 @@ import ctypes
4
4
  import logging
5
5
  import textwrap
6
6
 
7
- from ctypes import (addressof, byref, cast, c_double, c_float, c_int8, c_int16,
8
- c_int32, c_int64, c_void_p, POINTER)
7
+ from ctypes import (
8
+ addressof,
9
+ byref,
10
+ cast,
11
+ c_double,
12
+ c_float,
13
+ c_int8,
14
+ c_int16,
15
+ c_int32,
16
+ c_int64,
17
+ c_void_p,
18
+ POINTER,
19
+ )
9
20
 
10
21
  from ..tecutil import _tecutil, _tecutil_connector
11
22
  from ..constant import *
@@ -100,6 +111,7 @@ class Array(c_void_p):
100
111
  `ContourLevels.reset()` or similar. This will ensure that the total
101
112
  range of the new values is presented in the plot.
102
113
  """
114
+
103
115
  def __init__(self, zone, variable):
104
116
  self.zone = zone
105
117
  self.variable = variable
@@ -114,12 +126,12 @@ class Array(c_void_p):
114
126
  return False
115
127
 
116
128
  def _delete_cache(self):
117
- attrs = '''
129
+ attrs = """
118
130
  _rnr _wnr _rrp _wrp
119
131
  _location
120
132
  _len
121
133
  _data_type
122
- '''.split()
134
+ """.split()
123
135
  for attr in attrs:
124
136
  try:
125
137
  delattr(self, attr)
@@ -127,12 +139,18 @@ class Array(c_void_p):
127
139
  pass
128
140
 
129
141
  def _native_reference(self, writable=False):
130
- args = (self.zone.dataset.uid, self.zone.index + 1, self.variable.index + 1)
142
+ args = (
143
+ self.zone.dataset.uid,
144
+ self.zone.index + 1,
145
+ self.variable.index + 1,
146
+ )
131
147
  if writable:
132
148
  if self._cache:
133
149
  if not hasattr(self, '_wnr'):
134
150
  with tecutil.lock():
135
- self._wnr = _tecutil.DataValueGetWritableNativeRefByUniqueID(*args)
151
+ self._wnr = _tecutil.DataValueGetWritableNativeRefByUniqueID(
152
+ *args
153
+ )
136
154
  return self._wnr
137
155
  else:
138
156
  with tecutil.lock():
@@ -141,7 +159,9 @@ class Array(c_void_p):
141
159
  if self._cache:
142
160
  if not hasattr(self, '_rnr'):
143
161
  with tecutil.lock():
144
- self._rnr = _tecutil.DataValueGetReadableNativeRefByUniqueID(*args)
162
+ self._rnr = _tecutil.DataValueGetReadableNativeRefByUniqueID(
163
+ *args
164
+ )
145
165
  return self._rnr
146
166
  else:
147
167
  with tecutil.lock():
@@ -154,8 +174,9 @@ class Array(c_void_p):
154
174
  raise TecplotLogicError(msg)
155
175
  elif writable:
156
176
  ref = self._native_reference(writable=True)
157
- _tecutil.handle.tecUtilDataValueGetWritableRawPtrByRef.restype = \
158
- POINTER(self.c_type)
177
+ _tecutil.handle.tecUtilDataValueGetWritableRawPtrByRef.restype = POINTER(
178
+ self.c_type
179
+ )
159
180
  wrp = _tecutil.DataValueGetWritableRawPtrByRef(ref)
160
181
  if self._cache:
161
182
  if not hasattr(self, '_wrp'):
@@ -164,8 +185,9 @@ class Array(c_void_p):
164
185
  else:
165
186
  return wrp
166
187
  else:
167
- _tecutil.handle.tecUtilDataValueGetReadableRawPtrByRef.restype = \
168
- POINTER(self.c_type)
188
+ _tecutil.handle.tecUtilDataValueGetReadableRawPtrByRef.restype = POINTER(
189
+ self.c_type
190
+ )
169
191
  rrp = _tecutil.DataValueGetReadableRawPtrByRef(self)
170
192
  if self._cache:
171
193
  if not hasattr(self, '_rrp'):
@@ -202,6 +224,12 @@ class Array(c_void_p):
202
224
  else:
203
225
  return _tecutil.DataValueGetCountByRef(self)
204
226
 
227
+ def _value_location(self):
228
+ with self.zone.dataset.frame.activated():
229
+ return _tecutil.DataValueGetLocation(
230
+ self.zone.index + 1, self.variable.index + 1
231
+ )
232
+
205
233
  @property
206
234
  def location(self):
207
235
  """`ValueLocation`: Data points location with respect to the elements.
@@ -214,12 +242,10 @@ class Array(c_void_p):
214
242
  """
215
243
  if self._cache:
216
244
  if not hasattr(self, '_location'):
217
- self._location = _tecutil.DataValueGetLocation(
218
- self.zone.index + 1, self.variable.index + 1)
245
+ self._location = self._value_location()
219
246
  return self._location
220
247
  else:
221
- return _tecutil.DataValueGetLocation(self.zone.index + 1,
222
- self.variable.index + 1)
248
+ return self._value_location()
223
249
 
224
250
  @property
225
251
  def shape(self):
@@ -318,7 +344,8 @@ class Array(c_void_p):
318
344
  FieldDataType.Double: ctypes.c_double,
319
345
  FieldDataType.Int32: ctypes.c_int32,
320
346
  FieldDataType.Int16: ctypes.c_int16,
321
- FieldDataType.Byte: ctypes.c_int8}
347
+ FieldDataType.Byte: ctypes.c_int8,
348
+ }
322
349
  return _ctypes[self.data_type]
323
350
 
324
351
  @property
@@ -360,7 +387,7 @@ class Array(c_void_p):
360
387
  >>> x = dataset.zone('Zone').values('X').as_ctypes_array()
361
388
  """
362
389
  size = (len(self) - offset) if size is None else size
363
- CArray = (self.c_type * size)
390
+ CArray = self.c_type * size
364
391
  if copy:
365
392
  arr = CArray()
366
393
  _tecutil.DataValueArrayGetByRef(self, offset + 1, size, arr)
@@ -368,8 +395,7 @@ class Array(c_void_p):
368
395
  else:
369
396
  ptr = self._raw_pointer(True)
370
397
  if offset:
371
- vptr = ctypes.cast(ctypes.pointer(ptr),
372
- ctypes.POINTER(ctypes.c_void_p))
398
+ vptr = ctypes.cast(ctypes.pointer(ptr), ctypes.POINTER(ctypes.c_void_p))
373
399
  vptr.contents.value += ctypes.sizeof(ptr._type_) * offset
374
400
  ptr_addr = ctypes.addressof(ptr.contents)
375
401
  arr = CArray.from_address(ptr_addr)
@@ -402,6 +428,7 @@ class Array(c_void_p):
402
428
  >>> x = dataset.zone('Zone').values('X').as_numpy_array()
403
429
  """
404
430
  import numpy as np
431
+
405
432
  carr = self.as_ctypes_array(offset, size, copy)
406
433
  return np.ctypeslib.as_array(carr)
407
434
 
@@ -441,11 +468,13 @@ class Array(c_void_p):
441
468
  try:
442
469
  return self.as_numpy_array(offset, size, copy=True)
443
470
  except ImportError:
444
- msg = textwrap.dedent('''\
471
+ msg = textwrap.dedent(
472
+ """\
445
473
  Falling back to using basic Python for data operations.
446
474
  If installed, PyTecplot will make use of Numpy where
447
475
  appropriate for significant performance gains.
448
- ''')
476
+ """
477
+ )
449
478
  log.warning(msg)
450
479
  return self.as_ctypes_array(offset, size, copy=True)
451
480
 
@@ -506,22 +535,23 @@ class Array(c_void_p):
506
535
 
507
536
  if isinstance(val, Array):
508
537
  if (
509
- offset == 0 and
510
- size in (None, len(self)) and
511
- val.zone.dataset == self.zone.dataset
538
+ offset == 0
539
+ and size in (None, len(self))
540
+ and val.zone.dataset == self.zone.dataset
512
541
  ):
513
542
  # copy whole array
514
543
  if val.zone == self.zone:
515
- eqn = 'V{0} = V{1}'.format(self.variable.index + 1,
516
- val.variable.index + 1)
544
+ eqn = 'V{0} = V{1}'.format(
545
+ self.variable.index + 1, val.variable.index + 1
546
+ )
517
547
  operate.execute_equation(eqn, self.zone)
518
548
  else:
519
549
  src_zone_idx = self.zone.index
520
550
  tgt_zone_idx = val.zone.index
521
551
  var_idx = val.variable.index
522
- if not _tecutil.DataValueCopy(src_zone_idx + 1,
523
- tgt_zone_idx + 1,
524
- var_idx + 1):
552
+ if not _tecutil.DataValueCopy(
553
+ src_zone_idx + 1, tgt_zone_idx + 1, var_idx + 1
554
+ ):
525
555
  raise TecplotSystemError()
526
556
  return
527
557
  else:
@@ -535,17 +565,20 @@ class Array(c_void_p):
535
565
  # coerce val to a ctypes array, using numpy if available
536
566
  try:
537
567
  import numpy as np
568
+
538
569
  nparr = np.asarray(val, dtype=ctype)
539
570
  ptarr = nparr.ctypes.data_as(POINTER(ctype))
540
571
  ptaddr = addressof(ptarr.contents)
541
572
  arr = (ctype * size).from_address(ptaddr)
542
573
  except ImportError:
543
- msg = textwrap.dedent('''\
574
+ msg = textwrap.dedent(
575
+ """\
544
576
  Falling back to using basic Python for data
545
577
  operations. If installed, PyTecplot will make use
546
578
  of Numpy where appropriate for significant
547
579
  performance gains.
548
- ''')
580
+ """
581
+ )
549
582
  log.warning(msg)
550
583
  arr = (ctype * size)(*val)
551
584
 
@@ -606,7 +639,7 @@ class Array(c_void_p):
606
639
 
607
640
  @property
608
641
  def shared_zones(self):
609
- """`list` of `Zones <data_access>`: All `Zones <data_access>` sharing this array.
642
+ """`list` of `Zones <data_access>`: All zones sharing this array.
610
643
 
611
644
  Example usage::
612
645
 
@@ -616,10 +649,14 @@ class Array(c_void_p):
616
649
  0
617
650
  1
618
651
  """
619
- indices = _tecutil.DataValueGetShareZoneSet(self.zone.index + 1,
620
- self.variable.index + 1)
621
- ret = [self.zone.dataset.zone(i) for i in indices]
622
- indices.dealloc()
652
+ with self.zone.dataset.frame.activated():
653
+ indices = _tecutil.DataValueGetShareZoneSet(
654
+ self.zone.index + 1, self.variable.index + 1
655
+ )
656
+ try:
657
+ ret = [self.zone.dataset.zone(i) for i in indices]
658
+ finally:
659
+ indices.dealloc()
623
660
  return ret
624
661
 
625
662
  @property
@@ -638,5 +675,7 @@ class Array(c_void_p):
638
675
  z = ds.add_ordered_zone('Z1', (3,))
639
676
  assert not z.values(0).passive
640
677
  """
641
- return _tecutil.DataValueIsPassive(self.zone.index + 1,
642
- self.variable.index + 1)
678
+ with self.zone.dataset.frame.activated():
679
+ return _tecutil.DataValueIsPassive(
680
+ self.zone.index + 1, self.variable.index + 1
681
+ )
tecplot/data/dataset.py CHANGED
@@ -884,7 +884,7 @@ class Dataset(object):
884
884
  *zones (`Zone <data_access>`, optional): Specific `Zones
885
885
  <data_access>` to copy. All zones will be copied if none are
886
886
  supplied.
887
- shared_variables (`bool` or `list` of `Variables <Variable>`):
887
+ share_variables (`bool` or `list` of `Variables <Variable>`):
888
888
  Share all variables between the original and generated zones if
889
889
  `True` or the list of Variables to be shared. Variable sharing
890
890
  allows you to lower the use of physical memory (RAM). When
@@ -937,9 +937,10 @@ class Dataset(object):
937
937
  if not share_variables:
938
938
  branch_variables = list(self.variables())
939
939
  elif isinstance(share_variables, Iterable):
940
+ share_variables = list(share_variables)
940
941
  for idx, var in enumerate(share_variables):
941
942
  if not isinstance(var, Variable):
942
- share_variables[idx]= self.variable(var)
943
+ share_variables[idx] = self.variable(var)
943
944
 
944
945
  branch_variables = [v for v in self.variables()
945
946
  if v not in share_variables]
@@ -1191,6 +1192,14 @@ class Dataset(object):
1191
1192
  corrupting loaded data, if it attempts to render (especially
1192
1193
  polytope) data without connectivity.
1193
1194
 
1195
+ .. warning:: **Variable Sharing.**
1196
+
1197
+ If a new zone has the same type and shape as an existing zone,
1198
+ variables may be shared by Tecplot to conserve memory. This
1199
+ variable sharing can be broken with the `branch_variables()`
1200
+ method. More information on when variable sharing occurs can be
1201
+ found in the |Tecplot User's Manual|.
1202
+
1194
1203
  .. note:: **Performance considerations for data manipulations.**
1195
1204
 
1196
1205
  When performing many data-manipulation operations including adding
@@ -1425,6 +1434,14 @@ class Dataset(object):
1425
1434
  corrupting loaded data, if it attempts to render (especially
1426
1435
  polytope) data without connectivity.
1427
1436
 
1437
+ .. warning:: **Variable Sharing.**
1438
+
1439
+ If a new zone has the same type and shape as an existing zone,
1440
+ variables may be shared by Tecplot to conserve memory. This
1441
+ variable sharing can be broken with the `branch_variables()`
1442
+ method. More information on when variable sharing occurs can be
1443
+ found in the |Tecplot User's Manual|.
1444
+
1428
1445
  .. note:: **Performance considerations for data manipulations.**
1429
1446
 
1430
1447
  When performing many data-manipulation operations including adding
@@ -1493,6 +1510,14 @@ class Dataset(object):
1493
1510
  corrupting loaded data, if it attempts to render (especially
1494
1511
  polytope) data without connectivity.
1495
1512
 
1513
+ .. warning:: **Variable Sharing.**
1514
+
1515
+ If a new zone has the same type and shape as an existing zone,
1516
+ variables may be shared by Tecplot to conserve memory. This
1517
+ variable sharing can be broken with the `branch_variables()`
1518
+ method. More information on when variable sharing occurs can be
1519
+ found in the |Tecplot User's Manual|.
1520
+
1496
1521
  .. note:: **Performance considerations for data manipulations.**
1497
1522
 
1498
1523
  When performing many data-manipulation operations including adding
@@ -1541,6 +1566,14 @@ class Dataset(object):
1541
1566
  corrupting loaded data, if it attempts to render (especially
1542
1567
  polytope) data without connectivity.
1543
1568
 
1569
+ .. warning:: **Variable Sharing.**
1570
+
1571
+ If a new zone has the same type and shape as an existing zone,
1572
+ variables may be shared by Tecplot to conserve memory. This
1573
+ variable sharing can be broken with the `branch_variables()`
1574
+ method. More information on when variable sharing occurs can be
1575
+ found in the |Tecplot User's Manual|.
1576
+
1544
1577
  .. note:: **Performance considerations for data manipulations.**
1545
1578
 
1546
1579
  When performing many data-manipulation operations including adding
tecplot/data/extract.py CHANGED
@@ -411,12 +411,12 @@ def extract_slice(origin=(0, 0, 0), normal=(0, 0, 1), source=None,
411
411
  arglist[sv.AUTOSTRANDTRANSIENTDATA] = bool(assign_strand_ids)
412
412
  if transient_mode != TransientOperationMode.SingleSolutionTime:
413
413
  arglist[sv.TRANSIENTOPERATIONMODE] = transient_mode
414
+ zone_type = Resulting1DZoneType(resulting_1d_zone_type)
415
+ arglist[sv.RESULTING1DZONETYPE] = zone_type
414
416
  if not _tecutil.CreateSliceZoneFromPlneX(arglist):
415
417
  raise TecplotSystemError()
416
418
  if dataset.num_zones == nzones:
417
419
  raise TecplotLogicError('No zones found when extracting slice')
418
- zone_type = Resulting1DZoneType(resulting_1d_zone_type)
419
- arglist[sv.RESULTING1DZONETYPE] = zone_type
420
420
 
421
421
  if (
422
422
  mode == ExtractMode.SingleZone and
tecplot/layout/frame.py CHANGED
@@ -1,13 +1,18 @@
1
+ from __future__ import annotations
2
+
1
3
  import contextlib
2
4
  import ctypes
3
5
  import logging
4
6
  import numbers
7
+ import typing
5
8
 
6
9
  from ..tecutil import _tecutil, sv
7
10
  from ..constant import *
8
11
  from ..exception import *
9
12
  from .. import annotation, constant, plot, session, tecutil
10
13
 
14
+ if typing.TYPE_CHECKING:
15
+ from ..data import Dataset
11
16
 
12
17
  log = logging.getLogger(__name__)
13
18
 
@@ -60,6 +65,9 @@ class Frame(session.Style):
60
65
  print(page.name)
61
66
  """
62
67
 
68
+ dataset: Dataset = None
69
+ """The `Dataset <tecplot.data.Dataset>` belonging to this Frame."""
70
+
63
71
  def __init__(self, uid, page):
64
72
  self.page = page
65
73
  self.uid = uid
tecplot/plot/slice.py CHANGED
@@ -3,6 +3,7 @@ from builtins import int, super
3
3
  import itertools as it
4
4
 
5
5
  from collections.abc import Iterable
6
+ from warnings import warn
6
7
 
7
8
  from ..tecutil import _tecutil, sv
8
9
  from ..constant import *
@@ -1533,9 +1534,14 @@ class SliceGroup(SliceGroupCollection):
1533
1534
  result = super().extract(mode, assign_strand_ids,
1534
1535
  resulting_1d_zone_type, transient_mode)
1535
1536
  if (
1536
- mode == ExtractMode.SingleZone and
1537
- transient_mode == TransientOperationMode.SingleSolutionTime
1537
+ mode == ExtractMode.SingleZone
1538
+ and transient_mode == TransientOperationMode.SingleSolutionTime
1538
1539
  ):
1539
- return list(result)[0]
1540
- else:
1541
- return result
1540
+ warn("extract() will always return a generator" +
1541
+ " in future versions of PyTecplot")
1542
+ if (
1543
+ self.show_primary_slice == True
1544
+ and self.show_start_and_end_slices == False
1545
+ ):
1546
+ return list(result)[0]
1547
+ return result
@@ -34,7 +34,7 @@ not be recoverable by the |Tecplot Engine|.
34
34
  from .aux_data import AuxData
35
35
  from .config import configuration
36
36
  from .session import (acquire_license, clear_suspend, connect, connected,
37
- disconnect, license_expiration, release_license,
37
+ disconnect, license_expiration, redraw, release_license,
38
38
  start_roaming, stop, stop_roaming, suspend,
39
39
  suspend_enter, suspend_exit)
40
40
  from .state_changed import connectivity_altered, data_altered, zone_added
@@ -5,8 +5,10 @@ import logging
5
5
  import platform
6
6
  import textwrap
7
7
 
8
- from ..tecutil import _tecutil_connector
8
+ from ..tecutil import _tecutil, _tecutil_connector, lock
9
+ from ..constant import *
9
10
  from ..exception import *
11
+ from .. import macro
10
12
  from .state_changed import _emit_state_changes
11
13
 
12
14
 
@@ -155,12 +157,14 @@ def start_roaming(days):
155
157
  Your PyTecplot roaming license has been checked in.
156
158
  """
157
159
  if _tecutil_connector.connected:
158
- msg = textwrap.dedent('''\
160
+ msg = textwrap.dedent(
161
+ """\
159
162
  Roaming PyTecplot is not available when connected.
160
163
  To roam PyTecplot, first disconnect with
161
164
  tecplot.session.disconnect(). Roaming with Tecplot 360
162
165
  is available under Help -> License Roaming.
163
- ''')
166
+ """
167
+ )
164
168
  raise TecplotLogicError(msg)
165
169
  _tecutil_connector.start_roaming(days)
166
170
 
@@ -179,12 +183,14 @@ def stop_roaming(force=False):
179
183
  Your PyTecplot roaming license has been checked in.
180
184
  """
181
185
  if _tecutil_connector.connected:
182
- msg = textwrap.dedent('''\
186
+ msg = textwrap.dedent(
187
+ """\
183
188
  Roaming PyTecplot is not available when connected.
184
189
  To roam PyTecplot, first disconnect with
185
190
  tecplot.session.disconnect(). Roaming with Tecplot 360
186
191
  is available under Help -> License Roaming.
187
- ''')
192
+ """
193
+ )
188
194
  raise TecplotLogicError(msg)
189
195
  _tecutil_connector.stop_roaming(force)
190
196
 
@@ -421,5 +427,55 @@ def clear_suspend():
421
427
  _tecutil_connector.client.clear_suspend_interface()
422
428
 
423
429
 
430
+ def redraw():
431
+ """Force a refresh of all plots on the screen (connected mode only).
432
+
433
+ Forcibly updates all plots and renders everything to the screen. This is useful when
434
+ connected to a live instance of Tecplot 360 where updates faster than one second
435
+ (the default) is desired. This command is ignored in batch mode.
436
+
437
+ Eample usage::
438
+
439
+ for i in range(10):
440
+ zone.values('s')[:] = new_data
441
+ tp.session.redraw() # force redraw on screen before continuing script
442
+
443
+ .. versionadded:: 1.7
444
+ `redraw()` added in PyTecplot 1.7.0.
445
+
446
+ .. versionadded:: 2025.1
447
+ Forcing a redraw is supported in Tecplot 360 2025 R1 and later. For earlier
448
+ versions of Tecplot 360, the redraw is deferred but guaranteed to happen
449
+ within one second after the call.
450
+ """
451
+ tuclient = _tecutil_connector.client
452
+ if tuclient:
453
+ try:
454
+ """
455
+ Developer's note:
456
+ The TecUtilServer goes to great length to shutdown the user interface to
457
+ keep processing PyTecplot scripts in connected mode fast. Drawing to the
458
+ screen in Tecplot 360 requires that the Tecplot engine take control
459
+ which means the server must release it's control. We do this by
460
+ temporarily setting the server to "single command" mode, then asking if
461
+ automatic redraw is active. If it is, then the interface will
462
+ immediately draw. If not, then we just toggle it on then off which will
463
+ cause the whole workarea to redraw, updating anything that was changed
464
+ since the last draw.
465
+ """
466
+ tuclient.processing_mode = TecUtilServerProcessingMode.Single
467
+ if not _tecutil.AutoRedrawIsActive():
468
+ try:
469
+ macro.execute_command('''
470
+ $!Interface AutoRedraw { IsActive=True }
471
+ ''')
472
+ finally:
473
+ macro.execute_command('''
474
+ $!Interface AutoRedraw { IsActive=False }
475
+ ''')
476
+ finally:
477
+ tuclient.processing_mode = TecUtilServerProcessingMode.Unspecified
478
+
479
+
424
480
  # Ensure the Tecplot engine is cleaned up on exit if started.
425
481
  atexit.register(stop)
@@ -318,9 +318,10 @@ class TecUtilClient(TecUtilRPC):
318
318
  ERRMSG = 'Could not perform handshake with preferred method'
319
319
 
320
320
  msg = bytes(self.socket.recv())
321
+ log.debug(f'received message: {msg}')
321
322
 
322
323
  if len(msg) < 10:
323
- raise TecplotInvalidMessage(ERRMSG + ' (response too small')
324
+ raise TecplotInvalidMessage(ERRMSG + ' (response too small)')
324
325
  if msg[0] != RAWMSG:
325
326
  raise TecplotInvalidMessage(ERRMSG + ' (not a raw message)')
326
327
 
@@ -459,9 +460,9 @@ class TecUtilClient(TecUtilRPC):
459
460
  assert self.socket is not None
460
461
 
461
462
  if self.tuserver_version < 2:
462
- log.warn('This version of the TecUtil Server addon does not'
463
- ' support the suspended interface context. Please update'
464
- ' to the newest version of Tecplot 360.')
463
+ log.warning('This version of the TecUtil Server addon does not'
464
+ ' support the suspended interface context. Please update'
465
+ ' to the newest version of Tecplot 360.')
465
466
  yield
466
467
  else:
467
468
  if self.suspended:
@@ -485,9 +486,9 @@ class TecUtilClient(TecUtilRPC):
485
486
  @processing_mode.setter
486
487
  def processing_mode(self, mode):
487
488
  if self.tuserver_version < 6:
488
- log.warn('This version of the TecUtil Server addon does not'
489
- ' support different processing modes. Please update'
490
- ' to the newest version of Tecplot 360.')
489
+ log.warning('This version of the TecUtil Server addon does not'
490
+ ' support different processing modes. Please update'
491
+ ' to the newest version of Tecplot 360.')
491
492
  return
492
493
 
493
494
  request = tecrpc.Request()
@@ -512,9 +513,9 @@ class TecUtilClient(TecUtilRPC):
512
513
  @logging_level.setter
513
514
  def logging_level(self, level):
514
515
  if self.tuserver_version < 6:
515
- log.warn('This version of the TecUtil Server addon does not'
516
- ' support adjusting the logging level. Please update'
517
- ' to the newest version of Tecplot 360.')
516
+ log.warning('This version of the TecUtil Server addon does not'
517
+ ' support adjusting the logging level. Please update'
518
+ ' to the newest version of Tecplot 360.')
518
519
  return
519
520
 
520
521
  request = tecrpc.Request()
@@ -119,7 +119,7 @@ class TecUtilConnector(object):
119
119
  msg = 'required Python module: protobuf'
120
120
  raise ImportError(msg)
121
121
  else:
122
- # protobuf installed, both not working
122
+ # protobuf installed but not working
123
123
  msg = 'invalid message received on port {}'.format(port)
124
124
  raise TecplotInvalidMessage(msg + '\n' + str(err_pb))
125
125
 
@@ -442,10 +442,7 @@ class TecUtilConnector(object):
442
442
 
443
443
  Try running python using the tec360-env script included in the
444
444
  Tecplot 360 bin folder:
445
- "/Applications/Tecplot 360 EX [VERSION]/bin/tec360-env" -- python [options]
446
-
447
- On Apple Silicon machines, an Intel version of Python is required:
448
- "/Applications/Tecplot 360 EX [VERSION]/bin/tec360-env" -- python3-intel64 [options]''')
445
+ "/Applications/Tecplot 360 EX [VERSION]/bin/tec360-env" -- python [options]''')
449
446
 
450
447
  if self.libbatch_path is None:
451
448
  raise TecplotLibraryNotFoundError(errmsg)
tecplot/version.py CHANGED
@@ -33,8 +33,8 @@ from .tecutil import _tecutil_connector
33
33
 
34
34
  Version = collections.namedtuple('V', ['major', 'minor', 'patch', 'build'])
35
35
 
36
- version = '1.6.3'
37
- build = 'f1ee370'
36
+ version = '1.7.1'
37
+ build = 'd6b04de'
38
38
  version_info = Version(*[int(x) for x in version.split('.')], build=build or 0)
39
39
 
40
40
  sdk_version_info = _tecutil_connector.sdk_version_info