qtmodel 0.5.44__tar.gz → 0.5.46__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.

@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: qtmodel
3
- Version: 0.5.44
4
- Summary: python modeling for qt 2024-12-09
3
+ Version: 0.5.46
4
+ Summary: python modeling for qt 2024-12-17
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.44 - 2024-12-09
15
+ # 最新版本 V0.5.46 - 2024-12-17
16
16
  > pip install --upgrade qtmodel -i https://pypi.org/simple
17
- - 添加视图控制接口
17
+ - 除荷载组合外不自动刷新模型,用户可自行调用update_model刷新模型
18
18
  ## 项目管理
19
19
  ### update_bim
20
20
  刷新Bim模型信息
@@ -402,11 +402,13 @@ Returns: 无
402
402
  根据单元编号和单元类型添加单元
403
403
  > 参数:
404
404
  > index:单元编号
405
- > ele_type:单元类型 1-梁 2-索 3-杆 4-板
405
+ > ele_type:单元类型 1-梁 2-杆 3-索 4-板
406
406
  > node_ids:单元对应的节点列表 [i,j] 或 [i,j,k,l]
407
407
  > beta_angle:贝塔角
408
408
  > mat_id:材料编号
409
409
  > sec_id:截面编号
410
+ > initial_type:索单元初始参数类型
411
+ > initial_value:索单元初始始参数值
410
412
  ```Python
411
413
  # 示例代码
412
414
  from qtmodel import *
@@ -1893,6 +1895,16 @@ from qtmodel import *
1893
1895
  mdb.update_weight_stage(name="施工阶段1",structure_group_name="默认结构组",weight_stage_id=1)
1894
1896
  ```
1895
1897
  Returns: 无
1898
+ ### update_all_stage_setting_type
1899
+ 更新施工阶段安装方式
1900
+ > 参数:
1901
+ > setting_type:安装方式 (1-接线法 2-无应力法 3-变形法 4-切线法)
1902
+ ```Python
1903
+ # 示例代码
1904
+ from qtmodel import *
1905
+ mdb.update_all_stage_setting_type(setting_type=1)
1906
+ ```
1907
+ Returns: 无
1896
1908
  ### remove_construction_stage
1897
1909
  按照施工阶段名删除施工阶段,默认删除所有施工阶段
1898
1910
  > 参数:
@@ -1908,7 +1920,7 @@ Returns: 无
1908
1920
  添加荷载组合
1909
1921
  > 参数:
1910
1922
  > name:荷载组合名
1911
- > combine_type:荷载组合类型 1-叠加 2-判别 3-包络
1923
+ > combine_type:荷载组合类型 1-叠加 2-判别 3-包络 4-SRss 5-AbsSum
1912
1924
  > describe:描述
1913
1925
  > combine_info:荷载组合信息 [(荷载工况类型,工况名,系数)...] 工况类型如下
1914
1926
  > _"ST"-静力荷载工况 "CS"-施工阶段荷载工况 "CB"-荷载组合_
@@ -1955,17 +1967,20 @@ Returns: 无
1955
1967
  ```Python
1956
1968
  # 示例代码
1957
1969
  from qtmodel import *
1958
- odb.set_view_camera(camera_point=(-100,-100,-100),focus_point=(0,0,0))
1970
+ odb.set_view_camera(camera_point=(-100,-100,100),focus_point=(0,0,0))
1959
1971
  ```
1960
1972
  Returns: 无
1961
1973
  ### set_view_direction
1962
1974
  更改三维显示默认视图
1963
1975
  > 参数:
1964
1976
  > direction: 1-空间视图1 2-前视图 3-三维视图2 4-左视图 5-顶视图 6-右视图 7-空间视图3 8-后视图 9-空间视图4 10-底视图
1977
+ > horizontal_degree:水平向旋转角度
1978
+ > vertical_degree:竖向旋转角度
1979
+ > scale:缩放系数
1965
1980
  ```Python
1966
1981
  # 示例代码
1967
1982
  from qtmodel import *
1968
- odb.set_view_direction(1)
1983
+ odb.set_view_direction(direction=1,scale=1.2)
1969
1984
  ```
1970
1985
  Returns: 无
1971
1986
  ### activate_structure
@@ -2372,6 +2387,25 @@ odb.plot_plate_element_stress(file_path=r"D:\\图片\\板应力.png",component=0
2372
2387
  ```
2373
2388
  Returns: 无
2374
2389
  ## 获取模型信息
2390
+ ### get_overlap_nodes
2391
+ 获取重合节点
2392
+ > 参数:
2393
+ > round_num: 判断精度,默认小数点后四位
2394
+ ```Python
2395
+ # 示例代码
2396
+ from qtmodel import *
2397
+ odb.get_overlap_nodes()
2398
+ ```
2399
+ Returns: json字符串,包含信息为list[list[int]]
2400
+ ### get_overlap_elements
2401
+ 获取重合节点
2402
+ > 参数:
2403
+ ```Python
2404
+ # 示例代码
2405
+ from qtmodel import *
2406
+ odb.get_overlap_elements()
2407
+ ```
2408
+ Returns: json字符串,包含信息为list[list[int]]
2375
2409
  ### get_structure_group_names
2376
2410
  获取结构组名称
2377
2411
  > 参数:
@@ -1,6 +1,6 @@
1
- # 最新版本 V0.5.44 - 2024-12-09
1
+ # 最新版本 V0.5.46 - 2024-12-17
2
2
  > pip install --upgrade qtmodel -i https://pypi.org/simple
3
- - 添加视图控制接口
3
+ - 除荷载组合外不自动刷新模型,用户可自行调用update_model刷新模型
4
4
  ## 项目管理
5
5
  ### update_bim
6
6
  刷新Bim模型信息
@@ -388,11 +388,13 @@ Returns: 无
388
388
  根据单元编号和单元类型添加单元
389
389
  > 参数:
390
390
  > index:单元编号
391
- > ele_type:单元类型 1-梁 2-索 3-杆 4-板
391
+ > ele_type:单元类型 1-梁 2-杆 3-索 4-板
392
392
  > node_ids:单元对应的节点列表 [i,j] 或 [i,j,k,l]
393
393
  > beta_angle:贝塔角
394
394
  > mat_id:材料编号
395
395
  > sec_id:截面编号
396
+ > initial_type:索单元初始参数类型
397
+ > initial_value:索单元初始始参数值
396
398
  ```Python
397
399
  # 示例代码
398
400
  from qtmodel import *
@@ -1879,6 +1881,16 @@ from qtmodel import *
1879
1881
  mdb.update_weight_stage(name="施工阶段1",structure_group_name="默认结构组",weight_stage_id=1)
1880
1882
  ```
1881
1883
  Returns: 无
1884
+ ### update_all_stage_setting_type
1885
+ 更新施工阶段安装方式
1886
+ > 参数:
1887
+ > setting_type:安装方式 (1-接线法 2-无应力法 3-变形法 4-切线法)
1888
+ ```Python
1889
+ # 示例代码
1890
+ from qtmodel import *
1891
+ mdb.update_all_stage_setting_type(setting_type=1)
1892
+ ```
1893
+ Returns: 无
1882
1894
  ### remove_construction_stage
1883
1895
  按照施工阶段名删除施工阶段,默认删除所有施工阶段
1884
1896
  > 参数:
@@ -1894,7 +1906,7 @@ Returns: 无
1894
1906
  添加荷载组合
1895
1907
  > 参数:
1896
1908
  > name:荷载组合名
1897
- > combine_type:荷载组合类型 1-叠加 2-判别 3-包络
1909
+ > combine_type:荷载组合类型 1-叠加 2-判别 3-包络 4-SRss 5-AbsSum
1898
1910
  > describe:描述
1899
1911
  > combine_info:荷载组合信息 [(荷载工况类型,工况名,系数)...] 工况类型如下
1900
1912
  > _"ST"-静力荷载工况 "CS"-施工阶段荷载工况 "CB"-荷载组合_
@@ -1941,17 +1953,20 @@ Returns: 无
1941
1953
  ```Python
1942
1954
  # 示例代码
1943
1955
  from qtmodel import *
1944
- odb.set_view_camera(camera_point=(-100,-100,-100),focus_point=(0,0,0))
1956
+ odb.set_view_camera(camera_point=(-100,-100,100),focus_point=(0,0,0))
1945
1957
  ```
1946
1958
  Returns: 无
1947
1959
  ### set_view_direction
1948
1960
  更改三维显示默认视图
1949
1961
  > 参数:
1950
1962
  > direction: 1-空间视图1 2-前视图 3-三维视图2 4-左视图 5-顶视图 6-右视图 7-空间视图3 8-后视图 9-空间视图4 10-底视图
1963
+ > horizontal_degree:水平向旋转角度
1964
+ > vertical_degree:竖向旋转角度
1965
+ > scale:缩放系数
1951
1966
  ```Python
1952
1967
  # 示例代码
1953
1968
  from qtmodel import *
1954
- odb.set_view_direction(1)
1969
+ odb.set_view_direction(direction=1,scale=1.2)
1955
1970
  ```
1956
1971
  Returns: 无
1957
1972
  ### activate_structure
@@ -2358,6 +2373,25 @@ odb.plot_plate_element_stress(file_path=r"D:\\图片\\板应力.png",component=0
2358
2373
  ```
2359
2374
  Returns: 无
2360
2375
  ## 获取模型信息
2376
+ ### get_overlap_nodes
2377
+ 获取重合节点
2378
+ > 参数:
2379
+ > round_num: 判断精度,默认小数点后四位
2380
+ ```Python
2381
+ # 示例代码
2382
+ from qtmodel import *
2383
+ odb.get_overlap_nodes()
2384
+ ```
2385
+ Returns: json字符串,包含信息为list[list[int]]
2386
+ ### get_overlap_elements
2387
+ 获取重合节点
2388
+ > 参数:
2389
+ ```Python
2390
+ # 示例代码
2391
+ from qtmodel import *
2392
+ odb.get_overlap_elements()
2393
+ ```
2394
+ Returns: json字符串,包含信息为list[list[int]]
2361
2395
  ### get_structure_group_names
2362
2396
  获取结构组名称
2363
2397
  > 参数:
@@ -468,7 +468,6 @@ class Mdb:
468
468
  qt_model.MergeNode(tolerance)
469
469
  else:
470
470
  qt_model.MergeNodeByIds(ids, tolerance)
471
- qt_model.UpdateModel()
472
471
  except Exception as ex:
473
472
  raise Exception(ex)
474
473
 
@@ -505,7 +504,6 @@ class Mdb:
505
504
  """
506
505
  try:
507
506
  qt_model.RenumberNodeId()
508
- qt_model.UpdateModel()
509
507
  except Exception as ex:
510
508
  raise Exception(ex)
511
509
 
@@ -562,7 +560,7 @@ class Mdb:
562
560
  qt_model.RemoveStructureGroup(name=name)
563
561
  else:
564
562
  qt_model.RemoveAllStructureGroup()
565
- qt_model.UpdateModel()
563
+
566
564
  except Exception as ex:
567
565
  raise Exception(ex)
568
566
 
@@ -584,7 +582,7 @@ class Mdb:
584
582
  if element_ids is None:
585
583
  element_ids = []
586
584
  qt_model.AddStructureToGroup(name=name, nodeIds=node_ids, elementIds=element_ids)
587
- qt_model.UpdateModel()
585
+
588
586
  except Exception as ex:
589
587
  raise Exception(ex)
590
588
 
@@ -606,7 +604,7 @@ class Mdb:
606
604
  if element_ids is None:
607
605
  element_ids = []
608
606
  qt_model.RemoveStructureOnGroup(name=name, nodeIds=node_ids, elementIds=element_ids)
609
- qt_model.UpdateModel()
607
+
610
608
  except Exception as ex:
611
609
  raise Exception(ex)
612
610
 
@@ -614,16 +612,19 @@ class Mdb:
614
612
 
615
613
  # region 单元操作
616
614
  @staticmethod
617
- def add_element(index: int = 1, ele_type: int = 1, node_ids: list[int] = None, beta_angle: float = 0, mat_id: int = -1, sec_id: int = -1):
615
+ 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):
618
617
  """
619
618
  根据单元编号和单元类型添加单元
620
619
  Args:
621
620
  index:单元编号
622
- ele_type:单元类型 1-梁 2-索 3-杆 4-板
621
+ ele_type:单元类型 1-梁 2-杆 3-索 4-板
623
622
  node_ids:单元对应的节点列表 [i,j] 或 [i,j,k,l]
624
623
  beta_angle:贝塔角
625
624
  mat_id:材料编号
626
625
  sec_id:截面编号
626
+ initial_type:索单元初始参数类型
627
+ initial_value:索单元初始始参数值
627
628
  Example:
628
629
  mdb.add_element(index=1,ele_type=1,node_ids=[1,2],beta_angle=1,mat_id=1,sec_id=1)
629
630
  Returns: 无
@@ -636,13 +637,15 @@ class Mdb:
636
637
  if ele_type == 1:
637
638
  qt_model.AddBeam(id=index, idI=node_ids[0], idJ=node_ids[1], betaAngle=beta_angle, materialId=mat_id, sectionId=sec_id)
638
639
  elif ele_type == 2:
639
- qt_model.AddCable(id=index, idI=node_ids[0], idJ=node_ids[1], betaAngle=beta_angle, materialId=mat_id, sectionId=sec_id)
640
- elif ele_type == 3:
641
640
  qt_model.AddLink(id=index, idI=node_ids[0], idJ=node_ids[1], betaAngle=beta_angle, materialId=mat_id, sectionId=sec_id)
641
+ elif ele_type == 3:
642
+ qt_model.AddCable(id=index, idI=node_ids[0], idJ=node_ids[1], betaAngle=beta_angle, materialId=mat_id, sectionId=sec_id,
643
+ initialType=initial_type, initialValue=initial_value)
642
644
  else:
643
645
  qt_model.AddPlate(id=index, idI=node_ids[0], idJ=node_ids[1], idK=node_ids[2], idL=node_ids[3], betaAngle=beta_angle,
644
646
  materialId=mat_id,
645
647
  sectionId=sec_id)
648
+
646
649
  except Exception as ex:
647
650
  raise Exception(ex)
648
651
 
@@ -665,6 +668,7 @@ class Mdb:
665
668
  """
666
669
  try:
667
670
  qt_model.AddElements(eleData=ele_data)
671
+
668
672
  except Exception as ex:
669
673
  raise Exception(ex)
670
674
 
@@ -796,7 +800,7 @@ class Mdb:
796
800
  elasticModulus=data_info[0], unitWeight=data_info[1],
797
801
  posiRatio=data_info[2], temperatureCoefficient=data_info[3],
798
802
  timeParameterId=creep_id, fcuk=f_cuk, compositeInfo=composite_info)
799
- qt_model.UpdateModel()
803
+
800
804
  except Exception as ex:
801
805
  raise Exception(ex)
802
806
 
@@ -846,7 +850,7 @@ class Mdb:
846
850
  raise Exception("操作错误,time_parameter数据无效!")
847
851
  qt_model.AddTimeParameter(id=index, name=name, codeId=code_index, creepEnd=time_parameter[0], creepSpeek=time_parameter[1],
848
852
  shrinkSpeek=time_parameter[2], shrinkEnd=time_parameter[3])
849
- qt_model.UpdateModel()
853
+
850
854
  except Exception as ex:
851
855
  raise Exception(ex)
852
856
 
@@ -864,7 +868,7 @@ class Mdb:
864
868
  """
865
869
  try:
866
870
  qt_model.UpdateMaterialCreep(materialId=index, creepName=creep_name, fcuk=f_cuk)
867
- qt_model.UpdateModel()
871
+
868
872
  except Exception as ex:
869
873
  raise Exception(ex)
870
874
 
@@ -884,7 +888,7 @@ class Mdb:
884
888
  qt_model.RemoveAllMaterial()
885
889
  else:
886
890
  qt_model.RemoveMaterial(id=index)
887
- qt_model.UpdateModel()
891
+
888
892
  except Exception as ex:
889
893
  raise Exception(ex)
890
894
 
@@ -1048,7 +1052,7 @@ class Mdb:
1048
1052
  qt_model.RemoveAllSection()
1049
1053
  else:
1050
1054
  qt_model.RemoveSection(id=index)
1051
- qt_model.UpdateModel()
1055
+
1052
1056
  except Exception as ex:
1053
1057
  raise Exception(ex)
1054
1058
 
@@ -1090,7 +1094,7 @@ class Mdb:
1090
1094
  qt_model.AddThickness(id=index, name=name, t=t, thickType=thick_type, isBiased=False, ribPos=rib_pos,
1091
1095
  offSetType=bias_info[0], offSetValue=bias_info[1],
1092
1096
  verticalDis=dist_v, lateralDis=dist_l, verticalRib=rib_v, lateralRib=rib_l)
1093
- qt_model.UpdateModel()
1097
+
1094
1098
  except Exception as ex:
1095
1099
  raise Exception(ex)
1096
1100
 
@@ -1110,7 +1114,7 @@ class Mdb:
1110
1114
  qt_model.RemoveAllThickness()
1111
1115
  else:
1112
1116
  qt_model.RemoveThickness(id=index)
1113
- qt_model.UpdateModel()
1117
+
1114
1118
  except Exception as ex:
1115
1119
  raise Exception(ex)
1116
1120
 
@@ -1180,7 +1184,6 @@ class Mdb:
1180
1184
  """
1181
1185
  try:
1182
1186
  qt_model.AddBoundaryGroup(name=name)
1183
- qt_model.UpdateModel()
1184
1187
  except Exception as ex:
1185
1188
  raise Exception(ex)
1186
1189
 
@@ -1200,7 +1203,6 @@ class Mdb:
1200
1203
  qt_model.RemoveBoundaryGroup(name)
1201
1204
  else:
1202
1205
  qt_model.RemoveAllBoundaryGroup()
1203
- qt_model.UpdateModel()
1204
1206
  except Exception as ex:
1205
1207
  raise Exception(ex)
1206
1208
 
@@ -1215,7 +1217,6 @@ class Mdb:
1215
1217
  """
1216
1218
  try:
1217
1219
  qt_model.RemoveAllBoundary()
1218
- qt_model.UpdateModel()
1219
1220
  except Exception as ex:
1220
1221
  raise Exception(ex)
1221
1222
 
@@ -1474,7 +1475,7 @@ class Mdb:
1474
1475
  try:
1475
1476
  qt_model.AddStandardVehicle(name=name, standardIndex=standard_code, loadType=load_type,
1476
1477
  loadLength=load_length, factor=factor, N=n, calcFatigue=calc_fatigue)
1477
- qt_model.UpdateModel()
1478
+
1478
1479
  except Exception as ex:
1479
1480
  raise Exception(ex)
1480
1481
 
@@ -1507,7 +1508,7 @@ class Mdb:
1507
1508
  qt_model.AddUserVehicle(name=name, loadType=load_type, p=p, q=q, dis=dis, loadLength=load_length,
1508
1509
  num=n, emptyLoad=empty_load, width=width, wheelbase=wheelbase,
1509
1510
  minDistance=min_dis, unitForce=unit_force, unitLength=unit_length)
1510
- qt_model.UpdateModel()
1511
+
1511
1512
  except Exception as ex:
1512
1513
  raise Exception(ex)
1513
1514
 
@@ -1527,7 +1528,7 @@ class Mdb:
1527
1528
  if node_ids is None:
1528
1529
  raise Exception("操作错误,输入节点列表不能为空")
1529
1530
  qt_model.AddNodeTandem(name=name, startId=start_id, nodeIds=node_ids)
1530
- qt_model.UpdateModel()
1531
+
1531
1532
  except Exception as ex:
1532
1533
  raise Exception(ex)
1533
1534
 
@@ -1544,7 +1545,7 @@ class Mdb:
1544
1545
  """
1545
1546
  try:
1546
1547
  qt_model.AddInfluencePlane(name=name, tandemNames=tandem_names)
1547
- qt_model.UpdateModel()
1548
+
1548
1549
  except Exception as ex:
1549
1550
  raise Exception(ex)
1550
1551
 
@@ -1564,7 +1565,7 @@ class Mdb:
1564
1565
  """
1565
1566
  try:
1566
1567
  qt_model.AddLaneLine(name, influenceName=influence_name, tandemName=tandem_name, offset=offset, laneWidth=lane_width)
1567
- qt_model.UpdateModel()
1568
+
1568
1569
  except Exception as ex:
1569
1570
  raise Exception(ex)
1570
1571
 
@@ -1590,7 +1591,7 @@ class Mdb:
1590
1591
  raise Exception("操作错误,子工况信息列表不能为空")
1591
1592
  qt_model.AddLiveLoadCase(name=name, influencePlane=influence_plane, span=span, subCase=sub_case,
1592
1593
  trailerCode=trailer_code, specialCode=special_code)
1593
- qt_model.UpdateModel()
1594
+
1594
1595
  except Exception as ex:
1595
1596
  raise Exception(ex)
1596
1597
 
@@ -1614,7 +1615,7 @@ class Mdb:
1614
1615
  qt_model.AddCarRelativeFactor(name=name, codeIndex=code_index, crossFactors=cross_factors,
1615
1616
  longitudeFactor=longitude_factor,
1616
1617
  impactFactor=impact_factor, frequency=frequency)
1617
- qt_model.UpdateModel()
1618
+
1618
1619
  except Exception as ex:
1619
1620
  raise Exception(ex)
1620
1621
 
@@ -1646,7 +1647,7 @@ class Mdb:
1646
1647
  qt_model.AddTrainRelativeFactor(name=name, codeIndex=code_index, crossFactors=cross_factors, calculateFatigue=calc_fatigue,
1647
1648
  longitudeFactor=longitude_factor, fatigueLineCount=line_count, fatigueFactor=fatigue_factor,
1648
1649
  impactFactor=impact_factor, bridgeKind=bridge_kind, fillThick=fill_thick, rise=rise, lambDa=calc_length)
1649
- qt_model.UpdateModel()
1650
+
1650
1651
  except Exception as ex:
1651
1652
  raise Exception(ex)
1652
1653
 
@@ -1668,7 +1669,7 @@ class Mdb:
1668
1669
  qt_model.AddMetroRelativeFactor(name=name, crossFactors=cross_factors,
1669
1670
  longitudeFactor=longitude_factor,
1670
1671
  impactFactor=impact_factor)
1671
- qt_model.UpdateModel()
1672
+
1672
1673
  except Exception as ex:
1673
1674
  raise Exception(ex)
1674
1675
 
@@ -1684,7 +1685,7 @@ class Mdb:
1684
1685
  """
1685
1686
  try:
1686
1687
  qt_model.RemoveVehicle(name=name)
1687
- qt_model.UpdateModel()
1688
+
1688
1689
  except Exception as ex:
1689
1690
  raise Exception(ex)
1690
1691
 
@@ -1705,7 +1706,7 @@ class Mdb:
1705
1706
  qt_model.RemoveNodeTandem(id=index)
1706
1707
  elif name != "":
1707
1708
  qt_model.RemoveNodeTandem(name=name)
1708
- qt_model.UpdateModel()
1709
+
1709
1710
  except Exception as ex:
1710
1711
  raise Exception(ex)
1711
1712
 
@@ -1726,7 +1727,7 @@ class Mdb:
1726
1727
  qt_model.RemoveInfluencePlane(id=index)
1727
1728
  elif name != "":
1728
1729
  qt_model.RemoveInfluencePlane(name=name)
1729
- qt_model.UpdateModel()
1730
+
1730
1731
  except Exception as ex:
1731
1732
  raise Exception(ex)
1732
1733
 
@@ -1747,7 +1748,7 @@ class Mdb:
1747
1748
  qt_model.RemoveLaneLine(id=index)
1748
1749
  elif name != "":
1749
1750
  qt_model.RemoveLaneLine(name=name)
1750
- qt_model.UpdateModel()
1751
+
1751
1752
  except Exception as ex:
1752
1753
  raise Exception(ex)
1753
1754
 
@@ -1763,7 +1764,7 @@ class Mdb:
1763
1764
  """
1764
1765
  try:
1765
1766
  qt_model.RemoveLiveLoadCase(name=name)
1766
- qt_model.UpdateModel()
1767
+
1767
1768
  except Exception as ex:
1768
1769
  raise Exception(ex)
1769
1770
 
@@ -1783,7 +1784,6 @@ class Mdb:
1783
1784
  """
1784
1785
  try:
1785
1786
  qt_model.AddLoadToMass(name=name, factor=factor)
1786
- qt_model.UpdateModel()
1787
1787
  except Exception as ex:
1788
1788
  raise Exception(ex)
1789
1789
 
@@ -1802,7 +1802,6 @@ class Mdb:
1802
1802
  if mass_info is None:
1803
1803
  raise Exception("操作错误,节点质量信息列表不能为空")
1804
1804
  qt_model.AddNodalMass(nodeId=node_id, massInfo=mass_info)
1805
- qt_model.UpdateModel()
1806
1805
  except Exception as ex:
1807
1806
  raise Exception(ex)
1808
1807
 
@@ -1896,7 +1895,6 @@ class Mdb:
1896
1895
  """
1897
1896
  try:
1898
1897
  qt_model.AddTendonGroup(name=name, id=index)
1899
- qt_model.UpdateModel()
1900
1898
  except Exception as ex:
1901
1899
  raise Exception(ex)
1902
1900
 
@@ -1915,7 +1913,6 @@ class Mdb:
1915
1913
  qt_model.RemoveTendonGroup(name=name)
1916
1914
  else:
1917
1915
  qt_model.RemoveAllStructureGroup()
1918
- qt_model.UpdateModel()
1919
1916
  except Exception as ex:
1920
1917
  raise Exception(ex)
1921
1918
 
@@ -1954,7 +1951,7 @@ class Mdb:
1954
1951
  qt_model.AddTendonProperty(name=name, tendonType=tendon_type, materialId=material_id,
1955
1952
  ductType=duct_type, steelType=steel_type, steelDetail=steel_detail,
1956
1953
  loosDetail=loos_detail, slipInfo=slip_info)
1957
- qt_model.UpdateModel()
1954
+
1958
1955
  except Exception as ex:
1959
1956
  raise Exception(ex)
1960
1957
 
@@ -2066,7 +2063,7 @@ class Mdb:
2066
2063
  """
2067
2064
  try:
2068
2065
  qt_model.UpdatePreStressElement(ids)
2069
- qt_model.UpdateModel()
2066
+
2070
2067
  except Exception as ex:
2071
2068
  raise Exception(ex)
2072
2069
 
@@ -2113,7 +2110,7 @@ class Mdb:
2113
2110
  qt_model.RemoveTendonProperty(id=index)
2114
2111
  else:
2115
2112
  qt_model.RemoveAllTendonGroup()
2116
- qt_model.UpdateModel()
2113
+
2117
2114
  except Exception as ex:
2118
2115
  raise Exception(ex)
2119
2116
 
@@ -2133,7 +2130,7 @@ class Mdb:
2133
2130
  try:
2134
2131
  if name != "":
2135
2132
  qt_model.AddLoadGroup(name=name)
2136
- qt_model.UpdateModel()
2133
+
2137
2134
  except Exception as ex:
2138
2135
  raise Exception(ex)
2139
2136
 
@@ -2152,7 +2149,7 @@ class Mdb:
2152
2149
  qt_model.RemoveLoadGroup(name=name)
2153
2150
  else:
2154
2151
  qt_model.RemoveAllLoadGroup()
2155
- qt_model.UpdateModel()
2152
+
2156
2153
  except Exception as ex:
2157
2154
  raise Exception(ex)
2158
2155
 
@@ -2466,7 +2463,7 @@ class Mdb:
2466
2463
  if len(parameters) != 5 and len(parameters) != 7:
2467
2464
  raise Exception("操作错误,误差列表有误")
2468
2465
  qt_model.AddDeviationParameter(name=name, elementType=element_type, parameterInfo=parameters)
2469
- qt_model.UpdateModel()
2466
+
2470
2467
  except Exception as ex:
2471
2468
  raise Exception(ex)
2472
2469
 
@@ -2775,7 +2772,7 @@ class Mdb:
2775
2772
  if node_ids is None:
2776
2773
  raise Exception("操作错误,沉降定义中节点信息不能为空")
2777
2774
  qt_model.AddSinkGroup(name=name, sinkValue=sink, nodeIds=node_ids)
2778
- qt_model.UpdateModel()
2775
+
2779
2776
  except Exception as ex:
2780
2777
  raise Exception(ex)
2781
2778
 
@@ -2795,7 +2792,7 @@ class Mdb:
2795
2792
  qt_model.RemoveAllSinkGroup()
2796
2793
  else:
2797
2794
  qt_model.RemoveSinkGroup(name=name)
2798
- qt_model.UpdateModel()
2795
+
2799
2796
  except Exception as ex:
2800
2797
  raise Exception(ex)
2801
2798
 
@@ -2814,7 +2811,7 @@ class Mdb:
2814
2811
  if sink_groups is None:
2815
2812
  raise Exception("操作错误,沉降工况定义中沉降组信息不能为空")
2816
2813
  qt_model.AddSinkCase(name=name, sinkGroups=sink_groups)
2817
- qt_model.UpdateModel()
2814
+
2818
2815
  except Exception as ex:
2819
2816
  raise Exception(ex)
2820
2817
 
@@ -2834,7 +2831,7 @@ class Mdb:
2834
2831
  qt_model.RemoveAllSinkCase()
2835
2832
  else:
2836
2833
  qt_model.RemoveSinkCase()
2837
- qt_model.UpdateModel()
2834
+
2838
2835
  except Exception as ex:
2839
2836
  raise Exception(ex)
2840
2837
 
@@ -2852,7 +2849,7 @@ class Mdb:
2852
2849
  if names is None:
2853
2850
  raise Exception("操作错误,添加并发反力组时结构组名称不能为空")
2854
2851
  qt_model.AddConcurrentReaction(names=names)
2855
- qt_model.UpdateModel()
2852
+
2856
2853
  except Exception as ex:
2857
2854
  raise Exception(ex)
2858
2855
 
@@ -2867,7 +2864,7 @@ class Mdb:
2867
2864
  """
2868
2865
  try:
2869
2866
  qt_model.RemoveConcurrentRection()
2870
- qt_model.UpdateModel()
2867
+
2871
2868
  except Exception as ex:
2872
2869
  raise Exception(ex)
2873
2870
 
@@ -2883,7 +2880,7 @@ class Mdb:
2883
2880
  """
2884
2881
  try:
2885
2882
  qt_model.AddConcurrentForce(names=names)
2886
- qt_model.UpdateModel()
2883
+
2887
2884
  except Exception as ex:
2888
2885
  raise Exception(ex)
2889
2886
 
@@ -2898,7 +2895,7 @@ class Mdb:
2898
2895
  """
2899
2896
  try:
2900
2897
  qt_model.RemoveConcurrentForce()
2901
- qt_model.UpdateModel()
2898
+
2902
2899
  except Exception as ex:
2903
2900
  raise Exception(ex)
2904
2901
 
@@ -2917,7 +2914,7 @@ class Mdb:
2917
2914
  """
2918
2915
  try:
2919
2916
  qt_model.AddLoadCase(name=name, loadCaseType=case_type)
2920
- qt_model.UpdateModel()
2917
+
2921
2918
  except Exception as ex:
2922
2919
  raise Exception(ex)
2923
2920
 
@@ -2941,7 +2938,7 @@ class Mdb:
2941
2938
  qt_model.DeleteLoadCase(id=index)
2942
2939
  else:
2943
2940
  qt_model.DeleteAllLoadCase()
2944
- qt_model.UpdateModel()
2941
+
2945
2942
  except Exception as ex:
2946
2943
  raise Exception(ex)
2947
2944
 
@@ -2950,7 +2947,7 @@ class Mdb:
2950
2947
  # region 施工阶段操作
2951
2948
  @staticmethod
2952
2949
  def add_construction_stage(name: str = "", duration: int = 0,
2953
- active_structures: list[tuple[str, int, int, int]] = None,
2950
+ active_structures: list[tuple[str, float, int, int]] = None,
2954
2951
  delete_structures: list[str] = None,
2955
2952
  active_boundaries: list[tuple[str, int]] = None,
2956
2953
  delete_boundaries: list[str] = None,
@@ -2989,7 +2986,7 @@ class Mdb:
2989
2986
 
2990
2987
  @staticmethod
2991
2988
  def update_construction_stage(name: str = "", duration: int = 0,
2992
- active_structures: list[tuple[str, int, int, int]] = None,
2989
+ active_structures: list[tuple[str, float, int, int]] = None,
2993
2990
  delete_structures: list[str] = None,
2994
2991
  active_boundaries: list[tuple[str, int]] = None,
2995
2992
  delete_boundaries: list[str] = None,
@@ -3042,6 +3039,21 @@ class Mdb:
3042
3039
  except Exception as ex:
3043
3040
  raise Exception(f"更新施工阶段自重:{name}错误,{ex}")
3044
3041
 
3042
+ @staticmethod
3043
+ def update_all_stage_setting_type(setting_type: int = 1):
3044
+ """
3045
+ 更新施工阶段安装方式
3046
+ Args:
3047
+ setting_type:安装方式 (1-接线法 2-无应力法 3-变形法 4-切线法)
3048
+ Example:
3049
+ mdb.update_all_stage_setting_type(setting_type=1)
3050
+ Returns: 无
3051
+ """
3052
+ try:
3053
+ qt_model.UpdateAllStageSettingType(type=setting_type)
3054
+ except Exception as ex:
3055
+ raise Exception(f"操作错误,{ex}")
3056
+
3045
3057
  @staticmethod
3046
3058
  def remove_construction_stage(name: str = ""):
3047
3059
  """
@@ -3069,7 +3081,7 @@ class Mdb:
3069
3081
  添加荷载组合
3070
3082
  Args:
3071
3083
  name:荷载组合名
3072
- combine_type:荷载组合类型 1-叠加 2-判别 3-包络
3084
+ combine_type:荷载组合类型 1-叠加 2-判别 3-包络 4-SRss 5-AbsSum
3073
3085
  describe:描述
3074
3086
  combine_info:荷载组合信息 [(荷载工况类型,工况名,系数)...] 工况类型如下
3075
3087
  _"ST"-静力荷载工况 "CS"-施工阶段荷载工况 "CB"-荷载组合_
@@ -31,17 +31,20 @@ class Odb:
31
31
  raise Exception(ex)
32
32
 
33
33
  @staticmethod
34
- def set_view_direction(direction: int = 1):
34
+ def set_view_direction(direction: int = 1, horizontal_degree: float = 0, vertical_degree: float = 0, scale: float = 1):
35
35
  """
36
36
  更改三维显示默认视图
37
37
  Args:
38
38
  direction: 1-空间视图1 2-前视图 3-三维视图2 4-左视图 5-顶视图 6-右视图 7-空间视图3 8-后视图 9-空间视图4 10-底视图
39
+ horizontal_degree:水平向旋转角度
40
+ vertical_degree:竖向旋转角度
41
+ scale:缩放系数
39
42
  Example:
40
- odb.set_view_direction(1)
43
+ odb.set_view_direction(direction=1,scale=1.2)
41
44
  Returns: 无
42
45
  """
43
46
  try:
44
- qt_model.SetViewDirection(direction=direction)
47
+ qt_model.SetViewDirection(direction=direction, horizontalDegree=horizontal_degree, verticalDegree=vertical_degree, scale=scale)
45
48
  qt_model.UpdateModel()
46
49
  except Exception as ex:
47
50
  raise Exception(ex)
@@ -757,6 +760,43 @@ class Odb:
757
760
  # endregion
758
761
 
759
762
  # region 获取模型信息
763
+ @staticmethod
764
+ def get_overlap_nodes(round_num: int = 4):
765
+ """
766
+ 获取重合节点
767
+ Args:
768
+ round_num: 判断精度,默认小数点后四位
769
+ Example:
770
+ odb.get_overlap_nodes()
771
+ Returns: json字符串,包含信息为list[list[int]]
772
+ """
773
+ try:
774
+ result = []
775
+ qt_result = qt_model.GetOverlapNodes(mathRound=round_num)
776
+ for i in range(len(qt_result)):
777
+ result.append(list(qt_result[i]))
778
+ return json.dumps(result)
779
+ except Exception as ex:
780
+ raise Exception(ex)
781
+
782
+ @staticmethod
783
+ def get_overlap_elements():
784
+ """
785
+ 获取重合节点
786
+ Args:无
787
+ Example:
788
+ odb.get_overlap_elements()
789
+ Returns: json字符串,包含信息为list[list[int]]
790
+ """
791
+ try:
792
+ result = []
793
+ qt_result = qt_model.GetOverlapElements()
794
+ for i in range(len(qt_result)):
795
+ result.append(list(qt_result[i]))
796
+ return json.dumps(result)
797
+ except Exception as ex:
798
+ raise Exception(ex)
799
+
760
800
  @staticmethod
761
801
  def get_structure_group_names():
762
802
  """
@@ -766,8 +806,11 @@ class Odb:
766
806
  odb.get_structure_group_names()
767
807
  Returns: json字符串,包含信息为list[str]
768
808
  """
769
- res_list = list(qt_model.GetStructureGroupNames())
770
- return json.dumps(res_list)
809
+ try:
810
+ res_list = list(qt_model.GetStructureGroupNames())
811
+ return json.dumps(res_list)
812
+ except Exception as ex:
813
+ raise Exception(ex)
771
814
 
772
815
  @staticmethod
773
816
  def get_thickness_data(thick_id: int):
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: qtmodel
3
- Version: 0.5.44
4
- Summary: python modeling for qt 2024-12-09
3
+ Version: 0.5.46
4
+ Summary: python modeling for qt 2024-12-17
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.44 - 2024-12-09
15
+ # 最新版本 V0.5.46 - 2024-12-17
16
16
  > pip install --upgrade qtmodel -i https://pypi.org/simple
17
- - 添加视图控制接口
17
+ - 除荷载组合外不自动刷新模型,用户可自行调用update_model刷新模型
18
18
  ## 项目管理
19
19
  ### update_bim
20
20
  刷新Bim模型信息
@@ -402,11 +402,13 @@ Returns: 无
402
402
  根据单元编号和单元类型添加单元
403
403
  > 参数:
404
404
  > index:单元编号
405
- > ele_type:单元类型 1-梁 2-索 3-杆 4-板
405
+ > ele_type:单元类型 1-梁 2-杆 3-索 4-板
406
406
  > node_ids:单元对应的节点列表 [i,j] 或 [i,j,k,l]
407
407
  > beta_angle:贝塔角
408
408
  > mat_id:材料编号
409
409
  > sec_id:截面编号
410
+ > initial_type:索单元初始参数类型
411
+ > initial_value:索单元初始始参数值
410
412
  ```Python
411
413
  # 示例代码
412
414
  from qtmodel import *
@@ -1893,6 +1895,16 @@ from qtmodel import *
1893
1895
  mdb.update_weight_stage(name="施工阶段1",structure_group_name="默认结构组",weight_stage_id=1)
1894
1896
  ```
1895
1897
  Returns: 无
1898
+ ### update_all_stage_setting_type
1899
+ 更新施工阶段安装方式
1900
+ > 参数:
1901
+ > setting_type:安装方式 (1-接线法 2-无应力法 3-变形法 4-切线法)
1902
+ ```Python
1903
+ # 示例代码
1904
+ from qtmodel import *
1905
+ mdb.update_all_stage_setting_type(setting_type=1)
1906
+ ```
1907
+ Returns: 无
1896
1908
  ### remove_construction_stage
1897
1909
  按照施工阶段名删除施工阶段,默认删除所有施工阶段
1898
1910
  > 参数:
@@ -1908,7 +1920,7 @@ Returns: 无
1908
1920
  添加荷载组合
1909
1921
  > 参数:
1910
1922
  > name:荷载组合名
1911
- > combine_type:荷载组合类型 1-叠加 2-判别 3-包络
1923
+ > combine_type:荷载组合类型 1-叠加 2-判别 3-包络 4-SRss 5-AbsSum
1912
1924
  > describe:描述
1913
1925
  > combine_info:荷载组合信息 [(荷载工况类型,工况名,系数)...] 工况类型如下
1914
1926
  > _"ST"-静力荷载工况 "CS"-施工阶段荷载工况 "CB"-荷载组合_
@@ -1955,17 +1967,20 @@ Returns: 无
1955
1967
  ```Python
1956
1968
  # 示例代码
1957
1969
  from qtmodel import *
1958
- odb.set_view_camera(camera_point=(-100,-100,-100),focus_point=(0,0,0))
1970
+ odb.set_view_camera(camera_point=(-100,-100,100),focus_point=(0,0,0))
1959
1971
  ```
1960
1972
  Returns: 无
1961
1973
  ### set_view_direction
1962
1974
  更改三维显示默认视图
1963
1975
  > 参数:
1964
1976
  > direction: 1-空间视图1 2-前视图 3-三维视图2 4-左视图 5-顶视图 6-右视图 7-空间视图3 8-后视图 9-空间视图4 10-底视图
1977
+ > horizontal_degree:水平向旋转角度
1978
+ > vertical_degree:竖向旋转角度
1979
+ > scale:缩放系数
1965
1980
  ```Python
1966
1981
  # 示例代码
1967
1982
  from qtmodel import *
1968
- odb.set_view_direction(1)
1983
+ odb.set_view_direction(direction=1,scale=1.2)
1969
1984
  ```
1970
1985
  Returns: 无
1971
1986
  ### activate_structure
@@ -2372,6 +2387,25 @@ odb.plot_plate_element_stress(file_path=r"D:\\图片\\板应力.png",component=0
2372
2387
  ```
2373
2388
  Returns: 无
2374
2389
  ## 获取模型信息
2390
+ ### get_overlap_nodes
2391
+ 获取重合节点
2392
+ > 参数:
2393
+ > round_num: 判断精度,默认小数点后四位
2394
+ ```Python
2395
+ # 示例代码
2396
+ from qtmodel import *
2397
+ odb.get_overlap_nodes()
2398
+ ```
2399
+ Returns: json字符串,包含信息为list[list[int]]
2400
+ ### get_overlap_elements
2401
+ 获取重合节点
2402
+ > 参数:
2403
+ ```Python
2404
+ # 示例代码
2405
+ from qtmodel import *
2406
+ odb.get_overlap_elements()
2407
+ ```
2408
+ Returns: json字符串,包含信息为list[list[int]]
2375
2409
  ### get_structure_group_names
2376
2410
  获取结构组名称
2377
2411
  > 参数:
@@ -12,7 +12,7 @@ today = now.date()
12
12
 
13
13
  setup(
14
14
  name="qtmodel",
15
- version="0.5.44",
15
+ version="0.5.46",
16
16
  author="dqy-zhj",
17
17
  author_email="1105417715@qq.com",
18
18
  description=f"python modeling for qt {today} ",
File without changes
File without changes
File without changes