osis-python 0.3.2__tar.gz → 0.3.4__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.
Files changed (102) hide show
  1. {osis_python-0.3.2/src/osis_python.egg-info → osis_python-0.3.4}/PKG-INFO +1 -1
  2. {osis_python-0.3.2 → osis_python-0.3.4/src/osis_python.egg-info}/PKG-INFO +1 -1
  3. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/__init__.py +1 -1
  4. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/boundary/manager.py +12 -20
  5. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/core/command.py +1 -1
  6. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/element/manager.py +1 -1
  7. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/general/interface.py +1 -1
  8. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/geometry/manager.py +1 -1
  9. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/live/lane.py +4 -4
  10. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/live/manager.py +64 -13
  11. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/load/manager.py +47 -0
  12. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/load/static.py +23 -0
  13. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/material/manager.py +1 -1
  14. osis_python-0.3.4/src/pyosis/quick_building/__init__.py +2 -0
  15. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/section/manager.py +454 -0
  16. osis_python-0.3.2/src/pyosis/quick_building/__init__.py +0 -1
  17. {osis_python-0.3.2 → osis_python-0.3.4}/LICENSE +0 -0
  18. {osis_python-0.3.2 → osis_python-0.3.4}/README.md +0 -0
  19. {osis_python-0.3.2 → osis_python-0.3.4}/pyproject.toml +0 -0
  20. {osis_python-0.3.2 → osis_python-0.3.4}/setup.cfg +0 -0
  21. {osis_python-0.3.2 → osis_python-0.3.4}/src/osis_python.egg-info/SOURCES.txt +0 -0
  22. {osis_python-0.3.2 → osis_python-0.3.4}/src/osis_python.egg-info/dependency_links.txt +0 -0
  23. {osis_python-0.3.2 → osis_python-0.3.4}/src/osis_python.egg-info/requires.txt +0 -0
  24. {osis_python-0.3.2 → osis_python-0.3.4}/src/osis_python.egg-info/top_level.txt +0 -0
  25. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/boundary/__init__.py +0 -0
  26. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/boundary/interface.py +0 -0
  27. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/control/__init__.py +0 -0
  28. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/control/control.py +0 -0
  29. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/control/io.py +0 -0
  30. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/control/manager.py +0 -0
  31. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/control/nonlinear.py +0 -0
  32. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/core/__init__.py +0 -0
  33. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/core/all_func.py +0 -0
  34. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/core/client.py +0 -0
  35. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/core/engine.py +0 -0
  36. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/dynamic/__init__.py +0 -0
  37. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/dynamic/load_to_mass.py +0 -0
  38. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/dynamic/manager.py +0 -0
  39. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/dynamic/modal.py +0 -0
  40. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/dynamic/seismic.py +0 -0
  41. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/element/__init__.py +0 -0
  42. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/element/interface.py +0 -0
  43. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/general/__init__.py +0 -0
  44. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/geometry/__init__.py +0 -0
  45. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/geometry/interface.py +0 -0
  46. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/live/__init__.py +0 -0
  47. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/live/analysis.py +0 -0
  48. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/live/grade.py +0 -0
  49. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/load/__init__.py +0 -0
  50. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/load/loadcase.py +0 -0
  51. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/load/tendon.py +0 -0
  52. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/material/__init__.py +0 -0
  53. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/material/interface.py +0 -0
  54. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/node/__init__.py +0 -0
  55. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/node/interface.py +0 -0
  56. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/node/manager.py +0 -0
  57. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/post/__init__.py +0 -0
  58. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/post/combine.py +0 -0
  59. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/post/design_check.py +0 -0
  60. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/post/display.py +0 -0
  61. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/post/manager.py +0 -0
  62. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/project/__init__.py +0 -0
  63. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/project/interface.py +0 -0
  64. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/project/manager.py +0 -0
  65. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/property/__init__.py +0 -0
  66. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/property/component_thickness.py +0 -0
  67. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/property/coordinate.py +0 -0
  68. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/property/creep_shrink.py +0 -0
  69. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/property/damping.py +0 -0
  70. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/property/manager.py +0 -0
  71. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/property/pu_curve.py +0 -0
  72. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/quick_building/interface.py +0 -0
  73. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/result/__init__.py +0 -0
  74. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/result/check.py +0 -0
  75. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/result/env.py +0 -0
  76. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/result/loadcase.py +0 -0
  77. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/result/manager.py +0 -0
  78. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/result/result.py +0 -0
  79. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/section/__init__.py +0 -0
  80. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/section/common.py +0 -0
  81. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/section/numeric.py +0 -0
  82. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/section/param.py +0 -0
  83. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/section/rebar.py +0 -0
  84. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/section/rib.py +0 -0
  85. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/section/steel.py +0 -0
  86. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/settlement/__init__.py +0 -0
  87. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/settlement/interface.py +0 -0
  88. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/settlement/manager.py +0 -0
  89. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/stability/__init__.py +0 -0
  90. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/stability/buckling.py +0 -0
  91. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/stability/manager.py +0 -0
  92. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/stage/__init__.py +0 -0
  93. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/stage/define.py +0 -0
  94. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/stage/manager.py +0 -0
  95. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/stage/overall.py +0 -0
  96. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/thickness/__init__.py +0 -0
  97. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/thickness/interface.py +0 -0
  98. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/thickness/manager.py +0 -0
  99. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/transfer/__init__.py +0 -0
  100. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/transfer/command_map.py +0 -0
  101. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/transfer/generator.py +0 -0
  102. {osis_python-0.3.2 → osis_python-0.3.4}/src/pyosis/transfer/parser.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: osis-python
3
- Version: 0.3.2
3
+ Version: 0.3.4
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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: osis-python
3
- Version: 0.3.2
3
+ Version: 0.3.4
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
@@ -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.3.2"
10
+ __version__ = "0.3.4"
11
11
  __author__ = "CCCC Highway Consultant Co. Ltd." # 中交公路规划设计院 - 工程技术研究中心 - lzh - wjh - myf
12
12
 
13
13
  # from .core import engine
@@ -134,6 +134,18 @@ class Boundary:
134
134
 
135
135
  def __repr__(self) -> str:
136
136
  return f"Boundary(no={self.no}, type={self.boundary_type.name})"
137
+
138
+
139
+ def assign(
140
+ self,
141
+ eOP: Literal["a", "s", "r", "aa", "ra"] = "a",
142
+ param: list | None = None,
143
+ ) -> None:
144
+ """分配边界给节点"""
145
+ ok, err = osis_assign_boundary(self.no, eOP, param if param is not None else [])
146
+ if not ok:
147
+ raise RuntimeError(f"分配边界 {self.no} 到节点 {param} 失败: {err}")
148
+
137
149
 
138
150
  @dataclass(frozen=True)
139
151
  class GeneralBoundary(Boundary):
@@ -192,16 +204,6 @@ class GeneralBoundary(Boundary):
192
204
  def rw(self) -> int:
193
205
  return self.constraints[6] if len(self.constraints) > 6 else 0
194
206
 
195
- def assign(
196
- self,
197
- eOP: Literal["a", "s", "r", "aa", "ra"] = "a",
198
- param: list | None = None,
199
- ) -> None:
200
- """分配边界给节点"""
201
- ok, err = osis_assign_boundary(self.no, eOP, param if param is not None else [])
202
- if not ok:
203
- raise RuntimeError(f"分配边界 {self.no} 到节点 {param} 失败: {err}")
204
-
205
207
 
206
208
  @dataclass(frozen=True)
207
209
  class MstSlvBoundary(Boundary):
@@ -300,16 +302,6 @@ class ElstcSptBoundary(Boundary):
300
302
  def __repr__(self) -> str:
301
303
  return f"ElstcSptBoundary(no={self.no}, constraints={self.constraints})"
302
304
 
303
- def assign(
304
- self,
305
- eOP: Literal["a", "s", "r", "aa", "ra"] = "a",
306
- param: list | None = None,
307
- ) -> None:
308
- """分配边界给节点(节点弹性支撑)"""
309
- ok, err = osis_assign_boundary(self.no, eOP, param if param is not None else [])
310
- if not ok:
311
- raise RuntimeError(f"分配边界 {self.no} 到节点 {param} 失败: {err}")
312
-
313
305
 
314
306
  @dataclass(frozen=True)
315
307
  class GeneralElstcSptBoundary(Boundary):
@@ -242,7 +242,7 @@ class OSISFunctionRegistry:
242
242
 
243
243
  def _execute_command(self, cmd) -> Tuple[bool, str, Any]:
244
244
  """执行命令(发送到软件)"""
245
- _log(cmd)
245
+ # _log(cmd)
246
246
  result = osis_run(cmd, "exec")
247
247
  isok, error, *rest = result
248
248
  return result
@@ -79,7 +79,7 @@ class Element:
79
79
  """从接口 dict 构造 Material 对象(内部使用)"""
80
80
  return cls(
81
81
  no=d.get("no"),
82
- type=d.get("type"),
82
+ element_type=d.get("type"),
83
83
  mat=d.get("mat"),
84
84
  node_vec=d.get("nodeVec"),
85
85
  node_i=d.get("nodeI"),
@@ -118,7 +118,7 @@ def osis_matrix(matrix_name: str, matrix_data: Union[List, int, float, str]):
118
118
  # 返回拼接后的完整命令字符串
119
119
  # str_cmds = "\n".join(all_cmds)
120
120
  str_cmds = ";".join(all_cmds)
121
- _log(str_cmds)
121
+ # _log(str_cmds)
122
122
  return osis_run(str_cmds, "exec")
123
123
 
124
124
  def output_result_for_calc_book():
@@ -287,7 +287,7 @@ class GeometryManager:
287
287
  else:
288
288
  raise TypeError(f"不支持的名称类型: {type(name)}")
289
289
 
290
- resp = osis_client("GetSplineInfoByNames", {"names": names})
290
+ resp = osis_client("GetSplineInfoByNames", {"name": names})
291
291
  if not resp["success"]:
292
292
  raise RuntimeError(f"{resp['error']}")
293
293
 
@@ -2,7 +2,7 @@ from typing import Dict, Any, Literal
2
2
  from ..core import REGISTRY
3
3
 
4
4
  @REGISTRY.register("InflAlgo")
5
- def osis_lane_ve(strName: str, eType: Literal["VE"], dLength: float, wheel: int, eOriention: Literal[-1, 0, 1], eRef: Literal[0, 1], param: list):
5
+ def osis_lane_ve(strName: str, eType: Literal["VE"], dLength: float, wheel: float, eOriention: Literal[-1, 0, 1], eRef: Literal[0, 1], param: list):
6
6
  # Name, type, length, vehOri, ref, par1,par2, par3
7
7
  '''
8
8
  定义活载影响线计算方法:车道单元法(Vehicle Element Method)
@@ -11,7 +11,7 @@ def osis_lane_ve(strName: str, eType: Literal["VE"], dLength: float, wheel: int,
11
11
  strName (str): 车道名称,如"行车道-左幅"
12
12
  eType (str): 算法类型,不区分大小写。固定为 'VE'(Vehicle Element)
13
13
  dLength (float): 车道对应的桥梁跨度(m),决定影响线计算范围
14
- wheel: 轮距(默认为0,占位)
14
+ wheel (float): 轮距(默认为0,占位)
15
15
  eOriention (int): 车辆移动方向
16
16
  - -1: 向后(车辆沿坐标轴负向行驶)
17
17
  - 0: 往返(影响线对称,用于最不利加载)
@@ -48,7 +48,7 @@ def osis_lane_ve(strName: str, eType: Literal["VE"], dLength: float, wheel: int,
48
48
  pass
49
49
 
50
50
  @REGISTRY.register("InflAlgo")
51
- def osis_lane_tcb(strName: str, eType: Literal["TCB"], ESel: str, dLength: float, wheel: int,eOriention: Literal[-1, 0, 1], eRef: Literal[0, 1], param: list):
51
+ def osis_lane_tcb(strName: str, eType: Literal["TCB"], ESel: str, dLength: float, wheel: float,eOriention: Literal[-1, 0, 1], eRef: Literal[0, 1], param: list):
52
52
  '''
53
53
  定义活载影响线计算方法:横向联系梁法(Transverse Connection Beam Method)
54
54
 
@@ -57,7 +57,7 @@ def osis_lane_tcb(strName: str, eType: Literal["TCB"], ESel: str, dLength: float
57
57
  eType (str): 算法类型,不区分大小写。固定为 'TCB'(Transverse Connection Beam)
58
58
  ESel (str): 横梁单元组名称(如横隔板、横梁框架)
59
59
  dLength (float): 车道对应的桥梁跨度(m)
60
- wheel: 轮距(默认为0,占位)
60
+ wheel (float): 轮距(默认为0,占位)
61
61
  eOriention (int): 车辆移动方向
62
62
  - -1: 向后
63
63
  - 0: 往返
@@ -275,15 +275,66 @@ class LiveCase:
275
275
  Raises:
276
276
  RuntimeError: 添加失败时抛出异常
277
277
  """
278
- if mu_params is None:
279
- mu_params = []
280
- if lane_names is None:
281
- lane_names = []
282
-
283
- ok, err = osis_live_analysis_inc(
284
- self.name, "a", sub_name, grade_name,
285
- scalar, 1 if calc_mu else 0, bridge_type, mu_params, lane_names
286
- )
278
+ if calc_mu:
279
+ ok, err = osis_live_analysis_inc(
280
+ self.name, "a", sub_name, grade_name,
281
+ scalar, 1, bridge_type, mu_params, lane_names
282
+ )
283
+ else:
284
+ ok, err = osis_live_analysis_inc(
285
+ self.name, "a", sub_name, grade_name,
286
+ scalar, 0, None, None, lane_names
287
+ )
288
+
289
+ if not ok:
290
+ raise RuntimeError(f"添加子工况 {sub_name} 到活载工况 {self.name} 失败: {err}")
291
+ return self.refresh()
292
+
293
+ def modify_sub(
294
+ self,
295
+ sub_name: str,
296
+ grade_name: str,
297
+ scalar: float = 1.0,
298
+ calc_mu: bool = True,
299
+ bridge_type: Literal["SIMPLE", "CONTINUOUS", "ARCH", "CABLE_STAYED", "CABLE_STAYED_AUS", "SUSPENSION", "CUSTOM"] = "SIMPLE",
300
+ mu_params: list[float] | None = None,
301
+ lane_names: list[str] | None = None,
302
+ ) -> LiveCase:
303
+ """添加活载子工况
304
+
305
+ Args:
306
+ sub_name: 子工况名称
307
+ grade_name: 活载等级名称
308
+ scalar: 缩放系数,默认 1.0
309
+ calc_mu: 是否计算冲击系数,默认 True
310
+ bridge_type: 桥型(用于计算冲击系数)
311
+ - SIMPLE: 简支梁桥
312
+ - CONTINUOUS: 连续梁桥
313
+ - ARCH: 拱桥
314
+ - CABLE_STAYED: 斜拉桥(无辅助墩)
315
+ - CABLE_STAYED_AUS: 斜拉桥(有辅助墩)
316
+ - SUSPENSION: 悬索桥
317
+ - CUSTOM: 自定义,直接输入基频
318
+ mu_params: 冲击系数计算参数列表(根据桥型不同参数不同)
319
+ lane_names: 车道名称列表
320
+
321
+ Returns:
322
+ 更新后的 LiveCase 对象
323
+
324
+ Raises:
325
+ RuntimeError: 添加失败时抛出异常
326
+ """
327
+ if calc_mu:
328
+ ok, err = osis_live_analysis_inc(
329
+ self.name, "m", sub_name, grade_name,
330
+ scalar, 1, bridge_type, mu_params, lane_names
331
+ )
332
+ else:
333
+ ok, err = osis_live_analysis_inc(
334
+ self.name, "m", sub_name, grade_name,
335
+ scalar, 0, None, None, lane_names
336
+ )
337
+
287
338
  if not ok:
288
339
  raise RuntimeError(f"添加子工况 {sub_name} 到活载工况 {self.name} 失败: {err}")
289
340
  return self.refresh()
@@ -585,7 +636,7 @@ class LaneManager:
585
636
  self,
586
637
  name: str,
587
638
  dLength: float,
588
- wheel: int = 1,
639
+ wheel: float,
589
640
  eOriention: Literal[-1, 0, 1] = 0,
590
641
  eRef: Literal[0, 1] = 0,
591
642
  spline_name: str | None = None,
@@ -600,7 +651,7 @@ class LaneManager:
600
651
  Args:
601
652
  name: 车道名称
602
653
  dLength: 桥梁跨度(m)
603
- wheel: 轮距,默认 1
654
+ wheel: 轮距
604
655
  eOriention: 车辆移动方向
605
656
  - -1: 向后
606
657
  - 0: 往返(默认)
@@ -638,7 +689,7 @@ class LaneManager:
638
689
  name: str,
639
690
  crossbeam_elems: str,
640
691
  dLength: float,
641
- wheel: int = 1,
692
+ wheel: float,
642
693
  eOriention: Literal[-1, 0, 1] = 0,
643
694
  eRef: Literal[0, 1] = 0,
644
695
  spline_name: str | None = None,
@@ -654,7 +705,7 @@ class LaneManager:
654
705
  name: 车道名称
655
706
  crossbeam_elems: 横梁单元组名称
656
707
  dLength: 桥梁跨度(m)
657
- wheel: 轮距,默认 1
708
+ wheel: 轮距
658
709
  eOriention: 车辆移动方向
659
710
  - -1: 向后
660
711
  - 0: 往返(默认)
@@ -43,6 +43,7 @@ from .static import (
43
43
  osis_load_gravity,
44
44
  osis_load_nforce,
45
45
  osis_load_line,
46
+ osis_load_concentrated,
46
47
  osis_load_surface_load,
47
48
  osis_load_surface_load_vector,
48
49
  osis_load_displacement,
@@ -281,6 +282,52 @@ class LoadCase:
281
282
  raise RuntimeError(f"添加线荷载到工况 {self.name} 失败: {err}")
282
283
  return self.refresh()
283
284
 
285
+ def create_concentrated_force(
286
+ self,
287
+ nEntity: int,
288
+ eCoordSystem: Literal[0, 1] = 1,
289
+ is_moment: bool = False,
290
+ forces: list[list[float]] = None,
291
+ ) -> LoadCase:
292
+ """添加任意节间集中力/力矩
293
+
294
+ Args:
295
+ nEntity: 单元编号
296
+ eCoordSystem: 坐标系
297
+ * 0 = 单元坐标系
298
+ * 1 = 整体坐标系
299
+ is_moment: 是否为集中力矩(True=力矩PTM,False=力PTF)
300
+ forces: 各组力/力矩参数列表,每组为 [offsetX, offsetY, offsetZ, Px, Py, Pz]
301
+ 最多5组,例如:
302
+ [[0.5, 0, 0, 100, 0, 0]] # 1组力
303
+ [[0.25, 0, 0, 50, 0, 0], [0.75, 0, 0, 50, 0, 0]] # 2组力
304
+
305
+ Returns:
306
+ 更新后的 LoadCase 对象
307
+ """
308
+ if forces is None:
309
+ forces = []
310
+
311
+ nLoadRange = len(forces)
312
+ if nLoadRange < 1 or nLoadRange > 5:
313
+ raise ValueError(f"forces 组数必须在 1~5 之间,当前为 {nLoadRange}")
314
+
315
+ # 展平参数列表
316
+ params = []
317
+ for force in forces:
318
+ if len(force) != 6:
319
+ raise ValueError(f"每组力/力矩必须包含6个参数 [offsetX, offsetY, offsetZ, Px, Py, Pz],当前为 {len(force)}")
320
+ params.extend(force)
321
+
322
+ eType = "PTM" if is_moment else "PTF"
323
+ ok, err = osis_load_concentrated(
324
+ eType, self.name, nEntity, eCoordSystem, nLoadRange, params
325
+ )
326
+ if not ok:
327
+ force_type = "集中力矩" if is_moment else "集中力"
328
+ raise RuntimeError(f"添加{force_type}到工况 {self.name} 失败: {err}")
329
+ return self.refresh()
330
+
284
331
  def create_displacement(
285
332
  self,
286
333
  nEntity: int,
@@ -104,6 +104,29 @@ def osis_load_line(eType: Literal['LINE'], strLCName: str, nEntity: int, eCoordS
104
104
  '''
105
105
  pass
106
106
 
107
+ @REGISTRY.register("Load")
108
+ def osis_load_concentrated(eType: Literal['PTF', 'PTM'], strLCName: str, nEntity: int,
109
+ eCoordSystem: Literal[0, 1], nLoadRange: Literal[1, 2, 3, 4, 5],
110
+ params: list):
111
+ '''
112
+ 创建或修改任意节间集中力/力矩
113
+
114
+ Args:
115
+ eType (str): 荷载类型,不区分大小写。PTF = 集中力,PTM = 集中力矩
116
+ strLCName (str): 荷载工况名称
117
+ nEntity (int): 单元编号
118
+ eCoordSystem (int):
119
+ * 0-单元坐标系
120
+ * 1-整体坐标系
121
+ nLoadRange (int): 力/力矩组数,1~5
122
+ params (list): 各组力/力矩参数,按顺序填入:
123
+ [offsetX1, offsetY1, offsetZ1, Px1, Py1, Pz1, offsetX2, offsetY2, offsetZ2, Px2, Py2, Pz2, ...]
124
+ 每组包含6个参数:偏移量X/L, Y轴偏移量, Z轴偏移量, x方向力/力矩, y方向力/力矩, z方向力/力矩
125
+ Returns:
126
+ tuple (bool, str): 是否成功,失败原因
127
+ '''
128
+ pass
129
+
107
130
  @REGISTRY.register("Load")
108
131
  def osis_load_surface_load(eType: str, strLc: str, strEntity: str, strPlanei:str, strDir:str, strGlobalI:Literal["0","1","2"], strP1i:str, strP2i:str,strP3i:str,strP4i:str) -> tuple[bool, str]:
109
132
  """
@@ -64,7 +64,7 @@ class Material:
64
64
  return cls(
65
65
  no=d.get("no"),
66
66
  name=d.get("name"),
67
- type=d.get("materialType"),
67
+ material_type=d.get("materialType"),
68
68
  code=d.get("code"),
69
69
  grade=d.get("grade"),
70
70
  e=d.get("e"),
@@ -0,0 +1,2 @@
1
+ # 本模块暂时弃用
2
+ from .interface import *
@@ -43,10 +43,34 @@ from .steel import (
43
43
  from .param import (
44
44
  osis_section_offset,
45
45
  osis_section_mesh,
46
+ osis_section_mat,
46
47
  osis_section_del,
47
48
  osis_section_mod,
49
+ osis_stress_point,
48
50
  osis_export_section_pic,
49
51
  )
52
+ from .rebar import (
53
+ osis_rebar_l_point,
54
+ osis_rebar_l_line_a,
55
+ osis_rebar_l_line_b,
56
+ osis_rebar_l_del,
57
+ osis_rebar_s_bent_up,
58
+ osis_rebar_s_shear_stirrup,
59
+ osis_rebar_s_web_vertical,
60
+ osis_rebar_s_torsional_stirrup,
61
+ osis_rebar_s_del,
62
+ )
63
+ from .rib import (
64
+ osis_rib_flat,
65
+ osis_rib_t,
66
+ osis_rib_u,
67
+ osis_rib_l,
68
+ osis_rib_mod,
69
+ osis_rib_del,
70
+ osis_rib_layout,
71
+ osis_rib_layout_del,
72
+ osis_clear_section_rib,
73
+ )
50
74
 
51
75
 
52
76
  # ──────────────────────────────────────────────
@@ -140,6 +164,436 @@ class Section:
140
164
  if not ok:
141
165
  raise RuntimeError(f"导出截面 {self.no} 图片失败: {err}")
142
166
 
167
+ # ── 组合截面材料 ──────────────────────────
168
+
169
+ def set_material(self, n_steel_mat_no: int, n_conc_mat_no: int) -> None:
170
+ """定义组合截面材料(仅用于组合截面)
171
+
172
+ Args:
173
+ n_steel_mat_no: 钢材材料编号
174
+ n_conc_mat_no: 混凝土材料编号
175
+ """
176
+ ok, err = osis_section_mat(self.no, n_steel_mat_no, n_conc_mat_no)
177
+ if not ok:
178
+ raise RuntimeError(f"设置截面 {self.no} 材料失败: {err}")
179
+
180
+ # ── 应力点 ────────────────────────────────
181
+
182
+ def set_stress_point(self, n_point: int, d_coord_x: float, d_coord_y: float) -> None:
183
+ """修改截面应力点
184
+
185
+ Args:
186
+ n_point: 应力点编号
187
+ d_coord_x: 应力点 x 坐标
188
+ d_coord_y: 应力点 y 坐标
189
+ """
190
+ ok, err = osis_stress_point(self.no, n_point, d_coord_x, d_coord_y)
191
+ if not ok:
192
+ raise RuntimeError(f"设置截面 {self.no} 应力点 {n_point} 失败: {err}")
193
+
194
+ # ── 纵向钢筋 ──────────────────────────────
195
+
196
+ def add_rebar_point(
197
+ self,
198
+ n_rebar_no: int,
199
+ n_material_no: int,
200
+ d_coor_y: float,
201
+ d_coor_z: float,
202
+ diameter: str,
203
+ ) -> None:
204
+ """定义或修改纵向钢筋(点输入)
205
+
206
+ Args:
207
+ n_rebar_no: 钢筋编号
208
+ n_material_no: 钢筋材料编号
209
+ d_coor_y: 中心点 Y 坐标
210
+ d_coor_z: 中心点 Z 坐标
211
+ diameter: 钢筋直径,范围 D4-D50
212
+ """
213
+ ok, err = osis_rebar_l_point(self.no, n_rebar_no, "Point", n_material_no, d_coor_y, d_coor_z, diameter)
214
+ if not ok:
215
+ raise RuntimeError(f"添加截面 {self.no} 纵向钢筋 {n_rebar_no} 失败: {err}")
216
+
217
+ def add_rebar_line_a(
218
+ self,
219
+ n_rebar_no: int,
220
+ n_material_no: int,
221
+ y_ref: Literal["Left", "Center"] = "Left",
222
+ y_ref_value: float = 0.0,
223
+ z_ref: Literal["Top", "Bottom"] = "Top",
224
+ z_ref_value: float = 0.0,
225
+ n_num: int = 1,
226
+ d_interval: float = 0.1,
227
+ diameter: str = "D16",
228
+ ) -> None:
229
+ """定义或修改纵向钢筋(直线-输入方法 A)
230
+
231
+ Args:
232
+ n_rebar_no: 钢筋编号
233
+ n_material_no: 钢筋材料编号
234
+ y_ref: Y 方向参考位置,Left=左,Center=质心
235
+ y_ref_value: 与 Y 方向参考位置的距离,Y 轴正方向为正
236
+ z_ref: Z 方向参考位置,Top=顶,Bottom=底
237
+ z_ref_value: 与 Z 方向参考位置的距离,Z 轴正方向为正
238
+ n_num: 数量
239
+ d_interval: 间距
240
+ diameter: 钢筋直径,范围 D4-D50
241
+ """
242
+ ok, err = osis_rebar_l_line_a(
243
+ self.no, n_rebar_no, "LineA", n_material_no,
244
+ y_ref, y_ref_value, z_ref, z_ref_value,
245
+ n_num, d_interval, diameter,
246
+ )
247
+ if not ok:
248
+ raise RuntimeError(f"添加截面 {self.no} 纵向钢筋(LineA) {n_rebar_no} 失败: {err}")
249
+
250
+ def add_rebar_line_b(
251
+ self,
252
+ n_rebar_no: int,
253
+ n_material_no: int,
254
+ d_start_y: float,
255
+ d_start_z: float,
256
+ d_end_y: float,
257
+ d_end_z: float,
258
+ n_method: Literal[0, 1] = 1,
259
+ n_num: int = 1,
260
+ d_interval: float = 0.1,
261
+ layout_ref: Literal["StartPoint", "MidPoint", "EndPoint"] = "StartPoint",
262
+ n_has_end_rebar: Literal[0, 1] = 1,
263
+ diameter: str = "D16",
264
+ ) -> None:
265
+ """定义或修改纵向钢筋(直线-输入方法 B)
266
+
267
+ Args:
268
+ n_rebar_no: 钢筋编号
269
+ n_material_no: 钢筋材料编号
270
+ d_start_y: 开始点 Y 坐标
271
+ d_start_z: 开始点 Z 坐标
272
+ d_end_y: 结束点 Y 坐标
273
+ d_end_z: 结束点 Z 坐标
274
+ n_method: 1=输入数量,0=输入间距
275
+ n_num: 数量
276
+ d_interval: 间距
277
+ layout_ref: 分布参考,StartPoint=起点,MidPoint=中点,EndPoint=终点
278
+ n_has_end_rebar: 1=有端筋,0=无端筋
279
+ diameter: 钢筋直径,范围 D4-D50
280
+ """
281
+ ok, err = osis_rebar_l_line_b(
282
+ self.no, n_rebar_no, "LineB", n_material_no,
283
+ d_start_y, d_start_z, d_end_y, d_end_z,
284
+ n_method, n_num, d_interval, layout_ref, n_has_end_rebar, diameter,
285
+ )
286
+ if not ok:
287
+ raise RuntimeError(f"添加截面 {self.no} 纵向钢筋(LineB) {n_rebar_no} 失败: {err}")
288
+
289
+ def delete_rebar(self, n_rebar_no: int) -> None:
290
+ """删除纵向钢筋
291
+
292
+ Args:
293
+ n_rebar_no: 钢筋编号
294
+ """
295
+ ok, err = osis_rebar_l_del(self.no, n_rebar_no)
296
+ if not ok:
297
+ raise RuntimeError(f"删除截面 {self.no} 纵向钢筋 {n_rebar_no} 失败: {err}")
298
+
299
+ # ── 抗剪钢筋 ──────────────────────────────
300
+
301
+ def add_rebar_s_bent_up(
302
+ self,
303
+ n_material_no: int,
304
+ d_interval: float,
305
+ d_area: float,
306
+ d_angle: float,
307
+ ) -> None:
308
+ """定义或修改弯起钢筋
309
+
310
+ Args:
311
+ n_material_no: 材料编号
312
+ d_interval: 间距
313
+ d_area: 面积
314
+ d_angle: 角度
315
+ """
316
+ ok, err = osis_rebar_s_bent_up(self.no, "BentUpRebar", n_material_no, d_interval, d_area, d_angle)
317
+ if not ok:
318
+ raise RuntimeError(f"添加截面 {self.no} 弯起钢筋失败: {err}")
319
+
320
+ def add_rebar_s_shear_stirrup(
321
+ self,
322
+ n_material_no: int,
323
+ d_interval: float,
324
+ d_area: float,
325
+ ) -> None:
326
+ """定义或修改抗剪箍筋
327
+
328
+ Args:
329
+ n_material_no: 材料编号
330
+ d_interval: 间距
331
+ d_area: 面积
332
+ """
333
+ ok, err = osis_rebar_s_shear_stirrup(self.no, "ShearStirrup", n_material_no, d_interval, d_area)
334
+ if not ok:
335
+ raise RuntimeError(f"添加截面 {self.no} 抗剪箍筋失败: {err}")
336
+
337
+ def add_rebar_s_web_vertical(
338
+ self,
339
+ n_material_no: int,
340
+ d_interval: float,
341
+ d_area: float,
342
+ d_angle: float,
343
+ d_effective_stress: float,
344
+ d_reduction_factor: float,
345
+ ) -> None:
346
+ """定义或修改腹板竖筋
347
+
348
+ Args:
349
+ n_material_no: 材料编号
350
+ d_interval: 间距
351
+ d_area: 面积
352
+ d_angle: 角度
353
+ d_effective_stress: 有效应力
354
+ d_reduction_factor: 折减系数
355
+ """
356
+ ok, err = osis_rebar_s_web_vertical(
357
+ self.no, "WebVerticalRebar", n_material_no,
358
+ d_interval, d_area, d_angle, d_effective_stress, d_reduction_factor,
359
+ )
360
+ if not ok:
361
+ raise RuntimeError(f"添加截面 {self.no} 腹板竖筋失败: {err}")
362
+
363
+ def add_rebar_s_torsional_stirrup(
364
+ self,
365
+ n_material_no: int,
366
+ d_interval: float,
367
+ d_longi_area: float,
368
+ d_stirrup_area: float,
369
+ ) -> None:
370
+ """定义或修改扭转箍筋
371
+
372
+ Args:
373
+ n_material_no: 材料编号
374
+ d_interval: 间距
375
+ d_longi_area: 纵筋面积
376
+ d_stirrup_area: 箍筋面积
377
+ """
378
+ ok, err = osis_rebar_s_torsional_stirrup(
379
+ self.no, "TorsionalStirrup", n_material_no,
380
+ d_interval, d_longi_area, d_stirrup_area,
381
+ )
382
+ if not ok:
383
+ raise RuntimeError(f"添加截面 {self.no} 扭转箍筋失败: {err}")
384
+
385
+ def delete_rebar_s(
386
+ self,
387
+ e_rebar_type: Literal["BentUpRebar", "ShearStirrup", "WebVerticalRebar", "TorsionalStirrup"],
388
+ ) -> None:
389
+ """删除抗剪钢筋
390
+
391
+ Args:
392
+ e_rebar_type: 钢筋类型
393
+ * BentUpRebar = 弯起钢筋
394
+ * ShearStirrup = 抗剪箍筋
395
+ * WebVerticalRebar = 腹板竖筋
396
+ * TorsionalStirrup = 扭转箍筋
397
+ """
398
+ ok, err = osis_rebar_s_del(self.no, e_rebar_type)
399
+ if not ok:
400
+ raise RuntimeError(f"删除截面 {self.no} 抗剪钢筋 {e_rebar_type} 失败: {err}")
401
+
402
+ # ── 加劲肋 ────────────────────────────────
403
+
404
+ def add_rib_flat(self, str_name: str, d_h: float, d_t: float) -> None:
405
+ """定义或修改扁平加劲肋
406
+
407
+ Args:
408
+ str_name: 加劲肋名称
409
+ d_h: 加劲肋高度
410
+ d_t: 加劲肋厚度
411
+ """
412
+ ok, err = osis_rib_flat(self.no, "Flat", str_name, d_h, d_t)
413
+ if not ok:
414
+ raise RuntimeError(f"添加截面 {self.no} 扁平加劲肋 {str_name} 失败: {err}")
415
+
416
+ def add_rib_t(self, str_name: str, d_h: float, d_b: float, d_t1: float, d_t2: float) -> None:
417
+ """定义或修改 T 形加劲肋
418
+
419
+ Args:
420
+ str_name: 加劲肋名称
421
+ d_h: 加劲肋高度
422
+ d_b: 加劲肋宽度
423
+ d_t1: 竖肋厚度
424
+ d_t2: 横肋厚度
425
+ """
426
+ ok, err = osis_rib_t(self.no, "T", str_name, d_h, d_b, d_t1, d_t2)
427
+ if not ok:
428
+ raise RuntimeError(f"添加截面 {self.no} T形加劲肋 {str_name} 失败: {err}")
429
+
430
+ def add_rib_u(
431
+ self,
432
+ str_name: str,
433
+ d_h: float,
434
+ d_b1: float,
435
+ d_b2: float,
436
+ d_t: float,
437
+ d_r: float,
438
+ ) -> None:
439
+ """定义或修改 U 形加劲肋
440
+
441
+ Args:
442
+ str_name: 加劲肋名称
443
+ d_h: 加劲肋高度
444
+ d_b1: 加劲肋上端宽度
445
+ d_b2: 加劲肋下端宽度
446
+ d_t: 加劲肋厚度
447
+ d_r: 加劲肋转角处圆弧半径
448
+ """
449
+ ok, err = osis_rib_u(self.no, "U", str_name, d_h, d_b1, d_b2, d_t, d_r)
450
+ if not ok:
451
+ raise RuntimeError(f"添加截面 {self.no} U形加劲肋 {str_name} 失败: {err}")
452
+
453
+ def add_rib_l(
454
+ self,
455
+ str_name: str,
456
+ e_type: Literal["LL", "LR"] = "LL",
457
+ d_h: float = 0.1,
458
+ d_b: float = 0.1,
459
+ d_t: float = 0.01,
460
+ d_r: float = 0.01,
461
+ ) -> None:
462
+ """定义或修改 L 形加劲肋
463
+
464
+ Args:
465
+ str_name: 加劲肋名称
466
+ e_type: LL = 左向 L 形加劲肋,LR = 右向 L 形加劲肋
467
+ d_h: 加劲肋高度
468
+ d_b: 加劲肋宽度
469
+ d_t: 加劲肋厚度
470
+ d_r: 加劲肋转角处圆弧半径
471
+ """
472
+ ok, err = osis_rib_l(self.no, e_type, str_name, d_h, d_b, d_t, d_r)
473
+ if not ok:
474
+ raise RuntimeError(f"添加截面 {self.no} L形加劲肋 {str_name} 失败: {err}")
475
+
476
+ def modify_rib(self, str_old_name: str, str_new_name: str) -> None:
477
+ """修改加劲肋名称
478
+
479
+ Args:
480
+ str_old_name: 原加劲肋名称
481
+ str_new_name: 新加劲肋名称
482
+ """
483
+ ok, err = osis_rib_mod(self.no, str_old_name, str_new_name)
484
+ if not ok:
485
+ raise RuntimeError(f"修改截面 {self.no} 加劲肋名称 {str_old_name} -> {str_new_name} 失败: {err}")
486
+
487
+ def delete_rib(self, str_name: str) -> None:
488
+ """删除加劲肋
489
+
490
+ Args:
491
+ str_name: 加劲肋名称
492
+ """
493
+ ok, err = osis_rib_del(self.no, str_name)
494
+ if not ok:
495
+ raise RuntimeError(f"删除截面 {self.no} 加劲肋 {str_name} 失败: {err}")
496
+
497
+ def add_rib_layout(
498
+ self,
499
+ e_girder_type: Literal[
500
+ "STEELISIDE", "STEELIMIDDLE", "STEELBOX", "STEELTROUGH", "STEEL",
501
+ ],
502
+ e_plate_type: Literal[
503
+ "TopFlange", "TopFlange1", "TopFlange2", "TopFlange3", "TopFlange4", "TopFlange5",
504
+ "TopFlangeInclined", "TopFlangeInclined1", "TopFlangeInclined2", "TopFlangeInclined3", "TopFlangeInclined4", "TopFlangeInclined5",
505
+ "BottomFlange", "BottomFlange1", "BottomFlange2", "BottomFlange3", "BottomFlange4", "BottomFlange5",
506
+ "BottomFlangeInclined", "BottomFlangeInclined1", "BottomFlangeInclined2", "BottomFlangeInclined3", "BottomFlangeInclined4", "BottomFlangeInclined5",
507
+ "SideWeb", "SideWebL", "SideWebR",
508
+ "MiddleWeb", "MiddleWeb1", "MiddleWeb2", "MiddleWeb3", "MiddleWeb4", "MiddleWeb5",
509
+ "PlateWithoutRib",
510
+ ],
511
+ n_layout_no: int,
512
+ str_rib_name: str,
513
+ d_position_distance: float,
514
+ d_interval: float,
515
+ n_interval_num: int,
516
+ ) -> None:
517
+ """定义或修改加劲肋布置信息
518
+
519
+ Args:
520
+ e_girder_type: 钢梁类型
521
+ * STEELISIDE = 组合梁的边工字钢梁
522
+ * STEELIMIDDLE = 组合梁的中工字钢梁
523
+ * STEELBOX = 组合梁的钢箱梁
524
+ * STEELTROUGH = 组合梁的槽型钢梁
525
+ * STEEL = 一般钢梁截面
526
+ e_plate_type: 板件所在位置
527
+ * 顶板:TopFlange、TopFlange1~TopFlange5
528
+ * 斜顶板:TopFlangeInclined、TopFlangeInclined1~TopFlangeInclined5
529
+ * 底板:BottomFlange、BottomFlange1~BottomFlange5
530
+ * 斜底板:BottomFlangeInclined、BottomFlangeInclined1~BottomFlangeInclined5
531
+ * 边腹板:SideWeb、SideWebL、SideWebR
532
+ * 中腹板:MiddleWeb、MiddleWeb1~MiddleWeb5
533
+ * 无加劲肋的板件:PlateWithoutRib
534
+ n_layout_no: 加劲肋布置信息的编号
535
+ str_rib_name: 加劲肋的名称
536
+ d_position_distance: 加劲肋与参考点的定位距离
537
+ d_interval: 加劲肋布置间距
538
+ n_interval_num: 间距数量
539
+ """
540
+ ok, err = osis_rib_layout(
541
+ self.no, e_girder_type, e_plate_type, n_layout_no,
542
+ str_rib_name, d_position_distance, d_interval, n_interval_num,
543
+ )
544
+ if not ok:
545
+ raise RuntimeError(f"添加截面 {self.no} 加劲肋布置 {n_layout_no} 失败: {err}")
546
+
547
+ def delete_rib_layout(
548
+ self,
549
+ e_girder_type: Literal[
550
+ "STEELISIDE", "STEELIMIDDLE", "STEELBOX", "STEELTROUGH", "STEEL",
551
+ ],
552
+ e_plate_type: Literal[
553
+ "TopFlange", "TopFlange1", "TopFlange2", "TopFlange3", "TopFlange4", "TopFlange5",
554
+ "TopFlangeInclined", "TopFlangeInclined1", "TopFlangeInclined2", "TopFlangeInclined3", "TopFlangeInclined4", "TopFlangeInclined5",
555
+ "BottomFlange", "BottomFlange1", "BottomFlange2", "BottomFlange3", "BottomFlange4", "BottomFlange5",
556
+ "BottomFlangeInclined", "BottomFlangeInclined1", "BottomFlangeInclined2", "BottomFlangeInclined3", "BottomFlangeInclined4", "BottomFlangeInclined5",
557
+ "SideWeb", "SideWebL", "SideWebR",
558
+ "MiddleWeb", "MiddleWeb1", "MiddleWeb2", "MiddleWeb3", "MiddleWeb4", "MiddleWeb5",
559
+ "PlateWithoutRib",
560
+ ],
561
+ n_layout_no: int,
562
+ ) -> None:
563
+ """删除加劲肋布置信息
564
+
565
+ Args:
566
+ e_girder_type: 钢梁类型
567
+ e_plate_type: 板件所在位置
568
+ n_layout_no: 加劲肋布置信息的编号
569
+ """
570
+ ok, err = osis_rib_layout_del(self.no, e_girder_type, e_plate_type, n_layout_no)
571
+ if not ok:
572
+ raise RuntimeError(f"删除截面 {self.no} 加劲肋布置 {n_layout_no} 失败: {err}")
573
+
574
+ def clear_ribs(self) -> None:
575
+ """删除截面加劲肋及加劲肋布置信息"""
576
+ ok, err = osis_clear_section_rib(self.no)
577
+ if not ok:
578
+ raise RuntimeError(f"清除截面 {self.no} 加劲肋失败: {err}")
579
+
580
+ # 这两方法放在管理类
581
+ # def delete(self) -> None:
582
+ # """删除当前截面"""
583
+ # ok, err = osis_section_del(self.no)
584
+ # if not ok:
585
+ # raise RuntimeError(f"删除截面 {self.no} 失败: {err}")
586
+
587
+ # def renumber(self, new_no: int) -> None:
588
+ # """修改截面编号
589
+
590
+ # Args:
591
+ # new_no: 新截面编号
592
+ # """
593
+ # ok, err = osis_section_mod(self.no, new_no)
594
+ # if not ok:
595
+ # raise RuntimeError(f"修改截面编号 {self.no} -> {new_no} 失败: {err}")
596
+
143
597
 
144
598
  # ──────────────────────────────────────────────
145
599
  # 管理类
@@ -1 +0,0 @@
1
- from .interface import *
File without changes
File without changes
File without changes
File without changes