pytecplot 1.7.3__py3-none-any.whl → 1.7.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.
- {pytecplot-1.7.3.dist-info → pytecplot-1.7.4.dist-info}/METADATA +10 -1
- {pytecplot-1.7.3.dist-info → pytecplot-1.7.4.dist-info}/RECORD +11 -11
- {pytecplot-1.7.3.dist-info → pytecplot-1.7.4.dist-info}/WHEEL +1 -1
- tecplot/data/dataset.py +24 -34
- tecplot/data/load.py +8 -9
- tecplot/data/save.py +26 -29
- tecplot/layout/frame.py +3 -0
- tecplot/tecutil/tecutil_client.py +1 -1
- tecplot/version.py +2 -2
- {pytecplot-1.7.3.dist-info → pytecplot-1.7.4.dist-info}/licenses/LICENSE.html +0 -0
- {pytecplot-1.7.3.dist-info → pytecplot-1.7.4.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pytecplot
|
|
3
|
-
Version: 1.7.
|
|
3
|
+
Version: 1.7.4
|
|
4
4
|
Summary: A Python interface to Tecplot 360
|
|
5
5
|
Author-email: "Tecplot, Inc." <support@tecplot.com>
|
|
6
6
|
License-Expression: LicenseRef-Tecplot-Software-License
|
|
@@ -107,6 +107,15 @@ For more information, see |Tecplot 360s release notes|.
|
|
|
107
107
|
|
|
108
108
|
.. |Tecplot 360s release notes| replace:: `Tecplot 360's release notes <https://tecplot.com/products/tecplot-360/new-in-tecplot-360>`__
|
|
109
109
|
|
|
110
|
+
PyTecplot 1.7.4
|
|
111
|
+
^^^^^^^^^^^^^^^
|
|
112
|
+
|
|
113
|
+
* Fixed a bug where loading data files failed with the error:
|
|
114
|
+
`TypeError: Field tecrpc.Argument.int64: Expected an int, got a boolean.`
|
|
115
|
+
which was due to changes in the underlying RPC message system.
|
|
116
|
+
* Added `include_custom_labels` parameter to `save_tecplot_plt()` and
|
|
117
|
+
`save_tecplot_ascii()` to allow for writing out data files without custom labels.
|
|
118
|
+
|
|
110
119
|
PyTecplot 1.7.3
|
|
111
120
|
^^^^^^^^^^^^^^^
|
|
112
121
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
pytecplot-1.7.
|
|
1
|
+
pytecplot-1.7.4.dist-info/licenses/LICENSE.html,sha256=I240fAHgxqlSQn_eSmb9ktcS4hgugObDnHYQnlEPzt8,28492
|
|
2
2
|
tecplot/__init__.py,sha256=iHAPbGDgIh7HtLWaWcDYfVS4TOsNrRSHyQa-H_6Li3g,3550
|
|
3
3
|
tecplot/constant.py,sha256=DJ641ugRqAQNd8uQITFbhbyEK3JwR9QhfG_CteUn5s4,8686
|
|
4
4
|
tecplot/exception.py,sha256=YB4zeL0-07yCy4pyUqeFdNQ98nK11h2n3ZHHe58Od6s,6493
|
|
5
5
|
tecplot/macro.py,sha256=uE29ftjdr2HdlFVa9SS-1uBU8Di4W3PwquhI75LnvhM,13307
|
|
6
|
-
tecplot/version.py,sha256=
|
|
6
|
+
tecplot/version.py,sha256=m28NzZOI2Idf7k94m2r0_AtcJ-BqtkqGyc1LpvMdhvU,1544
|
|
7
7
|
tecplot/annotation/__init__.py,sha256=FfL8JhlO6T9NTajVRtgXHp6A6PhjpO51gnVKlHMkzWA,333
|
|
8
8
|
tecplot/annotation/annotation.py,sha256=B7G-BkrQ4lYBpak9RR3u7Pvdci5MGLUvNo_MnJidyY4,8481
|
|
9
9
|
tecplot/annotation/geometry.py,sha256=3jnp_Ut1AQdhSUCMAJ1yFuL_epoGUoTny03cv0kl09k,12516
|
|
@@ -15,16 +15,16 @@ tecplot/annotation/text.py,sha256=JFaaOJR1h6LyLt9vUVanQmakXtGZOguVdA-3oT8tWhQ,26
|
|
|
15
15
|
tecplot/data/__init__.py,sha256=apkztrNGBSS5cfyYSIYkrwU1eeRiO0GP4sHvryPJfVA,1937
|
|
16
16
|
tecplot/data/array.py,sha256=wcGIaoVbSjSdwQP3DpXAOECHAmjTBurbmZvTodF5h1E,24246
|
|
17
17
|
tecplot/data/create.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
18
|
-
tecplot/data/dataset.py,sha256=
|
|
18
|
+
tecplot/data/dataset.py,sha256=MvM1vVf5NlHaDc3rI6mQV_mjNxOaGVuBsGGRtLXSG3I,81909
|
|
19
19
|
tecplot/data/extract.py,sha256=VqDqe_-VcQSKD-rRo4DSqohZElUan2dxuNlLRM_qE54,21891
|
|
20
20
|
tecplot/data/face_neighbors.py,sha256=Bm77F87qtDcw2u1BWFNE9cRTc8FI9MS3Cw8YlaJsdkc,19440
|
|
21
21
|
tecplot/data/facemap.py,sha256=Xhn77cZndfgUA9U014I4M_ecwj8bI98_A7DZC24-Jwk,31287
|
|
22
22
|
tecplot/data/fe_cell_type.py,sha256=G2U0c1RBHvUP03_YjHGHaMk1JOkF-g9SlBlLkWXH2Yg,3911
|
|
23
|
-
tecplot/data/load.py,sha256=
|
|
23
|
+
tecplot/data/load.py,sha256=mTZ-c3k-adQKYxm2tMRnzuQNwFLTOHCYYhKGwe4kd3o,109473
|
|
24
24
|
tecplot/data/nodemap.py,sha256=AhSGO_Bmw3OB01UYKmjldTOci5rlUMGK_eiDrDHWrxk,36209
|
|
25
25
|
tecplot/data/operate.py,sha256=oFBOzLPYnA8hUCaeiTdpPXdFlLZNLoQCb-EHcPE5iDA,42593
|
|
26
26
|
tecplot/data/query.py,sha256=Ocr9h1I2bFuJFLVOFEqiCUnuxTzD4wnToNzYk996GhY,14807
|
|
27
|
-
tecplot/data/save.py,sha256=
|
|
27
|
+
tecplot/data/save.py,sha256=iTmR7DJL3iUDgHOikFRPkMRejmZrNaeX7BHpZqhI4aY,16991
|
|
28
28
|
tecplot/data/variable.py,sha256=xJCOO5ZeXCAFWKJYnC_mMxWKoy-oe3pE0EnHytZOwro,9437
|
|
29
29
|
tecplot/data/zone.py,sha256=LxtlinZ2ejq9UnOvapQ2wZfkMdjjRTR6wCi-lzXVa6M,35207
|
|
30
30
|
tecplot/export/__init__.py,sha256=eX3hx-FX9zEE-D3Nnfm_5rEG-jq6XufUDZmmRaLnKFw,781
|
|
@@ -36,7 +36,7 @@ tecplot/export/time_animation.py,sha256=lpy7mq4zQG0Wj5Q3pezHSqGbdaiX2fTOdqf3-s9t
|
|
|
36
36
|
tecplot/extension/__init__.py,sha256=3bDQNm1kqkiWsU7MkbturRl7YuRGSv4fjvGIN_XW5no,425
|
|
37
37
|
tecplot/extension/ipython.py,sha256=glcANfhj8pG5Pv_kF4NSfuyQXwgBKowQ1-nJbJGepgc,2229
|
|
38
38
|
tecplot/layout/__init__.py,sha256=HvlOnhPIsFHSRDACEPN3rlOUmk9tpLNPttReGq3P3_8,1218
|
|
39
|
-
tecplot/layout/frame.py,sha256=
|
|
39
|
+
tecplot/layout/frame.py,sha256=m6Z1JQ96k4CloN_qmvPJwOIfhPrIwnJ_1NzQK8kTv-4,51917
|
|
40
40
|
tecplot/layout/layout.py,sha256=vcrqWgOkcEW90VCbLG2-7xSWajPhP3cRsLnRIrcuO4c,16025
|
|
41
41
|
tecplot/layout/page.py,sha256=MqX3jJAd3o2xkfaSGXU7TD4gnXv-9CQcDj5WJnlIisU,18264
|
|
42
42
|
tecplot/legend/__init__.py,sha256=zj94bHuUKvgWxn5dddEuahKCXVDMOFonQNgKxtuNSTQ,185
|
|
@@ -85,7 +85,7 @@ tecplot/tecutil/preamble.py,sha256=wzpTPY3xyv8-cnWpp5q1ay0jlXRNmMEmC0UXN-xu0aU,2
|
|
|
85
85
|
tecplot/tecutil/stringlist.py,sha256=GMuwiP0scuyLxEUbcJFIz4DU9TLAhNdjGHDWawGGT-o,3533
|
|
86
86
|
tecplot/tecutil/sv.py,sha256=v6vBV_dCtZ6E-J3K4l27NCLF-eAlQddCqY3dgJ16ztE,54618
|
|
87
87
|
tecplot/tecutil/tecutil.py,sha256=RkVV3MLDd38sXHO9wqNkk-LPIW_qG8vZFST8455rKnM,696363
|
|
88
|
-
tecplot/tecutil/tecutil_client.py,sha256=
|
|
88
|
+
tecplot/tecutil/tecutil_client.py,sha256=2ELrTJG2hlPoOMp6ud0bb6ciTSQTEhFpkA50QrMVB6c,23754
|
|
89
89
|
tecplot/tecutil/tecutil_connector.py,sha256=HW05xfxIbSrnnpXic3DNUkXmMmo0e9Z-HhT3EoC_Mzg,37059
|
|
90
90
|
tecplot/tecutil/tecutil_rpc.py,sha256=ypGDA5ktXNClT9trdK1ElGnhrsO-oTABncT2CdQkRDU,287428
|
|
91
91
|
tecplot/tecutil/util.py,sha256=JgNpjE3J7Uz_QHqPrOxmHCwNnIojkZVfdKftVw_WUdo,12055
|
|
@@ -93,7 +93,7 @@ tecplot/text/__init__.py,sha256=hXk-XwewRyS-yxif3Wx5FS1wO5Uh6WQpRgtUiUfjNo0,112
|
|
|
93
93
|
tecplot/text/font.py,sha256=tHMT2NGJC8rLCVCUdmxK0YN_f4hZpTevWIofwjAp7cs,6722
|
|
94
94
|
tecplot/text/label_format.py,sha256=24MOvWtVZ_SKdcU16i5yEfxC-hBipmNOLQwJ_kzDr3k,12328
|
|
95
95
|
tecplot/text/textbox.py,sha256=nwr0ReRC56MY5gB7Ie6UdDxrd_Os_ZI1_3n4bmOzalU,2882
|
|
96
|
-
pytecplot-1.7.
|
|
97
|
-
pytecplot-1.7.
|
|
98
|
-
pytecplot-1.7.
|
|
99
|
-
pytecplot-1.7.
|
|
96
|
+
pytecplot-1.7.4.dist-info/METADATA,sha256=kq8Y9ArAbkVPkrLVzXQyG9x7FLZXkqeBSrp6jOop6ks,23443
|
|
97
|
+
pytecplot-1.7.4.dist-info/WHEEL,sha256=YCfwYGOYMi5Jhw2fU4yNgwErybb2IX5PEwBKV4ZbdBo,91
|
|
98
|
+
pytecplot-1.7.4.dist-info/top_level.txt,sha256=gU7HYnAb3AVBIKRUOASdYO0QRI6hg1raLt8aN5E4o7s,8
|
|
99
|
+
pytecplot-1.7.4.dist-info/RECORD,,
|
tecplot/data/dataset.py
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import collections
|
|
2
2
|
import ctypes
|
|
3
3
|
import fnmatch
|
|
4
|
-
|
|
4
|
+
|
|
5
5
|
import logging
|
|
6
6
|
import re
|
|
7
7
|
import warnings
|
|
8
8
|
|
|
9
9
|
from collections.abc import Iterable
|
|
10
|
-
from functools import reduce
|
|
11
10
|
from keyword import iskeyword
|
|
12
|
-
from textwrap import dedent
|
|
11
|
+
from textwrap import dedent
|
|
13
12
|
|
|
14
13
|
from ..tecutil import _tecutil, _tecutil_connector
|
|
15
14
|
from ..constant import *
|
|
@@ -386,8 +385,7 @@ class Dataset(object):
|
|
|
386
385
|
ZoneType.FEPolygon: PolyFEZone,
|
|
387
386
|
ZoneType.FEPolyhedron: PolyFEZone,
|
|
388
387
|
ZoneType.FEMixed: MixedFEZone}
|
|
389
|
-
|
|
390
|
-
if isinstance(pattern, (str, pattern_type)):
|
|
388
|
+
if isinstance(pattern, (str, re.Pattern)):
|
|
391
389
|
try:
|
|
392
390
|
return next(self.zones(pattern))
|
|
393
391
|
except StopIteration:
|
|
@@ -412,7 +410,7 @@ class Dataset(object):
|
|
|
412
410
|
def _zone_indices(self):
|
|
413
411
|
"""Zero-based indices of all enabled zones in the dataset."""
|
|
414
412
|
success, ptr = _tecutil.ZoneGetEnabledByDataSetID(self.uid)
|
|
415
|
-
if not success:
|
|
413
|
+
if not success or not ptr:
|
|
416
414
|
raise TecplotSystemError()
|
|
417
415
|
indices = ctypes.cast(ptr, IndexSet)
|
|
418
416
|
try:
|
|
@@ -436,7 +434,7 @@ class Dataset(object):
|
|
|
436
434
|
try:
|
|
437
435
|
return [_tecutil.ZoneGetUniqueIDByDataSetID(self.uid, zone_index + 1)
|
|
438
436
|
for zone_index in self._zone_indices]
|
|
439
|
-
except:
|
|
437
|
+
except Exception as _:
|
|
440
438
|
raise err
|
|
441
439
|
|
|
442
440
|
@property
|
|
@@ -455,12 +453,12 @@ class Dataset(object):
|
|
|
455
453
|
try:
|
|
456
454
|
return [_tecutil.ZoneGetTypeByDataSetID(self.uid, zone_index + 1)
|
|
457
455
|
for zone_index in self._zone_indices]
|
|
458
|
-
except:
|
|
456
|
+
except Exception as _:
|
|
459
457
|
try:
|
|
460
458
|
with self.frame.activated():
|
|
461
459
|
return [_tecutil.ZoneGetType(zone_index + 1)
|
|
462
460
|
for zone_index in self._zone_indices]
|
|
463
|
-
except:
|
|
461
|
+
except Exception as _:
|
|
464
462
|
raise err
|
|
465
463
|
|
|
466
464
|
@property
|
|
@@ -484,7 +482,7 @@ class Dataset(object):
|
|
|
484
482
|
"""
|
|
485
483
|
try:
|
|
486
484
|
success, ptr = _tecutil.ZoneGetNamesByDataSetID(self.uid)
|
|
487
|
-
if not success:
|
|
485
|
+
if not success or not ptr:
|
|
488
486
|
raise TecplotSystemError()
|
|
489
487
|
names = ctypes.cast(ptr, StringList)
|
|
490
488
|
try:
|
|
@@ -494,17 +492,17 @@ class Dataset(object):
|
|
|
494
492
|
except (AttributeError, TecplotSystemError) as err:
|
|
495
493
|
try:
|
|
496
494
|
success, ptr = _tecutil.ZoneGetEnabledNamesByDataSetID(self.uid)
|
|
497
|
-
if not success:
|
|
495
|
+
if not success or not ptr:
|
|
498
496
|
raise TecplotSystemError()
|
|
499
497
|
names = ctypes.cast(ptr, StringList)
|
|
500
498
|
try:
|
|
501
499
|
return list(names)
|
|
502
500
|
finally:
|
|
503
501
|
names.dealloc()
|
|
504
|
-
except:
|
|
502
|
+
except Exception as _:
|
|
505
503
|
try:
|
|
506
504
|
return [z.name for z in self.zones()]
|
|
507
|
-
except:
|
|
505
|
+
except Exception as _:
|
|
508
506
|
raise err
|
|
509
507
|
|
|
510
508
|
def zones(self, pattern=None):
|
|
@@ -563,18 +561,15 @@ class Dataset(object):
|
|
|
563
561
|
ZoneType.FEMixed: MixedFEZone}
|
|
564
562
|
|
|
565
563
|
if pattern:
|
|
566
|
-
|
|
567
|
-
if not isinstance(pattern, pattern_type):
|
|
564
|
+
if not isinstance(pattern, re.Pattern):
|
|
568
565
|
regex = re.compile(fnmatch.translate(pattern), re.IGNORECASE)
|
|
569
566
|
else:
|
|
570
567
|
regex = pattern
|
|
571
568
|
|
|
572
|
-
|
|
573
|
-
found = False
|
|
569
|
+
found = False
|
|
574
570
|
for uid, typ, name in zip(self._zone_uids, self._zone_types, self.zone_names):
|
|
575
571
|
if regex.match(name):
|
|
576
|
-
|
|
577
|
-
found = True
|
|
572
|
+
found = True
|
|
578
573
|
yield _dispatch[typ](uid, self)
|
|
579
574
|
|
|
580
575
|
if __debug__:
|
|
@@ -647,8 +642,7 @@ class Dataset(object):
|
|
|
647
642
|
"""
|
|
648
643
|
if isinstance(pattern, Variable):
|
|
649
644
|
return pattern
|
|
650
|
-
|
|
651
|
-
if isinstance(pattern, (str, pattern_type)):
|
|
645
|
+
if isinstance(pattern, (str, re.Pattern)):
|
|
652
646
|
try:
|
|
653
647
|
return next(self.variables(pattern))
|
|
654
648
|
except StopIteration:
|
|
@@ -669,7 +663,7 @@ class Dataset(object):
|
|
|
669
663
|
def _variable_indices(self):
|
|
670
664
|
"""Yields zero-based indices for all enabled variables in the dataset."""
|
|
671
665
|
success, ptr = _tecutil.VarGetEnabledByDataSetID(self.uid)
|
|
672
|
-
if not success:
|
|
666
|
+
if not success or not ptr:
|
|
673
667
|
raise TecplotSystemError()
|
|
674
668
|
indices = ctypes.cast(ptr, IndexSet)
|
|
675
669
|
try:
|
|
@@ -694,7 +688,7 @@ class Dataset(object):
|
|
|
694
688
|
try:
|
|
695
689
|
return [_tecutil.VarGetUniqueIDByDataSetID(self.uid, variable_index + 1)
|
|
696
690
|
for variable_index in self._variable_indices]
|
|
697
|
-
except:
|
|
691
|
+
except Exception as _:
|
|
698
692
|
raise err
|
|
699
693
|
|
|
700
694
|
@property
|
|
@@ -718,7 +712,7 @@ class Dataset(object):
|
|
|
718
712
|
"""
|
|
719
713
|
try:
|
|
720
714
|
success, ptr = _tecutil.VarGetNamesByDataSetID(self.uid)
|
|
721
|
-
if not success:
|
|
715
|
+
if not success or not ptr:
|
|
722
716
|
raise TecplotSystemError()
|
|
723
717
|
names = ctypes.cast(ptr, StringList)
|
|
724
718
|
try:
|
|
@@ -735,10 +729,10 @@ class Dataset(object):
|
|
|
735
729
|
return list(names)
|
|
736
730
|
finally:
|
|
737
731
|
names.dealloc()
|
|
738
|
-
except:
|
|
732
|
+
except Exception as _:
|
|
739
733
|
try:
|
|
740
734
|
return [z.name for z in self.variables()]
|
|
741
|
-
except:
|
|
735
|
+
except Exception as _:
|
|
742
736
|
raise err
|
|
743
737
|
|
|
744
738
|
def variables(self, pattern=None):
|
|
@@ -773,18 +767,15 @@ class Dataset(object):
|
|
|
773
767
|
reference zones and variables **by name** instead of by index.
|
|
774
768
|
"""
|
|
775
769
|
if pattern:
|
|
776
|
-
|
|
777
|
-
if not isinstance(pattern, pattern_type):
|
|
770
|
+
if not isinstance(pattern, re.Pattern):
|
|
778
771
|
regex = re.compile(fnmatch.translate(pattern), re.IGNORECASE)
|
|
779
772
|
else:
|
|
780
773
|
regex = pattern
|
|
781
774
|
|
|
782
|
-
|
|
783
|
-
found = False
|
|
775
|
+
found = False
|
|
784
776
|
for uid, name in zip(self._variable_uids, self.variable_names):
|
|
785
777
|
if regex.match(name):
|
|
786
|
-
|
|
787
|
-
found = True
|
|
778
|
+
found = True
|
|
788
779
|
yield Variable(uid, self)
|
|
789
780
|
|
|
790
781
|
if __debug__:
|
|
@@ -1011,8 +1002,7 @@ class Dataset(object):
|
|
|
1011
1002
|
):
|
|
1012
1003
|
mirror_variables = [mirror_variables]
|
|
1013
1004
|
|
|
1014
|
-
mvars = (
|
|
1015
|
-
for v in mirror_variables)
|
|
1005
|
+
mvars = map(self.variable, mirror_variables)
|
|
1016
1006
|
mvars = ','.join([str(v.index + 1) for v in mvars])
|
|
1017
1007
|
|
|
1018
1008
|
if not zones:
|
tecplot/data/load.py
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import getpass
|
|
2
2
|
import logging
|
|
3
|
-
import os
|
|
4
3
|
import pathlib
|
|
5
4
|
import platform
|
|
6
5
|
import textwrap
|
|
7
|
-
import warnings
|
|
8
6
|
|
|
9
7
|
from ..tecutil import _tecutil, _tecutil_connector
|
|
10
8
|
from ..constant import *
|
|
11
9
|
from ..exception import *
|
|
12
|
-
from .. import layout,
|
|
10
|
+
from .. import layout, tecutil
|
|
13
11
|
from ..tecutil import IndexSet, StringList, lock, sv
|
|
14
12
|
|
|
15
13
|
|
|
@@ -26,6 +24,7 @@ def _tecplot_loader_load_data(arglist,
|
|
|
26
24
|
assign_strand_ids=None,
|
|
27
25
|
add_zones_to_existing_strands=None):
|
|
28
26
|
frame = frame or layout.active_frame()
|
|
27
|
+
assert frame, 'Invalid Frame'
|
|
29
28
|
|
|
30
29
|
# If read_data_option is append and there is no data, we
|
|
31
30
|
# need to silently change it to "Replace in Active Frame"
|
|
@@ -1823,7 +1822,7 @@ def load_tecplot(filenames,
|
|
|
1823
1822
|
variables (`set` of `strings <str>` or `integers <int>`, optional):
|
|
1824
1823
|
Set of `Variables <Variable>` to load. If variable names are
|
|
1825
1824
|
specified as strings and appending then variables will be aligned
|
|
1826
|
-
with existing variables. If variable offsets are supplied then
|
|
1825
|
+
with existing variables. If variable offsets are supplied then
|
|
1827
1826
|
the variables at those offsets will be loaded and aligned based
|
|
1828
1827
|
on the value of the collapse parameter. Use `None` to load all
|
|
1829
1828
|
variables. (default: `None`)
|
|
@@ -1937,19 +1936,19 @@ def load_tecplot_szl(filenames,
|
|
|
1937
1936
|
szlserver_path=None):
|
|
1938
1937
|
|
|
1939
1938
|
#
|
|
1940
|
-
# Possible Future Enhancement.
|
|
1939
|
+
# Possible Future Enhancement.
|
|
1941
1940
|
# As it stands the szl loader is hardcoded to load variables by name when
|
|
1942
1941
|
# appending to an existing dataset. If we want the szl loader to behave
|
|
1943
1942
|
# similar to the internal tecplot loader then we need to add the ability
|
|
1944
|
-
# to specify a "variables" like paramter (but should not be named
|
|
1943
|
+
# to specify a "variables" like paramter (but should not be named
|
|
1945
1944
|
# "variables" because of conflicts with other V3 loaders that already use
|
|
1946
1945
|
# that for their primary load instructions.
|
|
1947
|
-
# This will apply ONLY to the VarNameList and VarPositionList for the
|
|
1946
|
+
# This will apply ONLY to the VarNameList and VarPositionList for the
|
|
1948
1947
|
# $!READDATASET command (i.e. only applied to appending for V3 Loaders)
|
|
1949
1948
|
#
|
|
1950
1949
|
# Proposed is to add:
|
|
1951
1950
|
#
|
|
1952
|
-
# appending_variables=None,
|
|
1951
|
+
# appending_variables=None,
|
|
1953
1952
|
#
|
|
1954
1953
|
# Documentation then will include:
|
|
1955
1954
|
#
|
|
@@ -1957,7 +1956,7 @@ def load_tecplot_szl(filenames,
|
|
|
1957
1956
|
# Set of `Variables <Variable>` to load. If variable names are
|
|
1958
1957
|
# specified as strings and **read_data_option** is set to
|
|
1959
1958
|
# `ReadDataOption.Append` then variables will be aligned with
|
|
1960
|
-
# existing variables. If variable offsets are supplied then
|
|
1959
|
+
# existing variables. If variable offsets are supplied then
|
|
1961
1960
|
# the variables at those offsets will be loaded.
|
|
1962
1961
|
# Use `None` to load all variables. (default: `None`)
|
|
1963
1962
|
|
tecplot/data/save.py
CHANGED
|
@@ -13,8 +13,9 @@ log = logging.getLogger(__name__)
|
|
|
13
13
|
@lock()
|
|
14
14
|
def _save_tecplot(binary, frame, dataset, filename, include_text, include_geom,
|
|
15
15
|
include_data, include_data_share_linkage,
|
|
16
|
-
include_autogen_face_neighbors,
|
|
17
|
-
associate_with_layout, zones, variables, precision,
|
|
16
|
+
include_autogen_face_neighbors, include_custom_labels,
|
|
17
|
+
use_point_format, associate_with_layout, zones, variables, precision,
|
|
18
|
+
version):
|
|
18
19
|
if dataset is None:
|
|
19
20
|
if frame is None:
|
|
20
21
|
frame = layout.active_frame()
|
|
@@ -47,6 +48,7 @@ def _save_tecplot(binary, frame, dataset, filename, include_text, include_geom,
|
|
|
47
48
|
arglist[sv.INCLUDEDATASHARELINKAGE] = include_data_share_linkage
|
|
48
49
|
arglist[sv.INCLUDEAUTOGENFACENEIGHBORS] = \
|
|
49
50
|
include_autogen_face_neighbors
|
|
51
|
+
arglist[sv.INCLUDECUSTOMLABELS] = include_custom_labels
|
|
50
52
|
arglist[sv.ASSOCIATELAYOUTWITHDATAFILE] = associate_with_layout
|
|
51
53
|
if version is not None:
|
|
52
54
|
arglist[sv.TECPLOTVERSIONTOWRITE] = BinaryFileVersion(version)
|
|
@@ -67,8 +69,8 @@ def save_tecplot_ascii(filename, frame=None, dataset=None, zones=None,
|
|
|
67
69
|
variables=None, include_text=None, precision=None,
|
|
68
70
|
include_geom=None, include_data=None,
|
|
69
71
|
include_data_share_linkage=None,
|
|
70
|
-
include_autogen_face_neighbors=None,
|
|
71
|
-
|
|
72
|
+
include_autogen_face_neighbors=None, use_point_format=None,
|
|
73
|
+
include_custom_labels=None):
|
|
72
74
|
"""Write Tecplot ASCII data file.
|
|
73
75
|
|
|
74
76
|
Parameters:
|
|
@@ -82,8 +84,7 @@ def save_tecplot_ascii(filename, frame=None, dataset=None, zones=None,
|
|
|
82
84
|
<tecplot.data.Dataset>` to write out. If this and *frame* are both `None`,
|
|
83
85
|
the `Dataset <tecplot.data.Dataset>` of the currently active `Frame
|
|
84
86
|
<layout.Frame>` is used. (default: `None`)
|
|
85
|
-
include_text (`bool`, optional): Write out all text
|
|
86
|
-
geometries and custom labels. (default: `True`)
|
|
87
|
+
include_text (`bool`, optional): Write out all text (default: `True`)
|
|
87
88
|
include_geom (`bool`, optional): Write out all geometries.
|
|
88
89
|
(default: `True`)
|
|
89
90
|
include_data (`bool`, optional): Write out the data. Set
|
|
@@ -97,6 +98,8 @@ def save_tecplot_ascii(filename, frame=None, dataset=None, zones=None,
|
|
|
97
98
|
include_autogen_face_neighbors (`bool`, optional): Save the
|
|
98
99
|
face neighbor connectivity. This may produce very large data
|
|
99
100
|
files. (default: `False`)
|
|
101
|
+
include_custom_labels (`bool`, optional): Write out any custom labels
|
|
102
|
+
in the dataset to the output data file. (default: `True`)
|
|
100
103
|
use_point_format (`bool`, optional): Write out point format,
|
|
101
104
|
otherwise use block format.
|
|
102
105
|
(default: `False`)
|
|
@@ -157,24 +160,20 @@ def save_tecplot_ascii(filename, frame=None, dataset=None, zones=None,
|
|
|
157
160
|
zones=[zone_to_save])
|
|
158
161
|
"""
|
|
159
162
|
return _save_tecplot(
|
|
160
|
-
binary=False, frame=frame, dataset=dataset,
|
|
161
|
-
|
|
162
|
-
include_geom=include_geom, include_data=include_data,
|
|
163
|
+
binary=False, frame=frame, dataset=dataset, filename=filename,
|
|
164
|
+
include_text=include_text, include_geom=include_geom, include_data=include_data,
|
|
163
165
|
include_data_share_linkage=include_data_share_linkage,
|
|
164
166
|
include_autogen_face_neighbors=include_autogen_face_neighbors,
|
|
165
|
-
use_point_format=use_point_format,
|
|
166
|
-
associate_with_layout=None,
|
|
167
|
-
|
|
168
|
-
zones=zones, variables=variables,
|
|
169
|
-
version=None)
|
|
167
|
+
include_custom_labels=include_custom_labels, use_point_format=use_point_format,
|
|
168
|
+
associate_with_layout=None, precision=precision, zones=zones,
|
|
169
|
+
variables=variables, version=None)
|
|
170
170
|
|
|
171
171
|
|
|
172
172
|
def save_tecplot_plt(filename, frame=None, dataset=None, zones=None,
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
associate_with_layout=None):
|
|
173
|
+
variables=None, version=None, include_text=None, include_geom=None,
|
|
174
|
+
include_data=None, include_data_share_linkage=None,
|
|
175
|
+
include_autogen_face_neighbors=None, associate_with_layout=None,
|
|
176
|
+
include_custom_labels=None):
|
|
178
177
|
"""Write Tecplot binary PLT data file.
|
|
179
178
|
|
|
180
179
|
Parameters:
|
|
@@ -194,8 +193,7 @@ def save_tecplot_plt(filename, frame=None, dataset=None, zones=None,
|
|
|
194
193
|
variables (`list` of `Variables <Variable>`, optional):
|
|
195
194
|
`Variables <Variable>` to write out. If `None`, all `Variables
|
|
196
195
|
<Variable>` will be saved.
|
|
197
|
-
include_text (`bool`, optional): Write out all text
|
|
198
|
-
geometries and custom labels. (default: `True`)
|
|
196
|
+
include_text (`bool`, optional): Write out all text. (default: `True`)
|
|
199
197
|
include_geom (`bool`, optional): Write out all geometries.
|
|
200
198
|
(default: `True`)
|
|
201
199
|
include_data (`bool`, optional): Write out the data. Set
|
|
@@ -209,6 +207,8 @@ def save_tecplot_plt(filename, frame=None, dataset=None, zones=None,
|
|
|
209
207
|
include_autogen_face_neighbors (`bool`, optional): Save the
|
|
210
208
|
face neighbor connectivity. This may produce very large data
|
|
211
209
|
files. (default: `False`)
|
|
210
|
+
include_custom_labels (`bool`, optional): Write out any custom labels
|
|
211
|
+
in the dataset to the output data file. (default: `True`)
|
|
212
212
|
associate_with_layout (`bool`, optional): Associate this
|
|
213
213
|
data file with the current layout. Set to `False` to write the
|
|
214
214
|
datafile without modifying Tecplot's current data file to layout
|
|
@@ -271,16 +271,13 @@ def save_tecplot_plt(filename, frame=None, dataset=None, zones=None,
|
|
|
271
271
|
zones=[zone_to_save])
|
|
272
272
|
"""
|
|
273
273
|
return _save_tecplot(
|
|
274
|
-
binary=True, frame=frame, dataset=dataset,
|
|
275
|
-
|
|
276
|
-
include_geom=include_geom, include_data=include_data,
|
|
274
|
+
binary=True, frame=frame, dataset=dataset, filename=filename,
|
|
275
|
+
include_text=include_text, include_geom=include_geom, include_data=include_data,
|
|
277
276
|
include_data_share_linkage=include_data_share_linkage,
|
|
278
277
|
include_autogen_face_neighbors=include_autogen_face_neighbors,
|
|
279
|
-
use_point_format=None,
|
|
280
|
-
associate_with_layout=associate_with_layout,
|
|
281
|
-
|
|
282
|
-
zones=zones, variables=variables,
|
|
283
|
-
version=version)
|
|
278
|
+
include_custom_labels=include_custom_labels, use_point_format=None,
|
|
279
|
+
associate_with_layout=associate_with_layout, precision=None, zones=zones,
|
|
280
|
+
variables=variables, version=version)
|
|
284
281
|
|
|
285
282
|
|
|
286
283
|
def save_tecplot_szl(filename, frame=None, dataset=None):
|
tecplot/layout/frame.py
CHANGED
|
@@ -68,6 +68,9 @@ class Frame(session.Style):
|
|
|
68
68
|
dataset: Dataset = None
|
|
69
69
|
"""The `Dataset <tecplot.data.Dataset>` belonging to this Frame."""
|
|
70
70
|
|
|
71
|
+
has_dataset = None
|
|
72
|
+
"""Property indicating the Frame has a `Dataset <tecplot.data.Dataset>`."""
|
|
73
|
+
|
|
71
74
|
def __init__(self, uid, page):
|
|
72
75
|
self.page = page
|
|
73
76
|
self.uid = uid
|
|
@@ -46,7 +46,7 @@ def set_arglist_item(item, key, val):
|
|
|
46
46
|
item.value.float64 = val[0]
|
|
47
47
|
|
|
48
48
|
elif isinstance(val, (int, bool)):
|
|
49
|
-
set_scalar(item.value, c_int64, val)
|
|
49
|
+
set_scalar(item.value, c_int64, int(val))
|
|
50
50
|
elif isinstance(val, Enum):
|
|
51
51
|
set_scalar(item.value, c_int64, val.value)
|
|
52
52
|
|
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.7.
|
|
37
|
-
build = '
|
|
36
|
+
version = '1.7.4'
|
|
37
|
+
build = '6f7ff42'
|
|
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
|
|
File without changes
|
|
File without changes
|