osis-python 0.7.5__py3-none-any.whl → 0.8.0__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
1
  Metadata-Version: 2.4
2
2
  Name: osis-python
3
- Version: 0.7.5
3
+ Version: 0.8.0
4
4
  Summary: A Python client library for Osis APDL
5
5
  Author-email: "CCCC Highway Consultant Co. Ltd." <support@osisbim.com>
6
6
  License-Expression: MIT
@@ -55,7 +55,7 @@ pip install osis-python -i https://pypi.org/simple
55
55
 
56
56
  - OSIS >= 5.1 (short-form command names like `N`/`Ele`/`Sec` are accepted by both the converter and runtime)
57
57
  - Python >= 3.8
58
- - **Solver-only mode** additionally requires the solver distribution that ships `PySolver.dll` (e.g. `D:\OSIS_Solver\Rbin64`).
58
+ - **Solver-only mode** additionally requires the solver distribution that ships `osisSdk.dll` (e.g. `D:\OSIS_Solver\Rbin64`).
59
59
 
60
60
  > OSIS 5.1 HTTP server bug workaround: the `/OSIS_Run` command-stream splitter does not strip `//` line comments, so a comment line and the command that follows it are merged into one bad command. The pyosis `.out` converter already strips comments before sending; if you ever build a raw `.out` payload yourself, pre-process the file or use `osis_run()` through the generated `main.py`.
61
61
 
@@ -149,7 +149,7 @@ By default, `OSISEngine()` connects to an already-running OSIS GUI process. If y
149
149
  from pyosis.core.solver import OSISSolver
150
150
  from pyosis.core.engine import OSISEngine
151
151
 
152
- # Load <install>/PySolver.dll and start the HTTP server (default port 18080)
152
+ # Load <install>/osisSdk.dll and start the HTTP server (default port 18080)
153
153
  solver = OSISSolver(osis_install_path=r"D:\OSIS_Solver\Rbin64")
154
154
  engine = OSISEngine.from_solver(solver)
155
155
 
@@ -162,7 +162,8 @@ engine.solve()
162
162
 
163
163
  Notes on solver-only mode:
164
164
 
165
- - `osis_install_path` must be the directory containing `PySolver.dll` (and its dependency DLLs).
165
+ - `osis_install_path` must be the directory containing `osisSdk.dll` (and its dependency DLLs).
166
+ - `osis_init` validates a license file (`osis.lic`, HMAC-signed) before anything runs. Search order: the `OSIS_LICENSE_FILE` environment variable, then `%ProgramData%\OSIS\osis.lic`, then `osis.lic` in the install directory. Contact the OSIS vendor to obtain one.
166
167
  - The solver needs a project to exist before model commands run: call `engine.project.create()` / `open()` first.
167
168
  - Crash minidumps are written to `<install>\Error\dmp\` (created on startup).
168
169
 
@@ -1,24 +1,27 @@
1
- osis_python-0.7.5.dist-info/licenses/LICENSE,sha256=T4mkSYliXdU9mYe-NfHkqg6GPhzoYaIQO_a630UzpS4,1088
2
- pyosis/__init__.py,sha256=fO35LAwXFLKagoQ9zSbK1hfIydGGkAcGsEkAMj__GeA,440
1
+ osis_python-0.8.0.dist-info/licenses/LICENSE,sha256=T4mkSYliXdU9mYe-NfHkqg6GPhzoYaIQO_a630UzpS4,1088
2
+ pyosis/__init__.py,sha256=eTE740oKVuI2f5Gb1OOGMmuWnYFc6kTOyActxwS14U0,440
3
3
  pyosis/boundary/__init__.py,sha256=W5LfF-jugWa-YI8pnfELZaz0pXLa-D8TiGnBn12HGGQ,102
4
4
  pyosis/boundary/interface.py,sha256=obqQUVFuQK9I7S8IaBZ2VBYfyXgNVBS0PQa9LzRlaAc,8990
5
- pyosis/boundary/manager.py,sha256=AAGdkp0sLV85enT9TQT9iqvWzjJyLzjiw0rC-tajSrI,39576
5
+ pyosis/boundary/manager.py,sha256=DotTkqDWoZw8ES4h4R0eheYrvQxb2gXHekSKpWftIOs,40474
6
6
  pyosis/control/__init__.py,sha256=98UAXB9Wkf93pGUKIjoGBBrSCblVeAwc_MXeaAB-UIA,119
7
7
  pyosis/control/control.py,sha256=4bX92TDJnf1D5A3YY7ZZrU7iUeAxKCjQe9z_F_SEHBs,2816
8
8
  pyosis/control/io.py,sha256=buaut3-W8kwJIe3PgjtgOU0JCSgDfOEd2cS3mxYsfuc,591
9
- pyosis/control/manager.py,sha256=NhxM-geF-STaUATMZgMac8A93hQ7OkN2cFMI7WRPm1Q,10800
9
+ pyosis/control/manager.py,sha256=EZEOlsgsg2rmOPIVjNFIdgwgxo9c0ZpKfjAr4wmx73Q,11610
10
10
  pyosis/control/nonlinear.py,sha256=26W_2GhD_0cn3YQxJjgbPR1oEopJWyuFWGlgx0q023I,1604
11
- pyosis/core/__init__.py,sha256=mte3tkLHfFIJq6HWpE54aM_D7ARvYBVGkM0Qv4H0uGE,629
11
+ pyosis/core/__init__.py,sha256=T7gaTtLWz8sPHB0s2T_GfCbpaFTwCXxTfEmecVyLR9A,1048
12
12
  pyosis/core/all_func.py,sha256=VhvAeMJMCQJ1redjqdkm7meTw1PJNDoRdmXXh2LzkVo,521
13
- pyosis/core/apdl_sync.py,sha256=rW5Ot6FLpmUzpfMlrbemstnfhxD_0qtPrWgDfj9_4XY,5312
13
+ pyosis/core/apdl_sync.py,sha256=SMBUwTdBCdQMQAPnC7gV1RS1Lp2XAVeHjQKEvFnkf54,5559
14
14
  pyosis/core/basic_manager.py,sha256=z3Qh5LpHg4AOyTrGffC09mPnW-yUT-UuhKnFe4GLUOM,7204
15
15
  pyosis/core/batch.py,sha256=jPA9U3ahGRZdY8y1wCSZyVpBPmGOtQtvM3vfDgqM2sM,6851
16
- pyosis/core/client.py,sha256=6i0q-yPosip5IzSESvpCxuF-v8iojRuFXyPulMKO8Ac,3285
16
+ pyosis/core/client.py,sha256=_9NxTf1D_3BFgt7A73v5C-Qk3KORku_Sq85RnNi3ZxQ,4849
17
17
  pyosis/core/command.py,sha256=bZ5nS1wvwhjwIsogWQh5-1dAcbsJoyB8MR85WUprZ0s,8863
18
- pyosis/core/engine.py,sha256=UnpE_CUQjNk62aFWRQ62lNA9hqaoBcefOmKnua7IE9A,15829
18
+ pyosis/core/engine.py,sha256=ZAclt7GSIlZ8-DWH1Q9Tr7Jb4Jwza88-pNW4OiMCDCc,16880
19
+ pyosis/core/enums.py,sha256=qY1-A9smleQk_9VxDmd0k9cwggT6zI5I24HQhd2yTJY,11331
19
20
  pyosis/core/exceptions.py,sha256=x0I0Emooejy8wF1ZBWGz7Yc1N70MitsnhhQv9txJQj8,1093
21
+ pyosis/core/normalize.py,sha256=DB0OS63G-TOhdpGvOKPqJ2xyyKGuURDe_hPV2B5I0XI,1326
20
22
  pyosis/core/references.py,sha256=JQ8260aqVB5PhhGrqMt7W7fmrsmE69dFdrE6EyyLADg,2755
21
- pyosis/core/solver.py,sha256=f0vJ1w_r2n8vjiOzfD05sU6qD838nV7R22zmQAbI0lQ,5194
23
+ pyosis/core/sdk.py,sha256=GL_Z8I66B4lqzB9K9JibG5TClqoo6uBaBMyTTlB981Y,2485
24
+ pyosis/core/solver.py,sha256=RmW7uJJkV-K18ArkNIW4C-GYlE5sAXE4Vi5rhjyMcvY,7105
22
25
  pyosis/core/sync_apdl_cli.py,sha256=xlRDhtR4fOebLvyVZT9joUp6Q0H55gIt0YDy9Cb4HB4,874
23
26
  pyosis/display/__init__.py,sha256=POxWZ8I5Qanj4ETpHBZMhXNOMlsLMYRamXwP_JjSDUo,161
24
27
  pyosis/display/interface.py,sha256=-ekocpi2DEieGrE34R_BjEGW3p6yZkXxlaxteT06XzE,3907
@@ -30,35 +33,36 @@ pyosis/dynamic/modal.py,sha256=__as3Nl7Ks2ntgcZwAA9UhvsvTfBl-1zSUOTsnPVf-Y,640
30
33
  pyosis/dynamic/seismic.py,sha256=8DIh7xkUgl0UwweDq4WoYSNzMxpLnpDaM4W_7u3rg_A,6380
31
34
  pyosis/element/__init__.py,sha256=fZgmxJiNhCe3Ki8vNEdZOhyinxwvlF6Jcu-DgD-c6YM,92
32
35
  pyosis/element/interface.py,sha256=xLd2ljq0qW5uvqV0Lo2e6Ly7NShh_p2I5vQNdcA8P4Q,9872
33
- pyosis/element/manager.py,sha256=YzJEmcs5sx8R-nfucneujouQtwm3o6vUo0CUEw-xing,36615
36
+ pyosis/element/manager.py,sha256=4LKbljGxBaZL-PcnqXA1Ei04_evAYxnDQma3XP-6HUY,39550
34
37
  pyosis/general/__init__.py,sha256=dyvge-GgUpT3BeDwm_Lss1xqNlxAQdt63WJ7QcuZ_O4,24
35
38
  pyosis/general/interface.py,sha256=YRXQ-iXYVhiUBiUd7fpA0NOtL5VSueOHcobj625aQeU,5382
36
39
  pyosis/geometry/__init__.py,sha256=mlAXlxaohcEcm8-6anyDo1fevh_IzYz2OXBn0_DIrCY,99
37
40
  pyosis/geometry/interface.py,sha256=OHpsFEgjQok8FXpsOXXbCxfe9PPF6ac2rU6fii91jkY,4444
38
- pyosis/geometry/manager.py,sha256=8sR4GJ6UXSEPM2_4eM6AFlWTj8RGuwmwm0OIT1hPFiQ,13698
39
- pyosis/live/__init__.py,sha256=jl0pMkfAGRnukwuCbc6fOJoWo-ufMnFm4lyBV-xQQxc,112
41
+ pyosis/geometry/manager.py,sha256=tfLXZd4eBT8y7F0tEVOXQY57xKzShqQ2iLt0h_QOto0,13454
42
+ pyosis/live/__init__.py,sha256=Y36H7paj8nbFBeT6a8shKzMQnxnsfJIRzjUvivuc7HA,165
40
43
  pyosis/live/analysis.py,sha256=sI0jE65KS2EylpmBbySNcGsUHvvk9-6SZ0-37ZXsmbk,5486
41
44
  pyosis/live/grade.py,sha256=GjFxV_FImMK_ahfB0DNePGwdifUbiFK8r-cSXlnrVP8,3774
42
45
  pyosis/live/lane.py,sha256=i1-mnKQuo_XLimtcX2ZV4PBC_A0FBneWxJU198X1MMc,5487
43
- pyosis/live/manager.py,sha256=q0w9RVfuwLUqPYo4CS8kc9NchyF7mCiczcrWEzD31NQ,49319
46
+ pyosis/live/manager.py,sha256=JBVeQF6DJY0uLfc74qnzlnTqyo-63IBHHzfSqqfInPg,51195
47
+ pyosis/live/vehicle.py,sha256=-0UasXdnqdcgwnNIdqZYLbKAizTN3IhG5hLlH_NV8yE,4428
44
48
  pyosis/load/__init__.py,sha256=AdCBsdf4QPVzbKwbj2C24Fnl9sPmlB9h542LjLFcqHM,135
45
49
  pyosis/load/loadcase.py,sha256=5DOty5OBtxHPguw_gYUqL3FFbXRkCjA2IVpCdAzJSJU,2457
46
- pyosis/load/manager.py,sha256=NVXXxW44eHhAElWSTi9IWjQbvOh9rblcQANzcTf31vg,81453
50
+ pyosis/load/manager.py,sha256=tfanb5D4EKGL-EaWnajg4etNjqvUZOUO4hufZhLvmKQ,82957
47
51
  pyosis/load/static.py,sha256=vvwx5WmXUL-M3GvlH9GA-oaTZQmvLaawR76dFNVrwgc,22773
48
52
  pyosis/load/tendon.py,sha256=2AJxvYJU8PEJ-rH-vbLUjd0CwmhIeSFEx9asuWpT_0s,11528
49
53
  pyosis/material/__init__.py,sha256=W0oDx9SY_zngAcrMCO_0sF773-OxCfL1B-w2IeWlZ_g,79
50
54
  pyosis/material/interface.py,sha256=SiHWjLPUDR1f3EMObGlYQUlKgpfoh1VuGJgVAQfariA,5729
51
- pyosis/material/manager.py,sha256=4zPVD03QOZ7sSPk4VpZgf1Ug5TTVpqsAIZb4Phj4Ftg,16061
55
+ pyosis/material/manager.py,sha256=4LlZ6B7ZWrmscru8cThxsZ7eKgTHGxbKSqAG9WLf8KA,17161
52
56
  pyosis/node/__init__.py,sha256=6BKMR_HhFuvf-wr_U1H4njEj95pqgiHh6ApFl2JWMQ0,71
53
57
  pyosis/node/interface.py,sha256=T0lL1pHD069Qw3PTxufUF6cJl9fAKiclAL_ISgboaz8,1208
54
- pyosis/node/manager.py,sha256=fXkmeILs_LUvyv45wKBwzDFB2ssNO4In-bP71Dbrlow,8877
58
+ pyosis/node/manager.py,sha256=pyCGHbIzAPaSKEseDOTBKlQbhz781y5h0jSH6UJH5qM,9598
55
59
  pyosis/post/__init__.py,sha256=Zh8Jvy6715tCZxwlTfV86-8cyh0OqqK2vCTlG_VARYY,120
56
60
  pyosis/post/combine.py,sha256=0EajaRAJK3d_rkW7t9Cmxc4wHM87TOBYroWnnBK2ldM,4587
57
61
  pyosis/post/design_check.py,sha256=vJzpu63yBjU4QDUIxvLOhUvqPrZ56q301ADCgHdu0eA,11257
58
62
  pyosis/post/display.py,sha256=BdoHetcM69Ez4s0-Zx3MreIcadxJPv2U2cx0E0PJTVw,2006
59
63
  pyosis/post/manager.py,sha256=wj0nGIqdlRhu9zqWxZAAhNAt9FB6vX0-hVtIYcdC6zU,19927
60
64
  pyosis/project/__init__.py,sha256=hYfnubp0bbHJK2tBBH12XDs3CeeO0d7whzILDxl4044,78
61
- pyosis/project/interface.py,sha256=Iiku4SsBlBkH216Hrb2E3VrqzHnoLW6tlGwxfFDwbpU,1522
65
+ pyosis/project/interface.py,sha256=BRJDSavAN7qx8HLnBTkmpw-TH0H8R6ZhTlp2npmXARI,1689
62
66
  pyosis/project/manager.py,sha256=II6NxEig5KJYzuPu3_70KadQ0HYu2TfbW338hZ23dEk,4095
63
67
  pyosis/property/__init__.py,sha256=xGdJItBRic3rd-6i5vyjGfA3KY-e9-WuOquIEnjPP_4,191
64
68
  pyosis/property/component_thickness.py,sha256=fH9jpt2V6w2lSL2jDb1cuk5wylfhvnznxZXObafxe44,794
@@ -69,16 +73,17 @@ pyosis/property/manager.py,sha256=7wHj0PC38hC42i0S36JDAeU8TUrjIQF0cubRgNUNpAI,33
69
73
  pyosis/property/pu_curve.py,sha256=E3oUfe7ERYKX6q9v1U-HnNP1LRbWobNYB8dUC26s8aQ,1534
70
74
  pyosis/quick_building/__init__.py,sha256=QiWapgiZk6pkAdiznKI0bVIc16UcFOIALQuLhupLkqw,48
71
75
  pyosis/quick_building/interface.py,sha256=xdQrORabxmnlhi537pspFokQBaXSmnZMIxA_kxSo_cE,13951
72
- pyosis/result/__init__.py,sha256=DYZe8miR9Fj2Rnbdjyi97h1Egr_kVm2bbHyIffJ2Yk8,114
76
+ pyosis/result/__init__.py,sha256=8mvkAeT6A9Sfn8R3fZuyLGZZPPAwaTAC3ikwN6TU7uo,336
73
77
  pyosis/result/check.py,sha256=CuPjCx54AQlg9oTM71tMbW7pTDfolkYPbpb9iOc7bIM,4922
74
78
  pyosis/result/env.py,sha256=PjvBpaZOPEjm4TVfolpQEssoXXtMSnMZ7dUmt9w3Glo,1425
79
+ pyosis/result/headless.py,sha256=8P15401c57FikagnS4wl1PJb5NT9M071pl9Vj7BJooI,6654
75
80
  pyosis/result/loadcase.py,sha256=Z5tGpesD-8o_l1iS6tLn6u8aty3QtDNsyKXsbvbkOV4,2351
76
- pyosis/result/manager.py,sha256=Q4aoRX0LB8y3q5TdqV_JPYFRWTWuygzyNnhCcJpUveY,9808
81
+ pyosis/result/manager.py,sha256=pFbdrBVAwjhsgTgBK0FCO8k2IlDgF3kUhH4bwySpbP4,13227
77
82
  pyosis/result/result.py,sha256=wUyRaHSwyijLpodWIHPFQVEOn6LP8MfYp7xLhC-RiIo,1194
78
83
  pyosis/section/__init__.py,sha256=VjNbQWgWHtLO6la39oXgbQMnQPR0-b1DPIM52Cj--jg,179
79
84
  pyosis/section/common.py,sha256=yI61YQH8btfkoBGnXF7wp3kFhZVW06XABIJZnvkDk3E,26616
80
85
  pyosis/section/composite.py,sha256=CWNcPagXbL4D8uUouRk8ux7Xv41bE2dXM8JfWX77pBI,9353
81
- pyosis/section/manager.py,sha256=WED3yj01gb0gOJ1pwDEJcEFpZhWwLBy62ETQayTEPYM,94343
86
+ pyosis/section/manager.py,sha256=UYhp6f1Ro6lJALVP_UsY6Y01i7AO3xV-B3fce74RAMo,93629
82
87
  pyosis/section/numeric.py,sha256=lDO1KvSTmzBE56wkfDw5xxDhWi-kM0szXPx6CIymIyQ,1479
83
88
  pyosis/section/param.py,sha256=E4ZyJqyPn1xhNchb82ar6K36a_ah8R_66-FruOMlbBM,4944
84
89
  pyosis/section/rebar.py,sha256=9ibcOoMd7HYfzSaO6dMpZFwp1ugmwayOmDqIoWUijNc,8337
@@ -92,19 +97,20 @@ pyosis/stability/buckling.py,sha256=mlEDo8aduCuxlaawRHt8nCEERbP2cCp_8BHSYeQmFGw,
92
97
  pyosis/stability/manager.py,sha256=pNi07ulfQOFoDCc6FsfjYILUKFtHWWUNfiIJsCutgh4,8853
93
98
  pyosis/stage/__init__.py,sha256=TrNcvwQKki2SSwFkVsVcDA6EXATXaXRUorxRocn4HX8,94
94
99
  pyosis/stage/define.py,sha256=kfUbC_52ap3q48EblvH_DiwYFD5CjuT6AkC1a_Z5QEc,4023
95
- pyosis/stage/manager.py,sha256=REA9V22Iyqoy7SemsdyWphlyl-8hQBWnBqdsQVlkhbQ,12239
100
+ pyosis/stage/manager.py,sha256=M6krQs07T2wrGDpJBZq0jtiGKD8WJ0ydUfhHkxOn0U8,12242
96
101
  pyosis/stage/overall.py,sha256=OS0qbx8SKAN425pPTMetFaX4V-tXEZeTwK3Id5_nLuw,2170
97
102
  pyosis/thickness/__init__.py,sha256=YGYmUPc9TvAlw4eFuEjxaG7HjvwLQJelU_Mx2M6RhW0,82
98
103
  pyosis/thickness/interface.py,sha256=o9fwAnPtincBvNB7KZ-Cw67V4mSvoMYgcuLqD_FMLs0,1311
99
104
  pyosis/thickness/manager.py,sha256=JfKNKQnAaqEVnFyr3UwCj9cl4qhHYT_9Pp7HVBYNx6M,5048
100
105
  pyosis/transfer/__init__.py,sha256=OZVxVnjhDGe4fHC6pjtOaKPzAKuoDp3-XkNFzDWepsE,623
101
- pyosis/transfer/generator.py,sha256=sVcmOfXp9_Xx0_Rk_BrSgIdK5CL47m6sBeIWCC-22XU,3869
106
+ pyosis/transfer/generator.py,sha256=VEK_od-buUfHLav39ldR6o-ibKBd1iWdjNQ0T_Zfhyg,5473
107
+ pyosis/transfer/introspect.py,sha256=auOKh6KJrT3dZckNnTA59zuGm9kzSsVNiSkpvDo1G9Q,5125
102
108
  pyosis/transfer/matrix.py,sha256=sHw9X34-PUeY1EdoNklgK0LUHwbBPnhkhk0R9ME0XG0,3378
103
- pyosis/transfer/out_to_python.py,sha256=wiU58lQvdfugxebizO91wPwFWVk8x1Q7LgKyScFNqZA,15706
109
+ pyosis/transfer/out_to_python.py,sha256=69UnwkmkQiAZvpB0RLZqXlj9I0hItWgvTZRY5dWN2lY,17880
104
110
  pyosis/transfer/parser.py,sha256=R_aBlYJTe53hD1sX5PBv86bhj88NQwANFRN4pGYudQ8,6774
105
- pyosis/transfer/routes.py,sha256=l1EdTAWeyvhkQSbK3jMKwn2SeXJHF9Lf2AdEDV6X0l4,10798
111
+ pyosis/transfer/routes.py,sha256=fBHDt53F5YxNpttPwW_jm6bjxcW7T1P8WAiEv7Xn90E,12748
106
112
  pyosis/transfer/split.py,sha256=hpBe9D9WbjbKsovx4hM3X5RjTrruWNkuFmZt2ed0fME,1284
107
- osis_python-0.7.5.dist-info/METADATA,sha256=u0ZbbySda6s0zZ2X4IKvJhK2mo6FfASB5QYfJ5HER-o,20180
108
- osis_python-0.7.5.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
109
- osis_python-0.7.5.dist-info/top_level.txt,sha256=6VDNySkQKwipRXcN8ayKVci4vAXi4oPyWLqFhNVcIfM,7
110
- osis_python-0.7.5.dist-info/RECORD,,
113
+ osis_python-0.8.0.dist-info/METADATA,sha256=oyyg_e4lH3Ezfg6FFSpKiIwWOU7ii6RYwKH00akUb30,20441
114
+ osis_python-0.8.0.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
115
+ osis_python-0.8.0.dist-info/top_level.txt,sha256=6VDNySkQKwipRXcN8ayKVci4vAXi4oPyWLqFhNVcIfM,7
116
+ osis_python-0.8.0.dist-info/RECORD,,
pyosis/__init__.py CHANGED
@@ -7,7 +7,7 @@ A library for extending OSIS functionality.
7
7
  A library that allows users to use CAE with great flexibility.
8
8
  """
9
9
 
10
- __version__ = "0.7.5"
10
+ __version__ = "0.8.0"
11
11
 
12
12
  from .core.engine import OSISEngine
13
13
  from .core.batch import batch, flush, batch_state, BatchError
@@ -9,23 +9,26 @@
9
9
  支持的边界类型:
10
10
  - GENERAL(一般边界,type=1)
11
11
  - MSTSLV(主从约束,type=2)
12
- - RELEASE(释放梁端约束,type=4)
13
- - ELSTCSPT(弹性支承,type=5)
14
- - GENERALELSTCSPT(一般弹性支承,type=6)
12
+ - RELEASE(释放梁端约束,type=3)
13
+ - ELSTCSPT(节点弹性支承,type=4)
14
+ - GENERALELSTCSPT(一般弹性支承,type=5)
15
15
 
16
- 注:截面特性调整(SECF)为独立功能,不属于边界类型
16
+ 其余类型(SECF=7 / GLINK=8 / UNISPT=9 / UNILNK=10 / LELNK=11 /
17
+ SOILSPRING=12 / SURFSPT=13)暂无专用数据类,_from_dict 落到基类 Boundary,
18
+ type_name 仍可正确取名。真实取值以 PrepEnum::Boundary 为准(见 core/enums.py)。
17
19
  """
18
20
 
19
21
  from __future__ import annotations
20
22
 
21
23
  from dataclasses import dataclass, field
22
24
  from typing import Any, Literal
23
- from enum import IntEnum
24
25
 
25
26
  from ..core.client import osis_client
26
27
  from ..core import get_references, raise_if_occupied
27
28
  from ..core.basic_manager import BasicManager
28
29
  from ..core.batch import batch_state
30
+ from ..core.enums import BoundaryType, boundary_type_name, constraints_to_dict
31
+ from ..core.normalize import as_no, as_name
29
32
  from .interface import (
30
33
  osis_boundary_general,
31
34
  osis_boundary_elstcspt,
@@ -40,21 +43,6 @@ from .interface import (
40
43
  )
41
44
 
42
45
 
43
- # ──────────────────────────────────────────────
44
- # 枚举类型
45
- # ──────────────────────────────────────────────
46
-
47
- class BoundaryType(IntEnum):
48
- """边界类型枚举"""
49
- UNASSIGNED = 0
50
- GENERAL = 1 # 一般支撑
51
- MSTSLV = 2 # 主从约束
52
- RELEASE = 3 # 释放梁端约束
53
- ELSTCSPT = 4 # 节点弹性支承
54
- GENERALELSTCSPT = 5 # 一般弹性支承
55
- RIGID = 6 # 刚性连接
56
-
57
-
58
46
  # ──────────────────────────────────────────────
59
47
  # 数据类
60
48
  # ──────────────────────────────────────────────
@@ -72,13 +60,18 @@ class Boundary:
72
60
  entity_vec: list[int] = field(default_factory=list)
73
61
  is_occupied: bool = False
74
62
  is_selected: bool = False
75
- is_ploted: bool = False
63
+ is_plotted: bool = False
64
+
65
+ @property
66
+ def type_name(self) -> str:
67
+ """边界类型名(与 OSIS 命令流一致,如 "GENERAL" / "ELSTCSPT")"""
68
+ return boundary_type_name(self.boundary_type.value)
76
69
 
77
70
  @classmethod
78
71
  def _from_dict(cls, d: dict) -> Boundary:
79
72
  """从接口 dict 构造 Boundary 对象(内部使用)"""
80
73
  raw_type = int(d.get("type"))
81
-
74
+
82
75
  # 根据类型创建具体子类
83
76
  if raw_type == BoundaryType.GENERAL:
84
77
  return GeneralBoundary._from_dict(d)
@@ -93,13 +86,13 @@ class Boundary:
93
86
  else:
94
87
  # 未知类型返回基类
95
88
  return cls(
96
- no=d.get("no"),
97
- name=d.get("name"),
89
+ no=as_no(d.get("no")),
90
+ name=as_name(d.get("name")),
98
91
  boundary_type=BoundaryType(raw_type) if raw_type in [t.value for t in BoundaryType] else BoundaryType.GENERAL,
99
- entity_vec=list(d.get("entityVec")),
92
+ entity_vec=list(d.get("entityVec") or []),
100
93
  is_occupied=d.get("isOccupied"),
101
94
  is_selected=d.get("isSelected"),
102
- is_ploted=d.get("isPloted"),
95
+ is_plotted=d.get("isPlotted"),
103
96
  )
104
97
 
105
98
  def set_section_factor(
@@ -169,20 +162,28 @@ class GeneralBoundary(Boundary):
169
162
  def _from_dict(cls, d: dict) -> GeneralBoundary:
170
163
  """从接口 dict 构造 GeneralBoundary 对象"""
171
164
  return cls(
172
- no=d.get("no"),
173
- name=d.get("name"),
165
+ no=as_no(d.get("no")),
166
+ name=as_name(d.get("name")),
174
167
  boundary_type=BoundaryType.GENERAL,
175
- entity_vec=list(d.get("entityVec")),
168
+ entity_vec=list(d.get("entityVec") or []),
176
169
  is_occupied=d.get("isOccupied"),
177
170
  is_selected=d.get("isSelected"),
178
- is_ploted=d.get("isPloted"),
179
- constraints=list(d.get("constraints")),
171
+ is_plotted=d.get("isPlotted"),
172
+ constraints=list(d.get("constraints") or []),
180
173
  coor_no=d.get("coorNO"),
181
174
  )
182
175
 
183
176
  def __repr__(self) -> str:
184
177
  return f"GeneralBoundary(no={self.no}, constraints={self.constraints})"
185
178
 
179
+ @property
180
+ def constraints_dict(self) -> dict[str, bool]:
181
+ """约束状态字典 {DX, DY, DZ, RX, RY, RZ, RW},True = 约束。
182
+
183
+ C++ 侧透传的是固定顺序的 7 位整数列表,这里转成可读字典。
184
+ """
185
+ return constraints_to_dict(self.constraints)
186
+
186
187
  @property
187
188
  def ux(self) -> int:
188
189
  return self.constraints[0] if len(self.constraints) > 0 else 0
@@ -227,17 +228,22 @@ class MstSlvBoundary(Boundary):
227
228
  def _from_dict(cls, d: dict) -> MstSlvBoundary:
228
229
  """从接口 dict 构造 MstSlvBoundary 对象"""
229
230
  return cls(
230
- no=d.get("no"),
231
- name=d.get("name"),
231
+ no=as_no(d.get("no")),
232
+ name=as_name(d.get("name")),
232
233
  boundary_type=BoundaryType.MSTSLV,
233
- entity_vec=list(d.get("entityVec")),
234
+ entity_vec=list(d.get("entityVec") or []),
234
235
  is_occupied=d.get("isOccupied"),
235
236
  is_selected=d.get("isSelected"),
236
- is_ploted=d.get("isPloted"),
237
- constraints=list(d.get("constraints")),
237
+ is_plotted=d.get("isPlotted"),
238
+ constraints=list(d.get("constraints") or []),
238
239
  master_no=d.get("masterNO"),
239
240
  )
240
241
 
242
+ @property
243
+ def constraints_dict(self) -> dict[str, bool]:
244
+ """约束状态字典 {DX, DY, DZ, RX, RY, RZ}(主从约束无 RW)"""
245
+ return constraints_to_dict(self.constraints)
246
+
241
247
  def __repr__(self) -> str:
242
248
  return f"MstSlvBoundary(no={self.no}, master_no={self.master_no})"
243
249
 
@@ -245,7 +251,7 @@ class MstSlvBoundary(Boundary):
245
251
  @dataclass(frozen=True)
246
252
  class ReleaseBoundary(Boundary):
247
253
  """释放梁端约束
248
-
254
+
249
255
  I端(7) + J端(7) = 14个约束状态/值
250
256
  state: 0 = 释放,1 = 约束
251
257
  value: 0-1 表示释放后残余约束能力的百分比
@@ -259,19 +265,29 @@ class ReleaseBoundary(Boundary):
259
265
  def _from_dict(cls, d: dict) -> ReleaseBoundary:
260
266
  """从接口 dict 构造 ReleaseBoundary 对象"""
261
267
  return cls(
262
- no=d.get("no"),
263
- name=d.get("name"),
268
+ no=as_no(d.get("no")),
269
+ name=as_name(d.get("name")),
264
270
  boundary_type=BoundaryType.RELEASE,
265
- entity_vec=list(d.get("entityVec")),
271
+ entity_vec=list(d.get("entityVec") or []),
266
272
  is_occupied=d.get("isOccupied"),
267
273
  is_selected=d.get("isSelected"),
268
- is_ploted=d.get("isPloted"),
269
- i_state=list(d.get("endIState")),
270
- i_values=list(d.get("endI")),
271
- j_state=list(d.get("endJState")),
272
- j_values=list(d.get("endJ")),
274
+ is_plotted=d.get("isPlotted"),
275
+ i_state=list(d.get("endIState") or []),
276
+ i_values=list(d.get("endI") or []),
277
+ j_state=list(d.get("endJState") or []),
278
+ j_values=list(d.get("endJ") or []),
273
279
  )
274
280
 
281
+ @property
282
+ def i_state_dict(self) -> dict[str, bool]:
283
+ """I 端约束状态字典 {DX, DY, DZ, RX, RY, RZ, RW}"""
284
+ return constraints_to_dict(self.i_state)
285
+
286
+ @property
287
+ def j_state_dict(self) -> dict[str, bool]:
288
+ """J 端约束状态字典 {DX, DY, DZ, RX, RY, RZ, RW}"""
289
+ return constraints_to_dict(self.j_state)
290
+
275
291
  def __repr__(self) -> str:
276
292
  return f"ReleaseBoundary(no={self.no})"
277
293
 
@@ -293,17 +309,17 @@ class ElstcSptBoundary(Boundary):
293
309
  def _from_dict(cls, d: dict) -> ElstcSptBoundary:
294
310
  """从接口 dict 构造 ElstcSptBoundary 对象"""
295
311
  return cls(
296
- no=d.get("no"),
297
- name=d.get("name"),
312
+ no=as_no(d.get("no")),
313
+ name=as_name(d.get("name")),
298
314
  boundary_type=BoundaryType.ELSTCSPT,
299
- entity_vec=list(d.get("entityVec")),
315
+ entity_vec=list(d.get("entityVec") or []),
300
316
  is_occupied=d.get("isOccupied"),
301
317
  is_selected=d.get("isSelected"),
302
- is_ploted=d.get("isPloted"),
318
+ is_plotted=d.get("isPlotted"),
303
319
  # constraints=list(d.get("constraints")),
304
320
  coor_no=d.get("coorNO"),
305
- k_values=list(d.get("k")),
306
- elastic_k=list(d.get("elasticK")),
321
+ k_values=list(d.get("k") or []),
322
+ elastic_k=list(d.get("elasticK") or []),
307
323
  )
308
324
 
309
325
  def __repr__(self) -> str:
@@ -329,13 +345,13 @@ class GeneralElstcSptBoundary(Boundary):
329
345
  def _from_dict(cls, d: dict) -> GeneralElstcSptBoundary:
330
346
  """从接口 dict 构造 GeneralElstcSptBoundary 对象"""
331
347
  return cls(
332
- no=d.get("no"),
333
- name=d.get("name"),
348
+ no=as_no(d.get("no")),
349
+ name=as_name(d.get("name")),
334
350
  boundary_type=BoundaryType.GENERALELSTCSPT,
335
- entity_vec=list(d.get("entityVec")),
351
+ entity_vec=list(d.get("entityVec") or []),
336
352
  is_occupied=d.get("isOccupied"),
337
353
  is_selected=d.get("isSelected"),
338
- is_ploted=d.get("isPloted"),
354
+ is_plotted=d.get("isPlotted"),
339
355
  coor_no=d.get("coorNO"),
340
356
  flag_m=d.get("flagM"),
341
357
  flag_c=d.get("flagC"),
pyosis/control/manager.py CHANGED
@@ -18,6 +18,7 @@ from __future__ import annotations
18
18
  from typing import Literal
19
19
 
20
20
  from ..core import osis_run
21
+ from ..core.client import osis_client
21
22
  from .control import (
22
23
  osis_acel,
23
24
  osis_calc_tendon,
@@ -373,6 +374,25 @@ class ControlManager:
373
374
  if not ok:
374
375
  raise RuntimeError(f"设置模态分析参数失败: {err}")
375
376
 
377
+ # ── 查询 ────────────────────────────────────
378
+
379
+ def summary(self) -> list[dict]:
380
+ '''获取分析控制摘要(走 GetAnalysisControlSummary 端点)
381
+
382
+ 汇总当前模型将要执行的分析类型(特征值分析、施工阶段分析等),
383
+ 每项含 name/type/summary/count。
384
+
385
+ Returns:
386
+ list[dict]: 分析控制摘要列表,未定义分析时为空列表
387
+
388
+ Raises:
389
+ RuntimeError: 查询失败时抛出异常
390
+ '''
391
+ resp = osis_client("GetAnalysisControlSummary", {})
392
+ if not resp.get("success"):
393
+ raise RuntimeError(f"{resp.get('error')}")
394
+ return list(resp.get("data") or [])
395
+
376
396
  def __repr__(self) -> str:
377
397
  return "ControlManager()"
378
398
 
pyosis/core/__init__.py CHANGED
@@ -14,3 +14,13 @@ from .batch import batch, flush, batch_state, BatchError
14
14
  from .basic_manager import BasicManager, LazyRef
15
15
  from .exceptions import DependencyError
16
16
  from .references import get_references, raise_if_occupied
17
+ from .sdk import health, sdk_version, list_commands, instance_info
18
+ from .enums import (
19
+ OsisEnum,
20
+ ElementType, BoundaryType, MaterialType, MaterialCode,
21
+ SectionType, LoadCaseType, SplineType, TensionType,
22
+ element_type_name, boundary_type_name, material_type_name,
23
+ material_code_name, section_type_name, loadcase_type_name,
24
+ DOF_NAMES, constraints_to_dict,
25
+ )
26
+ from .normalize import as_no, as_name
pyosis/core/apdl_sync.py CHANGED
@@ -51,8 +51,11 @@ class ApdlSessionStore:
51
51
 
52
52
 
53
53
  # 读取 .out 文件内容
54
+ # 实测 5.1(2026-10 构建)export_apdl 导出为 UTF-8(无 BOM);UTF-8 中文可能
55
+ # 恰好是合法 GBK,GBK 优先会静默乱码,所以 UTF-8 在前。旧版若导出 GBK,
56
+ # 按 UTF-8 解码通常直接抛错并回落到 GBK,不会误判。
54
57
  def _read_out_text(path: Path) -> str:
55
- for encoding in ("gbk", "utf-8", "gb2312", "gb18030", "latin-1"):
58
+ for encoding in ("utf-8-sig", "utf-8", "gbk", "gb18030", "latin-1"):
56
59
  try:
57
60
  return path.read_text(encoding=encoding)
58
61
  except UnicodeDecodeError:
pyosis/core/client.py CHANGED
@@ -102,4 +102,54 @@ def osis_client(
102
102
 
103
103
  except requests.RequestException as e:
104
104
  return {"success": False, "error": f"调用失败: {str(e)}"}
105
+
106
+
107
+ def osis_get(
108
+ path: str,
109
+ base_url=None,
110
+ timeout: float | None = None,
111
+ ) -> dict:
112
+ """
113
+ 通用 OSIS GET 客户端(复用连接池)
114
+
115
+ 用于只绑定 GET 的端点(如 /instance);/health、/sdk/* 同时支持
116
+ GET/POST,查询类调用统一走本函数。
117
+
118
+ Args:
119
+ path: 端点路径(如 "instance",无需前导斜杠)
120
+ Returns:
121
+ 成功时返回端点 JSON;失败时返回 {"success": False, "error": ...}
122
+ """
123
+ from .batch import batch_state, flush as _flush
124
+ if batch_state.active and batch_state.buffer and not batch_state.flushing:
125
+ _flush()
126
+
127
+ base_url = base_url or os.environ.get("OSIS_URL", f"{DEFAULT_URL}:{DEFAULT_PORT}")
128
+ url = f"{base_url}/{path.lstrip('/')}"
129
+
130
+ try:
131
+ response = session.get(
132
+ url,
133
+ timeout=timeout if timeout is not None else DEFAULT_TIMEOUT,
134
+ )
135
+
136
+ data = None
137
+ if response.content:
138
+ try:
139
+ data = response.json()
140
+ except ValueError:
141
+ pass
142
+
143
+ if response.status_code == 404:
144
+ return {"success": False, "error": f"接口不存在: {path}"}
145
+
146
+ if response.ok: # 200-299
147
+ if data is not None:
148
+ return data
149
+ return {"success": False, "error": f"接口返回空数据: {path}"}
150
+
151
+ return {"success": False, "error": f"HTTP {response.status_code}: {response.text[:200]}"}
152
+
153
+ except requests.RequestException as e:
154
+ return {"success": False, "error": f"调用失败: {str(e)}"}
105
155
 
pyosis/core/engine.py CHANGED
@@ -52,6 +52,7 @@ from ..general.interface import (
52
52
  )
53
53
  from .command import osis_run
54
54
  from .client import set_osis_port, set_osis_url
55
+ from .sdk import sdk_version, list_commands, instance_info, health as _sdk_health
55
56
 
56
57
 
57
58
  class OSISEngine:
@@ -329,6 +330,30 @@ class OSISEngine:
329
330
  """输出计算书所需结果"""
330
331
  return output_result_for_calc_book()
331
332
 
333
+ # ──────────────────────────────────────────
334
+ # 服务端元信息(/sdk/*、/instance)
335
+ # ──────────────────────────────────────────
336
+
337
+ def sdk_version(self) -> dict:
338
+ """查询 SDK/OSIS 版本与 ABI
339
+
340
+ Returns:
341
+ {"success": True, "sdk": 版本串, "osis": 版本串, "abi": ABI, "port": 端口}
342
+ """
343
+ return sdk_version()
344
+
345
+ def list_commands(self) -> list[str]:
346
+ """查询运行时可用命令名(GUI 书册命令不列出)"""
347
+ return list_commands()
348
+
349
+ def instance_info(self) -> dict:
350
+ """查询 OSIS 实例信息(pid/port/project/version/state)"""
351
+ return instance_info()
352
+
353
+ def is_alive(self) -> bool:
354
+ """存活探测(POST /health,不碰工程状态)"""
355
+ return _sdk_health()
356
+
332
357
  # ──────────────────────────────────────────
333
358
  # 便捷方法(委托给 project manager)
334
359
  # ──────────────────────────────────────────