qtmodel 0.5.51__tar.gz → 0.5.52__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.
- {qtmodel-0.5.51 → qtmodel-0.5.52}/PKG-INFO +84 -24
- {qtmodel-0.5.51 → qtmodel-0.5.52}/README.md +82 -22
- {qtmodel-0.5.51 → qtmodel-0.5.52}/qtmodel/qt_mdb.py +128 -36
- {qtmodel-0.5.51 → qtmodel-0.5.52}/qtmodel.egg-info/PKG-INFO +84 -24
- {qtmodel-0.5.51 → qtmodel-0.5.52}/setup.py +1 -1
- {qtmodel-0.5.51 → qtmodel-0.5.52}/qtmodel/__init__.py +0 -0
- {qtmodel-0.5.51 → qtmodel-0.5.52}/qtmodel/qt_db.py +0 -0
- {qtmodel-0.5.51 → qtmodel-0.5.52}/qtmodel/qt_odb.py +0 -0
- {qtmodel-0.5.51 → qtmodel-0.5.52}/qtmodel.egg-info/SOURCES.txt +0 -0
- {qtmodel-0.5.51 → qtmodel-0.5.52}/qtmodel.egg-info/dependency_links.txt +0 -0
- {qtmodel-0.5.51 → qtmodel-0.5.52}/qtmodel.egg-info/top_level.txt +0 -0
- {qtmodel-0.5.51 → qtmodel-0.5.52}/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.52
|
|
4
|
+
Summary: python modeling for qt 2024-12-24
|
|
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.52 - 2024-12-24
|
|
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
|
|
@@ -723,6 +724,17 @@ from qtmodel import *
|
|
|
723
724
|
mdb.add_boundary_group(name="边界组1")
|
|
724
725
|
```
|
|
725
726
|
Returns: 无
|
|
727
|
+
### update_boundary_group
|
|
728
|
+
更改边界组名
|
|
729
|
+
> 参数:
|
|
730
|
+
> name:边界组名
|
|
731
|
+
> new_name:新边界组名
|
|
732
|
+
```Python
|
|
733
|
+
# 示例代码
|
|
734
|
+
from qtmodel import *
|
|
735
|
+
mdb.update_boundary_group("旧边界组","新边界组")
|
|
736
|
+
```
|
|
737
|
+
Returns: 无
|
|
726
738
|
### remove_boundary_group
|
|
727
739
|
按照名称删除边界组
|
|
728
740
|
> 参数:
|
|
@@ -744,16 +756,17 @@ mdb.remove_all_boundary()
|
|
|
744
756
|
```
|
|
745
757
|
Returns: 无
|
|
746
758
|
### remove_boundary
|
|
747
|
-
|
|
759
|
+
根据节点号删除一般支撑、弹性支承/根据弹性连接I或J端(需指定)节点号删除弹性连接/根据单元号删除梁端约束/根据从节点号和约束方程名删除约束方程/根据从节点号删除主从约束
|
|
748
760
|
> 参数:
|
|
749
761
|
> remove_id:节点号 or 单元号 or 从节点号
|
|
750
|
-
> bd_type:边界类型 ["一般支承", "弹性支承","一般弹性支承", "主从约束", "
|
|
762
|
+
> bd_type:边界类型 ["一般支承", "弹性支承","一般弹性支承", "主从约束", "一般/受拉/受压/刚性弹性连接", "约束方程", "梁端约束"]
|
|
751
763
|
> group:边界所处边界组名
|
|
752
|
-
>
|
|
764
|
+
> extra_name:删除弹性连接或约束方程时额外标识,约束方程名或指定删除弹性连接节点类型 I/J
|
|
753
765
|
```Python
|
|
754
766
|
# 示例代码
|
|
755
767
|
from qtmodel import *
|
|
756
|
-
mdb.remove_boundary(remove_id=
|
|
768
|
+
mdb.remove_boundary(remove_id=11, bd_type="一般弹性连接",group="边界组1", extra_name="J")
|
|
769
|
+
mdb.remove_boundary(remove_id=12, bd_type="约束方程",group="边界组1", extra_name="约束方程名")
|
|
757
770
|
```
|
|
758
771
|
Returns: 无
|
|
759
772
|
### add_general_elastic_support_property
|
|
@@ -767,6 +780,28 @@ from qtmodel import *
|
|
|
767
780
|
mdb.add_general_elastic_support_property(name = "特性1", data_matrix=[i for i in range(1,22)])
|
|
768
781
|
```
|
|
769
782
|
Returns: 无
|
|
783
|
+
### update_general_elastic_support_property
|
|
784
|
+
添加一般弹性支承特性
|
|
785
|
+
> 参数:
|
|
786
|
+
> name:原一般弹性支承特性名称
|
|
787
|
+
> new_name:现一般弹性支承特性名称
|
|
788
|
+
> data_matrix:一般弹性支承刚度矩阵(数据需按列输入至列表,共计21个参数)
|
|
789
|
+
```Python
|
|
790
|
+
# 示例代码
|
|
791
|
+
from qtmodel import *
|
|
792
|
+
mdb.update_general_elastic_support_property(name = "特性1",new_name="特性2", data_matrix=[i for i in range(1,22)])
|
|
793
|
+
```
|
|
794
|
+
Returns: 无
|
|
795
|
+
### remove_general_elastic_support_property
|
|
796
|
+
添加一般弹性支承特性
|
|
797
|
+
> 参数:
|
|
798
|
+
> name:一般弹性支承特性名称
|
|
799
|
+
```Python
|
|
800
|
+
# 示例代码
|
|
801
|
+
from qtmodel import *
|
|
802
|
+
mdb.remove_general_elastic_support_property(name = "特性1")
|
|
803
|
+
```
|
|
804
|
+
Returns: 无
|
|
770
805
|
### add_general_elastic_support
|
|
771
806
|
添加一般弹性支承特性
|
|
772
807
|
> 参数:
|
|
@@ -851,20 +886,6 @@ from qtmodel import *
|
|
|
851
886
|
mdb.add_master_slave_link(master_id=1,slave_id=[2,3],boundary_info=[True,True,True,False,False,False])
|
|
852
887
|
```
|
|
853
888
|
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
889
|
### add_beam_constraint
|
|
869
890
|
添加梁端约束
|
|
870
891
|
> 参数:
|
|
@@ -892,6 +913,45 @@ from qtmodel import *
|
|
|
892
913
|
mdb.add_beam_constraint(beam_id=2,info_i=[True,True,True,False,False,False],info_j=[True,True,True,False,False,False])
|
|
893
914
|
```
|
|
894
915
|
Returns: 无
|
|
916
|
+
### add_node_axis
|
|
917
|
+
添加节点坐标
|
|
918
|
+
> 参数:
|
|
919
|
+
> node_id:节点号
|
|
920
|
+
> input_type:输入方式 1-角度 2-三点 3-向量
|
|
921
|
+
> coord_info:局部坐标信息 -List<float>(角) -List<List<float>>(三点 or 向量)
|
|
922
|
+
```Python
|
|
923
|
+
# 示例代码
|
|
924
|
+
from qtmodel import *
|
|
925
|
+
mdb.add_node_axis(input_type=1,node_id=1,coord_info=[45,45,45])
|
|
926
|
+
mdb.add_node_axis(input_type=2,node_id=1,coord_info=[[0,0,1],[0,1,0],[1,0,0]])
|
|
927
|
+
mdb.add_node_axis(input_type=3,node_id=1,coord_info=[[0,0,1],[0,1,0]])
|
|
928
|
+
```
|
|
929
|
+
Returns: 无
|
|
930
|
+
### update_node_axis
|
|
931
|
+
添加节点坐标
|
|
932
|
+
> 参数:
|
|
933
|
+
> node_id:节点号
|
|
934
|
+
> new_id:新节点号
|
|
935
|
+
> input_type:输入方式 1-角度 2-三点 3-向量
|
|
936
|
+
> coord_info:局部坐标信息 -List<float>(角) -List<List<float>>(三点 or 向量)
|
|
937
|
+
```Python
|
|
938
|
+
# 示例代码
|
|
939
|
+
from qtmodel import *
|
|
940
|
+
mdb.update_node_axis(node_id=1,new_id=1,input_type=1,coord_info=[45,45,45])
|
|
941
|
+
mdb.update_node_axis(node_id=2,new_id=2,input_type=2,coord_info=[[0,0,1],[0,1,0],[1,0,0]])
|
|
942
|
+
mdb.update_node_axis(node_id=3,new_id=3,input_type=3,coord_info=[[0,0,1],[0,1,0]])
|
|
943
|
+
```
|
|
944
|
+
Returns: 无
|
|
945
|
+
### remove_node_axis
|
|
946
|
+
添加节点坐标
|
|
947
|
+
> 参数:
|
|
948
|
+
> node_id:节点号
|
|
949
|
+
```Python
|
|
950
|
+
# 示例代码
|
|
951
|
+
from qtmodel import *
|
|
952
|
+
mdb.remove_node_axis(node_id=1)
|
|
953
|
+
```
|
|
954
|
+
Returns: 无
|
|
895
955
|
## 移动荷载操作
|
|
896
956
|
### add_standard_vehicle
|
|
897
957
|
添加标准车辆
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# 最新版本 V0.5.
|
|
1
|
+
# 最新版本 V0.5.52 - 2024-12-24
|
|
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
|
|
@@ -709,6 +710,17 @@ from qtmodel import *
|
|
|
709
710
|
mdb.add_boundary_group(name="边界组1")
|
|
710
711
|
```
|
|
711
712
|
Returns: 无
|
|
713
|
+
### update_boundary_group
|
|
714
|
+
更改边界组名
|
|
715
|
+
> 参数:
|
|
716
|
+
> name:边界组名
|
|
717
|
+
> new_name:新边界组名
|
|
718
|
+
```Python
|
|
719
|
+
# 示例代码
|
|
720
|
+
from qtmodel import *
|
|
721
|
+
mdb.update_boundary_group("旧边界组","新边界组")
|
|
722
|
+
```
|
|
723
|
+
Returns: 无
|
|
712
724
|
### remove_boundary_group
|
|
713
725
|
按照名称删除边界组
|
|
714
726
|
> 参数:
|
|
@@ -730,16 +742,17 @@ mdb.remove_all_boundary()
|
|
|
730
742
|
```
|
|
731
743
|
Returns: 无
|
|
732
744
|
### remove_boundary
|
|
733
|
-
|
|
745
|
+
根据节点号删除一般支撑、弹性支承/根据弹性连接I或J端(需指定)节点号删除弹性连接/根据单元号删除梁端约束/根据从节点号和约束方程名删除约束方程/根据从节点号删除主从约束
|
|
734
746
|
> 参数:
|
|
735
747
|
> remove_id:节点号 or 单元号 or 从节点号
|
|
736
|
-
> bd_type:边界类型 ["一般支承", "弹性支承","一般弹性支承", "主从约束", "
|
|
748
|
+
> bd_type:边界类型 ["一般支承", "弹性支承","一般弹性支承", "主从约束", "一般/受拉/受压/刚性弹性连接", "约束方程", "梁端约束"]
|
|
737
749
|
> group:边界所处边界组名
|
|
738
|
-
>
|
|
750
|
+
> extra_name:删除弹性连接或约束方程时额外标识,约束方程名或指定删除弹性连接节点类型 I/J
|
|
739
751
|
```Python
|
|
740
752
|
# 示例代码
|
|
741
753
|
from qtmodel import *
|
|
742
|
-
mdb.remove_boundary(remove_id=
|
|
754
|
+
mdb.remove_boundary(remove_id=11, bd_type="一般弹性连接",group="边界组1", extra_name="J")
|
|
755
|
+
mdb.remove_boundary(remove_id=12, bd_type="约束方程",group="边界组1", extra_name="约束方程名")
|
|
743
756
|
```
|
|
744
757
|
Returns: 无
|
|
745
758
|
### add_general_elastic_support_property
|
|
@@ -753,6 +766,28 @@ from qtmodel import *
|
|
|
753
766
|
mdb.add_general_elastic_support_property(name = "特性1", data_matrix=[i for i in range(1,22)])
|
|
754
767
|
```
|
|
755
768
|
Returns: 无
|
|
769
|
+
### update_general_elastic_support_property
|
|
770
|
+
添加一般弹性支承特性
|
|
771
|
+
> 参数:
|
|
772
|
+
> name:原一般弹性支承特性名称
|
|
773
|
+
> new_name:现一般弹性支承特性名称
|
|
774
|
+
> data_matrix:一般弹性支承刚度矩阵(数据需按列输入至列表,共计21个参数)
|
|
775
|
+
```Python
|
|
776
|
+
# 示例代码
|
|
777
|
+
from qtmodel import *
|
|
778
|
+
mdb.update_general_elastic_support_property(name = "特性1",new_name="特性2", data_matrix=[i for i in range(1,22)])
|
|
779
|
+
```
|
|
780
|
+
Returns: 无
|
|
781
|
+
### remove_general_elastic_support_property
|
|
782
|
+
添加一般弹性支承特性
|
|
783
|
+
> 参数:
|
|
784
|
+
> name:一般弹性支承特性名称
|
|
785
|
+
```Python
|
|
786
|
+
# 示例代码
|
|
787
|
+
from qtmodel import *
|
|
788
|
+
mdb.remove_general_elastic_support_property(name = "特性1")
|
|
789
|
+
```
|
|
790
|
+
Returns: 无
|
|
756
791
|
### add_general_elastic_support
|
|
757
792
|
添加一般弹性支承特性
|
|
758
793
|
> 参数:
|
|
@@ -837,20 +872,6 @@ from qtmodel import *
|
|
|
837
872
|
mdb.add_master_slave_link(master_id=1,slave_id=[2,3],boundary_info=[True,True,True,False,False,False])
|
|
838
873
|
```
|
|
839
874
|
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
875
|
### add_beam_constraint
|
|
855
876
|
添加梁端约束
|
|
856
877
|
> 参数:
|
|
@@ -878,6 +899,45 @@ from qtmodel import *
|
|
|
878
899
|
mdb.add_beam_constraint(beam_id=2,info_i=[True,True,True,False,False,False],info_j=[True,True,True,False,False,False])
|
|
879
900
|
```
|
|
880
901
|
Returns: 无
|
|
902
|
+
### add_node_axis
|
|
903
|
+
添加节点坐标
|
|
904
|
+
> 参数:
|
|
905
|
+
> node_id:节点号
|
|
906
|
+
> input_type:输入方式 1-角度 2-三点 3-向量
|
|
907
|
+
> coord_info:局部坐标信息 -List<float>(角) -List<List<float>>(三点 or 向量)
|
|
908
|
+
```Python
|
|
909
|
+
# 示例代码
|
|
910
|
+
from qtmodel import *
|
|
911
|
+
mdb.add_node_axis(input_type=1,node_id=1,coord_info=[45,45,45])
|
|
912
|
+
mdb.add_node_axis(input_type=2,node_id=1,coord_info=[[0,0,1],[0,1,0],[1,0,0]])
|
|
913
|
+
mdb.add_node_axis(input_type=3,node_id=1,coord_info=[[0,0,1],[0,1,0]])
|
|
914
|
+
```
|
|
915
|
+
Returns: 无
|
|
916
|
+
### update_node_axis
|
|
917
|
+
添加节点坐标
|
|
918
|
+
> 参数:
|
|
919
|
+
> node_id:节点号
|
|
920
|
+
> new_id:新节点号
|
|
921
|
+
> input_type:输入方式 1-角度 2-三点 3-向量
|
|
922
|
+
> coord_info:局部坐标信息 -List<float>(角) -List<List<float>>(三点 or 向量)
|
|
923
|
+
```Python
|
|
924
|
+
# 示例代码
|
|
925
|
+
from qtmodel import *
|
|
926
|
+
mdb.update_node_axis(node_id=1,new_id=1,input_type=1,coord_info=[45,45,45])
|
|
927
|
+
mdb.update_node_axis(node_id=2,new_id=2,input_type=2,coord_info=[[0,0,1],[0,1,0],[1,0,0]])
|
|
928
|
+
mdb.update_node_axis(node_id=3,new_id=3,input_type=3,coord_info=[[0,0,1],[0,1,0]])
|
|
929
|
+
```
|
|
930
|
+
Returns: 无
|
|
931
|
+
### remove_node_axis
|
|
932
|
+
添加节点坐标
|
|
933
|
+
> 参数:
|
|
934
|
+
> node_id:节点号
|
|
935
|
+
```Python
|
|
936
|
+
# 示例代码
|
|
937
|
+
from qtmodel import *
|
|
938
|
+
mdb.remove_node_axis(node_id=1)
|
|
939
|
+
```
|
|
940
|
+
Returns: 无
|
|
881
941
|
## 移动荷载操作
|
|
882
942
|
### add_standard_vehicle
|
|
883
943
|
添加标准车辆
|
|
@@ -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
|
|
|
@@ -1187,6 +1188,22 @@ class Mdb:
|
|
|
1187
1188
|
except Exception as ex:
|
|
1188
1189
|
raise Exception(ex)
|
|
1189
1190
|
|
|
1191
|
+
@staticmethod
|
|
1192
|
+
def update_boundary_group(name: str, new_name: str):
|
|
1193
|
+
"""
|
|
1194
|
+
更改边界组名
|
|
1195
|
+
Args:
|
|
1196
|
+
name:边界组名
|
|
1197
|
+
new_name:新边界组名
|
|
1198
|
+
Example:
|
|
1199
|
+
mdb.update_boundary_group("旧边界组","新边界组")
|
|
1200
|
+
Returns: 无
|
|
1201
|
+
"""
|
|
1202
|
+
try:
|
|
1203
|
+
qt_model.UpdateBoundaryGroup(name=name, newName=new_name)
|
|
1204
|
+
except Exception as ex:
|
|
1205
|
+
raise Exception(ex)
|
|
1206
|
+
|
|
1190
1207
|
@staticmethod
|
|
1191
1208
|
def remove_boundary_group(name: str = ""):
|
|
1192
1209
|
"""
|
|
@@ -1221,20 +1238,21 @@ class Mdb:
|
|
|
1221
1238
|
raise Exception(ex)
|
|
1222
1239
|
|
|
1223
1240
|
@staticmethod
|
|
1224
|
-
def remove_boundary(remove_id: int, bd_type: str, group: str = "默认边界组",
|
|
1241
|
+
def remove_boundary(remove_id: int, bd_type: str, group: str = "默认边界组", extra_name="I"):
|
|
1225
1242
|
"""
|
|
1226
|
-
|
|
1243
|
+
根据节点号删除一般支撑、弹性支承/根据弹性连接I或J端(需指定)节点号删除弹性连接/根据单元号删除梁端约束/根据从节点号和约束方程名删除约束方程/根据从节点号删除主从约束
|
|
1227
1244
|
Args:
|
|
1228
1245
|
remove_id:节点号 or 单元号 or 从节点号
|
|
1229
|
-
bd_type:边界类型 ["一般支承", "弹性支承","一般弹性支承", "主从约束", "
|
|
1246
|
+
bd_type:边界类型 ["一般支承", "弹性支承","一般弹性支承", "主从约束", "一般/受拉/受压/刚性弹性连接", "约束方程", "梁端约束"]
|
|
1230
1247
|
group:边界所处边界组名
|
|
1231
|
-
|
|
1248
|
+
extra_name:删除弹性连接或约束方程时额外标识,约束方程名或指定删除弹性连接节点类型 I/J
|
|
1232
1249
|
Example:
|
|
1233
|
-
mdb.remove_boundary(remove_id=
|
|
1250
|
+
mdb.remove_boundary(remove_id=11, bd_type="一般弹性连接",group="边界组1", extra_name="J")
|
|
1251
|
+
mdb.remove_boundary(remove_id=12, bd_type="约束方程",group="边界组1", extra_name="约束方程名")
|
|
1234
1252
|
Returns: 无
|
|
1235
1253
|
"""
|
|
1236
1254
|
try:
|
|
1237
|
-
qt_model.RemoveBoundary(controlId=remove_id, type=bd_type, group=group,
|
|
1255
|
+
qt_model.RemoveBoundary(controlId=remove_id, type=bd_type, group=group, extraName=extra_name)
|
|
1238
1256
|
except Exception as ex:
|
|
1239
1257
|
raise Exception(ex)
|
|
1240
1258
|
|
|
@@ -1256,6 +1274,40 @@ class Mdb:
|
|
|
1256
1274
|
except Exception as ex:
|
|
1257
1275
|
raise Exception(ex)
|
|
1258
1276
|
|
|
1277
|
+
@staticmethod
|
|
1278
|
+
def update_general_elastic_support_property(name: str = "", new_name: str = "", data_matrix: list[float] = None):
|
|
1279
|
+
"""
|
|
1280
|
+
添加一般弹性支承特性
|
|
1281
|
+
Args:
|
|
1282
|
+
name:原一般弹性支承特性名称
|
|
1283
|
+
new_name:现一般弹性支承特性名称
|
|
1284
|
+
data_matrix:一般弹性支承刚度矩阵(数据需按列输入至列表,共计21个参数)
|
|
1285
|
+
Example:
|
|
1286
|
+
mdb.update_general_elastic_support_property(name = "特性1",new_name="特性2", data_matrix=[i for i in range(1,22)])
|
|
1287
|
+
Returns: 无
|
|
1288
|
+
"""
|
|
1289
|
+
if data_matrix is None or len(data_matrix) is not 21:
|
|
1290
|
+
raise Exception("添加一般弹性支承失败,矩阵参数有误(数据需按列输入至列表)")
|
|
1291
|
+
try:
|
|
1292
|
+
qt_model.UpdateGeneralElasticSupportProperty(name=name, newName=new_name, dataMatrix=data_matrix)
|
|
1293
|
+
except Exception as ex:
|
|
1294
|
+
raise Exception(ex)
|
|
1295
|
+
|
|
1296
|
+
@staticmethod
|
|
1297
|
+
def remove_general_elastic_support_property(name: str = ""):
|
|
1298
|
+
"""
|
|
1299
|
+
添加一般弹性支承特性
|
|
1300
|
+
Args:
|
|
1301
|
+
name:一般弹性支承特性名称
|
|
1302
|
+
Example:
|
|
1303
|
+
mdb.remove_general_elastic_support_property(name = "特性1")
|
|
1304
|
+
Returns: 无
|
|
1305
|
+
"""
|
|
1306
|
+
try:
|
|
1307
|
+
qt_model.RemoveGeneralElasticSupportProperty(name=name)
|
|
1308
|
+
except Exception as ex:
|
|
1309
|
+
raise Exception(ex)
|
|
1310
|
+
|
|
1259
1311
|
@staticmethod
|
|
1260
1312
|
def add_general_elastic_support(node_id: (Union[int, List[int]]) = 1, property_name: str = "", group_name: str = "默认边界组"):
|
|
1261
1313
|
"""
|
|
@@ -1315,7 +1367,7 @@ class Mdb:
|
|
|
1315
1367
|
raise Exception(ex)
|
|
1316
1368
|
|
|
1317
1369
|
@staticmethod
|
|
1318
|
-
def add_elastic_link(index
|
|
1370
|
+
def add_elastic_link(index=-1, link_type: int = 1, start_id: int = 1, end_id: int = 2, beta_angle: float = 0,
|
|
1319
1371
|
boundary_info: list[float] = None,
|
|
1320
1372
|
group_name: str = "默认边界组", dis_ratio: float = 0.5, kx: float = 0):
|
|
1321
1373
|
"""
|
|
@@ -1337,7 +1389,7 @@ class Mdb:
|
|
|
1337
1389
|
Returns: 无
|
|
1338
1390
|
"""
|
|
1339
1391
|
try:
|
|
1340
|
-
qt_model.AddElasticLink(id=
|
|
1392
|
+
qt_model.AddElasticLink(id=index, linkType=link_type, startId=start_id, endId=end_id, beta=beta_angle,
|
|
1341
1393
|
boundaryInfo=boundary_info, groupName=group_name, disRatio=dis_ratio, kDx=kx)
|
|
1342
1394
|
except Exception as ex:
|
|
1343
1395
|
raise Exception(ex)
|
|
@@ -1378,30 +1430,6 @@ class Mdb:
|
|
|
1378
1430
|
except Exception as ex:
|
|
1379
1431
|
raise Exception(ex)
|
|
1380
1432
|
|
|
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
1433
|
@staticmethod
|
|
1406
1434
|
def add_beam_constraint(beam_id: int = 2, info_i: list[bool] = None, info_j: list[bool] = None, group_name: str = "默认边界组"):
|
|
1407
1435
|
"""
|
|
@@ -1444,6 +1472,70 @@ class Mdb:
|
|
|
1444
1472
|
except Exception as ex:
|
|
1445
1473
|
raise Exception(ex)
|
|
1446
1474
|
|
|
1475
|
+
@staticmethod
|
|
1476
|
+
def add_node_axis(node_id: int = 1, input_type: int = 1, coord_info: list = None):
|
|
1477
|
+
"""
|
|
1478
|
+
添加节点坐标
|
|
1479
|
+
Args:
|
|
1480
|
+
node_id:节点号
|
|
1481
|
+
input_type:输入方式 1-角度 2-三点 3-向量
|
|
1482
|
+
coord_info:局部坐标信息 -List<float>(角) -List<List<float>>(三点 or 向量)
|
|
1483
|
+
Example:
|
|
1484
|
+
mdb.add_node_axis(input_type=1,node_id=1,coord_info=[45,45,45])
|
|
1485
|
+
mdb.add_node_axis(input_type=2,node_id=1,coord_info=[[0,0,1],[0,1,0],[1,0,0]])
|
|
1486
|
+
mdb.add_node_axis(input_type=3,node_id=1,coord_info=[[0,0,1],[0,1,0]])
|
|
1487
|
+
Returns: 无
|
|
1488
|
+
"""
|
|
1489
|
+
try:
|
|
1490
|
+
if coord_info is None:
|
|
1491
|
+
raise Exception("操作错误,输入坐标系信息不能为空")
|
|
1492
|
+
if input_type == 1:
|
|
1493
|
+
qt_model.AddNodalAxis(inputType=input_type, nodeId=node_id, angleInfo=coord_info)
|
|
1494
|
+
else:
|
|
1495
|
+
qt_model.AddNodalAxis(inputType=input_type, nodeId=node_id, nodeInfo=coord_info)
|
|
1496
|
+
except Exception as ex:
|
|
1497
|
+
raise Exception(ex)
|
|
1498
|
+
|
|
1499
|
+
@staticmethod
|
|
1500
|
+
def update_node_axis(node_id: int = 1, new_id: int = 1, input_type: int = 1, coord_info: list = None):
|
|
1501
|
+
"""
|
|
1502
|
+
添加节点坐标
|
|
1503
|
+
Args:
|
|
1504
|
+
node_id:节点号
|
|
1505
|
+
new_id:新节点号
|
|
1506
|
+
input_type:输入方式 1-角度 2-三点 3-向量
|
|
1507
|
+
coord_info:局部坐标信息 -List<float>(角) -List<List<float>>(三点 or 向量)
|
|
1508
|
+
Example:
|
|
1509
|
+
mdb.update_node_axis(node_id=1,new_id=1,input_type=1,coord_info=[45,45,45])
|
|
1510
|
+
mdb.update_node_axis(node_id=2,new_id=2,input_type=2,coord_info=[[0,0,1],[0,1,0],[1,0,0]])
|
|
1511
|
+
mdb.update_node_axis(node_id=3,new_id=3,input_type=3,coord_info=[[0,0,1],[0,1,0]])
|
|
1512
|
+
Returns: 无
|
|
1513
|
+
"""
|
|
1514
|
+
try:
|
|
1515
|
+
if coord_info is None:
|
|
1516
|
+
raise Exception("操作错误,输入坐标系信息不能为空")
|
|
1517
|
+
if input_type == 1:
|
|
1518
|
+
qt_model.UpdateNodeAxis(nodeId=node_id, newId=new_id, inputType=input_type, angleInfo=coord_info)
|
|
1519
|
+
else:
|
|
1520
|
+
qt_model.UpdateNodeAxis(nodeId=node_id, newId=new_id, inputType=input_type, nodeInfo=coord_info)
|
|
1521
|
+
except Exception as ex:
|
|
1522
|
+
raise Exception(ex)
|
|
1523
|
+
|
|
1524
|
+
@staticmethod
|
|
1525
|
+
def remove_node_axis(node_id: int = 1):
|
|
1526
|
+
"""
|
|
1527
|
+
添加节点坐标
|
|
1528
|
+
Args:
|
|
1529
|
+
node_id:节点号
|
|
1530
|
+
Example:
|
|
1531
|
+
mdb.remove_node_axis(node_id=1)
|
|
1532
|
+
Returns: 无
|
|
1533
|
+
"""
|
|
1534
|
+
try:
|
|
1535
|
+
qt_model.RemoveNodalAxis(nodeId=node_id)
|
|
1536
|
+
except Exception as ex:
|
|
1537
|
+
raise Exception(ex)
|
|
1538
|
+
|
|
1447
1539
|
# endregion
|
|
1448
1540
|
|
|
1449
1541
|
# 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.52
|
|
4
|
+
Summary: python modeling for qt 2024-12-24
|
|
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.52 - 2024-12-24
|
|
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
|
|
@@ -723,6 +724,17 @@ from qtmodel import *
|
|
|
723
724
|
mdb.add_boundary_group(name="边界组1")
|
|
724
725
|
```
|
|
725
726
|
Returns: 无
|
|
727
|
+
### update_boundary_group
|
|
728
|
+
更改边界组名
|
|
729
|
+
> 参数:
|
|
730
|
+
> name:边界组名
|
|
731
|
+
> new_name:新边界组名
|
|
732
|
+
```Python
|
|
733
|
+
# 示例代码
|
|
734
|
+
from qtmodel import *
|
|
735
|
+
mdb.update_boundary_group("旧边界组","新边界组")
|
|
736
|
+
```
|
|
737
|
+
Returns: 无
|
|
726
738
|
### remove_boundary_group
|
|
727
739
|
按照名称删除边界组
|
|
728
740
|
> 参数:
|
|
@@ -744,16 +756,17 @@ mdb.remove_all_boundary()
|
|
|
744
756
|
```
|
|
745
757
|
Returns: 无
|
|
746
758
|
### remove_boundary
|
|
747
|
-
|
|
759
|
+
根据节点号删除一般支撑、弹性支承/根据弹性连接I或J端(需指定)节点号删除弹性连接/根据单元号删除梁端约束/根据从节点号和约束方程名删除约束方程/根据从节点号删除主从约束
|
|
748
760
|
> 参数:
|
|
749
761
|
> remove_id:节点号 or 单元号 or 从节点号
|
|
750
|
-
> bd_type:边界类型 ["一般支承", "弹性支承","一般弹性支承", "主从约束", "
|
|
762
|
+
> bd_type:边界类型 ["一般支承", "弹性支承","一般弹性支承", "主从约束", "一般/受拉/受压/刚性弹性连接", "约束方程", "梁端约束"]
|
|
751
763
|
> group:边界所处边界组名
|
|
752
|
-
>
|
|
764
|
+
> extra_name:删除弹性连接或约束方程时额外标识,约束方程名或指定删除弹性连接节点类型 I/J
|
|
753
765
|
```Python
|
|
754
766
|
# 示例代码
|
|
755
767
|
from qtmodel import *
|
|
756
|
-
mdb.remove_boundary(remove_id=
|
|
768
|
+
mdb.remove_boundary(remove_id=11, bd_type="一般弹性连接",group="边界组1", extra_name="J")
|
|
769
|
+
mdb.remove_boundary(remove_id=12, bd_type="约束方程",group="边界组1", extra_name="约束方程名")
|
|
757
770
|
```
|
|
758
771
|
Returns: 无
|
|
759
772
|
### add_general_elastic_support_property
|
|
@@ -767,6 +780,28 @@ from qtmodel import *
|
|
|
767
780
|
mdb.add_general_elastic_support_property(name = "特性1", data_matrix=[i for i in range(1,22)])
|
|
768
781
|
```
|
|
769
782
|
Returns: 无
|
|
783
|
+
### update_general_elastic_support_property
|
|
784
|
+
添加一般弹性支承特性
|
|
785
|
+
> 参数:
|
|
786
|
+
> name:原一般弹性支承特性名称
|
|
787
|
+
> new_name:现一般弹性支承特性名称
|
|
788
|
+
> data_matrix:一般弹性支承刚度矩阵(数据需按列输入至列表,共计21个参数)
|
|
789
|
+
```Python
|
|
790
|
+
# 示例代码
|
|
791
|
+
from qtmodel import *
|
|
792
|
+
mdb.update_general_elastic_support_property(name = "特性1",new_name="特性2", data_matrix=[i for i in range(1,22)])
|
|
793
|
+
```
|
|
794
|
+
Returns: 无
|
|
795
|
+
### remove_general_elastic_support_property
|
|
796
|
+
添加一般弹性支承特性
|
|
797
|
+
> 参数:
|
|
798
|
+
> name:一般弹性支承特性名称
|
|
799
|
+
```Python
|
|
800
|
+
# 示例代码
|
|
801
|
+
from qtmodel import *
|
|
802
|
+
mdb.remove_general_elastic_support_property(name = "特性1")
|
|
803
|
+
```
|
|
804
|
+
Returns: 无
|
|
770
805
|
### add_general_elastic_support
|
|
771
806
|
添加一般弹性支承特性
|
|
772
807
|
> 参数:
|
|
@@ -851,20 +886,6 @@ from qtmodel import *
|
|
|
851
886
|
mdb.add_master_slave_link(master_id=1,slave_id=[2,3],boundary_info=[True,True,True,False,False,False])
|
|
852
887
|
```
|
|
853
888
|
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
889
|
### add_beam_constraint
|
|
869
890
|
添加梁端约束
|
|
870
891
|
> 参数:
|
|
@@ -892,6 +913,45 @@ from qtmodel import *
|
|
|
892
913
|
mdb.add_beam_constraint(beam_id=2,info_i=[True,True,True,False,False,False],info_j=[True,True,True,False,False,False])
|
|
893
914
|
```
|
|
894
915
|
Returns: 无
|
|
916
|
+
### add_node_axis
|
|
917
|
+
添加节点坐标
|
|
918
|
+
> 参数:
|
|
919
|
+
> node_id:节点号
|
|
920
|
+
> input_type:输入方式 1-角度 2-三点 3-向量
|
|
921
|
+
> coord_info:局部坐标信息 -List<float>(角) -List<List<float>>(三点 or 向量)
|
|
922
|
+
```Python
|
|
923
|
+
# 示例代码
|
|
924
|
+
from qtmodel import *
|
|
925
|
+
mdb.add_node_axis(input_type=1,node_id=1,coord_info=[45,45,45])
|
|
926
|
+
mdb.add_node_axis(input_type=2,node_id=1,coord_info=[[0,0,1],[0,1,0],[1,0,0]])
|
|
927
|
+
mdb.add_node_axis(input_type=3,node_id=1,coord_info=[[0,0,1],[0,1,0]])
|
|
928
|
+
```
|
|
929
|
+
Returns: 无
|
|
930
|
+
### update_node_axis
|
|
931
|
+
添加节点坐标
|
|
932
|
+
> 参数:
|
|
933
|
+
> node_id:节点号
|
|
934
|
+
> new_id:新节点号
|
|
935
|
+
> input_type:输入方式 1-角度 2-三点 3-向量
|
|
936
|
+
> coord_info:局部坐标信息 -List<float>(角) -List<List<float>>(三点 or 向量)
|
|
937
|
+
```Python
|
|
938
|
+
# 示例代码
|
|
939
|
+
from qtmodel import *
|
|
940
|
+
mdb.update_node_axis(node_id=1,new_id=1,input_type=1,coord_info=[45,45,45])
|
|
941
|
+
mdb.update_node_axis(node_id=2,new_id=2,input_type=2,coord_info=[[0,0,1],[0,1,0],[1,0,0]])
|
|
942
|
+
mdb.update_node_axis(node_id=3,new_id=3,input_type=3,coord_info=[[0,0,1],[0,1,0]])
|
|
943
|
+
```
|
|
944
|
+
Returns: 无
|
|
945
|
+
### remove_node_axis
|
|
946
|
+
添加节点坐标
|
|
947
|
+
> 参数:
|
|
948
|
+
> node_id:节点号
|
|
949
|
+
```Python
|
|
950
|
+
# 示例代码
|
|
951
|
+
from qtmodel import *
|
|
952
|
+
mdb.remove_node_axis(node_id=1)
|
|
953
|
+
```
|
|
954
|
+
Returns: 无
|
|
895
955
|
## 移动荷载操作
|
|
896
956
|
### add_standard_vehicle
|
|
897
957
|
添加标准车辆
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|