qtmodel 0.5.51__tar.gz → 0.5.53__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-0.5.51 → qtmodel-0.5.53}/PKG-INFO +137 -26
- {qtmodel-0.5.51 → qtmodel-0.5.53}/README.md +135 -24
- {qtmodel-0.5.51 → qtmodel-0.5.53}/qtmodel/qt_mdb.py +213 -46
- {qtmodel-0.5.51 → qtmodel-0.5.53}/qtmodel.egg-info/PKG-INFO +137 -26
- {qtmodel-0.5.51 → qtmodel-0.5.53}/setup.py +1 -1
- {qtmodel-0.5.51 → qtmodel-0.5.53}/qtmodel/__init__.py +0 -0
- {qtmodel-0.5.51 → qtmodel-0.5.53}/qtmodel/qt_db.py +0 -0
- {qtmodel-0.5.51 → qtmodel-0.5.53}/qtmodel/qt_odb.py +0 -0
- {qtmodel-0.5.51 → qtmodel-0.5.53}/qtmodel.egg-info/SOURCES.txt +0 -0
- {qtmodel-0.5.51 → qtmodel-0.5.53}/qtmodel.egg-info/dependency_links.txt +0 -0
- {qtmodel-0.5.51 → qtmodel-0.5.53}/qtmodel.egg-info/top_level.txt +0 -0
- {qtmodel-0.5.51 → qtmodel-0.5.53}/setup.cfg +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: qtmodel
|
|
3
|
-
Version: 0.5.
|
|
4
|
-
Summary: python modeling for qt 2024-12-
|
|
3
|
+
Version: 0.5.53
|
|
4
|
+
Summary: python modeling for qt 2024-12-28
|
|
5
5
|
Home-page: https://github.com/Inface0443/pyqt
|
|
6
6
|
Author: dqy-zhj
|
|
7
7
|
Author-email: 1105417715@qq.com
|
|
@@ -12,9 +12,9 @@ Classifier: Programming Language :: Python :: 3
|
|
|
12
12
|
Classifier: Operating System :: OS Independent
|
|
13
13
|
Description-Content-Type: text/markdown
|
|
14
14
|
|
|
15
|
-
# 最新版本 V0.5.
|
|
15
|
+
# 最新版本 V0.5.53 - 2024-12-28
|
|
16
16
|
> pip install --upgrade qtmodel -i https://pypi.org/simple
|
|
17
|
-
-
|
|
17
|
+
- 增加边界更新接口
|
|
18
18
|
## 项目管理
|
|
19
19
|
### update_bim
|
|
20
20
|
刷新Bim模型信息
|
|
@@ -282,14 +282,15 @@ Returns: 无
|
|
|
282
282
|
### update_node
|
|
283
283
|
根据节点号修改节点坐标
|
|
284
284
|
> 参数:
|
|
285
|
-
> node_id:
|
|
285
|
+
> node_id: 旧节点编号
|
|
286
|
+
> new_id: 新节点编号,默认为-1时不改变节点编号
|
|
286
287
|
> x: 更新后x坐标
|
|
287
288
|
> y: 更新后y坐标
|
|
288
289
|
> z: 更新后z坐标
|
|
289
290
|
```Python
|
|
290
291
|
# 示例代码
|
|
291
292
|
from qtmodel import *
|
|
292
|
-
mdb.update_node(node_id=1,x=2,y=2,z=2)
|
|
293
|
+
mdb.update_node(node_id=1,new_id=2,x=2,y=2,z=2)
|
|
293
294
|
```
|
|
294
295
|
Returns: 无
|
|
295
296
|
### update_node_id
|
|
@@ -398,6 +399,27 @@ mdb.add_structure_to_group(name="现有结构组1",node_ids=[1,2,3,4],element_id
|
|
|
398
399
|
```
|
|
399
400
|
Returns: 无
|
|
400
401
|
## 单元操作
|
|
402
|
+
### update_local_orientation
|
|
403
|
+
反转杆系单元局部方向
|
|
404
|
+
> 参数:
|
|
405
|
+
> ele_id: 杆系单元编号
|
|
406
|
+
```Python
|
|
407
|
+
# 示例代码
|
|
408
|
+
from qtmodel import *
|
|
409
|
+
mdb.update_local_orientation(1)
|
|
410
|
+
```
|
|
411
|
+
Returns: 无
|
|
412
|
+
### update_element_id
|
|
413
|
+
更改单元编号
|
|
414
|
+
> 参数:
|
|
415
|
+
> old_id: 单元编号
|
|
416
|
+
> new_id: 新单元编号
|
|
417
|
+
```Python
|
|
418
|
+
# 示例代码
|
|
419
|
+
from qtmodel import *
|
|
420
|
+
mdb.update_element_id(1,2)
|
|
421
|
+
```
|
|
422
|
+
Returns: 无
|
|
401
423
|
### add_element
|
|
402
424
|
根据单元编号和单元类型添加单元
|
|
403
425
|
> 参数:
|
|
@@ -407,14 +429,34 @@ Returns: 无
|
|
|
407
429
|
> beta_angle:贝塔角
|
|
408
430
|
> mat_id:材料编号
|
|
409
431
|
> sec_id:截面编号
|
|
410
|
-
> initial_type:索单元初始参数类型
|
|
432
|
+
> initial_type:索单元初始参数类型 1-初始拉力 2-初始水平力 3-无应力长度
|
|
411
433
|
> initial_value:索单元初始始参数值
|
|
434
|
+
> plate_type:板单元类型 0-薄板 1-厚板
|
|
412
435
|
```Python
|
|
413
436
|
# 示例代码
|
|
414
437
|
from qtmodel import *
|
|
415
438
|
mdb.add_element(index=1,ele_type=1,node_ids=[1,2],beta_angle=1,mat_id=1,sec_id=1)
|
|
416
439
|
```
|
|
417
440
|
Returns: 无
|
|
441
|
+
### update_element
|
|
442
|
+
根据单元编号和单元类型添加单元
|
|
443
|
+
> 参数:
|
|
444
|
+
> old_id:原单元编号
|
|
445
|
+
> new_id:现单元编号,默认不修改原单元Id
|
|
446
|
+
> ele_type:单元类型 1-梁 2-杆 3-索 4-板
|
|
447
|
+
> node_ids:单元对应的节点列表 [i,j] 或 [i,j,k,l]
|
|
448
|
+
> beta_angle:贝塔角
|
|
449
|
+
> mat_id:材料编号
|
|
450
|
+
> sec_id:截面编号
|
|
451
|
+
> initial_type:索单元初始参数类型 1-初始拉力 2-初始水平力 3-无应力长度
|
|
452
|
+
> initial_value:索单元初始始参数值
|
|
453
|
+
> plate_type:板单元类型 0-薄板 1-厚板
|
|
454
|
+
```Python
|
|
455
|
+
# 示例代码
|
|
456
|
+
from qtmodel import *
|
|
457
|
+
mdb.update_element(old_id=1,ele_type=1,node_ids=[1,2],beta_angle=1,mat_id=1,sec_id=1)
|
|
458
|
+
```
|
|
459
|
+
Returns: 无
|
|
418
460
|
### add_elements
|
|
419
461
|
根据单元编号和单元类型添加单元
|
|
420
462
|
> 参数:
|
|
@@ -432,6 +474,16 @@ mdb.add_elements(ele_data=[
|
|
|
432
474
|
[4,4,1,1,0,1,2,3,4]])
|
|
433
475
|
```
|
|
434
476
|
Returns: 无
|
|
477
|
+
### update_element_local_orientation
|
|
478
|
+
更新指定单元的单元局部坐标系
|
|
479
|
+
> 参数:
|
|
480
|
+
> index: 单元编号
|
|
481
|
+
```Python
|
|
482
|
+
# 示例代码
|
|
483
|
+
from qtmodel import *
|
|
484
|
+
mdb.update_element_local_orientation(index=1)
|
|
485
|
+
```
|
|
486
|
+
Returns: 无
|
|
435
487
|
### update_element_material
|
|
436
488
|
更新指定单元的材料号
|
|
437
489
|
> 参数:
|
|
@@ -492,7 +544,7 @@ Returns: 无
|
|
|
492
544
|
### add_material
|
|
493
545
|
添加材料
|
|
494
546
|
> 参数:
|
|
495
|
-
> index
|
|
547
|
+
> index:材料编号,默认为最大Id+1
|
|
496
548
|
> name:材料名称
|
|
497
549
|
> mat_type: 材料类型,1-混凝土 2-钢材 3-预应力 4-钢筋 5-自定义 6-组合材料
|
|
498
550
|
> standard:规范序号,参考UI 默认从1开始
|
|
@@ -723,6 +775,17 @@ from qtmodel import *
|
|
|
723
775
|
mdb.add_boundary_group(name="边界组1")
|
|
724
776
|
```
|
|
725
777
|
Returns: 无
|
|
778
|
+
### update_boundary_group
|
|
779
|
+
更改边界组名
|
|
780
|
+
> 参数:
|
|
781
|
+
> name:边界组名
|
|
782
|
+
> new_name:新边界组名
|
|
783
|
+
```Python
|
|
784
|
+
# 示例代码
|
|
785
|
+
from qtmodel import *
|
|
786
|
+
mdb.update_boundary_group("旧边界组","新边界组")
|
|
787
|
+
```
|
|
788
|
+
Returns: 无
|
|
726
789
|
### remove_boundary_group
|
|
727
790
|
按照名称删除边界组
|
|
728
791
|
> 参数:
|
|
@@ -744,16 +807,17 @@ mdb.remove_all_boundary()
|
|
|
744
807
|
```
|
|
745
808
|
Returns: 无
|
|
746
809
|
### remove_boundary
|
|
747
|
-
|
|
810
|
+
根据节点号删除一般支撑、弹性支承/根据弹性连接I或J端(需指定)节点号删除弹性连接/根据单元号删除梁端约束/根据从节点号和约束方程名删除约束方程/根据从节点号删除主从约束
|
|
748
811
|
> 参数:
|
|
749
812
|
> remove_id:节点号 or 单元号 or 从节点号
|
|
750
|
-
> bd_type:边界类型 ["一般支承", "弹性支承","一般弹性支承", "主从约束", "
|
|
813
|
+
> bd_type:边界类型 ["一般支承", "弹性支承","一般弹性支承", "主从约束", "一般/受拉/受压/刚性弹性连接", "约束方程", "梁端约束"]
|
|
751
814
|
> group:边界所处边界组名
|
|
752
|
-
>
|
|
815
|
+
> extra_name:删除弹性连接或约束方程时额外标识,约束方程名或指定删除弹性连接节点类型 I/J
|
|
753
816
|
```Python
|
|
754
817
|
# 示例代码
|
|
755
818
|
from qtmodel import *
|
|
756
|
-
mdb.remove_boundary(remove_id=
|
|
819
|
+
mdb.remove_boundary(remove_id=11, bd_type="一般弹性连接",group="边界组1", extra_name="J")
|
|
820
|
+
mdb.remove_boundary(remove_id=12, bd_type="约束方程",group="边界组1", extra_name="约束方程名")
|
|
757
821
|
```
|
|
758
822
|
Returns: 无
|
|
759
823
|
### add_general_elastic_support_property
|
|
@@ -767,6 +831,28 @@ from qtmodel import *
|
|
|
767
831
|
mdb.add_general_elastic_support_property(name = "特性1", data_matrix=[i for i in range(1,22)])
|
|
768
832
|
```
|
|
769
833
|
Returns: 无
|
|
834
|
+
### update_general_elastic_support_property
|
|
835
|
+
添加一般弹性支承特性
|
|
836
|
+
> 参数:
|
|
837
|
+
> name:原一般弹性支承特性名称
|
|
838
|
+
> new_name:现一般弹性支承特性名称
|
|
839
|
+
> data_matrix:一般弹性支承刚度矩阵(数据需按列输入至列表,共计21个参数)
|
|
840
|
+
```Python
|
|
841
|
+
# 示例代码
|
|
842
|
+
from qtmodel import *
|
|
843
|
+
mdb.update_general_elastic_support_property(name = "特性1",new_name="特性2", data_matrix=[i for i in range(1,22)])
|
|
844
|
+
```
|
|
845
|
+
Returns: 无
|
|
846
|
+
### remove_general_elastic_support_property
|
|
847
|
+
添加一般弹性支承特性
|
|
848
|
+
> 参数:
|
|
849
|
+
> name:一般弹性支承特性名称
|
|
850
|
+
```Python
|
|
851
|
+
# 示例代码
|
|
852
|
+
from qtmodel import *
|
|
853
|
+
mdb.remove_general_elastic_support_property(name = "特性1")
|
|
854
|
+
```
|
|
855
|
+
Returns: 无
|
|
770
856
|
### add_general_elastic_support
|
|
771
857
|
添加一般弹性支承特性
|
|
772
858
|
> 参数:
|
|
@@ -851,20 +937,6 @@ from qtmodel import *
|
|
|
851
937
|
mdb.add_master_slave_link(master_id=1,slave_id=[2,3],boundary_info=[True,True,True,False,False,False])
|
|
852
938
|
```
|
|
853
939
|
Returns: 无
|
|
854
|
-
### add_node_axis
|
|
855
|
-
添加节点坐标
|
|
856
|
-
> 参数:
|
|
857
|
-
> input_type:输入方式 1-角度 2-三点 3-向量
|
|
858
|
-
> node_id:节点号
|
|
859
|
-
> coord_info:局部坐标信息 -List<float>(角) -List<List<float>>(三点 or 向量)
|
|
860
|
-
```Python
|
|
861
|
-
# 示例代码
|
|
862
|
-
from qtmodel import *
|
|
863
|
-
mdb.add_node_axis(input_type=1,node_id=1,coord_info=[45,45,45])
|
|
864
|
-
mdb.add_node_axis(input_type=2,node_id=1,coord_info=[[0,0,1],[0,1,0],[1,0,0]])
|
|
865
|
-
mdb.add_node_axis(input_type=3,node_id=1,coord_info=[[0,0,1],[0,1,0]])
|
|
866
|
-
```
|
|
867
|
-
Returns: 无
|
|
868
940
|
### add_beam_constraint
|
|
869
941
|
添加梁端约束
|
|
870
942
|
> 参数:
|
|
@@ -892,6 +964,45 @@ from qtmodel import *
|
|
|
892
964
|
mdb.add_beam_constraint(beam_id=2,info_i=[True,True,True,False,False,False],info_j=[True,True,True,False,False,False])
|
|
893
965
|
```
|
|
894
966
|
Returns: 无
|
|
967
|
+
### add_node_axis
|
|
968
|
+
添加节点坐标
|
|
969
|
+
> 参数:
|
|
970
|
+
> node_id:节点号
|
|
971
|
+
> input_type:输入方式 1-角度 2-三点 3-向量
|
|
972
|
+
> coord_info:局部坐标信息 -List<float>(角) -List<List<float>>(三点 or 向量)
|
|
973
|
+
```Python
|
|
974
|
+
# 示例代码
|
|
975
|
+
from qtmodel import *
|
|
976
|
+
mdb.add_node_axis(input_type=1,node_id=1,coord_info=[45,45,45])
|
|
977
|
+
mdb.add_node_axis(input_type=2,node_id=1,coord_info=[[0,0,1],[0,1,0],[1,0,0]])
|
|
978
|
+
mdb.add_node_axis(input_type=3,node_id=1,coord_info=[[0,0,1],[0,1,0]])
|
|
979
|
+
```
|
|
980
|
+
Returns: 无
|
|
981
|
+
### update_node_axis
|
|
982
|
+
添加节点坐标
|
|
983
|
+
> 参数:
|
|
984
|
+
> node_id:节点号
|
|
985
|
+
> new_id:新节点号
|
|
986
|
+
> input_type:输入方式 1-角度 2-三点 3-向量
|
|
987
|
+
> coord_info:局部坐标信息 -List<float>(角) -List<List<float>>(三点 or 向量)
|
|
988
|
+
```Python
|
|
989
|
+
# 示例代码
|
|
990
|
+
from qtmodel import *
|
|
991
|
+
mdb.update_node_axis(node_id=1,new_id=1,input_type=1,coord_info=[45,45,45])
|
|
992
|
+
mdb.update_node_axis(node_id=2,new_id=2,input_type=2,coord_info=[[0,0,1],[0,1,0],[1,0,0]])
|
|
993
|
+
mdb.update_node_axis(node_id=3,new_id=3,input_type=3,coord_info=[[0,0,1],[0,1,0]])
|
|
994
|
+
```
|
|
995
|
+
Returns: 无
|
|
996
|
+
### remove_node_axis
|
|
997
|
+
添加节点坐标
|
|
998
|
+
> 参数:
|
|
999
|
+
> node_id:节点号
|
|
1000
|
+
```Python
|
|
1001
|
+
# 示例代码
|
|
1002
|
+
from qtmodel import *
|
|
1003
|
+
mdb.remove_node_axis(node_id=1)
|
|
1004
|
+
```
|
|
1005
|
+
Returns: 无
|
|
895
1006
|
## 移动荷载操作
|
|
896
1007
|
### add_standard_vehicle
|
|
897
1008
|
添加标准车辆
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# 最新版本 V0.5.
|
|
1
|
+
# 最新版本 V0.5.53 - 2024-12-28
|
|
2
2
|
> pip install --upgrade qtmodel -i https://pypi.org/simple
|
|
3
|
-
-
|
|
3
|
+
- 增加边界更新接口
|
|
4
4
|
## 项目管理
|
|
5
5
|
### update_bim
|
|
6
6
|
刷新Bim模型信息
|
|
@@ -268,14 +268,15 @@ Returns: 无
|
|
|
268
268
|
### update_node
|
|
269
269
|
根据节点号修改节点坐标
|
|
270
270
|
> 参数:
|
|
271
|
-
> node_id:
|
|
271
|
+
> node_id: 旧节点编号
|
|
272
|
+
> new_id: 新节点编号,默认为-1时不改变节点编号
|
|
272
273
|
> x: 更新后x坐标
|
|
273
274
|
> y: 更新后y坐标
|
|
274
275
|
> z: 更新后z坐标
|
|
275
276
|
```Python
|
|
276
277
|
# 示例代码
|
|
277
278
|
from qtmodel import *
|
|
278
|
-
mdb.update_node(node_id=1,x=2,y=2,z=2)
|
|
279
|
+
mdb.update_node(node_id=1,new_id=2,x=2,y=2,z=2)
|
|
279
280
|
```
|
|
280
281
|
Returns: 无
|
|
281
282
|
### update_node_id
|
|
@@ -384,6 +385,27 @@ mdb.add_structure_to_group(name="现有结构组1",node_ids=[1,2,3,4],element_id
|
|
|
384
385
|
```
|
|
385
386
|
Returns: 无
|
|
386
387
|
## 单元操作
|
|
388
|
+
### update_local_orientation
|
|
389
|
+
反转杆系单元局部方向
|
|
390
|
+
> 参数:
|
|
391
|
+
> ele_id: 杆系单元编号
|
|
392
|
+
```Python
|
|
393
|
+
# 示例代码
|
|
394
|
+
from qtmodel import *
|
|
395
|
+
mdb.update_local_orientation(1)
|
|
396
|
+
```
|
|
397
|
+
Returns: 无
|
|
398
|
+
### update_element_id
|
|
399
|
+
更改单元编号
|
|
400
|
+
> 参数:
|
|
401
|
+
> old_id: 单元编号
|
|
402
|
+
> new_id: 新单元编号
|
|
403
|
+
```Python
|
|
404
|
+
# 示例代码
|
|
405
|
+
from qtmodel import *
|
|
406
|
+
mdb.update_element_id(1,2)
|
|
407
|
+
```
|
|
408
|
+
Returns: 无
|
|
387
409
|
### add_element
|
|
388
410
|
根据单元编号和单元类型添加单元
|
|
389
411
|
> 参数:
|
|
@@ -393,14 +415,34 @@ Returns: 无
|
|
|
393
415
|
> beta_angle:贝塔角
|
|
394
416
|
> mat_id:材料编号
|
|
395
417
|
> sec_id:截面编号
|
|
396
|
-
> initial_type:索单元初始参数类型
|
|
418
|
+
> initial_type:索单元初始参数类型 1-初始拉力 2-初始水平力 3-无应力长度
|
|
397
419
|
> initial_value:索单元初始始参数值
|
|
420
|
+
> plate_type:板单元类型 0-薄板 1-厚板
|
|
398
421
|
```Python
|
|
399
422
|
# 示例代码
|
|
400
423
|
from qtmodel import *
|
|
401
424
|
mdb.add_element(index=1,ele_type=1,node_ids=[1,2],beta_angle=1,mat_id=1,sec_id=1)
|
|
402
425
|
```
|
|
403
426
|
Returns: 无
|
|
427
|
+
### update_element
|
|
428
|
+
根据单元编号和单元类型添加单元
|
|
429
|
+
> 参数:
|
|
430
|
+
> old_id:原单元编号
|
|
431
|
+
> new_id:现单元编号,默认不修改原单元Id
|
|
432
|
+
> ele_type:单元类型 1-梁 2-杆 3-索 4-板
|
|
433
|
+
> node_ids:单元对应的节点列表 [i,j] 或 [i,j,k,l]
|
|
434
|
+
> beta_angle:贝塔角
|
|
435
|
+
> mat_id:材料编号
|
|
436
|
+
> sec_id:截面编号
|
|
437
|
+
> initial_type:索单元初始参数类型 1-初始拉力 2-初始水平力 3-无应力长度
|
|
438
|
+
> initial_value:索单元初始始参数值
|
|
439
|
+
> plate_type:板单元类型 0-薄板 1-厚板
|
|
440
|
+
```Python
|
|
441
|
+
# 示例代码
|
|
442
|
+
from qtmodel import *
|
|
443
|
+
mdb.update_element(old_id=1,ele_type=1,node_ids=[1,2],beta_angle=1,mat_id=1,sec_id=1)
|
|
444
|
+
```
|
|
445
|
+
Returns: 无
|
|
404
446
|
### add_elements
|
|
405
447
|
根据单元编号和单元类型添加单元
|
|
406
448
|
> 参数:
|
|
@@ -418,6 +460,16 @@ mdb.add_elements(ele_data=[
|
|
|
418
460
|
[4,4,1,1,0,1,2,3,4]])
|
|
419
461
|
```
|
|
420
462
|
Returns: 无
|
|
463
|
+
### update_element_local_orientation
|
|
464
|
+
更新指定单元的单元局部坐标系
|
|
465
|
+
> 参数:
|
|
466
|
+
> index: 单元编号
|
|
467
|
+
```Python
|
|
468
|
+
# 示例代码
|
|
469
|
+
from qtmodel import *
|
|
470
|
+
mdb.update_element_local_orientation(index=1)
|
|
471
|
+
```
|
|
472
|
+
Returns: 无
|
|
421
473
|
### update_element_material
|
|
422
474
|
更新指定单元的材料号
|
|
423
475
|
> 参数:
|
|
@@ -478,7 +530,7 @@ Returns: 无
|
|
|
478
530
|
### add_material
|
|
479
531
|
添加材料
|
|
480
532
|
> 参数:
|
|
481
|
-
> index
|
|
533
|
+
> index:材料编号,默认为最大Id+1
|
|
482
534
|
> name:材料名称
|
|
483
535
|
> mat_type: 材料类型,1-混凝土 2-钢材 3-预应力 4-钢筋 5-自定义 6-组合材料
|
|
484
536
|
> standard:规范序号,参考UI 默认从1开始
|
|
@@ -709,6 +761,17 @@ from qtmodel import *
|
|
|
709
761
|
mdb.add_boundary_group(name="边界组1")
|
|
710
762
|
```
|
|
711
763
|
Returns: 无
|
|
764
|
+
### update_boundary_group
|
|
765
|
+
更改边界组名
|
|
766
|
+
> 参数:
|
|
767
|
+
> name:边界组名
|
|
768
|
+
> new_name:新边界组名
|
|
769
|
+
```Python
|
|
770
|
+
# 示例代码
|
|
771
|
+
from qtmodel import *
|
|
772
|
+
mdb.update_boundary_group("旧边界组","新边界组")
|
|
773
|
+
```
|
|
774
|
+
Returns: 无
|
|
712
775
|
### remove_boundary_group
|
|
713
776
|
按照名称删除边界组
|
|
714
777
|
> 参数:
|
|
@@ -730,16 +793,17 @@ mdb.remove_all_boundary()
|
|
|
730
793
|
```
|
|
731
794
|
Returns: 无
|
|
732
795
|
### remove_boundary
|
|
733
|
-
|
|
796
|
+
根据节点号删除一般支撑、弹性支承/根据弹性连接I或J端(需指定)节点号删除弹性连接/根据单元号删除梁端约束/根据从节点号和约束方程名删除约束方程/根据从节点号删除主从约束
|
|
734
797
|
> 参数:
|
|
735
798
|
> remove_id:节点号 or 单元号 or 从节点号
|
|
736
|
-
> bd_type:边界类型 ["一般支承", "弹性支承","一般弹性支承", "主从约束", "
|
|
799
|
+
> bd_type:边界类型 ["一般支承", "弹性支承","一般弹性支承", "主从约束", "一般/受拉/受压/刚性弹性连接", "约束方程", "梁端约束"]
|
|
737
800
|
> group:边界所处边界组名
|
|
738
|
-
>
|
|
801
|
+
> extra_name:删除弹性连接或约束方程时额外标识,约束方程名或指定删除弹性连接节点类型 I/J
|
|
739
802
|
```Python
|
|
740
803
|
# 示例代码
|
|
741
804
|
from qtmodel import *
|
|
742
|
-
mdb.remove_boundary(remove_id=
|
|
805
|
+
mdb.remove_boundary(remove_id=11, bd_type="一般弹性连接",group="边界组1", extra_name="J")
|
|
806
|
+
mdb.remove_boundary(remove_id=12, bd_type="约束方程",group="边界组1", extra_name="约束方程名")
|
|
743
807
|
```
|
|
744
808
|
Returns: 无
|
|
745
809
|
### add_general_elastic_support_property
|
|
@@ -753,6 +817,28 @@ from qtmodel import *
|
|
|
753
817
|
mdb.add_general_elastic_support_property(name = "特性1", data_matrix=[i for i in range(1,22)])
|
|
754
818
|
```
|
|
755
819
|
Returns: 无
|
|
820
|
+
### update_general_elastic_support_property
|
|
821
|
+
添加一般弹性支承特性
|
|
822
|
+
> 参数:
|
|
823
|
+
> name:原一般弹性支承特性名称
|
|
824
|
+
> new_name:现一般弹性支承特性名称
|
|
825
|
+
> data_matrix:一般弹性支承刚度矩阵(数据需按列输入至列表,共计21个参数)
|
|
826
|
+
```Python
|
|
827
|
+
# 示例代码
|
|
828
|
+
from qtmodel import *
|
|
829
|
+
mdb.update_general_elastic_support_property(name = "特性1",new_name="特性2", data_matrix=[i for i in range(1,22)])
|
|
830
|
+
```
|
|
831
|
+
Returns: 无
|
|
832
|
+
### remove_general_elastic_support_property
|
|
833
|
+
添加一般弹性支承特性
|
|
834
|
+
> 参数:
|
|
835
|
+
> name:一般弹性支承特性名称
|
|
836
|
+
```Python
|
|
837
|
+
# 示例代码
|
|
838
|
+
from qtmodel import *
|
|
839
|
+
mdb.remove_general_elastic_support_property(name = "特性1")
|
|
840
|
+
```
|
|
841
|
+
Returns: 无
|
|
756
842
|
### add_general_elastic_support
|
|
757
843
|
添加一般弹性支承特性
|
|
758
844
|
> 参数:
|
|
@@ -837,20 +923,6 @@ from qtmodel import *
|
|
|
837
923
|
mdb.add_master_slave_link(master_id=1,slave_id=[2,3],boundary_info=[True,True,True,False,False,False])
|
|
838
924
|
```
|
|
839
925
|
Returns: 无
|
|
840
|
-
### add_node_axis
|
|
841
|
-
添加节点坐标
|
|
842
|
-
> 参数:
|
|
843
|
-
> input_type:输入方式 1-角度 2-三点 3-向量
|
|
844
|
-
> node_id:节点号
|
|
845
|
-
> coord_info:局部坐标信息 -List<float>(角) -List<List<float>>(三点 or 向量)
|
|
846
|
-
```Python
|
|
847
|
-
# 示例代码
|
|
848
|
-
from qtmodel import *
|
|
849
|
-
mdb.add_node_axis(input_type=1,node_id=1,coord_info=[45,45,45])
|
|
850
|
-
mdb.add_node_axis(input_type=2,node_id=1,coord_info=[[0,0,1],[0,1,0],[1,0,0]])
|
|
851
|
-
mdb.add_node_axis(input_type=3,node_id=1,coord_info=[[0,0,1],[0,1,0]])
|
|
852
|
-
```
|
|
853
|
-
Returns: 无
|
|
854
926
|
### add_beam_constraint
|
|
855
927
|
添加梁端约束
|
|
856
928
|
> 参数:
|
|
@@ -878,6 +950,45 @@ from qtmodel import *
|
|
|
878
950
|
mdb.add_beam_constraint(beam_id=2,info_i=[True,True,True,False,False,False],info_j=[True,True,True,False,False,False])
|
|
879
951
|
```
|
|
880
952
|
Returns: 无
|
|
953
|
+
### add_node_axis
|
|
954
|
+
添加节点坐标
|
|
955
|
+
> 参数:
|
|
956
|
+
> node_id:节点号
|
|
957
|
+
> input_type:输入方式 1-角度 2-三点 3-向量
|
|
958
|
+
> coord_info:局部坐标信息 -List<float>(角) -List<List<float>>(三点 or 向量)
|
|
959
|
+
```Python
|
|
960
|
+
# 示例代码
|
|
961
|
+
from qtmodel import *
|
|
962
|
+
mdb.add_node_axis(input_type=1,node_id=1,coord_info=[45,45,45])
|
|
963
|
+
mdb.add_node_axis(input_type=2,node_id=1,coord_info=[[0,0,1],[0,1,0],[1,0,0]])
|
|
964
|
+
mdb.add_node_axis(input_type=3,node_id=1,coord_info=[[0,0,1],[0,1,0]])
|
|
965
|
+
```
|
|
966
|
+
Returns: 无
|
|
967
|
+
### update_node_axis
|
|
968
|
+
添加节点坐标
|
|
969
|
+
> 参数:
|
|
970
|
+
> node_id:节点号
|
|
971
|
+
> new_id:新节点号
|
|
972
|
+
> input_type:输入方式 1-角度 2-三点 3-向量
|
|
973
|
+
> coord_info:局部坐标信息 -List<float>(角) -List<List<float>>(三点 or 向量)
|
|
974
|
+
```Python
|
|
975
|
+
# 示例代码
|
|
976
|
+
from qtmodel import *
|
|
977
|
+
mdb.update_node_axis(node_id=1,new_id=1,input_type=1,coord_info=[45,45,45])
|
|
978
|
+
mdb.update_node_axis(node_id=2,new_id=2,input_type=2,coord_info=[[0,0,1],[0,1,0],[1,0,0]])
|
|
979
|
+
mdb.update_node_axis(node_id=3,new_id=3,input_type=3,coord_info=[[0,0,1],[0,1,0]])
|
|
980
|
+
```
|
|
981
|
+
Returns: 无
|
|
982
|
+
### remove_node_axis
|
|
983
|
+
添加节点坐标
|
|
984
|
+
> 参数:
|
|
985
|
+
> node_id:节点号
|
|
986
|
+
```Python
|
|
987
|
+
# 示例代码
|
|
988
|
+
from qtmodel import *
|
|
989
|
+
mdb.remove_node_axis(node_id=1)
|
|
990
|
+
```
|
|
991
|
+
Returns: 无
|
|
881
992
|
## 移动荷载操作
|
|
882
993
|
### add_standard_vehicle
|
|
883
994
|
添加标准车辆
|
|
@@ -419,20 +419,21 @@ class Mdb:
|
|
|
419
419
|
raise Exception(ex)
|
|
420
420
|
|
|
421
421
|
@staticmethod
|
|
422
|
-
def update_node(node_id: int, x: float = 1, y: float = 1, z: float = 1):
|
|
422
|
+
def update_node(node_id: int, new_id: int = -1, x: float = 1, y: float = 1, z: float = 1):
|
|
423
423
|
"""
|
|
424
424
|
根据节点号修改节点坐标
|
|
425
425
|
Args:
|
|
426
|
-
node_id:
|
|
426
|
+
node_id: 旧节点编号
|
|
427
|
+
new_id: 新节点编号,默认为-1时不改变节点编号
|
|
427
428
|
x: 更新后x坐标
|
|
428
429
|
y: 更新后y坐标
|
|
429
430
|
z: 更新后z坐标
|
|
430
431
|
Example:
|
|
431
|
-
mdb.update_node(node_id=1,x=2,y=2,z=2)
|
|
432
|
+
mdb.update_node(node_id=1,new_id=2,x=2,y=2,z=2)
|
|
432
433
|
Returns: 无
|
|
433
434
|
"""
|
|
434
435
|
try:
|
|
435
|
-
qt_model.UpdateNode(
|
|
436
|
+
qt_model.UpdateNode(oldId=node_id, newId=new_id, x=x, y=y, z=z)
|
|
436
437
|
except Exception as ex:
|
|
437
438
|
raise Exception(ex)
|
|
438
439
|
|
|
@@ -611,9 +612,40 @@ class Mdb:
|
|
|
611
612
|
# endregion
|
|
612
613
|
|
|
613
614
|
# region 单元操作
|
|
615
|
+
@staticmethod
|
|
616
|
+
def update_local_orientation(ele_id: int):
|
|
617
|
+
"""
|
|
618
|
+
反转杆系单元局部方向
|
|
619
|
+
Args:
|
|
620
|
+
ele_id: 杆系单元编号
|
|
621
|
+
Example:
|
|
622
|
+
mdb.update_local_orientation(1)
|
|
623
|
+
Returns: 无
|
|
624
|
+
"""
|
|
625
|
+
try:
|
|
626
|
+
qt_model.UpdateLocalOrientation(elementId=ele_id)
|
|
627
|
+
except Exception as ex:
|
|
628
|
+
raise Exception(ex)
|
|
629
|
+
|
|
630
|
+
@staticmethod
|
|
631
|
+
def update_element_id(old_id: int, new_id: int):
|
|
632
|
+
"""
|
|
633
|
+
更改单元编号
|
|
634
|
+
Args:
|
|
635
|
+
old_id: 单元编号
|
|
636
|
+
new_id: 新单元编号
|
|
637
|
+
Example:
|
|
638
|
+
mdb.update_element_id(1,2)
|
|
639
|
+
Returns: 无
|
|
640
|
+
"""
|
|
641
|
+
try:
|
|
642
|
+
qt_model.UpdateElementId(oldId=old_id, newId=new_id)
|
|
643
|
+
except Exception as ex:
|
|
644
|
+
raise Exception(ex)
|
|
645
|
+
|
|
614
646
|
@staticmethod
|
|
615
647
|
def add_element(index: int = 1, ele_type: int = 1, node_ids: list[int] = None, beta_angle: float = 0,
|
|
616
|
-
mat_id: int = -1, sec_id: int = -1, initial_type: int = 1, initial_value: float = 0):
|
|
648
|
+
mat_id: int = -1, sec_id: int = -1, initial_type: int = 1, initial_value: float = 0, plate_type: int = 0):
|
|
617
649
|
"""
|
|
618
650
|
根据单元编号和单元类型添加单元
|
|
619
651
|
Args:
|
|
@@ -623,8 +655,9 @@ class Mdb:
|
|
|
623
655
|
beta_angle:贝塔角
|
|
624
656
|
mat_id:材料编号
|
|
625
657
|
sec_id:截面编号
|
|
626
|
-
initial_type:索单元初始参数类型
|
|
658
|
+
initial_type:索单元初始参数类型 1-初始拉力 2-初始水平力 3-无应力长度
|
|
627
659
|
initial_value:索单元初始始参数值
|
|
660
|
+
plate_type:板单元类型 0-薄板 1-厚板
|
|
628
661
|
Example:
|
|
629
662
|
mdb.add_element(index=1,ele_type=1,node_ids=[1,2],beta_angle=1,mat_id=1,sec_id=1)
|
|
630
663
|
Returns: 无
|
|
@@ -643,9 +676,37 @@ class Mdb:
|
|
|
643
676
|
initialType=initial_type, initialValue=initial_value)
|
|
644
677
|
else:
|
|
645
678
|
qt_model.AddPlate(id=index, idI=node_ids[0], idJ=node_ids[1], idK=node_ids[2], idL=node_ids[3], betaAngle=beta_angle,
|
|
646
|
-
materialId=mat_id,
|
|
647
|
-
|
|
679
|
+
materialId=mat_id, sectionId=sec_id, type=plate_type)
|
|
680
|
+
except Exception as ex:
|
|
681
|
+
raise Exception(ex)
|
|
648
682
|
|
|
683
|
+
@staticmethod
|
|
684
|
+
def update_element(old_id: int, new_id: int = -1, ele_type: int = 1, node_ids: list[int] = None, beta_angle: float = 0,
|
|
685
|
+
mat_id: int = -1, sec_id: int = -1, initial_type: int = 1, initial_value: float = 0, plate_type: int = 0):
|
|
686
|
+
"""
|
|
687
|
+
根据单元编号和单元类型添加单元
|
|
688
|
+
Args:
|
|
689
|
+
old_id:原单元编号
|
|
690
|
+
new_id:现单元编号,默认不修改原单元Id
|
|
691
|
+
ele_type:单元类型 1-梁 2-杆 3-索 4-板
|
|
692
|
+
node_ids:单元对应的节点列表 [i,j] 或 [i,j,k,l]
|
|
693
|
+
beta_angle:贝塔角
|
|
694
|
+
mat_id:材料编号
|
|
695
|
+
sec_id:截面编号
|
|
696
|
+
initial_type:索单元初始参数类型 1-初始拉力 2-初始水平力 3-无应力长度
|
|
697
|
+
initial_value:索单元初始始参数值
|
|
698
|
+
plate_type:板单元类型 0-薄板 1-厚板
|
|
699
|
+
Example:
|
|
700
|
+
mdb.update_element(old_id=1,ele_type=1,node_ids=[1,2],beta_angle=1,mat_id=1,sec_id=1)
|
|
701
|
+
Returns: 无
|
|
702
|
+
"""
|
|
703
|
+
try:
|
|
704
|
+
if node_ids is None and ele_type != 4:
|
|
705
|
+
raise Exception("操作错误,请输入此单元所需节点列表,[i,j]")
|
|
706
|
+
if node_ids is None and ele_type == 4:
|
|
707
|
+
raise Exception("操作错误,请输入此板单元所需节点列表,[i,j,k,l]")
|
|
708
|
+
qt_model.UpdateElement(oldId=old_id, newId=new_id, nodeIds=node_ids, betaAngle=beta_angle, initialType=initial_type,
|
|
709
|
+
initialValue=initial_value, materialId=mat_id, sectionId=sec_id, type=plate_type)
|
|
649
710
|
except Exception as ex:
|
|
650
711
|
raise Exception(ex)
|
|
651
712
|
|
|
@@ -673,7 +734,22 @@ class Mdb:
|
|
|
673
734
|
raise Exception(ex)
|
|
674
735
|
|
|
675
736
|
@staticmethod
|
|
676
|
-
def
|
|
737
|
+
def update_element_local_orientation(index: Union[int, List[int]]):
|
|
738
|
+
"""
|
|
739
|
+
更新指定单元的单元局部坐标系
|
|
740
|
+
Args:
|
|
741
|
+
index: 单元编号
|
|
742
|
+
Example:
|
|
743
|
+
mdb.update_element_local_orientation(index=1)
|
|
744
|
+
Returns: 无
|
|
745
|
+
"""
|
|
746
|
+
try:
|
|
747
|
+
qt_model.UpdateElementLocalOrientation(elementId=index)
|
|
748
|
+
except Exception as ex:
|
|
749
|
+
raise Exception(ex)
|
|
750
|
+
|
|
751
|
+
@staticmethod
|
|
752
|
+
def update_element_material(index: Union[int, List[int]], mat_id: int):
|
|
677
753
|
"""
|
|
678
754
|
更新指定单元的材料号
|
|
679
755
|
Args:
|
|
@@ -689,7 +765,7 @@ class Mdb:
|
|
|
689
765
|
raise Exception(ex)
|
|
690
766
|
|
|
691
767
|
@staticmethod
|
|
692
|
-
def update_element_beta_angle(index: int, beta_angle: float):
|
|
768
|
+
def update_element_beta_angle(index: Union[int, List[int]], beta_angle: float):
|
|
693
769
|
"""
|
|
694
770
|
更新指定单元的贝塔角
|
|
695
771
|
Args:
|
|
@@ -705,7 +781,7 @@ class Mdb:
|
|
|
705
781
|
raise Exception(ex)
|
|
706
782
|
|
|
707
783
|
@staticmethod
|
|
708
|
-
def update_element_section(index: int, sec_id: int):
|
|
784
|
+
def update_element_section(index: Union[int, List[int]], sec_id: int):
|
|
709
785
|
"""
|
|
710
786
|
更新杆系单元截面或板单元板厚
|
|
711
787
|
Args:
|
|
@@ -716,7 +792,7 @@ class Mdb:
|
|
|
716
792
|
Returns: 无
|
|
717
793
|
"""
|
|
718
794
|
try:
|
|
719
|
-
if qt_model.
|
|
795
|
+
if qt_model.GetElemntType(index) == "PLATE":
|
|
720
796
|
qt_model.UpdatePlateThickness(elementId=index, thicknessId=sec_id)
|
|
721
797
|
else:
|
|
722
798
|
qt_model.UpdateFrameSection(elementId=index, sectionId=sec_id)
|
|
@@ -741,7 +817,7 @@ class Mdb:
|
|
|
741
817
|
raise Exception(ex)
|
|
742
818
|
|
|
743
819
|
@staticmethod
|
|
744
|
-
def remove_element(index: int = None):
|
|
820
|
+
def remove_element(index: (Union[int, List[int]]) = None):
|
|
745
821
|
"""
|
|
746
822
|
删除指定编号的单元
|
|
747
823
|
Args:
|
|
@@ -769,7 +845,7 @@ class Mdb:
|
|
|
769
845
|
"""
|
|
770
846
|
添加材料
|
|
771
847
|
Args:
|
|
772
|
-
index
|
|
848
|
+
index:材料编号,默认为最大Id+1
|
|
773
849
|
name:材料名称
|
|
774
850
|
mat_type: 材料类型,1-混凝土 2-钢材 3-预应力 4-钢筋 5-自定义 6-组合材料
|
|
775
851
|
standard:规范序号,参考UI 默认从1开始
|
|
@@ -1187,6 +1263,22 @@ class Mdb:
|
|
|
1187
1263
|
except Exception as ex:
|
|
1188
1264
|
raise Exception(ex)
|
|
1189
1265
|
|
|
1266
|
+
@staticmethod
|
|
1267
|
+
def update_boundary_group(name: str, new_name: str):
|
|
1268
|
+
"""
|
|
1269
|
+
更改边界组名
|
|
1270
|
+
Args:
|
|
1271
|
+
name:边界组名
|
|
1272
|
+
new_name:新边界组名
|
|
1273
|
+
Example:
|
|
1274
|
+
mdb.update_boundary_group("旧边界组","新边界组")
|
|
1275
|
+
Returns: 无
|
|
1276
|
+
"""
|
|
1277
|
+
try:
|
|
1278
|
+
qt_model.UpdateBoundaryGroup(name=name, newName=new_name)
|
|
1279
|
+
except Exception as ex:
|
|
1280
|
+
raise Exception(ex)
|
|
1281
|
+
|
|
1190
1282
|
@staticmethod
|
|
1191
1283
|
def remove_boundary_group(name: str = ""):
|
|
1192
1284
|
"""
|
|
@@ -1221,20 +1313,21 @@ class Mdb:
|
|
|
1221
1313
|
raise Exception(ex)
|
|
1222
1314
|
|
|
1223
1315
|
@staticmethod
|
|
1224
|
-
def remove_boundary(remove_id: int, bd_type: str, group: str = "默认边界组",
|
|
1316
|
+
def remove_boundary(remove_id: int, bd_type: str, group: str = "默认边界组", extra_name="I"):
|
|
1225
1317
|
"""
|
|
1226
|
-
|
|
1318
|
+
根据节点号删除一般支撑、弹性支承/根据弹性连接I或J端(需指定)节点号删除弹性连接/根据单元号删除梁端约束/根据从节点号和约束方程名删除约束方程/根据从节点号删除主从约束
|
|
1227
1319
|
Args:
|
|
1228
1320
|
remove_id:节点号 or 单元号 or 从节点号
|
|
1229
|
-
bd_type:边界类型 ["一般支承", "弹性支承","一般弹性支承", "主从约束", "
|
|
1321
|
+
bd_type:边界类型 ["一般支承", "弹性支承","一般弹性支承", "主从约束", "一般/受拉/受压/刚性弹性连接", "约束方程", "梁端约束"]
|
|
1230
1322
|
group:边界所处边界组名
|
|
1231
|
-
|
|
1323
|
+
extra_name:删除弹性连接或约束方程时额外标识,约束方程名或指定删除弹性连接节点类型 I/J
|
|
1232
1324
|
Example:
|
|
1233
|
-
mdb.remove_boundary(remove_id=
|
|
1325
|
+
mdb.remove_boundary(remove_id=11, bd_type="一般弹性连接",group="边界组1", extra_name="J")
|
|
1326
|
+
mdb.remove_boundary(remove_id=12, bd_type="约束方程",group="边界组1", extra_name="约束方程名")
|
|
1234
1327
|
Returns: 无
|
|
1235
1328
|
"""
|
|
1236
1329
|
try:
|
|
1237
|
-
qt_model.RemoveBoundary(controlId=remove_id, type=bd_type, group=group,
|
|
1330
|
+
qt_model.RemoveBoundary(controlId=remove_id, type=bd_type, group=group, extraName=extra_name)
|
|
1238
1331
|
except Exception as ex:
|
|
1239
1332
|
raise Exception(ex)
|
|
1240
1333
|
|
|
@@ -1256,6 +1349,40 @@ class Mdb:
|
|
|
1256
1349
|
except Exception as ex:
|
|
1257
1350
|
raise Exception(ex)
|
|
1258
1351
|
|
|
1352
|
+
@staticmethod
|
|
1353
|
+
def update_general_elastic_support_property(name: str = "", new_name: str = "", data_matrix: list[float] = None):
|
|
1354
|
+
"""
|
|
1355
|
+
添加一般弹性支承特性
|
|
1356
|
+
Args:
|
|
1357
|
+
name:原一般弹性支承特性名称
|
|
1358
|
+
new_name:现一般弹性支承特性名称
|
|
1359
|
+
data_matrix:一般弹性支承刚度矩阵(数据需按列输入至列表,共计21个参数)
|
|
1360
|
+
Example:
|
|
1361
|
+
mdb.update_general_elastic_support_property(name = "特性1",new_name="特性2", data_matrix=[i for i in range(1,22)])
|
|
1362
|
+
Returns: 无
|
|
1363
|
+
"""
|
|
1364
|
+
if data_matrix is None or len(data_matrix) is not 21:
|
|
1365
|
+
raise Exception("添加一般弹性支承失败,矩阵参数有误(数据需按列输入至列表)")
|
|
1366
|
+
try:
|
|
1367
|
+
qt_model.UpdateGeneralElasticSupportProperty(name=name, newName=new_name, dataMatrix=data_matrix)
|
|
1368
|
+
except Exception as ex:
|
|
1369
|
+
raise Exception(ex)
|
|
1370
|
+
|
|
1371
|
+
@staticmethod
|
|
1372
|
+
def remove_general_elastic_support_property(name: str = ""):
|
|
1373
|
+
"""
|
|
1374
|
+
添加一般弹性支承特性
|
|
1375
|
+
Args:
|
|
1376
|
+
name:一般弹性支承特性名称
|
|
1377
|
+
Example:
|
|
1378
|
+
mdb.remove_general_elastic_support_property(name = "特性1")
|
|
1379
|
+
Returns: 无
|
|
1380
|
+
"""
|
|
1381
|
+
try:
|
|
1382
|
+
qt_model.RemoveGeneralElasticSupportProperty(name=name)
|
|
1383
|
+
except Exception as ex:
|
|
1384
|
+
raise Exception(ex)
|
|
1385
|
+
|
|
1259
1386
|
@staticmethod
|
|
1260
1387
|
def add_general_elastic_support(node_id: (Union[int, List[int]]) = 1, property_name: str = "", group_name: str = "默认边界组"):
|
|
1261
1388
|
"""
|
|
@@ -1315,7 +1442,7 @@ class Mdb:
|
|
|
1315
1442
|
raise Exception(ex)
|
|
1316
1443
|
|
|
1317
1444
|
@staticmethod
|
|
1318
|
-
def add_elastic_link(index
|
|
1445
|
+
def add_elastic_link(index=-1, link_type: int = 1, start_id: int = 1, end_id: int = 2, beta_angle: float = 0,
|
|
1319
1446
|
boundary_info: list[float] = None,
|
|
1320
1447
|
group_name: str = "默认边界组", dis_ratio: float = 0.5, kx: float = 0):
|
|
1321
1448
|
"""
|
|
@@ -1337,7 +1464,7 @@ class Mdb:
|
|
|
1337
1464
|
Returns: 无
|
|
1338
1465
|
"""
|
|
1339
1466
|
try:
|
|
1340
|
-
qt_model.AddElasticLink(id=
|
|
1467
|
+
qt_model.AddElasticLink(id=index, linkType=link_type, startId=start_id, endId=end_id, beta=beta_angle,
|
|
1341
1468
|
boundaryInfo=boundary_info, groupName=group_name, disRatio=dis_ratio, kDx=kx)
|
|
1342
1469
|
except Exception as ex:
|
|
1343
1470
|
raise Exception(ex)
|
|
@@ -1378,30 +1505,6 @@ class Mdb:
|
|
|
1378
1505
|
except Exception as ex:
|
|
1379
1506
|
raise Exception(ex)
|
|
1380
1507
|
|
|
1381
|
-
@staticmethod
|
|
1382
|
-
def add_node_axis(input_type: int = 1, node_id: int = 1, coord_info: list = None):
|
|
1383
|
-
"""
|
|
1384
|
-
添加节点坐标
|
|
1385
|
-
Args:
|
|
1386
|
-
input_type:输入方式 1-角度 2-三点 3-向量
|
|
1387
|
-
node_id:节点号
|
|
1388
|
-
coord_info:局部坐标信息 -List<float>(角) -List<List<float>>(三点 or 向量)
|
|
1389
|
-
Example:
|
|
1390
|
-
mdb.add_node_axis(input_type=1,node_id=1,coord_info=[45,45,45])
|
|
1391
|
-
mdb.add_node_axis(input_type=2,node_id=1,coord_info=[[0,0,1],[0,1,0],[1,0,0]])
|
|
1392
|
-
mdb.add_node_axis(input_type=3,node_id=1,coord_info=[[0,0,1],[0,1,0]])
|
|
1393
|
-
Returns: 无
|
|
1394
|
-
"""
|
|
1395
|
-
try:
|
|
1396
|
-
if coord_info is None:
|
|
1397
|
-
raise Exception("操作错误,输入坐标系信息不能为空")
|
|
1398
|
-
if input_type == 1:
|
|
1399
|
-
qt_model.AddNodalAxis(inputType=input_type, nodeId=node_id, angleInfo=coord_info)
|
|
1400
|
-
else:
|
|
1401
|
-
qt_model.AddNodalAxis(inputType=input_type, nodeId=node_id, nodeInfo=coord_info)
|
|
1402
|
-
except Exception as ex:
|
|
1403
|
-
raise Exception(ex)
|
|
1404
|
-
|
|
1405
1508
|
@staticmethod
|
|
1406
1509
|
def add_beam_constraint(beam_id: int = 2, info_i: list[bool] = None, info_j: list[bool] = None, group_name: str = "默认边界组"):
|
|
1407
1510
|
"""
|
|
@@ -1444,6 +1547,70 @@ class Mdb:
|
|
|
1444
1547
|
except Exception as ex:
|
|
1445
1548
|
raise Exception(ex)
|
|
1446
1549
|
|
|
1550
|
+
@staticmethod
|
|
1551
|
+
def add_node_axis(node_id: int = 1, input_type: int = 1, coord_info: list = None):
|
|
1552
|
+
"""
|
|
1553
|
+
添加节点坐标
|
|
1554
|
+
Args:
|
|
1555
|
+
node_id:节点号
|
|
1556
|
+
input_type:输入方式 1-角度 2-三点 3-向量
|
|
1557
|
+
coord_info:局部坐标信息 -List<float>(角) -List<List<float>>(三点 or 向量)
|
|
1558
|
+
Example:
|
|
1559
|
+
mdb.add_node_axis(input_type=1,node_id=1,coord_info=[45,45,45])
|
|
1560
|
+
mdb.add_node_axis(input_type=2,node_id=1,coord_info=[[0,0,1],[0,1,0],[1,0,0]])
|
|
1561
|
+
mdb.add_node_axis(input_type=3,node_id=1,coord_info=[[0,0,1],[0,1,0]])
|
|
1562
|
+
Returns: 无
|
|
1563
|
+
"""
|
|
1564
|
+
try:
|
|
1565
|
+
if coord_info is None:
|
|
1566
|
+
raise Exception("操作错误,输入坐标系信息不能为空")
|
|
1567
|
+
if input_type == 1:
|
|
1568
|
+
qt_model.AddNodalAxis(inputType=input_type, nodeId=node_id, angleInfo=coord_info)
|
|
1569
|
+
else:
|
|
1570
|
+
qt_model.AddNodalAxis(inputType=input_type, nodeId=node_id, nodeInfo=coord_info)
|
|
1571
|
+
except Exception as ex:
|
|
1572
|
+
raise Exception(ex)
|
|
1573
|
+
|
|
1574
|
+
@staticmethod
|
|
1575
|
+
def update_node_axis(node_id: int = 1, new_id: int = 1, input_type: int = 1, coord_info: list = None):
|
|
1576
|
+
"""
|
|
1577
|
+
添加节点坐标
|
|
1578
|
+
Args:
|
|
1579
|
+
node_id:节点号
|
|
1580
|
+
new_id:新节点号
|
|
1581
|
+
input_type:输入方式 1-角度 2-三点 3-向量
|
|
1582
|
+
coord_info:局部坐标信息 -List<float>(角) -List<List<float>>(三点 or 向量)
|
|
1583
|
+
Example:
|
|
1584
|
+
mdb.update_node_axis(node_id=1,new_id=1,input_type=1,coord_info=[45,45,45])
|
|
1585
|
+
mdb.update_node_axis(node_id=2,new_id=2,input_type=2,coord_info=[[0,0,1],[0,1,0],[1,0,0]])
|
|
1586
|
+
mdb.update_node_axis(node_id=3,new_id=3,input_type=3,coord_info=[[0,0,1],[0,1,0]])
|
|
1587
|
+
Returns: 无
|
|
1588
|
+
"""
|
|
1589
|
+
try:
|
|
1590
|
+
if coord_info is None:
|
|
1591
|
+
raise Exception("操作错误,输入坐标系信息不能为空")
|
|
1592
|
+
if input_type == 1:
|
|
1593
|
+
qt_model.UpdateNodeAxis(nodeId=node_id, newId=new_id, inputType=input_type, angleInfo=coord_info)
|
|
1594
|
+
else:
|
|
1595
|
+
qt_model.UpdateNodeAxis(nodeId=node_id, newId=new_id, inputType=input_type, nodeInfo=coord_info)
|
|
1596
|
+
except Exception as ex:
|
|
1597
|
+
raise Exception(ex)
|
|
1598
|
+
|
|
1599
|
+
@staticmethod
|
|
1600
|
+
def remove_node_axis(node_id: int = 1):
|
|
1601
|
+
"""
|
|
1602
|
+
添加节点坐标
|
|
1603
|
+
Args:
|
|
1604
|
+
node_id:节点号
|
|
1605
|
+
Example:
|
|
1606
|
+
mdb.remove_node_axis(node_id=1)
|
|
1607
|
+
Returns: 无
|
|
1608
|
+
"""
|
|
1609
|
+
try:
|
|
1610
|
+
qt_model.RemoveNodalAxis(nodeId=node_id)
|
|
1611
|
+
except Exception as ex:
|
|
1612
|
+
raise Exception(ex)
|
|
1613
|
+
|
|
1447
1614
|
# endregion
|
|
1448
1615
|
|
|
1449
1616
|
# region 移动荷载操作
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: qtmodel
|
|
3
|
-
Version: 0.5.
|
|
4
|
-
Summary: python modeling for qt 2024-12-
|
|
3
|
+
Version: 0.5.53
|
|
4
|
+
Summary: python modeling for qt 2024-12-28
|
|
5
5
|
Home-page: https://github.com/Inface0443/pyqt
|
|
6
6
|
Author: dqy-zhj
|
|
7
7
|
Author-email: 1105417715@qq.com
|
|
@@ -12,9 +12,9 @@ Classifier: Programming Language :: Python :: 3
|
|
|
12
12
|
Classifier: Operating System :: OS Independent
|
|
13
13
|
Description-Content-Type: text/markdown
|
|
14
14
|
|
|
15
|
-
# 最新版本 V0.5.
|
|
15
|
+
# 最新版本 V0.5.53 - 2024-12-28
|
|
16
16
|
> pip install --upgrade qtmodel -i https://pypi.org/simple
|
|
17
|
-
-
|
|
17
|
+
- 增加边界更新接口
|
|
18
18
|
## 项目管理
|
|
19
19
|
### update_bim
|
|
20
20
|
刷新Bim模型信息
|
|
@@ -282,14 +282,15 @@ Returns: 无
|
|
|
282
282
|
### update_node
|
|
283
283
|
根据节点号修改节点坐标
|
|
284
284
|
> 参数:
|
|
285
|
-
> node_id:
|
|
285
|
+
> node_id: 旧节点编号
|
|
286
|
+
> new_id: 新节点编号,默认为-1时不改变节点编号
|
|
286
287
|
> x: 更新后x坐标
|
|
287
288
|
> y: 更新后y坐标
|
|
288
289
|
> z: 更新后z坐标
|
|
289
290
|
```Python
|
|
290
291
|
# 示例代码
|
|
291
292
|
from qtmodel import *
|
|
292
|
-
mdb.update_node(node_id=1,x=2,y=2,z=2)
|
|
293
|
+
mdb.update_node(node_id=1,new_id=2,x=2,y=2,z=2)
|
|
293
294
|
```
|
|
294
295
|
Returns: 无
|
|
295
296
|
### update_node_id
|
|
@@ -398,6 +399,27 @@ mdb.add_structure_to_group(name="现有结构组1",node_ids=[1,2,3,4],element_id
|
|
|
398
399
|
```
|
|
399
400
|
Returns: 无
|
|
400
401
|
## 单元操作
|
|
402
|
+
### update_local_orientation
|
|
403
|
+
反转杆系单元局部方向
|
|
404
|
+
> 参数:
|
|
405
|
+
> ele_id: 杆系单元编号
|
|
406
|
+
```Python
|
|
407
|
+
# 示例代码
|
|
408
|
+
from qtmodel import *
|
|
409
|
+
mdb.update_local_orientation(1)
|
|
410
|
+
```
|
|
411
|
+
Returns: 无
|
|
412
|
+
### update_element_id
|
|
413
|
+
更改单元编号
|
|
414
|
+
> 参数:
|
|
415
|
+
> old_id: 单元编号
|
|
416
|
+
> new_id: 新单元编号
|
|
417
|
+
```Python
|
|
418
|
+
# 示例代码
|
|
419
|
+
from qtmodel import *
|
|
420
|
+
mdb.update_element_id(1,2)
|
|
421
|
+
```
|
|
422
|
+
Returns: 无
|
|
401
423
|
### add_element
|
|
402
424
|
根据单元编号和单元类型添加单元
|
|
403
425
|
> 参数:
|
|
@@ -407,14 +429,34 @@ Returns: 无
|
|
|
407
429
|
> beta_angle:贝塔角
|
|
408
430
|
> mat_id:材料编号
|
|
409
431
|
> sec_id:截面编号
|
|
410
|
-
> initial_type:索单元初始参数类型
|
|
432
|
+
> initial_type:索单元初始参数类型 1-初始拉力 2-初始水平力 3-无应力长度
|
|
411
433
|
> initial_value:索单元初始始参数值
|
|
434
|
+
> plate_type:板单元类型 0-薄板 1-厚板
|
|
412
435
|
```Python
|
|
413
436
|
# 示例代码
|
|
414
437
|
from qtmodel import *
|
|
415
438
|
mdb.add_element(index=1,ele_type=1,node_ids=[1,2],beta_angle=1,mat_id=1,sec_id=1)
|
|
416
439
|
```
|
|
417
440
|
Returns: 无
|
|
441
|
+
### update_element
|
|
442
|
+
根据单元编号和单元类型添加单元
|
|
443
|
+
> 参数:
|
|
444
|
+
> old_id:原单元编号
|
|
445
|
+
> new_id:现单元编号,默认不修改原单元Id
|
|
446
|
+
> ele_type:单元类型 1-梁 2-杆 3-索 4-板
|
|
447
|
+
> node_ids:单元对应的节点列表 [i,j] 或 [i,j,k,l]
|
|
448
|
+
> beta_angle:贝塔角
|
|
449
|
+
> mat_id:材料编号
|
|
450
|
+
> sec_id:截面编号
|
|
451
|
+
> initial_type:索单元初始参数类型 1-初始拉力 2-初始水平力 3-无应力长度
|
|
452
|
+
> initial_value:索单元初始始参数值
|
|
453
|
+
> plate_type:板单元类型 0-薄板 1-厚板
|
|
454
|
+
```Python
|
|
455
|
+
# 示例代码
|
|
456
|
+
from qtmodel import *
|
|
457
|
+
mdb.update_element(old_id=1,ele_type=1,node_ids=[1,2],beta_angle=1,mat_id=1,sec_id=1)
|
|
458
|
+
```
|
|
459
|
+
Returns: 无
|
|
418
460
|
### add_elements
|
|
419
461
|
根据单元编号和单元类型添加单元
|
|
420
462
|
> 参数:
|
|
@@ -432,6 +474,16 @@ mdb.add_elements(ele_data=[
|
|
|
432
474
|
[4,4,1,1,0,1,2,3,4]])
|
|
433
475
|
```
|
|
434
476
|
Returns: 无
|
|
477
|
+
### update_element_local_orientation
|
|
478
|
+
更新指定单元的单元局部坐标系
|
|
479
|
+
> 参数:
|
|
480
|
+
> index: 单元编号
|
|
481
|
+
```Python
|
|
482
|
+
# 示例代码
|
|
483
|
+
from qtmodel import *
|
|
484
|
+
mdb.update_element_local_orientation(index=1)
|
|
485
|
+
```
|
|
486
|
+
Returns: 无
|
|
435
487
|
### update_element_material
|
|
436
488
|
更新指定单元的材料号
|
|
437
489
|
> 参数:
|
|
@@ -492,7 +544,7 @@ Returns: 无
|
|
|
492
544
|
### add_material
|
|
493
545
|
添加材料
|
|
494
546
|
> 参数:
|
|
495
|
-
> index
|
|
547
|
+
> index:材料编号,默认为最大Id+1
|
|
496
548
|
> name:材料名称
|
|
497
549
|
> mat_type: 材料类型,1-混凝土 2-钢材 3-预应力 4-钢筋 5-自定义 6-组合材料
|
|
498
550
|
> standard:规范序号,参考UI 默认从1开始
|
|
@@ -723,6 +775,17 @@ from qtmodel import *
|
|
|
723
775
|
mdb.add_boundary_group(name="边界组1")
|
|
724
776
|
```
|
|
725
777
|
Returns: 无
|
|
778
|
+
### update_boundary_group
|
|
779
|
+
更改边界组名
|
|
780
|
+
> 参数:
|
|
781
|
+
> name:边界组名
|
|
782
|
+
> new_name:新边界组名
|
|
783
|
+
```Python
|
|
784
|
+
# 示例代码
|
|
785
|
+
from qtmodel import *
|
|
786
|
+
mdb.update_boundary_group("旧边界组","新边界组")
|
|
787
|
+
```
|
|
788
|
+
Returns: 无
|
|
726
789
|
### remove_boundary_group
|
|
727
790
|
按照名称删除边界组
|
|
728
791
|
> 参数:
|
|
@@ -744,16 +807,17 @@ mdb.remove_all_boundary()
|
|
|
744
807
|
```
|
|
745
808
|
Returns: 无
|
|
746
809
|
### remove_boundary
|
|
747
|
-
|
|
810
|
+
根据节点号删除一般支撑、弹性支承/根据弹性连接I或J端(需指定)节点号删除弹性连接/根据单元号删除梁端约束/根据从节点号和约束方程名删除约束方程/根据从节点号删除主从约束
|
|
748
811
|
> 参数:
|
|
749
812
|
> remove_id:节点号 or 单元号 or 从节点号
|
|
750
|
-
> bd_type:边界类型 ["一般支承", "弹性支承","一般弹性支承", "主从约束", "
|
|
813
|
+
> bd_type:边界类型 ["一般支承", "弹性支承","一般弹性支承", "主从约束", "一般/受拉/受压/刚性弹性连接", "约束方程", "梁端约束"]
|
|
751
814
|
> group:边界所处边界组名
|
|
752
|
-
>
|
|
815
|
+
> extra_name:删除弹性连接或约束方程时额外标识,约束方程名或指定删除弹性连接节点类型 I/J
|
|
753
816
|
```Python
|
|
754
817
|
# 示例代码
|
|
755
818
|
from qtmodel import *
|
|
756
|
-
mdb.remove_boundary(remove_id=
|
|
819
|
+
mdb.remove_boundary(remove_id=11, bd_type="一般弹性连接",group="边界组1", extra_name="J")
|
|
820
|
+
mdb.remove_boundary(remove_id=12, bd_type="约束方程",group="边界组1", extra_name="约束方程名")
|
|
757
821
|
```
|
|
758
822
|
Returns: 无
|
|
759
823
|
### add_general_elastic_support_property
|
|
@@ -767,6 +831,28 @@ from qtmodel import *
|
|
|
767
831
|
mdb.add_general_elastic_support_property(name = "特性1", data_matrix=[i for i in range(1,22)])
|
|
768
832
|
```
|
|
769
833
|
Returns: 无
|
|
834
|
+
### update_general_elastic_support_property
|
|
835
|
+
添加一般弹性支承特性
|
|
836
|
+
> 参数:
|
|
837
|
+
> name:原一般弹性支承特性名称
|
|
838
|
+
> new_name:现一般弹性支承特性名称
|
|
839
|
+
> data_matrix:一般弹性支承刚度矩阵(数据需按列输入至列表,共计21个参数)
|
|
840
|
+
```Python
|
|
841
|
+
# 示例代码
|
|
842
|
+
from qtmodel import *
|
|
843
|
+
mdb.update_general_elastic_support_property(name = "特性1",new_name="特性2", data_matrix=[i for i in range(1,22)])
|
|
844
|
+
```
|
|
845
|
+
Returns: 无
|
|
846
|
+
### remove_general_elastic_support_property
|
|
847
|
+
添加一般弹性支承特性
|
|
848
|
+
> 参数:
|
|
849
|
+
> name:一般弹性支承特性名称
|
|
850
|
+
```Python
|
|
851
|
+
# 示例代码
|
|
852
|
+
from qtmodel import *
|
|
853
|
+
mdb.remove_general_elastic_support_property(name = "特性1")
|
|
854
|
+
```
|
|
855
|
+
Returns: 无
|
|
770
856
|
### add_general_elastic_support
|
|
771
857
|
添加一般弹性支承特性
|
|
772
858
|
> 参数:
|
|
@@ -851,20 +937,6 @@ from qtmodel import *
|
|
|
851
937
|
mdb.add_master_slave_link(master_id=1,slave_id=[2,3],boundary_info=[True,True,True,False,False,False])
|
|
852
938
|
```
|
|
853
939
|
Returns: 无
|
|
854
|
-
### add_node_axis
|
|
855
|
-
添加节点坐标
|
|
856
|
-
> 参数:
|
|
857
|
-
> input_type:输入方式 1-角度 2-三点 3-向量
|
|
858
|
-
> node_id:节点号
|
|
859
|
-
> coord_info:局部坐标信息 -List<float>(角) -List<List<float>>(三点 or 向量)
|
|
860
|
-
```Python
|
|
861
|
-
# 示例代码
|
|
862
|
-
from qtmodel import *
|
|
863
|
-
mdb.add_node_axis(input_type=1,node_id=1,coord_info=[45,45,45])
|
|
864
|
-
mdb.add_node_axis(input_type=2,node_id=1,coord_info=[[0,0,1],[0,1,0],[1,0,0]])
|
|
865
|
-
mdb.add_node_axis(input_type=3,node_id=1,coord_info=[[0,0,1],[0,1,0]])
|
|
866
|
-
```
|
|
867
|
-
Returns: 无
|
|
868
940
|
### add_beam_constraint
|
|
869
941
|
添加梁端约束
|
|
870
942
|
> 参数:
|
|
@@ -892,6 +964,45 @@ from qtmodel import *
|
|
|
892
964
|
mdb.add_beam_constraint(beam_id=2,info_i=[True,True,True,False,False,False],info_j=[True,True,True,False,False,False])
|
|
893
965
|
```
|
|
894
966
|
Returns: 无
|
|
967
|
+
### add_node_axis
|
|
968
|
+
添加节点坐标
|
|
969
|
+
> 参数:
|
|
970
|
+
> node_id:节点号
|
|
971
|
+
> input_type:输入方式 1-角度 2-三点 3-向量
|
|
972
|
+
> coord_info:局部坐标信息 -List<float>(角) -List<List<float>>(三点 or 向量)
|
|
973
|
+
```Python
|
|
974
|
+
# 示例代码
|
|
975
|
+
from qtmodel import *
|
|
976
|
+
mdb.add_node_axis(input_type=1,node_id=1,coord_info=[45,45,45])
|
|
977
|
+
mdb.add_node_axis(input_type=2,node_id=1,coord_info=[[0,0,1],[0,1,0],[1,0,0]])
|
|
978
|
+
mdb.add_node_axis(input_type=3,node_id=1,coord_info=[[0,0,1],[0,1,0]])
|
|
979
|
+
```
|
|
980
|
+
Returns: 无
|
|
981
|
+
### update_node_axis
|
|
982
|
+
添加节点坐标
|
|
983
|
+
> 参数:
|
|
984
|
+
> node_id:节点号
|
|
985
|
+
> new_id:新节点号
|
|
986
|
+
> input_type:输入方式 1-角度 2-三点 3-向量
|
|
987
|
+
> coord_info:局部坐标信息 -List<float>(角) -List<List<float>>(三点 or 向量)
|
|
988
|
+
```Python
|
|
989
|
+
# 示例代码
|
|
990
|
+
from qtmodel import *
|
|
991
|
+
mdb.update_node_axis(node_id=1,new_id=1,input_type=1,coord_info=[45,45,45])
|
|
992
|
+
mdb.update_node_axis(node_id=2,new_id=2,input_type=2,coord_info=[[0,0,1],[0,1,0],[1,0,0]])
|
|
993
|
+
mdb.update_node_axis(node_id=3,new_id=3,input_type=3,coord_info=[[0,0,1],[0,1,0]])
|
|
994
|
+
```
|
|
995
|
+
Returns: 无
|
|
996
|
+
### remove_node_axis
|
|
997
|
+
添加节点坐标
|
|
998
|
+
> 参数:
|
|
999
|
+
> node_id:节点号
|
|
1000
|
+
```Python
|
|
1001
|
+
# 示例代码
|
|
1002
|
+
from qtmodel import *
|
|
1003
|
+
mdb.remove_node_axis(node_id=1)
|
|
1004
|
+
```
|
|
1005
|
+
Returns: 无
|
|
895
1006
|
## 移动荷载操作
|
|
896
1007
|
### add_standard_vehicle
|
|
897
1008
|
添加标准车辆
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|