osis-python 0.7.7__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.7/src/osis_python.egg-info → osis_python-0.8.0}/PKG-INFO +5 -4
- {osis_python-0.7.7 → osis_python-0.8.0}/README.md +4 -3
- {osis_python-0.7.7 → osis_python-0.8.0/src/osis_python.egg-info}/PKG-INFO +5 -4
- {osis_python-0.7.7 → osis_python-0.8.0}/src/osis_python.egg-info/SOURCES.txt +3 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/__init__.py +1 -1
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/boundary/manager.py +71 -55
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/core/__init__.py +9 -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.7.7 → osis_python-0.8.0}/src/pyosis/core/sdk.py +1 -1
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/core/solver.py +41 -21
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/element/manager.py +70 -20
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/geometry/manager.py +1 -11
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/live/__init__.py +1 -0
- {osis_python-0.7.7 → 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.7 → osis_python-0.8.0}/src/pyosis/load/manager.py +21 -12
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/material/manager.py +16 -13
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/node/manager.py +5 -5
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/project/interface.py +5 -1
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/result/__init__.py +2 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/result/headless.py +52 -2
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/result/manager.py +27 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/section/manager.py +13 -56
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/stage/manager.py +1 -1
- {osis_python-0.7.7 → osis_python-0.8.0}/LICENSE +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/pyproject.toml +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/setup.cfg +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/osis_python.egg-info/dependency_links.txt +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/osis_python.egg-info/requires.txt +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/osis_python.egg-info/top_level.txt +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/boundary/__init__.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/boundary/interface.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/control/__init__.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/control/control.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/control/io.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/control/manager.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/control/nonlinear.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/core/all_func.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/core/apdl_sync.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/core/basic_manager.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/core/batch.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/core/client.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/core/command.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/core/engine.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/core/exceptions.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/core/references.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/core/sync_apdl_cli.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/display/__init__.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/display/interface.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/display/manager.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/dynamic/__init__.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/dynamic/load_to_mass.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/dynamic/manager.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/dynamic/modal.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/dynamic/seismic.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/element/__init__.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/element/interface.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/general/__init__.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/general/interface.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/geometry/__init__.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/geometry/interface.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/live/analysis.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/live/grade.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/live/lane.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/load/__init__.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/load/loadcase.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/load/static.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/load/tendon.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/material/__init__.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/material/interface.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/node/__init__.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/node/interface.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/post/__init__.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/post/combine.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/post/design_check.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/post/display.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/post/manager.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/project/__init__.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/project/manager.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/property/__init__.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/property/component_thickness.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/property/coordinate.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/property/creep_shrink.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/property/damping.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/property/manager.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/property/pu_curve.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/quick_building/__init__.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/quick_building/interface.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/result/check.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/result/env.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/result/loadcase.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/result/result.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/section/__init__.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/section/common.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/section/composite.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/section/numeric.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/section/param.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/section/rebar.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/section/rib.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/section/steel.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/settlement/__init__.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/settlement/interface.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/settlement/manager.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/stability/__init__.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/stability/buckling.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/stability/manager.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/stage/__init__.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/stage/define.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/stage/overall.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/thickness/__init__.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/thickness/interface.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/thickness/manager.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/transfer/__init__.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/transfer/generator.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/transfer/introspect.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/transfer/matrix.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/transfer/out_to_python.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/transfer/parser.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/transfer/routes.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/src/pyosis/transfer/split.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/tests/test_batch.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/tests/test_delete_occupied.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/tests/test_project_manager.py +0 -0
- {osis_python-0.7.7 → osis_python-0.8.0}/tests/test_transfer_fixups.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,7 +23,9 @@ 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
|
|
28
30
|
src/pyosis/core/sdk.py
|
|
29
31
|
src/pyosis/core/solver.py
|
|
@@ -49,6 +51,7 @@ src/pyosis/live/analysis.py
|
|
|
49
51
|
src/pyosis/live/grade.py
|
|
50
52
|
src/pyosis/live/lane.py
|
|
51
53
|
src/pyosis/live/manager.py
|
|
54
|
+
src/pyosis/live/vehicle.py
|
|
52
55
|
src/pyosis/load/__init__.py
|
|
53
56
|
src/pyosis/load/loadcase.py
|
|
54
57
|
src/pyosis/load/manager.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"),
|
|
@@ -15,3 +15,12 @@ from .basic_manager import BasicManager, LazyRef
|
|
|
15
15
|
from .exceptions import DependencyError
|
|
16
16
|
from .references import get_references, raise_if_occupied
|
|
17
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
|