osis-python 0.7.5__tar.gz → 0.8.0__tar.gz
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.
- {osis_python-0.7.5/src/osis_python.egg-info → osis_python-0.8.0}/PKG-INFO +5 -4
- {osis_python-0.7.5 → osis_python-0.8.0}/README.md +4 -3
- {osis_python-0.7.5 → osis_python-0.8.0/src/osis_python.egg-info}/PKG-INFO +5 -4
- {osis_python-0.7.5 → osis_python-0.8.0}/src/osis_python.egg-info/SOURCES.txt +8 -1
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/__init__.py +1 -1
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/boundary/manager.py +71 -55
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/control/manager.py +20 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/core/__init__.py +10 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/core/apdl_sync.py +4 -1
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/core/client.py +50 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/core/engine.py +25 -0
- osis_python-0.8.0/src/pyosis/core/enums.py +349 -0
- osis_python-0.8.0/src/pyosis/core/normalize.py +45 -0
- osis_python-0.8.0/src/pyosis/core/sdk.py +76 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/core/solver.py +58 -22
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/element/manager.py +70 -20
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/geometry/manager.py +1 -11
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/live/__init__.py +1 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/live/manager.py +54 -11
- osis_python-0.8.0/src/pyosis/live/vehicle.py +121 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/load/manager.py +38 -12
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/material/manager.py +36 -13
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/node/manager.py +25 -5
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/project/interface.py +5 -1
- osis_python-0.8.0/src/pyosis/result/__init__.py +14 -0
- osis_python-0.8.0/src/pyosis/result/headless.py +172 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/result/manager.py +93 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/section/manager.py +30 -56
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/stage/manager.py +1 -1
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/transfer/generator.py +53 -21
- osis_python-0.8.0/src/pyosis/transfer/introspect.py +149 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/transfer/out_to_python.py +49 -3
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/transfer/routes.py +49 -5
- osis_python-0.8.0/tests/test_transfer_fixups.py +126 -0
- osis_python-0.7.5/src/pyosis/result/__init__.py +0 -4
- {osis_python-0.7.5 → osis_python-0.8.0}/LICENSE +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/pyproject.toml +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/setup.cfg +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/osis_python.egg-info/dependency_links.txt +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/osis_python.egg-info/requires.txt +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/osis_python.egg-info/top_level.txt +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/boundary/__init__.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/boundary/interface.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/control/__init__.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/control/control.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/control/io.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/control/nonlinear.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/core/all_func.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/core/basic_manager.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/core/batch.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/core/command.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/core/exceptions.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/core/references.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/core/sync_apdl_cli.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/display/__init__.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/display/interface.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/display/manager.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/dynamic/__init__.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/dynamic/load_to_mass.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/dynamic/manager.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/dynamic/modal.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/dynamic/seismic.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/element/__init__.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/element/interface.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/general/__init__.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/general/interface.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/geometry/__init__.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/geometry/interface.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/live/analysis.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/live/grade.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/live/lane.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/load/__init__.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/load/loadcase.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/load/static.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/load/tendon.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/material/__init__.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/material/interface.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/node/__init__.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/node/interface.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/post/__init__.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/post/combine.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/post/design_check.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/post/display.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/post/manager.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/project/__init__.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/project/manager.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/property/__init__.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/property/component_thickness.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/property/coordinate.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/property/creep_shrink.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/property/damping.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/property/manager.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/property/pu_curve.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/quick_building/__init__.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/quick_building/interface.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/result/check.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/result/env.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/result/loadcase.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/result/result.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/section/__init__.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/section/common.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/section/composite.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/section/numeric.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/section/param.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/section/rebar.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/section/rib.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/section/steel.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/settlement/__init__.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/settlement/interface.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/settlement/manager.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/stability/__init__.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/stability/buckling.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/stability/manager.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/stage/__init__.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/stage/define.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/stage/overall.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/thickness/__init__.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/thickness/interface.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/thickness/manager.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/transfer/__init__.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/transfer/matrix.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/transfer/parser.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/src/pyosis/transfer/split.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/tests/test_batch.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/tests/test_delete_occupied.py +0 -0
- {osis_python-0.7.5 → osis_python-0.8.0}/tests/test_project_manager.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: osis-python
|
|
3
|
-
Version: 0.
|
|
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 `
|
|
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>/
|
|
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 `
|
|
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
|
|
|
@@ -24,7 +24,7 @@ pip install osis-python -i https://pypi.org/simple
|
|
|
24
24
|
|
|
25
25
|
- OSIS >= 5.1 (short-form command names like `N`/`Ele`/`Sec` are accepted by both the converter and runtime)
|
|
26
26
|
- Python >= 3.8
|
|
27
|
-
- **Solver-only mode** additionally requires the solver distribution that ships `
|
|
27
|
+
- **Solver-only mode** additionally requires the solver distribution that ships `osisSdk.dll` (e.g. `D:\OSIS_Solver\Rbin64`).
|
|
28
28
|
|
|
29
29
|
> 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`.
|
|
30
30
|
|
|
@@ -118,7 +118,7 @@ By default, `OSISEngine()` connects to an already-running OSIS GUI process. If y
|
|
|
118
118
|
from pyosis.core.solver import OSISSolver
|
|
119
119
|
from pyosis.core.engine import OSISEngine
|
|
120
120
|
|
|
121
|
-
# Load <install>/
|
|
121
|
+
# Load <install>/osisSdk.dll and start the HTTP server (default port 18080)
|
|
122
122
|
solver = OSISSolver(osis_install_path=r"D:\OSIS_Solver\Rbin64")
|
|
123
123
|
engine = OSISEngine.from_solver(solver)
|
|
124
124
|
|
|
@@ -131,7 +131,8 @@ engine.solve()
|
|
|
131
131
|
|
|
132
132
|
Notes on solver-only mode:
|
|
133
133
|
|
|
134
|
-
- `osis_install_path` must be the directory containing `
|
|
134
|
+
- `osis_install_path` must be the directory containing `osisSdk.dll` (and its dependency DLLs).
|
|
135
|
+
- `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.
|
|
135
136
|
- The solver needs a project to exist before model commands run: call `engine.project.create()` / `open()` first.
|
|
136
137
|
- Crash minidumps are written to `<install>\Error\dmp\` (created on startup).
|
|
137
138
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: osis-python
|
|
3
|
-
Version: 0.
|
|
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 `
|
|
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>/
|
|
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 `
|
|
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
|
|
|
@@ -23,8 +23,11 @@ src/pyosis/core/batch.py
|
|
|
23
23
|
src/pyosis/core/client.py
|
|
24
24
|
src/pyosis/core/command.py
|
|
25
25
|
src/pyosis/core/engine.py
|
|
26
|
+
src/pyosis/core/enums.py
|
|
26
27
|
src/pyosis/core/exceptions.py
|
|
28
|
+
src/pyosis/core/normalize.py
|
|
27
29
|
src/pyosis/core/references.py
|
|
30
|
+
src/pyosis/core/sdk.py
|
|
28
31
|
src/pyosis/core/solver.py
|
|
29
32
|
src/pyosis/core/sync_apdl_cli.py
|
|
30
33
|
src/pyosis/display/__init__.py
|
|
@@ -48,6 +51,7 @@ src/pyosis/live/analysis.py
|
|
|
48
51
|
src/pyosis/live/grade.py
|
|
49
52
|
src/pyosis/live/lane.py
|
|
50
53
|
src/pyosis/live/manager.py
|
|
54
|
+
src/pyosis/live/vehicle.py
|
|
51
55
|
src/pyosis/load/__init__.py
|
|
52
56
|
src/pyosis/load/loadcase.py
|
|
53
57
|
src/pyosis/load/manager.py
|
|
@@ -79,6 +83,7 @@ src/pyosis/quick_building/interface.py
|
|
|
79
83
|
src/pyosis/result/__init__.py
|
|
80
84
|
src/pyosis/result/check.py
|
|
81
85
|
src/pyosis/result/env.py
|
|
86
|
+
src/pyosis/result/headless.py
|
|
82
87
|
src/pyosis/result/loadcase.py
|
|
83
88
|
src/pyosis/result/manager.py
|
|
84
89
|
src/pyosis/result/result.py
|
|
@@ -106,6 +111,7 @@ src/pyosis/thickness/interface.py
|
|
|
106
111
|
src/pyosis/thickness/manager.py
|
|
107
112
|
src/pyosis/transfer/__init__.py
|
|
108
113
|
src/pyosis/transfer/generator.py
|
|
114
|
+
src/pyosis/transfer/introspect.py
|
|
109
115
|
src/pyosis/transfer/matrix.py
|
|
110
116
|
src/pyosis/transfer/out_to_python.py
|
|
111
117
|
src/pyosis/transfer/parser.py
|
|
@@ -113,4 +119,5 @@ src/pyosis/transfer/routes.py
|
|
|
113
119
|
src/pyosis/transfer/split.py
|
|
114
120
|
tests/test_batch.py
|
|
115
121
|
tests/test_delete_occupied.py
|
|
116
|
-
tests/test_project_manager.py
|
|
122
|
+
tests/test_project_manager.py
|
|
123
|
+
tests/test_transfer_fixups.py
|
|
@@ -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.
|
|
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=
|
|
13
|
-
- ELSTCSPT
|
|
14
|
-
- GENERALELSTCSPT(一般弹性支承,type=
|
|
12
|
+
- RELEASE(释放梁端约束,type=3)
|
|
13
|
+
- ELSTCSPT(节点弹性支承,type=4)
|
|
14
|
+
- GENERALELSTCSPT(一般弹性支承,type=5)
|
|
15
15
|
|
|
16
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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"),
|
|
@@ -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
|
|
|
@@ -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
|
|
@@ -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 ("
|
|
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:
|
|
@@ -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
|
|
|
@@ -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
|
# ──────────────────────────────────────────
|