qtmodel 1.1.1__tar.gz → 1.1.2__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.
Potentially problematic release.
This version of qtmodel might be problematic. Click here for more details.
- {qtmodel-1.1.1 → qtmodel-1.1.2}/PKG-INFO +3 -3
- {qtmodel-1.1.1 → qtmodel-1.1.2}/README.md +2 -2
- {qtmodel-1.1.1 → qtmodel-1.1.2}/qtmodel/mdb/data_helper.py +2 -1
- {qtmodel-1.1.1 → qtmodel-1.1.2}/qtmodel/mdb/mdb_analysis_setting.py +10 -10
- {qtmodel-1.1.1 → qtmodel-1.1.2}/qtmodel/mdb/mdb_boundary.py +12 -12
- {qtmodel-1.1.1 → qtmodel-1.1.2}/qtmodel/mdb/mdb_construction_stage.py +17 -18
- {qtmodel-1.1.1 → qtmodel-1.1.2}/qtmodel/mdb/mdb_dynamic_load.py +10 -10
- {qtmodel-1.1.1 → qtmodel-1.1.2}/qtmodel/mdb/mdb_live_load.py +8 -10
- {qtmodel-1.1.1 → qtmodel-1.1.2}/qtmodel/mdb/mdb_property.py +5 -8
- {qtmodel-1.1.1 → qtmodel-1.1.2}/qtmodel/mdb/mdb_section.py +8 -7
- {qtmodel-1.1.1 → qtmodel-1.1.2}/qtmodel/mdb/mdb_static_load.py +7 -7
- {qtmodel-1.1.1 → qtmodel-1.1.2}/qtmodel/mdb/mdb_structure.py +5 -5
- {qtmodel-1.1.1 → qtmodel-1.1.2}/qtmodel/mdb/mdb_temperature_load.py +10 -10
- {qtmodel-1.1.1 → qtmodel-1.1.2}/qtmodel/mdb/mdb_tendon.py +6 -6
- {qtmodel-1.1.1 → qtmodel-1.1.2}/qtmodel.egg-info/PKG-INFO +3 -3
- {qtmodel-1.1.1 → qtmodel-1.1.2}/setup.py +1 -1
- {qtmodel-1.1.1 → qtmodel-1.1.2}/qtmodel/__init__.py +0 -0
- {qtmodel-1.1.1 → qtmodel-1.1.2}/qtmodel/core/__init__.py +0 -0
- {qtmodel-1.1.1 → qtmodel-1.1.2}/qtmodel/core/model_db.py +0 -0
- {qtmodel-1.1.1 → qtmodel-1.1.2}/qtmodel/core/qt_server.py +0 -0
- {qtmodel-1.1.1 → qtmodel-1.1.2}/qtmodel/core/result_db.py +0 -0
- {qtmodel-1.1.1 → qtmodel-1.1.2}/qtmodel/mdb/__init__.py +0 -0
- {qtmodel-1.1.1 → qtmodel-1.1.2}/qtmodel/mdb/mdb_project.py +0 -0
- {qtmodel-1.1.1 → qtmodel-1.1.2}/qtmodel/odb/__init__.py +0 -0
- {qtmodel-1.1.1 → qtmodel-1.1.2}/qtmodel/odb/odb_model.py +0 -0
- {qtmodel-1.1.1 → qtmodel-1.1.2}/qtmodel/odb/odb_result.py +0 -0
- {qtmodel-1.1.1 → qtmodel-1.1.2}/qtmodel/odb/odb_result_plot.py +0 -0
- {qtmodel-1.1.1 → qtmodel-1.1.2}/qtmodel/odb/odb_view.py +0 -0
- {qtmodel-1.1.1 → qtmodel-1.1.2}/qtmodel.egg-info/SOURCES.txt +0 -0
- {qtmodel-1.1.1 → qtmodel-1.1.2}/qtmodel.egg-info/dependency_links.txt +0 -0
- {qtmodel-1.1.1 → qtmodel-1.1.2}/qtmodel.egg-info/top_level.txt +0 -0
- {qtmodel-1.1.1 → qtmodel-1.1.2}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: qtmodel
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.2
|
|
4
4
|
Summary: python modeling for qt 2025-09-24
|
|
5
5
|
Home-page: https://github.com/Inface0443/pyqt
|
|
6
6
|
Author: dqy-zhj
|
|
@@ -17,7 +17,7 @@ Dynamic: description-content-type
|
|
|
17
17
|
Dynamic: home-page
|
|
18
18
|
Dynamic: summary
|
|
19
19
|
|
|
20
|
-
> 最新版本 V1.1.
|
|
20
|
+
> 最新版本 V1.1.2 - 2025-09-24
|
|
21
21
|
> pip install --upgrade qtmodel -i https://pypi.org/simple
|
|
22
22
|
- 新增更新结构组接口
|
|
23
23
|
# 建模操作
|
|
@@ -633,7 +633,7 @@ Returns: 无
|
|
|
633
633
|
```Python
|
|
634
634
|
# 示例代码
|
|
635
635
|
from qtmodel import *
|
|
636
|
-
mdb.add_tendon_elements(
|
|
636
|
+
mdb.add_tendon_elements(element_id=[1,2,4,6])
|
|
637
637
|
```
|
|
638
638
|
Returns: 无
|
|
639
639
|
## 静力荷载操作
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
> 最新版本 V1.1.
|
|
1
|
+
> 最新版本 V1.1.2 - 2025-09-24
|
|
2
2
|
> pip install --upgrade qtmodel -i https://pypi.org/simple
|
|
3
3
|
- 新增更新结构组接口
|
|
4
4
|
# 建模操作
|
|
@@ -614,7 +614,7 @@ Returns: 无
|
|
|
614
614
|
```Python
|
|
615
615
|
# 示例代码
|
|
616
616
|
from qtmodel import *
|
|
617
|
-
mdb.add_tendon_elements(
|
|
617
|
+
mdb.add_tendon_elements(element_id=[1,2,4,6])
|
|
618
618
|
```
|
|
619
619
|
Returns: 无
|
|
620
620
|
## 静力荷载操作
|
|
@@ -38,7 +38,7 @@ class MdbAnalysisSetting:
|
|
|
38
38
|
for key, val in mapping.items():
|
|
39
39
|
if val: # 字符串不为空
|
|
40
40
|
s += f"{key}={val}\r\n"
|
|
41
|
-
print(s)
|
|
41
|
+
# print(s)
|
|
42
42
|
QtServer.post_command(s, "QDAT")
|
|
43
43
|
except Exception as ex:
|
|
44
44
|
raise Exception(ex)
|
|
@@ -57,7 +57,7 @@ class MdbAnalysisSetting:
|
|
|
57
57
|
"""
|
|
58
58
|
try:
|
|
59
59
|
s = "*GLB-SET\r\n" + f"{solver_type},{calculation_type},{thread_count}\r\n"
|
|
60
|
-
print(s)
|
|
60
|
+
# print(s)
|
|
61
61
|
QtServer.post_command(s, "QDAT")
|
|
62
62
|
except Exception as ex:
|
|
63
63
|
raise Exception(ex)
|
|
@@ -95,7 +95,7 @@ class MdbAnalysisSetting:
|
|
|
95
95
|
s = "*CS-SET\r\n" + f"{do_str},{toend_str},{other_stage_name},{analysis_type},{creep_str},{cable_tension_position},{comp_str}\r\n"
|
|
96
96
|
s += f"{shrink_creep_type},{creep_load_type},"
|
|
97
97
|
s += f"{'YES' if sub_step_info[0] else 'NO'},{','.join(f'{x:g}' for x in sub_step_info[1:])}\r\n" if sub_step_info else "\r\n"
|
|
98
|
-
print(s)
|
|
98
|
+
# print(s)
|
|
99
99
|
QtServer.post_command(s, "QDAT")
|
|
100
100
|
except Exception as ex:
|
|
101
101
|
raise Exception(ex)
|
|
@@ -163,7 +163,7 @@ class MdbAnalysisSetting:
|
|
|
163
163
|
lines.append(MdbDataHelper.live_load_set_line(code, calc_type, groups))
|
|
164
164
|
|
|
165
165
|
s = "".join(lines)
|
|
166
|
-
print(s)
|
|
166
|
+
# print(s)
|
|
167
167
|
QtServer.post_command(s, "QDAT")
|
|
168
168
|
except Exception as ex:
|
|
169
169
|
raise Exception(ex)
|
|
@@ -188,7 +188,7 @@ class MdbAnalysisSetting:
|
|
|
188
188
|
"""
|
|
189
189
|
try:
|
|
190
190
|
s = "*NON-SET\r\n" + f"{non_linear_type},{non_linear_method},{max_loading_steps},{max_iteration_times},{accuracy_of_displacement:g},{accuracy_of_force:g}\r\n"
|
|
191
|
-
print(s)
|
|
191
|
+
# print(s)
|
|
192
192
|
QtServer.post_command(s, "QDAT")
|
|
193
193
|
except Exception as ex:
|
|
194
194
|
raise Exception(ex)
|
|
@@ -217,7 +217,7 @@ class MdbAnalysisSetting:
|
|
|
217
217
|
s += f"SM={','.join(sink_load_cases)}\r\n"
|
|
218
218
|
if live_load_cases is not None:
|
|
219
219
|
s += f"MV={','.join(live_load_cases)}\r\n"
|
|
220
|
-
print(s)
|
|
220
|
+
# print(s)
|
|
221
221
|
QtServer.post_command(s, "QDAT")
|
|
222
222
|
except Exception as ex:
|
|
223
223
|
raise Exception(ex)
|
|
@@ -238,7 +238,7 @@ class MdbAnalysisSetting:
|
|
|
238
238
|
"""
|
|
239
239
|
try:
|
|
240
240
|
s = "*VB-SET\r\n" + f"{'YES' if do_analysis else 'NO'},{method},{matrix_type},{mode_num}\r\n"
|
|
241
|
-
print(s)
|
|
241
|
+
# print(s)
|
|
242
242
|
QtServer.post_command(s, "QDAT")
|
|
243
243
|
except Exception as ex:
|
|
244
244
|
raise Exception(ex)
|
|
@@ -262,7 +262,7 @@ class MdbAnalysisSetting:
|
|
|
262
262
|
if isinstance(damping_ratio, float):
|
|
263
263
|
damping_ratio = [damping_ratio]
|
|
264
264
|
s = "*RS-SET\r\n" + f"{kind},{'YES' if by_mode else 'NO'},{','.join(f'{x:g}' for x in damping_ratio)}\r\n"
|
|
265
|
-
print(s)
|
|
265
|
+
# print(s)
|
|
266
266
|
QtServer.post_command(s, "QDAT")
|
|
267
267
|
except Exception as ex:
|
|
268
268
|
raise Exception(ex)
|
|
@@ -287,7 +287,7 @@ class MdbAnalysisSetting:
|
|
|
287
287
|
else:
|
|
288
288
|
s += "\r\n"
|
|
289
289
|
QtServer.post_command(s, "QDAT")
|
|
290
|
-
print(s)
|
|
290
|
+
# print(s)
|
|
291
291
|
QtServer.post_command(s, "QDAT")
|
|
292
292
|
except Exception as ex:
|
|
293
293
|
raise Exception(ex)
|
|
@@ -320,7 +320,7 @@ class MdbAnalysisSetting:
|
|
|
320
320
|
s += f"VL={','.join(variable_cases)}\r\n"
|
|
321
321
|
if constant_cases is not None:
|
|
322
322
|
s += f"CL={','.join(constant_cases)}\r\n"
|
|
323
|
-
print(s)
|
|
323
|
+
# print(s)
|
|
324
324
|
QtServer.post_command(s, "QDAT")
|
|
325
325
|
except Exception as ex:
|
|
326
326
|
raise Exception(ex)
|
|
@@ -33,7 +33,7 @@ class MdbBoundary:
|
|
|
33
33
|
else:
|
|
34
34
|
id_str = str(element_ids)
|
|
35
35
|
s = "*EFCFACTOR\r\n" + f"{id_str},{factor_i},{factor_j},{dz_i},{dz_j},{group_name}\r\n"
|
|
36
|
-
print(s)
|
|
36
|
+
# print(s)
|
|
37
37
|
QtServer.post_command(s, "QDAT")
|
|
38
38
|
except Exception as ex:
|
|
39
39
|
raise Exception(ex)
|
|
@@ -50,7 +50,7 @@ class MdbBoundary:
|
|
|
50
50
|
"""
|
|
51
51
|
try:
|
|
52
52
|
s = "*BNDRGROUP\r\n" + f"{name}\r\n"
|
|
53
|
-
print(s)
|
|
53
|
+
# print(s)
|
|
54
54
|
QtServer.post_command(s, "QDAT")
|
|
55
55
|
except Exception as ex:
|
|
56
56
|
raise Exception(ex)
|
|
@@ -70,7 +70,7 @@ class MdbBoundary:
|
|
|
70
70
|
raise Exception("添加一般弹性支承失败,矩阵参数有误(数据需按列输入至列表)")
|
|
71
71
|
try:
|
|
72
72
|
s = "*GSPRTYPE\r\n" + f"{name}," + ",".join(f"{x:g}" for x in data_matrix) + "\r\n"
|
|
73
|
-
print(s)
|
|
73
|
+
# print(s)
|
|
74
74
|
QtServer.post_command(s, "QDAT")
|
|
75
75
|
except Exception as ex:
|
|
76
76
|
raise Exception(ex)
|
|
@@ -93,7 +93,7 @@ class MdbBoundary:
|
|
|
93
93
|
else:
|
|
94
94
|
id_str = str(node_id)
|
|
95
95
|
s = "*GSPRING\r\n" + f"{id_str},{property_name},{group_name}\r\n"
|
|
96
|
-
print(s)
|
|
96
|
+
# print(s)
|
|
97
97
|
QtServer.post_command(s, "QDAT")
|
|
98
98
|
except Exception as ex:
|
|
99
99
|
raise Exception(ex)
|
|
@@ -120,7 +120,7 @@ class MdbBoundary:
|
|
|
120
120
|
else:
|
|
121
121
|
id_str = str(node_id)
|
|
122
122
|
s = "*GSUPPORT\r\n" + f"{id_str}," + "".join(str(int(x)) for x in boundary_info) + f",{group_name}\r\n"
|
|
123
|
-
print(s)
|
|
123
|
+
# print(s)
|
|
124
124
|
QtServer.post_command(s, "QDAT")
|
|
125
125
|
except Exception as ex:
|
|
126
126
|
raise Exception(ex)
|
|
@@ -153,7 +153,7 @@ class MdbBoundary:
|
|
|
153
153
|
raise Exception("操作错误,要求输入弹性支承边界信息长度为2")
|
|
154
154
|
else:
|
|
155
155
|
s += f"{support_type},{group_name}," + ",".join(f"{x:g}" for x in boundary_info) + "\r\n"
|
|
156
|
-
print(s)
|
|
156
|
+
# print(s)
|
|
157
157
|
QtServer.post_command(s, "QDAT")
|
|
158
158
|
except Exception as ex:
|
|
159
159
|
raise Exception(ex)
|
|
@@ -194,7 +194,7 @@ class MdbBoundary:
|
|
|
194
194
|
# s += "\r\n"
|
|
195
195
|
# elif link_type in (3,4):
|
|
196
196
|
# s += f",{kx:g}" + "\r\n"
|
|
197
|
-
# print(s)
|
|
197
|
+
# # print(s)
|
|
198
198
|
# QtServer.post_command(s, "QDAT")
|
|
199
199
|
params = {
|
|
200
200
|
"version": QtServer.QT_VERSION, # 版本控制
|
|
@@ -237,7 +237,7 @@ class MdbBoundary:
|
|
|
237
237
|
for master_id, slave_ids in master_slave_dict.items():
|
|
238
238
|
ids_str = MdbDataHelper.parse_int_list_to_str(slave_ids)
|
|
239
239
|
s += f"{master_id},{ids_str}," + "".join(str(int(x)) for x in boundary_info) + f",{group_name}\r\n"
|
|
240
|
-
print(s)
|
|
240
|
+
# print(s)
|
|
241
241
|
QtServer.post_command(s, "QDAT")
|
|
242
242
|
except Exception as ex:
|
|
243
243
|
raise Exception(ex)
|
|
@@ -264,7 +264,7 @@ class MdbBoundary:
|
|
|
264
264
|
id_str = str(slave_id)
|
|
265
265
|
s = "*MSLINK\r\n" + f"{master_id},{id_str}," + "".join(
|
|
266
266
|
str(int(x)) for x in boundary_info) + f",{group_name}\r\n"
|
|
267
|
-
print(s)
|
|
267
|
+
# print(s)
|
|
268
268
|
QtServer.post_command(s, "QDAT")
|
|
269
269
|
except Exception as ex:
|
|
270
270
|
raise Exception(ex)
|
|
@@ -290,7 +290,7 @@ class MdbBoundary:
|
|
|
290
290
|
raise Exception("操作错误,要求输入J端约束列表长度为6")
|
|
291
291
|
s = "*RESTRAINTS\r\n" + f"{beam_id}," + "".join(str(int(x)) for x in info_i) + "," + "".join(
|
|
292
292
|
str(int(y)) for y in info_j) + f",{group_name}\r\n"
|
|
293
|
-
print(s)
|
|
293
|
+
# print(s)
|
|
294
294
|
QtServer.post_command(s, "QDAT")
|
|
295
295
|
except Exception as ex:
|
|
296
296
|
raise Exception(ex)
|
|
@@ -313,7 +313,7 @@ class MdbBoundary:
|
|
|
313
313
|
try:
|
|
314
314
|
s = "*EQUATION\r\n" + f"{name},{group_name},{sec_node},{sec_dof}," + ",".join(
|
|
315
315
|
f"{tuples}" for tuples in master_info) + "\r\n"
|
|
316
|
-
print(s)
|
|
316
|
+
# print(s)
|
|
317
317
|
QtServer.post_command(s, "QDAT")
|
|
318
318
|
except Exception as ex:
|
|
319
319
|
raise Exception(ex)
|
|
@@ -342,7 +342,7 @@ class MdbBoundary:
|
|
|
342
342
|
elif input_type == 2:
|
|
343
343
|
tran_info = MdbDataHelper.convert_three_points_to_vectors(coord_info)
|
|
344
344
|
s += f"V1({','.join(f'{axis:g}' for axis in tran_info[0])}),V2({','.join(f'{axis:g}' for axis in tran_info[1])})\r\n"
|
|
345
|
-
print(s)
|
|
345
|
+
# print(s)
|
|
346
346
|
QtServer.post_command(s, "QDAT")
|
|
347
347
|
except Exception as ex:
|
|
348
348
|
pass
|
|
@@ -47,20 +47,20 @@ class MdbConstructionStage:
|
|
|
47
47
|
s = "*STAGE\r\n"
|
|
48
48
|
s += f"ID={index},{name},{duration},{tendon_cancel_loss:g},{constraint_cancel_type}\r\n"
|
|
49
49
|
if active_structures is not None:
|
|
50
|
-
s += f"AELEM={','.join(
|
|
50
|
+
s += f"AELEM={','.join(','.join(str(x) if not isinstance(x, (int, float)) else f'{x:g}' for x in row) for row in active_structures)}\r\n"
|
|
51
51
|
if delete_structures is not None:
|
|
52
|
-
s += f"DELEM={','.join(
|
|
52
|
+
s += f"DELEM={','.join(map(str, delete_structures))}\r\n"
|
|
53
53
|
if active_boundaries is not None:
|
|
54
|
-
s += f"ABNDR={','.join(
|
|
54
|
+
s += f"ABNDR={','.join(','.join(map(str, row)) for row in active_boundaries)}\r\n"
|
|
55
55
|
if delete_boundaries is not None:
|
|
56
|
-
s += f"DBNDR={','.join(
|
|
56
|
+
s += f"DBNDR={','.join(map(str, delete_boundaries))}\r\n"
|
|
57
57
|
if active_loads is not None:
|
|
58
|
-
s += f"ALOAD={','.join(
|
|
58
|
+
s += f"ALOAD={','.join(','.join(map(str, row)) for row in active_loads)}\r\n"
|
|
59
59
|
if delete_loads is not None:
|
|
60
|
-
s += f"DLOAD={','.join(
|
|
60
|
+
s += f"DLOAD={','.join(','.join(map(str, row)) for row in delete_loads)}\r\n"
|
|
61
61
|
if temp_loads is not None:
|
|
62
|
-
s += f"TEPLOAD={
|
|
63
|
-
print(s)
|
|
62
|
+
s += f"TEPLOAD={','.join(map(str, temp_loads))}\r\n"
|
|
63
|
+
# print(s)
|
|
64
64
|
QtServer.post_command(s, "QDAT")
|
|
65
65
|
except Exception as ex:
|
|
66
66
|
raise Exception(f"添加施工阶段:{name}错误,{ex}")
|
|
@@ -91,7 +91,7 @@ class MdbConstructionStage:
|
|
|
91
91
|
# s = "*LOADCOMB\r\n" + f"NAME={name},{combine_type},{describe}\r\n"
|
|
92
92
|
# s += "\r\n".join(f'{','.join(f'{x:g}' if isinstance(x, float) else str(x) for x in row)}' for row in
|
|
93
93
|
# combine_info) + "\r\n"
|
|
94
|
-
# print(s)
|
|
94
|
+
# # print(s)
|
|
95
95
|
# QtServer.post_command(s, "QDAT")
|
|
96
96
|
params = {
|
|
97
97
|
"version": QtServer.QT_VERSION, # 版本控制
|
|
@@ -121,7 +121,7 @@ class MdbConstructionStage:
|
|
|
121
121
|
try:
|
|
122
122
|
# 创建参数字典
|
|
123
123
|
params = {
|
|
124
|
-
"version":QtServer.QT_VERSION,
|
|
124
|
+
"version": QtServer.QT_VERSION, # 版本控制
|
|
125
125
|
"name": name,
|
|
126
126
|
"structure_group_name": structure_group_name,
|
|
127
127
|
"weight_stage_id": weight_stage_id,
|
|
@@ -131,6 +131,7 @@ class MdbConstructionStage:
|
|
|
131
131
|
QtServer.get_command(header="UPDATE-WEIGHT-STAGE", command=json_string)
|
|
132
132
|
except Exception as ex:
|
|
133
133
|
raise Exception(ex)
|
|
134
|
+
|
|
134
135
|
# endregion
|
|
135
136
|
|
|
136
137
|
# region 荷载工况操作
|
|
@@ -156,7 +157,7 @@ class MdbConstructionStage:
|
|
|
156
157
|
else:
|
|
157
158
|
id_str = str(node_ids)
|
|
158
159
|
s = "*SINK-GROUP\r\n" + f"{name},{sink:g},{id_str}\r\n"
|
|
159
|
-
print(s)
|
|
160
|
+
# print(s)
|
|
160
161
|
QtServer.post_command(s, "QDAT")
|
|
161
162
|
except Exception as ex:
|
|
162
163
|
raise Exception(ex)
|
|
@@ -176,7 +177,7 @@ class MdbConstructionStage:
|
|
|
176
177
|
if isinstance(sink_groups, str):
|
|
177
178
|
sink_groups = [sink_groups]
|
|
178
179
|
s = "*SINK-CASE\r\n" + f"{name},{','.join(sink_groups)}\r\n"
|
|
179
|
-
print(s)
|
|
180
|
+
# print(s)
|
|
180
181
|
QtServer.post_command(s, "QDAT")
|
|
181
182
|
except Exception as ex:
|
|
182
183
|
raise Exception(ex)
|
|
@@ -197,7 +198,7 @@ class MdbConstructionStage:
|
|
|
197
198
|
if isinstance(names, str):
|
|
198
199
|
names = [names]
|
|
199
200
|
s = "*CCT-REACT\r\n" + ",".join(names) + "\r\n"
|
|
200
|
-
print(s)
|
|
201
|
+
# print(s)
|
|
201
202
|
QtServer.post_command(s, "QDAT")
|
|
202
203
|
except Exception as ex:
|
|
203
204
|
raise Exception(ex)
|
|
@@ -216,7 +217,7 @@ class MdbConstructionStage:
|
|
|
216
217
|
if isinstance(names, str):
|
|
217
218
|
names = [names]
|
|
218
219
|
s = "*CCT-FORCE\r\n" + ",".join(names) + "\r\n"
|
|
219
|
-
print(s)
|
|
220
|
+
# print(s)
|
|
220
221
|
QtServer.post_command(s, "QDAT")
|
|
221
222
|
except Exception as ex:
|
|
222
223
|
raise Exception(ex)
|
|
@@ -236,7 +237,7 @@ class MdbConstructionStage:
|
|
|
236
237
|
"""
|
|
237
238
|
try:
|
|
238
239
|
s = "*LOADCASE\r\n" + f"{name},{case_type}\r\n"
|
|
239
|
-
print(s)
|
|
240
|
+
# print(s)
|
|
240
241
|
QtServer.post_command(s, "QDAT")
|
|
241
242
|
except Exception as ex:
|
|
242
243
|
raise Exception(ex)
|
|
@@ -254,7 +255,7 @@ class MdbConstructionStage:
|
|
|
254
255
|
try:
|
|
255
256
|
if name != "":
|
|
256
257
|
s = "*LOADGROUP\r\n" + f"{name}\r\n"
|
|
257
|
-
print(s)
|
|
258
|
+
# print(s)
|
|
258
259
|
else:
|
|
259
260
|
s = ""
|
|
260
261
|
QtServer.post_command(s, "QDAT")
|
|
@@ -262,5 +263,3 @@ class MdbConstructionStage:
|
|
|
262
263
|
raise Exception(ex)
|
|
263
264
|
|
|
264
265
|
# endregion
|
|
265
|
-
|
|
266
|
-
|
|
@@ -19,7 +19,7 @@ class MdbDynamicLoad:
|
|
|
19
19
|
"""
|
|
20
20
|
try:
|
|
21
21
|
s = "*LOADTOMASS\r\n" + f"{name},{factor}\r\n"
|
|
22
|
-
print(s)
|
|
22
|
+
# print(s)
|
|
23
23
|
QtServer.post_command(s, "QDAT")
|
|
24
24
|
except Exception as ex:
|
|
25
25
|
raise Exception(ex)
|
|
@@ -43,7 +43,7 @@ class MdbDynamicLoad:
|
|
|
43
43
|
else:
|
|
44
44
|
node_str = str(node_id)
|
|
45
45
|
s = "*NODALMASS\r\n" + f"{node_str},{mass_info[0]:g},{mass_info[1]:g},{mass_info[2]:g},{mass_info[3]:g}\r\n"
|
|
46
|
-
print(s)
|
|
46
|
+
# print(s)
|
|
47
47
|
QtServer.post_command(s, "QDAT")
|
|
48
48
|
except Exception as ex:
|
|
49
49
|
raise Exception(ex)
|
|
@@ -66,7 +66,7 @@ class MdbDynamicLoad:
|
|
|
66
66
|
s = "*SPFUNC\r\n" + f"NAME={name},{factor:g},{kind}\r\n"
|
|
67
67
|
if function_info is not None:
|
|
68
68
|
s += ",".join(f"{time:g},{y:g}" for time,y in function_info) + "\r\n"
|
|
69
|
-
print(s)
|
|
69
|
+
# print(s)
|
|
70
70
|
QtServer.post_command(s, "QDAT")
|
|
71
71
|
except Exception as ex:
|
|
72
72
|
raise Exception(ex)
|
|
@@ -97,7 +97,7 @@ class MdbDynamicLoad:
|
|
|
97
97
|
s += f"Y={info_y[0]},{info_y[1]:g}\r\n"
|
|
98
98
|
if info_z is not None:
|
|
99
99
|
s += f"Z={info_z[0]},{info_z[1]:g}\r\n"
|
|
100
|
-
print(s)
|
|
100
|
+
# print(s)
|
|
101
101
|
QtServer.post_command(s, "QDAT")
|
|
102
102
|
except Exception as ex:
|
|
103
103
|
raise Exception(ex)
|
|
@@ -131,7 +131,7 @@ class MdbDynamicLoad:
|
|
|
131
131
|
# s += "Y=" + ",".join(f"{y:g}" for y in info_y) + "\r\n"
|
|
132
132
|
# if info_z is not None:
|
|
133
133
|
# s += "Z=" + ",".join(f"{z:g}" for z in info_z) + "\r\n"
|
|
134
|
-
# print(s)
|
|
134
|
+
# # print(s)
|
|
135
135
|
# QtServer.post_command(s, "QDAT")
|
|
136
136
|
params = {
|
|
137
137
|
"version": QtServer.QT_VERSION,
|
|
@@ -170,7 +170,7 @@ class MdbDynamicLoad:
|
|
|
170
170
|
"""
|
|
171
171
|
try:
|
|
172
172
|
s = "*BDLINK\r\n" + f"{index},{property_name},{node_i},{node_j},{beta},{node_system},{group_name}\r\n"
|
|
173
|
-
print(s)
|
|
173
|
+
# print(s)
|
|
174
174
|
QtServer.post_command(s, "QDAT")
|
|
175
175
|
except Exception as ex:
|
|
176
176
|
raise Exception(ex)
|
|
@@ -194,7 +194,7 @@ class MdbDynamicLoad:
|
|
|
194
194
|
"""
|
|
195
195
|
try:
|
|
196
196
|
# s = "*DMCLOAD\r\n" + f"{node_id},{case_name},{function_name},{force_type},{factor},{time}\r\n"
|
|
197
|
-
# print(s)
|
|
197
|
+
# # print(s)
|
|
198
198
|
# QtServer.post_command(s, "QDAT")
|
|
199
199
|
params = {
|
|
200
200
|
"version": QtServer.QT_VERSION, # 版本控制
|
|
@@ -233,7 +233,7 @@ class MdbDynamicLoad:
|
|
|
233
233
|
s += f"Y={info_y[0]},{info_y[1]:g},{info_y[2]:g}\r\n"
|
|
234
234
|
if info_z is not None:
|
|
235
235
|
s += f"Z={info_z[0]},{info_z[1]:g},{info_z[2]:g}\r\n"
|
|
236
|
-
print(s)
|
|
236
|
+
# print(s)
|
|
237
237
|
QtServer.post_command(s, "QDAT")
|
|
238
238
|
except Exception as ex:
|
|
239
239
|
raise Exception(ex)
|
|
@@ -281,7 +281,7 @@ class MdbDynamicLoad:
|
|
|
281
281
|
# s += f"DAMPING={single_damping[0]:g},{single_damping[1]:g},{single_damping[2]:g},{single_damping[3]:g}\r\n"
|
|
282
282
|
# elif damp_type == 2:
|
|
283
283
|
# s += "DAMPING=" + ",".join(f"{m1},{t1:g},{t2:g},{d:g}" for m1,t1,t2,d in group_damping) + "\r\n"
|
|
284
|
-
# print(s)
|
|
284
|
+
# # print(s)
|
|
285
285
|
# QtServer.post_command(s, "QDAT")
|
|
286
286
|
params = {
|
|
287
287
|
"version": QtServer.QT_VERSION, # 版本控制
|
|
@@ -320,7 +320,7 @@ class MdbDynamicLoad:
|
|
|
320
320
|
s = "*THFUNC\r\n" + f"NAME={name},{factor},{kind}\r\n"
|
|
321
321
|
if function_info is not None:
|
|
322
322
|
s += ",".join(f"{time:g},{y:g}" for time,y in function_info) + "\r\n"
|
|
323
|
-
print(s)
|
|
323
|
+
# print(s)
|
|
324
324
|
QtServer.post_command(s, "QDAT")
|
|
325
325
|
except Exception as ex:
|
|
326
326
|
raise Exception(ex)
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import json
|
|
2
|
-
|
|
3
2
|
from ..core.qt_server import QtServer
|
|
4
3
|
from typing import Union, List
|
|
5
4
|
from .data_helper import MdbDataHelper
|
|
6
|
-
import re
|
|
7
5
|
|
|
8
6
|
|
|
9
7
|
class MdbLiveLoad:
|
|
@@ -46,7 +44,7 @@ class MdbLiveLoad:
|
|
|
46
44
|
s += f",{','.join('YES' if x else 'NO' for x in calc_fatigue[:3])}\r\n"
|
|
47
45
|
elif standard_code in (2, 3, 4, 5, 7):
|
|
48
46
|
s += "\r\n"
|
|
49
|
-
print(s)
|
|
47
|
+
# print(s)
|
|
50
48
|
QtServer.post_command(s, "QDAT")
|
|
51
49
|
except Exception as ex:
|
|
52
50
|
raise Exception(ex)
|
|
@@ -98,7 +96,7 @@ class MdbLiveLoad:
|
|
|
98
96
|
s += f"{wheelbase:g},{min_dis:g}," + ",".join(f"({pi},{di})" for pi, di in zip(p, dis)) + "\r\n"
|
|
99
97
|
else:
|
|
100
98
|
raise Exception("操作错误,P和D列表长度不一致")
|
|
101
|
-
print(s)
|
|
99
|
+
# print(s)
|
|
102
100
|
QtServer.post_command(s, "QDAT")
|
|
103
101
|
except Exception as ex:
|
|
104
102
|
raise Exception(ex)
|
|
@@ -143,7 +141,7 @@ class MdbLiveLoad:
|
|
|
143
141
|
"""
|
|
144
142
|
try:
|
|
145
143
|
s = "*INF-PLANE\r\n" + f"{name}," + ",".join(tandem_names) + "\r\n"
|
|
146
|
-
print(s)
|
|
144
|
+
# print(s)
|
|
147
145
|
QtServer.post_command(s, "QDAT")
|
|
148
146
|
except Exception as ex:
|
|
149
147
|
raise Exception(ex)
|
|
@@ -168,7 +166,7 @@ class MdbLiveLoad:
|
|
|
168
166
|
try:
|
|
169
167
|
opt_str = "YES" if optimize else "NO"
|
|
170
168
|
s = "*LANE-LINE\r\n" + f"{name},{influence_name},{tandem_name},{offset:g},{lane_width:g},{opt_str},{direction}\r\n"
|
|
171
|
-
print(s)
|
|
169
|
+
# print(s)
|
|
172
170
|
QtServer.post_command(s, "QDAT")
|
|
173
171
|
except Exception as ex:
|
|
174
172
|
raise Exception(ex)
|
|
@@ -205,7 +203,7 @@ class MdbLiveLoad:
|
|
|
205
203
|
else:
|
|
206
204
|
s += f"YES,{special_code}\r\n"
|
|
207
205
|
s += "\r\n".join((f"{veh_name},{coeff:g}," + ",".join(lanes)) for veh_name, coeff, lanes in sub_case)
|
|
208
|
-
print(s)
|
|
206
|
+
# print(s)
|
|
209
207
|
QtServer.post_command(s, "QDAT")
|
|
210
208
|
except Exception as ex:
|
|
211
209
|
raise Exception(ex)
|
|
@@ -230,7 +228,7 @@ class MdbLiveLoad:
|
|
|
230
228
|
try:
|
|
231
229
|
s = "*LIVE-REDUCTION\r\n" + f"NAME={name},1,{code_index},{longitude_factor:g},{impact_factor:g},{frequency:g}\r\n" + ",".join(
|
|
232
230
|
f"{x:g}" for x in cross_factors) + "\r\n"
|
|
233
|
-
print(s)
|
|
231
|
+
# print(s)
|
|
234
232
|
QtServer.post_command(s, "QDAT")
|
|
235
233
|
except Exception as ex:
|
|
236
234
|
raise Exception(ex)
|
|
@@ -264,7 +262,7 @@ class MdbLiveLoad:
|
|
|
264
262
|
calc_str = "YES" if calc_fatigue else "NO"
|
|
265
263
|
s = "*LIVE-REDUCTION\r\n" + f"NAME={name},2,{code_index},{calc_str},{line_count},{longitude_factor:g},{impact_factor:g},{fatigue_factor:g},{bridge_kind},{fill_thick:g},{rise:g},{calc_length}\r\n"
|
|
266
264
|
s += ",".join(f"{x:g}" for x in cross_factors) + "\r\n"
|
|
267
|
-
print(s)
|
|
265
|
+
# print(s)
|
|
268
266
|
QtServer.post_command(s, "QDAT")
|
|
269
267
|
except Exception as ex:
|
|
270
268
|
raise Exception(ex)
|
|
@@ -287,7 +285,7 @@ class MdbLiveLoad:
|
|
|
287
285
|
try:
|
|
288
286
|
s = "*LIVE-REDUCTION\r\n" + f"NAME={name},3,0,{longitude_factor:g},{impact_factor:g}\r\n" + ",".join(
|
|
289
287
|
f"{x:g}" for x in cross_factors) + "\r\n"
|
|
290
|
-
print(s)
|
|
288
|
+
# print(s)
|
|
291
289
|
QtServer.post_command(s, "QDAT")
|
|
292
290
|
except Exception as ex:
|
|
293
291
|
raise Exception(ex)
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import json
|
|
2
|
-
|
|
3
|
-
from .data_helper import MdbDataHelper
|
|
4
1
|
from ..core.qt_server import QtServer
|
|
5
2
|
|
|
6
3
|
|
|
@@ -67,7 +64,7 @@ class MdbProperty:
|
|
|
67
64
|
if not composite_info or len(composite_info) != 2:
|
|
68
65
|
raise Exception("操作错误,组合材料composite_info数据无效!")
|
|
69
66
|
s += f"{index},{name},{mat_type},{composite_info[0]},{composite_info[1]}\r\n"
|
|
70
|
-
print(s)
|
|
67
|
+
# print(s)
|
|
71
68
|
QtServer.post_command(s, "QDAT")
|
|
72
69
|
except Exception as ex:
|
|
73
70
|
raise Exception(ex)
|
|
@@ -127,7 +124,7 @@ class MdbProperty:
|
|
|
127
124
|
elif code_index == 1000: # 自定义收缩徐变
|
|
128
125
|
s += f"{index},{name},{code_index},{shrink_data}," + ",".join(
|
|
129
126
|
str(x) for pair in creep_data for x in pair) + "\r\n"
|
|
130
|
-
print(s)
|
|
127
|
+
# print(s)
|
|
131
128
|
QtServer.post_command(s, "QDAT")
|
|
132
129
|
except Exception as ex:
|
|
133
130
|
raise Exception(ex)
|
|
@@ -147,7 +144,7 @@ class MdbProperty:
|
|
|
147
144
|
try:
|
|
148
145
|
s = "*CREEPFCT\r\n" + f"Name={name},{scale_factor:g}\r\n" + ",".join(
|
|
149
146
|
f"{x:g},{y:g}" for x, y in creep_data) + "\r\n"
|
|
150
|
-
print(s)
|
|
147
|
+
# print(s)
|
|
151
148
|
QtServer.post_command(s, "QDAT")
|
|
152
149
|
except Exception as ex:
|
|
153
150
|
raise Exception(ex)
|
|
@@ -168,7 +165,7 @@ class MdbProperty:
|
|
|
168
165
|
try:
|
|
169
166
|
s = "*SHRINKFCT\r\n" + f"Name={name},{scale_factor:g}\r\n" + ",".join(
|
|
170
167
|
f"{x:g},{y:g}" for x, y in shrink_data) + "\r\n"
|
|
171
|
-
print(s)
|
|
168
|
+
# print(s)
|
|
172
169
|
QtServer.post_command(s, "QDAT")
|
|
173
170
|
except Exception as ex:
|
|
174
171
|
raise Exception(ex)
|
|
@@ -214,7 +211,7 @@ class MdbProperty:
|
|
|
214
211
|
else:
|
|
215
212
|
type_l = {4: "T,", 5: "U,"}.get(len(rib_l), "")
|
|
216
213
|
s += f"YES,{dist_l},{type_l}" + ",".join(f"{x:g}" for x in rib_l) + "\r\n"
|
|
217
|
-
print(s)
|
|
214
|
+
# print(s)
|
|
218
215
|
QtServer.post_command(s, "QDAT")
|
|
219
216
|
except Exception as ex:
|
|
220
217
|
raise Exception(ex)
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import json
|
|
2
|
+
from typing import Union
|
|
2
3
|
|
|
3
4
|
from .data_helper import MdbDataHelper
|
|
4
5
|
from ..core.qt_server import QtServer
|
|
@@ -104,7 +105,7 @@ class MdbSection:
|
|
|
104
105
|
loop_segments,
|
|
105
106
|
sec_lines,
|
|
106
107
|
secondary_loop_segments)
|
|
107
|
-
print(s)
|
|
108
|
+
# print(s)
|
|
108
109
|
QtServer.post_command(s, "QDAT")
|
|
109
110
|
except Exception as ex:
|
|
110
111
|
raise Exception(f"添加截面:{name}失败,{ex}")
|
|
@@ -133,14 +134,14 @@ class MdbSection:
|
|
|
133
134
|
bias = f"{bias_x:g},{bias_y:g}"
|
|
134
135
|
else:
|
|
135
136
|
bias = f"{center_type},{bias_type}"
|
|
136
|
-
sec_property: list[float]
|
|
137
|
+
sec_property: Union[list[float], None] = sec_data.get("sec_property", None)
|
|
137
138
|
s = ""
|
|
138
139
|
if sec_property is not None:
|
|
139
140
|
s += "*SEC-PROPERTY\r\n" + f"ID={index},{name},1,{'YES' if shear_consider else 'NO'},{bias}\r\n"
|
|
140
141
|
s += ",".join(f"{x:g}" for x in sec_property) + "\r\n"
|
|
141
142
|
s += "*SEC-INFO\r\n" + f"ID={index},{name},{sec_type},{'YES' if shear_consider else 'NO'},{bias}\r\n"
|
|
142
143
|
s = MdbDataHelper.get_str_by_data(s, sec_type, sec_data)
|
|
143
|
-
print(s)
|
|
144
|
+
# print(s)
|
|
144
145
|
QtServer.post_command(s, "QDAT")
|
|
145
146
|
except Exception as ex:
|
|
146
147
|
raise Exception(ex)
|
|
@@ -170,12 +171,12 @@ class MdbSection:
|
|
|
170
171
|
center_type_i = sec_begin.get("center_type", "质心")
|
|
171
172
|
bias_x_i = sec_begin.get("bias_x", 0)
|
|
172
173
|
bias_y_i = sec_begin.get("bias_y", 0)
|
|
173
|
-
sec_property_i: list[float]
|
|
174
|
+
sec_property_i: Union[list[float], None] = sec_begin.get("sec_property", None)
|
|
174
175
|
bias_type_j = sec_end.get("bias_type", "中心")
|
|
175
176
|
center_type_j = sec_end.get("center_type", "质心")
|
|
176
177
|
bias_x_j = sec_end.get("bias_x", 0)
|
|
177
178
|
bias_y_j = sec_end.get("bias_y", 0)
|
|
178
|
-
sec_property_j: list[float]
|
|
179
|
+
sec_property_j: Union[list[float], None] = sec_end.get("sec_property", None)
|
|
179
180
|
|
|
180
181
|
if (bias_x_i, bias_y_i) != (0, 0):
|
|
181
182
|
bias1 = f"{bias_x_i:g},{bias_y_i:g}"
|
|
@@ -201,7 +202,7 @@ class MdbSection:
|
|
|
201
202
|
s += "J=\r\n"
|
|
202
203
|
s = MdbDataHelper.get_str_by_data(s, sec_type, sec_end)
|
|
203
204
|
|
|
204
|
-
print(s)
|
|
205
|
+
# print(s)
|
|
205
206
|
QtServer.post_command(s, "QDAT")
|
|
206
207
|
if sec_normalize:
|
|
207
208
|
params = {
|
|
@@ -277,7 +278,7 @@ class MdbSection:
|
|
|
277
278
|
id_str = str(ids)
|
|
278
279
|
if parameter_info is None:
|
|
279
280
|
s = "*TSGROUP\r\n" + f"{name},{id_str},{factor_w:g},{ref_w},{dis_w:g},{factor_h:g},{ref_h},{dis_h:g}\r\n"
|
|
280
|
-
print(s)
|
|
281
|
+
# print(s)
|
|
281
282
|
QtServer.post_command(s, "QDAT")
|
|
282
283
|
if parameter_info is not None:
|
|
283
284
|
s = "*PARA-TSGROUP\r\n" + f"NAME={name},{id_str}\r\n"
|
|
@@ -32,7 +32,7 @@ class MdbStaticLoad:
|
|
|
32
32
|
node_str = str(node_id)
|
|
33
33
|
s = "*NODALLOAD\r\n" + f"{node_str},{case_name},{group_name}," + ",".join(
|
|
34
34
|
f"{x:g}" for x in load_info) + "\r\n"
|
|
35
|
-
print(s)
|
|
35
|
+
# print(s)
|
|
36
36
|
QtServer.post_command(s, "QDAT")
|
|
37
37
|
except Exception as ex:
|
|
38
38
|
raise Exception(ex)
|
|
@@ -64,7 +64,7 @@ class MdbStaticLoad:
|
|
|
64
64
|
node_str = str(node_id)
|
|
65
65
|
s = "*NODALDISP\r\n" + f"{node_str},{case_name},{group_name}," + ",".join(
|
|
66
66
|
f"{x:g}" for x in load_info) + "\r\n"
|
|
67
|
-
print(s)
|
|
67
|
+
# print(s)
|
|
68
68
|
QtServer.post_command(s, "QDAT")
|
|
69
69
|
except Exception as ex:
|
|
70
70
|
raise Exception(ex)
|
|
@@ -127,7 +127,7 @@ class MdbStaticLoad:
|
|
|
127
127
|
# s += ",".join(f"{x:g}" for x in list_x) + "," + ",".join(f"{load:g}" for load in list_load)
|
|
128
128
|
# bias_str = "YES" if load_bias[0] else "NO"
|
|
129
129
|
# s += f",{bias_str},{load_bias[1]},{load_bias[2]},{load_bias[3]:g}\r\n"
|
|
130
|
-
# print(s)
|
|
130
|
+
# # print(s)
|
|
131
131
|
# QtServer.post_command(s, "QDAT")
|
|
132
132
|
except Exception as ex:
|
|
133
133
|
raise Exception(ex)
|
|
@@ -155,7 +155,7 @@ class MdbStaticLoad:
|
|
|
155
155
|
tend_list = tendon_name
|
|
156
156
|
s = "*PRESTRESS\r\n" + "\r\n".join(
|
|
157
157
|
f"{tend},{case_name},{group_name},{tension_type},{force}" for tend in tend_list) + "\r\n"
|
|
158
|
-
print(s)
|
|
158
|
+
# print(s)
|
|
159
159
|
QtServer.post_command(s, "QDAT")
|
|
160
160
|
except Exception as ex:
|
|
161
161
|
raise Exception(ex)
|
|
@@ -185,7 +185,7 @@ class MdbStaticLoad:
|
|
|
185
185
|
else:
|
|
186
186
|
elem_str = str(element_id)
|
|
187
187
|
s = "*INITTENSION\r\n" + f"{elem_str},{case_name},{group_name},{tension:g},{tension_type},{application_type},{stiffness:g}\r\n"
|
|
188
|
-
print(s)
|
|
188
|
+
# print(s)
|
|
189
189
|
QtServer.post_command(s, "QDAT")
|
|
190
190
|
except Exception as ex:
|
|
191
191
|
raise Exception(ex)
|
|
@@ -213,7 +213,7 @@ class MdbStaticLoad:
|
|
|
213
213
|
else:
|
|
214
214
|
elem_str = str(element_id)
|
|
215
215
|
s = "*CABLELENLOAD\r\n" + f"{elem_str},{case_name},{group_name},{length},{tension_type}\r\n"
|
|
216
|
-
print(s)
|
|
216
|
+
# print(s)
|
|
217
217
|
QtServer.post_command(s, "QDAT")
|
|
218
218
|
except Exception as ex:
|
|
219
219
|
raise Exception(ex)
|
|
@@ -259,7 +259,7 @@ class MdbStaticLoad:
|
|
|
259
259
|
s += f"{load_type},{coord_system},{list_load[0]:g},{list_load[1]:g},{list_load[2]:g},{list_load[3]:g}\r\n"
|
|
260
260
|
else:
|
|
261
261
|
raise Exception("操作错误,板单元暂不支持该类型荷载")
|
|
262
|
-
print(s)
|
|
262
|
+
# print(s)
|
|
263
263
|
QtServer.post_command(s, "QDAT")
|
|
264
264
|
except Exception as ex:
|
|
265
265
|
raise Exception(ex)
|
|
@@ -2,7 +2,7 @@ import json
|
|
|
2
2
|
|
|
3
3
|
from ..core.qt_server import QtServer
|
|
4
4
|
from .data_helper import MdbDataHelper
|
|
5
|
-
from typing import Union
|
|
5
|
+
from typing import Union
|
|
6
6
|
|
|
7
7
|
class MdbStructure:
|
|
8
8
|
"""
|
|
@@ -32,7 +32,7 @@ class MdbStructure:
|
|
|
32
32
|
# QtServer.MERGE_STR += s
|
|
33
33
|
# else:
|
|
34
34
|
# QtServer.post_command(s,"QDAT")
|
|
35
|
-
# print(s)
|
|
35
|
+
# # print(s)
|
|
36
36
|
params = {
|
|
37
37
|
"version": QtServer.QT_VERSION, # 版本控制
|
|
38
38
|
"node_data": node_data,
|
|
@@ -81,7 +81,7 @@ class MdbStructure:
|
|
|
81
81
|
s += f"{index},{ele_type},{mat_id},{sec_id},{beta_angle},{node_ids[0]},{node_ids[1]},{initial_type},{initial_value:g}" + "\r\n"
|
|
82
82
|
elif ele_type == 4: # 4-板
|
|
83
83
|
s += f"{index},{ele_type},{mat_id},{sec_id},{beta_angle},{node_ids[0]},{node_ids[1]},{node_ids[2]},{node_ids[3]},{plate_type}" + "\r\n"
|
|
84
|
-
print(s)
|
|
84
|
+
# print(s)
|
|
85
85
|
if QtServer.QT_MERGE:
|
|
86
86
|
QtServer.MERGE_STR += s # 开启合并发送时需要调用update_model生效
|
|
87
87
|
else:
|
|
@@ -108,7 +108,7 @@ class MdbStructure:
|
|
|
108
108
|
"""
|
|
109
109
|
try:
|
|
110
110
|
s = "*ELEMENT\r\n" + "\r\n".join(",".join(str(x) for x in row) for row in ele_data) + "\r\n"
|
|
111
|
-
print(s)
|
|
111
|
+
# print(s)
|
|
112
112
|
QtServer.post_command(s,"QDAT")
|
|
113
113
|
except Exception as ex:
|
|
114
114
|
raise Exception(ex)
|
|
@@ -146,7 +146,7 @@ class MdbStructure:
|
|
|
146
146
|
elem_str = str(element_ids)
|
|
147
147
|
|
|
148
148
|
s = "*STRGROUP\r\n" + f"{name},{node_str},{elem_str}" + "\r\n"
|
|
149
|
-
print(s)
|
|
149
|
+
# print(s)
|
|
150
150
|
QtServer.post_command(s, "QDAT")
|
|
151
151
|
except Exception as ex:
|
|
152
152
|
raise Exception(ex)
|
|
@@ -25,8 +25,8 @@ class MdbTemperatureLoad:
|
|
|
25
25
|
raise Exception("操作错误,制造误差信息不能为空")
|
|
26
26
|
if len(parameters) != 7 and len(parameters) != 5 :
|
|
27
27
|
raise Exception("操作错误,制造误差信息数量有误,请核查数据")
|
|
28
|
-
s = "*DEVPARAM\r\n" + f"{name},{
|
|
29
|
-
print(s)
|
|
28
|
+
s = "*DEVPARAM\r\n" + f"{name},{','.join(f'{x:g}' for x in parameters)}" + "\r\n"
|
|
29
|
+
# print(s)
|
|
30
30
|
QtServer.post_command(s, "QDAT")
|
|
31
31
|
except Exception as ex:
|
|
32
32
|
raise Exception(ex)
|
|
@@ -62,7 +62,7 @@ class MdbTemperatureLoad:
|
|
|
62
62
|
s += f"{parameters}\r\n"
|
|
63
63
|
elif isinstance(parameters, list):
|
|
64
64
|
s += ",".join(f"{s}" for s in parameters) + "\r\n"
|
|
65
|
-
print(s)
|
|
65
|
+
# print(s)
|
|
66
66
|
QtServer.post_command(s, "QDAT")
|
|
67
67
|
except Exception as ex:
|
|
68
68
|
raise Exception(ex)
|
|
@@ -91,7 +91,7 @@ class MdbTemperatureLoad:
|
|
|
91
91
|
id_str = str(element_id)
|
|
92
92
|
s = "*USER-TEMP\r\n" + f"{id_str},{case_name},{group_name},{orientation},"
|
|
93
93
|
s += ",".join(f"({','.join(f'{x:g}' for x in data)})" for data in temperature_data) + "\r\n"
|
|
94
|
-
print(s)
|
|
94
|
+
# print(s)
|
|
95
95
|
QtServer.post_command(s, "QDAT")
|
|
96
96
|
except Exception as ex:
|
|
97
97
|
raise Exception(ex)
|
|
@@ -118,7 +118,7 @@ class MdbTemperatureLoad:
|
|
|
118
118
|
else:
|
|
119
119
|
id_str = str(element_id)
|
|
120
120
|
s = "*ELE-TEMP\r\n" + f"{id_str},{case_name},{group_name},{temperature:g}\r\n"
|
|
121
|
-
print(s)
|
|
121
|
+
# print(s)
|
|
122
122
|
QtServer.post_command(s, "QDAT")
|
|
123
123
|
except Exception as ex:
|
|
124
124
|
raise Exception(ex)
|
|
@@ -137,7 +137,7 @@ class MdbTemperatureLoad:
|
|
|
137
137
|
"""
|
|
138
138
|
try:
|
|
139
139
|
s = "*SYSTEM-TEMP\r\n" + f"{case_name},{group_name},{temperature:g}\r\n"
|
|
140
|
-
print(s)
|
|
140
|
+
# print(s)
|
|
141
141
|
QtServer.post_command(s, "QDAT")
|
|
142
142
|
except Exception as ex:
|
|
143
143
|
raise Exception(ex)
|
|
@@ -171,7 +171,7 @@ class MdbTemperatureLoad:
|
|
|
171
171
|
s = "*BEAMGRD-TEMP\r\n" + f"{id_str},{case_name},{group_name},{section_oriental},{temperature:g}" + "\r\n"
|
|
172
172
|
elif element_type == 2: # 2-板单元
|
|
173
173
|
s = "*PLATEGRD-TEMP\r\n" + f"{id_str},{case_name},{group_name},{temperature:g}" + "\r\n"
|
|
174
|
-
print(s)
|
|
174
|
+
# print(s)
|
|
175
175
|
QtServer.post_command(s, "QDAT")
|
|
176
176
|
except Exception as ex:
|
|
177
177
|
raise Exception(ex)
|
|
@@ -205,7 +205,7 @@ class MdbTemperatureLoad:
|
|
|
205
205
|
else:
|
|
206
206
|
id_str = str(element_id)
|
|
207
207
|
s = "*SEC-TEMP\r\n" + f"{id_str},{case_name},{group_name},{code_index},{sec_type},{t1:g},{t2:g},{t3:g},{t4:g},{thick:g}" + "\r\n"
|
|
208
|
-
print(s)
|
|
208
|
+
# print(s)
|
|
209
209
|
QtServer.post_command(s, "QDAT")
|
|
210
210
|
except Exception as ex:
|
|
211
211
|
raise Exception(ex)
|
|
@@ -234,7 +234,7 @@ class MdbTemperatureLoad:
|
|
|
234
234
|
id_str = str(element_id)
|
|
235
235
|
tem_dir = 1 # 目前仅支持截面高度方向温度加载
|
|
236
236
|
s = "*INDEX-TEMP\r\n" + f"{id_str},{case_name},{group_name},{tem_dir},{temperature:g},{index:g}" + "\r\n"
|
|
237
|
-
print(s)
|
|
237
|
+
# print(s)
|
|
238
238
|
QtServer.post_command(s, "QDAT")
|
|
239
239
|
except Exception as ex:
|
|
240
240
|
raise Exception(ex)
|
|
@@ -261,7 +261,7 @@ class MdbTemperatureLoad:
|
|
|
261
261
|
else:
|
|
262
262
|
id_str = str(element_id)
|
|
263
263
|
s = "*TOPPLATE-TEMP\r\n" + f"{id_str},{case_name},{group_name},{temperature:g}" + "\r\n"
|
|
264
|
-
print(s)
|
|
264
|
+
# print(s)
|
|
265
265
|
QtServer.post_command(s, "QDAT")
|
|
266
266
|
except Exception as ex:
|
|
267
267
|
raise Exception(ex)
|
|
@@ -16,7 +16,7 @@ class MdbTendon:
|
|
|
16
16
|
"""
|
|
17
17
|
try:
|
|
18
18
|
s = "*TDNGROUP\r\n" + f"{name}\r\n"
|
|
19
|
-
print(s)
|
|
19
|
+
# print(s)
|
|
20
20
|
QtServer.post_command(s, "QDAT")
|
|
21
21
|
except Exception as ex:
|
|
22
22
|
raise Exception(ex)
|
|
@@ -61,7 +61,7 @@ class MdbTendon:
|
|
|
61
61
|
elif steel_type == 2:
|
|
62
62
|
s += "螺纹钢筋," + ",".join(f"{steel:g}" for steel in steel_detail)
|
|
63
63
|
s += f",{slip_info[0]:g},{slip_info[1]:g}\r\n"
|
|
64
|
-
print(s)
|
|
64
|
+
# print(s)
|
|
65
65
|
QtServer.post_command(s, "QDAT")
|
|
66
66
|
except Exception as ex:
|
|
67
67
|
raise Exception(ex)
|
|
@@ -111,7 +111,7 @@ class MdbTendon:
|
|
|
111
111
|
s += "TRACK,2,3D\r\n"
|
|
112
112
|
s += f"{track_group},{point_insert[0]},{point_insert[2]},{point_insert[1]},{rotation_angle:g}\r\n"
|
|
113
113
|
s += ",".join(f"({','.join(f'{v:g}' for v in point)})" for point in control_points) + "\r\n"
|
|
114
|
-
print(s)
|
|
114
|
+
# print(s)
|
|
115
115
|
QtServer.post_command(s, "QDAT")
|
|
116
116
|
except Exception as ex:
|
|
117
117
|
raise Exception(f"添加三维钢束:{name}失败,{ex}")
|
|
@@ -167,7 +167,7 @@ class MdbTendon:
|
|
|
167
167
|
if control_points_lateral is not None:
|
|
168
168
|
s += "Y=" + ",".join(
|
|
169
169
|
f"({','.join(f'{y:g}' for y in point)})" for point in control_points_lateral) + "\r\n"
|
|
170
|
-
print(s)
|
|
170
|
+
# print(s)
|
|
171
171
|
QtServer.post_command(s, "QDAT")
|
|
172
172
|
except Exception as ex:
|
|
173
173
|
raise Exception(f"添加二维钢束:{name}失败,{ex}")
|
|
@@ -179,7 +179,7 @@ class MdbTendon:
|
|
|
179
179
|
Args:
|
|
180
180
|
ids:单元编号支持数或列表且支持XtoYbyN形式字符串
|
|
181
181
|
Example:
|
|
182
|
-
mdb.add_tendon_elements(
|
|
182
|
+
mdb.add_tendon_elements(element_id=[1,2,4,6])
|
|
183
183
|
Returns: 无
|
|
184
184
|
"""
|
|
185
185
|
try:
|
|
@@ -190,7 +190,7 @@ class MdbTendon:
|
|
|
190
190
|
else:
|
|
191
191
|
elem_str = str(ids)
|
|
192
192
|
s = "*PSELEMENT\r\n" + f"{elem_str}\r\n"
|
|
193
|
-
print(s)
|
|
193
|
+
# print(s)
|
|
194
194
|
QtServer.post_command(s, "QDAT")
|
|
195
195
|
except Exception as ec:
|
|
196
196
|
raise Exception(ec)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: qtmodel
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.2
|
|
4
4
|
Summary: python modeling for qt 2025-09-24
|
|
5
5
|
Home-page: https://github.com/Inface0443/pyqt
|
|
6
6
|
Author: dqy-zhj
|
|
@@ -17,7 +17,7 @@ Dynamic: description-content-type
|
|
|
17
17
|
Dynamic: home-page
|
|
18
18
|
Dynamic: summary
|
|
19
19
|
|
|
20
|
-
> 最新版本 V1.1.
|
|
20
|
+
> 最新版本 V1.1.2 - 2025-09-24
|
|
21
21
|
> pip install --upgrade qtmodel -i https://pypi.org/simple
|
|
22
22
|
- 新增更新结构组接口
|
|
23
23
|
# 建模操作
|
|
@@ -633,7 +633,7 @@ Returns: 无
|
|
|
633
633
|
```Python
|
|
634
634
|
# 示例代码
|
|
635
635
|
from qtmodel import *
|
|
636
|
-
mdb.add_tendon_elements(
|
|
636
|
+
mdb.add_tendon_elements(element_id=[1,2,4,6])
|
|
637
637
|
```
|
|
638
638
|
Returns: 无
|
|
639
639
|
## 静力荷载操作
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|