pytecplot 1.5.2__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.
Files changed (97) hide show
  1. pytecplot-1.5.2.dist-info/LICENSE.html +77 -0
  2. pytecplot-1.5.2.dist-info/METADATA +508 -0
  3. pytecplot-1.5.2.dist-info/RECORD +97 -0
  4. pytecplot-1.5.2.dist-info/WHEEL +5 -0
  5. pytecplot-1.5.2.dist-info/top_level.txt +1 -0
  6. tecplot/__init__.py +94 -0
  7. tecplot/annotation/__init__.py +7 -0
  8. tecplot/annotation/annotation.py +223 -0
  9. tecplot/annotation/geometry.py +369 -0
  10. tecplot/annotation/georeference.py +33 -0
  11. tecplot/annotation/image.py +185 -0
  12. tecplot/annotation/iter.py +105 -0
  13. tecplot/annotation/polyline.py +381 -0
  14. tecplot/annotation/text.py +744 -0
  15. tecplot/constant.py +401 -0
  16. tecplot/data/__init__.py +34 -0
  17. tecplot/data/array.py +645 -0
  18. tecplot/data/create.py +1 -0
  19. tecplot/data/dataset.py +1809 -0
  20. tecplot/data/extract.py +544 -0
  21. tecplot/data/face_neighbors.py +494 -0
  22. tecplot/data/facemap.py +814 -0
  23. tecplot/data/load.py +2075 -0
  24. tecplot/data/nodemap.py +577 -0
  25. tecplot/data/operate.py +928 -0
  26. tecplot/data/query.py +334 -0
  27. tecplot/data/save.py +343 -0
  28. tecplot/data/variable.py +280 -0
  29. tecplot/data/zone.py +841 -0
  30. tecplot/exception.py +201 -0
  31. tecplot/export/__init__.py +13 -0
  32. tecplot/export/animation.py +521 -0
  33. tecplot/export/export_setup.py +318 -0
  34. tecplot/export/image.py +577 -0
  35. tecplot/export/print_setup.py +218 -0
  36. tecplot/export/time_animation.py +607 -0
  37. tecplot/extension/__init__.py +14 -0
  38. tecplot/extension/ipython.py +68 -0
  39. tecplot/layout/__init__.py +20 -0
  40. tecplot/layout/frame.py +1285 -0
  41. tecplot/layout/layout.py +488 -0
  42. tecplot/layout/page.py +541 -0
  43. tecplot/legend/__init__.py +4 -0
  44. tecplot/legend/contour_legend.py +516 -0
  45. tecplot/legend/legend.py +141 -0
  46. tecplot/legend/line_legend.py +66 -0
  47. tecplot/legend/rgb_coloring_legend.py +291 -0
  48. tecplot/legend/scatter_legend.py +136 -0
  49. tecplot/macro.py +339 -0
  50. tecplot/plot/__init__.py +62 -0
  51. tecplot/plot/axes.py +881 -0
  52. tecplot/plot/axis.py +1350 -0
  53. tecplot/plot/blanking.py +584 -0
  54. tecplot/plot/contour.py +1302 -0
  55. tecplot/plot/effects.py +162 -0
  56. tecplot/plot/fieldmap.py +2159 -0
  57. tecplot/plot/grid.py +758 -0
  58. tecplot/plot/isosurface.py +1167 -0
  59. tecplot/plot/labels.py +338 -0
  60. tecplot/plot/linemap.py +1905 -0
  61. tecplot/plot/linking.py +489 -0
  62. tecplot/plot/plot.py +1791 -0
  63. tecplot/plot/rgb_coloring.py +281 -0
  64. tecplot/plot/scatter.py +396 -0
  65. tecplot/plot/slice.py +1544 -0
  66. tecplot/plot/streamtrace.py +1949 -0
  67. tecplot/plot/symbol.py +567 -0
  68. tecplot/plot/ticks.py +666 -0
  69. tecplot/plot/title.py +380 -0
  70. tecplot/plot/vector.py +679 -0
  71. tecplot/plot/view.py +868 -0
  72. tecplot/session/__init__.py +112 -0
  73. tecplot/session/aux_data.py +276 -0
  74. tecplot/session/config.py +92 -0
  75. tecplot/session/session.py +425 -0
  76. tecplot/session/state_changed.py +225 -0
  77. tecplot/session/style.py +504 -0
  78. tecplot/tecutil/__init__.py +16 -0
  79. tecplot/tecutil/arglist.py +230 -0
  80. tecplot/tecutil/captured_output.py +177 -0
  81. tecplot/tecutil/constant.py +1312 -0
  82. tecplot/tecutil/index_set.py +118 -0
  83. tecplot/tecutil/lock.py +36 -0
  84. tecplot/tecutil/message_pb2.py +39 -0
  85. tecplot/tecutil/preamble.py +54 -0
  86. tecplot/tecutil/stringlist.py +114 -0
  87. tecplot/tecutil/sv.py +1662 -0
  88. tecplot/tecutil/tecutil.py +12402 -0
  89. tecplot/tecutil/tecutil_client.py +627 -0
  90. tecplot/tecutil/tecutil_connector.py +937 -0
  91. tecplot/tecutil/tecutil_rpc.py +6845 -0
  92. tecplot/tecutil/util.py +332 -0
  93. tecplot/text/__init__.py +3 -0
  94. tecplot/text/font.py +224 -0
  95. tecplot/text/label_format.py +374 -0
  96. tecplot/text/textbox.py +106 -0
  97. tecplot/version.py +41 -0
@@ -0,0 +1,97 @@
1
+ tecplot/__init__.py,sha256=iHAPbGDgIh7HtLWaWcDYfVS4TOsNrRSHyQa-H_6Li3g,3550
2
+ tecplot/constant.py,sha256=HoM2GWSKm0Us60UMcPAjQ7sZfzYVdCxHwGOhQN3TEvk,8643
3
+ tecplot/exception.py,sha256=1a4TNUTi_dJ3fWFBDmRp3w7nAlPSZnND-X3QnObutxg,6499
4
+ tecplot/macro.py,sha256=XHl_k1oRsiClH-M6FqlTEkcWLr_Fm9a6kHJ96KS8oLY,13252
5
+ tecplot/version.py,sha256=qi0LC24YN7IXuEFAJzQ-pHlu1cI8ztjXF7I78hO6OfE,1544
6
+ tecplot/annotation/__init__.py,sha256=FfL8JhlO6T9NTajVRtgXHp6A6PhjpO51gnVKlHMkzWA,333
7
+ tecplot/annotation/annotation.py,sha256=B7G-BkrQ4lYBpak9RR3u7Pvdci5MGLUvNo_MnJidyY4,8481
8
+ tecplot/annotation/geometry.py,sha256=3jnp_Ut1AQdhSUCMAJ1yFuL_epoGUoTny03cv0kl09k,12516
9
+ tecplot/annotation/georeference.py,sha256=fB35i1MARQorSopdZw1ljgjqpC2G16YOxUBW7q_Gzhk,1108
10
+ tecplot/annotation/image.py,sha256=QNye7LFi54CAlcl1YE85i1odJ5QaJwmrrUncIF25br0,5809
11
+ tecplot/annotation/iter.py,sha256=s9rFJLhKgJKApxxTghRFBjT6Pmu6BAEfvB5QgBI4mNI,3709
12
+ tecplot/annotation/polyline.py,sha256=bw-1LfpjfcHK7VZGTf7xrvHtzjlFJAegIYrU5GVdse0,12390
13
+ tecplot/annotation/text.py,sha256=ueKAOL_SMtrV7g8HimIrP_dVg0qDV8yvn4yWjz2iEmA,26467
14
+ tecplot/data/__init__.py,sha256=kNH1zdj8-_GIamFOaVk_H1FZO0wsvxkyonQC8ubZhEE,1783
15
+ tecplot/data/array.py,sha256=OC0J-VIe-M6qwppHASXi9vTW1kR_77romGLj2ZoO0RE,23967
16
+ tecplot/data/create.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
17
+ tecplot/data/dataset.py,sha256=rlrl59SgX0txbPpb37n2gi12xBsf03kVpp4dyfUvKz0,75732
18
+ tecplot/data/extract.py,sha256=YTky1ZS8ameG42OfziLwoV1a7ZHfVgbYZSDhjhHM-es,21775
19
+ tecplot/data/face_neighbors.py,sha256=Bm77F87qtDcw2u1BWFNE9cRTc8FI9MS3Cw8YlaJsdkc,19440
20
+ tecplot/data/facemap.py,sha256=Xhn77cZndfgUA9U014I4M_ecwj8bI98_A7DZC24-Jwk,31287
21
+ tecplot/data/load.py,sha256=izhK5VHjfvPlSrsDs0paEW2zzCCLR9nPCh2hbhnYqw0,104697
22
+ tecplot/data/nodemap.py,sha256=5wZN5DiB43KjLBm1ulAvOaSKvkCQ8LZWvRccrSMoCME,20836
23
+ tecplot/data/operate.py,sha256=oFBOzLPYnA8hUCaeiTdpPXdFlLZNLoQCb-EHcPE5iDA,42593
24
+ tecplot/data/query.py,sha256=SFvEG9Vn7V_knWVUzzoNMyXdgjD4rE-VIarJWxTxIyE,14819
25
+ tecplot/data/save.py,sha256=FJCDGpAB9vjT-QrsmtUL6nyt3hgdGoY05qPadg40Pa0,16461
26
+ tecplot/data/variable.py,sha256=xJCOO5ZeXCAFWKJYnC_mMxWKoy-oe3pE0EnHytZOwro,9437
27
+ tecplot/data/zone.py,sha256=SDVBgCYaEcGfDlAi4tClCyTDxfq7eCyEoFUeiLFXEkM,29814
28
+ tecplot/export/__init__.py,sha256=eX3hx-FX9zEE-D3Nnfm_5rEG-jq6XufUDZmmRaLnKFw,781
29
+ tecplot/export/animation.py,sha256=663iBPNXnkFLLXQBjmqujR_NGUrLdBcah2gkPhRiYaA,25030
30
+ tecplot/export/export_setup.py,sha256=XpHOLPqraRrS8mprWU_WlPWhpPJcCA6IbXo9R3w2vvg,10352
31
+ tecplot/export/image.py,sha256=sT3kat-cT9HQAN7tnKXtfGtn7SzTyc3uDJAs3gG4Ejo,27957
32
+ tecplot/export/print_setup.py,sha256=12h0uVmQfBgXk3Fr-7TSK5OkAXO5NgoEyJ5xZowAUYo,6451
33
+ tecplot/export/time_animation.py,sha256=4Y2L0mQN_6c0Ck1fQeGScVpEOIB9RMuWqO_NAfC5RJ0,33447
34
+ tecplot/extension/__init__.py,sha256=3bDQNm1kqkiWsU7MkbturRl7YuRGSv4fjvGIN_XW5no,425
35
+ tecplot/extension/ipython.py,sha256=glcANfhj8pG5Pv_kF4NSfuyQXwgBKowQ1-nJbJGepgc,2229
36
+ tecplot/layout/__init__.py,sha256=HvlOnhPIsFHSRDACEPN3rlOUmk9tpLNPttReGq3P3_8,1218
37
+ tecplot/layout/frame.py,sha256=ESmGFuJwB2aFX1-e2JgW2YrOruRDp-3BhLZW8VwRXzo,51488
38
+ tecplot/layout/layout.py,sha256=gXnb1Eg8bPRwLFYIt7JIYLbHdOcfkSII9N4a7cpFUHI,15955
39
+ tecplot/layout/page.py,sha256=MqX3jJAd3o2xkfaSGXU7TD4gnXv-9CQcDj5WJnlIisU,18264
40
+ tecplot/legend/__init__.py,sha256=zj94bHuUKvgWxn5dddEuahKCXVDMOFonQNgKxtuNSTQ,185
41
+ tecplot/legend/contour_legend.py,sha256=DtXy84WwnodUNnv-mWL_1-d58xgP_8XPxFOJGelDLck,17416
42
+ tecplot/legend/legend.py,sha256=FTx03o54awsytUUI2fu8db2oCWvG9L8_D6fymS-gd-Q,4022
43
+ tecplot/legend/line_legend.py,sha256=qim_xoNHB7gk-Hn7x6d5Yttd_zfFAaoA2KKqpD0S94Q,2121
44
+ tecplot/legend/rgb_coloring_legend.py,sha256=pDgPaQBtdV99Qz2tDkxc-FGXHmpBSfwZvtDrKXf3gus,9740
45
+ tecplot/legend/scatter_legend.py,sha256=_td5uXO2u3PxT-cCYfGlMVZWHuA4k9i75YYzvLdHv6E,4013
46
+ tecplot/plot/__init__.py,sha256=UFwUgEwgszkURikqoIhfi1lybWygZ-QNgDMLS2722kI,3903
47
+ tecplot/plot/axes.py,sha256=EL-WWUG5S2M66hxLd1-ubS9jzlS4TCEcf4qfZBWT9q8,27044
48
+ tecplot/plot/axis.py,sha256=3cgOPbgQdCAWueqfjOpZUbPdhYLsw3bqw4Apm7vEaRQ,43264
49
+ tecplot/plot/blanking.py,sha256=6y5ph3Rp6oJFhTGIOokS-NDWFxEox1R84k1CexQ8Ya4,20239
50
+ tecplot/plot/contour.py,sha256=tw-7YW27uwr-V17Ip5zvQtZXsbbG4ca-oILB2bCPu1k,44240
51
+ tecplot/plot/effects.py,sha256=Q9KytPL9dzanSG2Wbx09lNjf1OeKep5Aj3gyOv9s0JE,4983
52
+ tecplot/plot/fieldmap.py,sha256=WseLhJVI0TtjIvpB2cRBTRFQakXKJNDQdUgGw2gFFtY,75712
53
+ tecplot/plot/grid.py,sha256=p8h2Tmu93aVunOww6VXSuK8onjf1HkYZRQEyApTJr_c,22463
54
+ tecplot/plot/isosurface.py,sha256=WQec-6hIur5Eyi9Z7m_Y4nuFmGGLUF2RQZDzZRXT1o4,40303
55
+ tecplot/plot/labels.py,sha256=ac8Dl37lGbkY78cJJo_aCuN9zslYZthSZqriTHGkPOs,10578
56
+ tecplot/plot/linemap.py,sha256=XU3jzRIk62o19vp2WWbuJbAVPvh8it4N7MTOs54C2xA,63192
57
+ tecplot/plot/linking.py,sha256=HyetVeDsnUsGJtmWLURg6ylyCom0zR-0UubrVynB_fs,16775
58
+ tecplot/plot/plot.py,sha256=vEjbOi2D9oza8M0GK8eeU6ahmayZ55WcrPYJwythxnQ,60377
59
+ tecplot/plot/rgb_coloring.py,sha256=OfcIvhQ9Tm5TQylOUttX7QcNu3CHtETBpIz7gqa9GwY,9417
60
+ tecplot/plot/scatter.py,sha256=SFjxZThZFbJwx0q-McjvSekQ8EdepMtLVurCFo_dKZk,12609
61
+ tecplot/plot/slice.py,sha256=k6hH59MQg3_SsxpZCRU_Gt4NEjT5bd3qGhxFWOuDUPI,52100
62
+ tecplot/plot/streamtrace.py,sha256=kL_3SFhYnmEIdLX2OmcP4tcxysdG41e2LZ4URZEshIA,64686
63
+ tecplot/plot/symbol.py,sha256=6p28udpGG-rOKCAb9bgsk6kWHqXYPfAQ7W-jBrtmPaA,18422
64
+ tecplot/plot/ticks.py,sha256=Wx3myMFWJYqeE8uefTv3sZYBBAAcaK2Pg6v-0pBk56M,19252
65
+ tecplot/plot/title.py,sha256=Eg4T5i_Z_thuISW8CJi0gh_tGwfQ84zD6J0VZcaUnP8,11162
66
+ tecplot/plot/vector.py,sha256=soEpzmqaii-FnMUWALgWCViJp1agXh54YxIaiZZExD0,21490
67
+ tecplot/plot/view.py,sha256=MsafFR3G2_bPMPPdtINXk_Q0h2rfW-8XzubT7ahFC6A,29473
68
+ tecplot/session/__init__.py,sha256=D8y3mwo9tLgBRYHho4LMCVH4GfsGT_5kOqOkfWDfCVk,4164
69
+ tecplot/session/aux_data.py,sha256=79910rsjRBD2ZAzlG8SYoPxYoxoJuYtGpeMaCwzUB8s,9192
70
+ tecplot/session/config.py,sha256=UrKiaP1HIZSO1J-eV-SEPZa0LvxK80eDcQanEZNeMtw,2952
71
+ tecplot/session/session.py,sha256=1LHd7u1oib9Sm4LPp9y2CjTdaU1k190rgBpEzf12AWc,15586
72
+ tecplot/session/state_changed.py,sha256=qefZrJDIO5gT8hvkrrRmq75rQwIFXKA12qrXx6TPiD4,7961
73
+ tecplot/session/style.py,sha256=djEwXG3H8_izU1Zsk5b7FlJo-WsxgLzb3N78YHCC7Us,17619
74
+ tecplot/tecutil/__init__.py,sha256=19h7jJ1OIyR08YE-8pPSCYdHic4mQcT8hcB11yGEULA,717
75
+ tecplot/tecutil/arglist.py,sha256=9vLUzzlOTbsv1EiltanhxAQ2WryGArnCmF6H16-t9PM,8373
76
+ tecplot/tecutil/captured_output.py,sha256=_q4pFzQvQ736AO_PAVNxlEhzIaxgZV19sBrMuLkiCB4,6373
77
+ tecplot/tecutil/constant.py,sha256=8fEFvSqyouD2P_wjUMNkmvjRG0S7-fCBuVfztqP8yrA,20399
78
+ tecplot/tecutil/index_set.py,sha256=oF4nLpeNOu0-F7RIQUO33WWKGIvK9O6T7lQBIALxRg0,3984
79
+ tecplot/tecutil/lock.py,sha256=rVa7hekZ7ZFZnvYgRGsWxZUty9JUbC2EZ-eO4vHzqlU,967
80
+ tecplot/tecutil/message_pb2.py,sha256=5LLHkC4o1hiXYx7FGPLFkPvN2YzVhPT7gfVNVJg_sEU,3668
81
+ tecplot/tecutil/preamble.py,sha256=wzpTPY3xyv8-cnWpp5q1ay0jlXRNmMEmC0UXN-xu0aU,2142
82
+ tecplot/tecutil/stringlist.py,sha256=MKFiUxbjDdAXtuOcZzqkimbgTOCo9zf8SKSCUrtL_dE,3584
83
+ tecplot/tecutil/sv.py,sha256=fKvx3ED5vxvGBRlS3SjYlOoQU7Zwa02F_FPpAn3G2wc,54006
84
+ tecplot/tecutil/tecutil.py,sha256=1g8CJw37EKN6OB-M7cg6onoMssgCl6MOHCwP9gnkcyA,664418
85
+ tecplot/tecutil/tecutil_client.py,sha256=cdMVhFHmBtvDhrufNlDUKEQZgJXCKe9paq0fRg6hvo0,23592
86
+ tecplot/tecutil/tecutil_connector.py,sha256=JhcK6DwUrvGjUjVV0HbPBkbLIkMrgjK5pcUvelEZqLo,37268
87
+ tecplot/tecutil/tecutil_rpc.py,sha256=7iSvK4X9S7cqToZsfbr_Kut5cwDi9IhaaPzDxjNUX9o,280141
88
+ tecplot/tecutil/util.py,sha256=wti5ny16SwXxa6SAPNzkLOQsNpZXb8sxs-aqSht4Dks,10957
89
+ tecplot/text/__init__.py,sha256=hXk-XwewRyS-yxif3Wx5FS1wO5Uh6WQpRgtUiUfjNo0,112
90
+ tecplot/text/font.py,sha256=tHMT2NGJC8rLCVCUdmxK0YN_f4hZpTevWIofwjAp7cs,6722
91
+ tecplot/text/label_format.py,sha256=24MOvWtVZ_SKdcU16i5yEfxC-hBipmNOLQwJ_kzDr3k,12328
92
+ tecplot/text/textbox.py,sha256=nwr0ReRC56MY5gB7Ie6UdDxrd_Os_ZI1_3n4bmOzalU,2882
93
+ pytecplot-1.5.2.dist-info/LICENSE.html,sha256=M3wq4JZjjVwoa8kHnmykU8xiVekNUEYSczl6BRVnjkQ,27693
94
+ pytecplot-1.5.2.dist-info/METADATA,sha256=jfWrVaNL9bERybF2ieP5lKAPZml6McC9stCbTjoAyU4,19791
95
+ pytecplot-1.5.2.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
96
+ pytecplot-1.5.2.dist-info/top_level.txt,sha256=gU7HYnAb3AVBIKRUOASdYO0QRI6hg1raLt8aN5E4o7s,8
97
+ pytecplot-1.5.2.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: bdist_wheel (0.40.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1 @@
1
+ tecplot
tecplot/__init__.py ADDED
@@ -0,0 +1,94 @@
1
+ # coding: utf-8
2
+
3
+ """`tecplot` is the top-level module for |PyTecplot| and it provides access
4
+ to the entire public API.
5
+
6
+ .. _hello_world:
7
+
8
+ In this example, the tecplot dynamic library is loaded at import time. The
9
+ |Tecplot Engine| is started and the text 'Hello, World!' is added to the
10
+ center of the active frame. All logging messages are piped to the console
11
+ which may be useful to debug any script:
12
+
13
+ .. code-block:: python
14
+
15
+ import sys
16
+ import logging
17
+
18
+ import tecplot
19
+
20
+ log = logging.getLogger()
21
+ log.setLevel(logging.DEBUG)
22
+
23
+ frame = tecplot.active_frame()
24
+ frame.add_text('Hello, World!', position=(35,50), size=35)
25
+ tecplot.export.save_png('hello_world.png')
26
+
27
+ TecUtil Layer
28
+ -------------
29
+
30
+ The interface used to access the |Tecplot Engine| is called "TecUtil" and is
31
+ the same as that used by addons. There are many checks in place for
32
+ validating calls into this layer. The vast majority of these are recoverable
33
+ and are seen in Python as a raised exception of type `TecplotLogicError`.
34
+
35
+ In principle, a user's script should never trigger a `TecplotLogicError` as
36
+ it indicates the requested operation is invalid in the current engine state
37
+ or that the parameters passed into the TecUtil layer (indices for example)
38
+ are not valid. Here is a (contrived) example of a typical exception one might
39
+ see:
40
+
41
+ .. code-block:: python
42
+
43
+ import tecplot as tp
44
+ from tecplot.tecutil import lock
45
+
46
+ '''
47
+ The following will print out something like:
48
+
49
+ Assertion trap in function call from an Add-on:
50
+ Assertion Type: Pre-condition
51
+ Assertion: ArgListIsValid(ArgList)
52
+ Tecplot version: 2018.3.0.92441
53
+ Function: TecUtilStateChangedX
54
+ Explanation: Argument list must be valid.
55
+ '''
56
+ try:
57
+ with tp.tecutil.lock():
58
+ tp.tecutil._tecutil.StateChangedX(None)
59
+ except tp.exception.TecplotError as e:
60
+ print(e)
61
+
62
+ Note that `None` is an invalid input value for the ``StateChangedX()`` TecUtil
63
+ method.
64
+
65
+ Tecplot Version Compatibility
66
+ -----------------------------
67
+
68
+ It is always recommended to use the most recent version of |PyTecplot|. However,
69
+ doing so may require an update to the underlying |Tecplot 360| installation.
70
+ Out-of-date installations of |Tecplot 360| may be used but features may be
71
+ missing and care must be taken not to use such features in the Python scripts.
72
+ On top of this, there is a minimum version of the installed |Tecplot 360|
73
+ required by |PyTecplot| and the Python library will fail to load if this is
74
+ not satisfied.
75
+ """
76
+ __author__ = 'Tecplot, Inc.'
77
+
78
+ from . import (data, export, extension, layout, macro, constant, exception,
79
+ session)
80
+ from .export import save_png, save_tiff, save_jpeg
81
+ from .layout import (active_frame, active_page, add_page, delete_page, frames,
82
+ load_layout, next_page, new_layout, page, pages,
83
+ save_layout)
84
+ from .session import stop, acquire_license, release_license
85
+ from .version import version as __version__
86
+ from .version import version_info, sdk_version, sdk_version_info
87
+
88
+ __all__ = ['__version__', 'version_info', 'sdk_version', 'sdk_version_info',
89
+ '__author__', 'data', 'export', 'extension', 'layout', 'macro',
90
+ 'constant', 'exception', 'session', 'active_frame', 'save_jpeg',
91
+ 'active_page', 'add_page', 'delete_page', 'frames', 'load_layout',
92
+ 'next_page', 'save_png', 'new_layout', 'page', 'pages',
93
+ 'save_layout', 'stop', 'save_tiff', 'acquire_license',
94
+ 'release_license', 'configuration']
@@ -0,0 +1,7 @@
1
+ from .geometry import Circle, Ellipse, Rectangle, Square
2
+ from .georeference import GeoreferencedImage
3
+ from .image import Image
4
+ from .iter import GeometryIterator, TextIterator
5
+ from .polyline import (Arrowhead, MultiPolyline2D, MultiPolyline3D, Polyline2D,
6
+ Polyline3D)
7
+ from .text import Text, TextBox, TextFont
@@ -0,0 +1,223 @@
1
+ from builtins import super
2
+
3
+ import collections
4
+ import ctypes
5
+
6
+ from ..tecutil import _tecutil
7
+ from .. import constant, tecutil
8
+ from ..exception import *
9
+
10
+
11
+ @tecutil.lock_attributes
12
+ class Annotation(object):
13
+ """Base-class for all geometry and image annotations."""
14
+ def __init__(self, uid, frame):
15
+ self.uid = uid
16
+ self.frame = frame
17
+
18
+ def __eq__(self, other):
19
+ return self.uid == other.uid
20
+
21
+ def __ne__(self, other):
22
+ return self.uid != other.uid
23
+
24
+ @property
25
+ def scope(self):
26
+ """`Scope`: Display annotation in all frames with the same data.
27
+
28
+ Annotations with local scope are displayed only in the `Frame <layout.Frame>` in which
29
+ they are created. If it is defined as having `global <Scope.Global>`
30
+ scope, it will appear in all "like" `frames <layout.Frame>`. That is, those
31
+ frames using the same data set as the one in which the annotation was
32
+ created. (default: `Scope.Local`)
33
+
34
+ Example usage assuming an annotation variable ``anno``::
35
+
36
+ >>> from tecplot.constant import Scope
37
+ >>> anno.scope = Scope.Global
38
+ """
39
+ with self.frame.activated():
40
+ return constant.Scope(_tecutil.GeomGetScope(self.uid))
41
+
42
+ @scope.setter
43
+ @tecutil.lock()
44
+ def scope(self, scope):
45
+ with self.frame.activated():
46
+ _tecutil.GeomSetScope(self.uid, constant.Scope(scope).value)
47
+
48
+ @property
49
+ def type(self):
50
+ """`GeomType`: The type of this annotation (read-only).
51
+
52
+ This is the generic type information for geometry and image
53
+ annotations. This is a read-only parameter and is used, in combination
54
+ with *position_coordinate_system* to determine the actual return types
55
+ of the iterators `Frame.geometries()` and `Frame.images()`::
56
+
57
+ >>> frame.add_image('image.png', (1, 1), 5)
58
+ >>> frame.add_circle((0,0), 1, CoordSys.Grid)
59
+ >>> frame.add_square((0,0), 1, CoordSys.Grid)
60
+ >>> for anno in frame.images():
61
+ ... print(anno.type)
62
+ ...
63
+ GeomType.Image
64
+ >>> for anno in frame.geometries():
65
+ ... print(anno.type)
66
+ ...
67
+ GeomType.Circle
68
+ GeomType.Square
69
+ """
70
+ with self.frame.activated():
71
+ return constant.GeomType(_tecutil.GeomGetType(self.uid).value)
72
+
73
+ @property
74
+ def macro_function(self):
75
+ """`str`: An associated macro function.
76
+
77
+ All geometry or image annotations may be linked to a macro function.
78
+ This macro function is called when you hold down the Control key
79
+ (Command key on Mac OS X) and click the right mouse button on the text,
80
+ geometry or image in the frame.
81
+
82
+ In order to be attached to a text or geometry object, the macro
83
+ function must be a "retained" macro function. A macro function is
84
+ "retained" via either of the following scenarios:
85
+
86
+ * running a macro file that contains the required macro functions
87
+ * including it in your tecplot.mcr file (which is run at start up,
88
+ making it a special case of the preceding scenario)
89
+
90
+ In both cases, the macro function is defined using the $!MACROFUNCTION
91
+ macro command. Refer to "$!MACROFUNCTION...$!ENDMACROFUNCTION" on page
92
+ 157 in the |Tecplot Macro Scripting Guide| for additional information.
93
+
94
+ Example usage assuming an annotation variable ``anno``::
95
+
96
+ >>> anno.macro_function = 'MYMACROFUNCTION'
97
+
98
+ To run this function from PyTecplot it is neccessary to pass the
99
+ function to a call to `macro.execute_function()`::
100
+
101
+ >>> tecplot.macro.execute_function(anno.macro_function)
102
+ """
103
+ with self.frame.activated():
104
+ success, cmd = _tecutil.GeomGetMacroFunctionCmd(self.uid)
105
+ if not success:
106
+ raise TecplotSystemError()
107
+ return cmd
108
+
109
+ @macro_function.setter
110
+ @tecutil.lock()
111
+ def macro_function(self, value):
112
+ with self.frame.activated():
113
+ success = _tecutil.GeomSetMacroFunctionCmd(self.uid, str(value))
114
+ if not success:
115
+ raise TecplotSystemError()
116
+
117
+ @property
118
+ def attached_map_index(self):
119
+ """`Index` or `None`: Index to the associated fieldmap or linemap.
120
+
121
+ This property allows an annotation to follow the same active/inactive
122
+ state as another plot object so their visibility can be changed
123
+ together. Attach this annotation to a fieldmap or linemap using the
124
+ object's index property. Geometries and images that are attached to an
125
+ inactive or non-existent zone are not displayed. Example usage assuming
126
+ an annotation variable ``anno``::
127
+
128
+ >>> anno.attached_map_index = plot.fieldmap(2).index
129
+ """
130
+ with self.frame.activated():
131
+ if _tecutil.GeomIsAttached(self.uid):
132
+ return tecutil.Index(_tecutil.GeomGetZoneOrMap(self.uid) - 1)
133
+
134
+ @attached_map_index.setter
135
+ @tecutil.lock()
136
+ def attached_map_index(self, value):
137
+ with self.frame.activated():
138
+ if value is None:
139
+ _tecutil.GeomSetAttached(self.uid, False)
140
+ else:
141
+ _tecutil.GeomSetAttached(self.uid, True)
142
+ _tecutil.GeomSetZoneOrMap(self.uid, tecutil.Index(value) + 1)
143
+
144
+
145
+ class MovableAnnotation(Annotation):
146
+ @property
147
+ def draw_order(self):
148
+ """`constant.DrawOrder`: Draw before or after the data.
149
+
150
+ Annotations can be drawn either before or after the data. If a geometry
151
+ or image is drawn before the data, the plot layers, such as mesh,
152
+ contour lines, etc. will be drawn on top of the geometry. Otherwise,
153
+ the annotation will be drawn last, potentially obscuring the data.
154
+
155
+ .. note::
156
+ Tecplot 360 draws all geometries and images first, in the order
157
+ they were added, then all text.
158
+
159
+ Example usage assuming an annotation variable ``anno``::
160
+
161
+ >>> from tecplot.constant import DrawOrder
162
+ >>> anno.draw_order = DrawOrder.BeforeData
163
+ """
164
+ with self.frame.activated():
165
+ return constant.DrawOrder(_tecutil.GeomGetDrawOrder(self.uid))
166
+
167
+ @draw_order.setter
168
+ @tecutil.lock()
169
+ def draw_order(self, value):
170
+ with self.frame.activated():
171
+ _tecutil.GeomSetDrawOrder(self.uid, constant.DrawOrder(value).value)
172
+
173
+ @property
174
+ def position(self):
175
+ r"""`tuple`: Location on the `Frame <layout.Frame>`.
176
+
177
+ This is the origin of the annotation and will be :math:`(x,y)` or
178
+ :math:`(\theta,r)` depending on the plot type. Example usage assuming
179
+ an annotation variable ``anno``::
180
+
181
+ >>> anno.position = (3, 4)
182
+ """
183
+ with self.frame.activated():
184
+ pos = _tecutil.GeomGetAnchorPos(self.uid)
185
+ return tecutil.XY(*pos[:2])
186
+
187
+ @position.setter
188
+ @tecutil.lock()
189
+ def position(self, values):
190
+ pos = tecutil.XY(*[float(x) for x in values])
191
+ with self.frame.activated():
192
+ _tecutil.GeomSetAnchorPos(self.uid, pos.x, pos.y, 0)
193
+
194
+ @property
195
+ def position_coordinate_system(self):
196
+ """`CoordSys`: Position coordinate system.
197
+
198
+ The object may be positioned using either the grid coordinate system or
199
+ the frame coordinate system and must be one of `CoordSys.Frame` or
200
+ `CoordSys.Grid`:
201
+
202
+ * `CoordSys.Frame`: The geometry is always displayed at constant
203
+ size and position when you zoom in or out of the plot.
204
+ * `CoordSys.Grid`: The geometry resizes and moves with the data
205
+ grid. However, the geometry remains fixed when you rotate the
206
+ plot. Changing the center of rotation may cause the geometry to
207
+ move.
208
+
209
+ Example usage assuming an annotation variable ``anno``::
210
+
211
+ >>> from tecplot.constant import CoordSys
212
+ >>> anno.position_coordinate_system = CoordSys.Frame
213
+ """
214
+ with self.frame.activated():
215
+ result = _tecutil.GeomGetPositionCoordSys(self.uid)
216
+ return constant.CoordSys(result)
217
+
218
+ @position_coordinate_system.setter
219
+ @tecutil.lock()
220
+ def position_coordinate_system(self, value):
221
+ with self.frame.activated():
222
+ coord_sys = constant.CoordSys(value)
223
+ _tecutil.GeomSetPositionCoordSys(self.uid, coord_sys.value)