qtmodel 0.5.47__tar.gz → 0.5.49__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.47
4
- Summary: python modeling for qt 2024-12-17
3
+ Version: 0.5.49
4
+ Summary: python modeling for qt 2024-12-18
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.47 - 2024-12-17
15
+ # 最新版本 V0.5.49 - 2024-12-18
16
16
  > pip install --upgrade qtmodel -i https://pypi.org/simple
17
- - 除荷载组合外不自动刷新模型,用户可自行调用update_model刷新模型
17
+ - 增加两个获取单元接口
18
18
  ## 项目管理
19
19
  ### update_bim
20
20
  刷新Bim模型信息
@@ -2387,6 +2387,29 @@ odb.plot_plate_element_stress(file_path=r"D:\\图片\\板应力.png",component=0
2387
2387
  ```
2388
2388
  Returns: 无
2389
2389
  ## 获取模型信息
2390
+ ### get_element_by_point
2391
+ 获取某一点指定范围内单元集合,单元中心点为节点平均值
2392
+ > 参数:
2393
+ > x: 坐标x
2394
+ > y: 坐标y
2395
+ > z: 坐标z
2396
+ > tolerance:容许范围,默认为1
2397
+ ```Python
2398
+ # 示例代码
2399
+ from qtmodel import *
2400
+ odb.get_element_by_point(0.5,0.5,0.5,tolerance=1)
2401
+ ```
2402
+ Returns: json字符串,包含信息为list[int]
2403
+ ### get_element_by_material
2404
+ 获取某一材料相应的单元
2405
+ > 参数:
2406
+ > name:材料名称
2407
+ ```Python
2408
+ # 示例代码
2409
+ from qtmodel import *
2410
+ odb.get_element_by_material("材料1")
2411
+ ```
2412
+ Returns: json字符串,包含信息为list[int]
2390
2413
  ### get_overlap_nodes
2391
2414
  获取重合节点
2392
2415
  > 参数:
@@ -1,6 +1,6 @@
1
- # 最新版本 V0.5.47 - 2024-12-17
1
+ # 最新版本 V0.5.49 - 2024-12-18
2
2
  > pip install --upgrade qtmodel -i https://pypi.org/simple
3
- - 除荷载组合外不自动刷新模型,用户可自行调用update_model刷新模型
3
+ - 增加两个获取单元接口
4
4
  ## 项目管理
5
5
  ### update_bim
6
6
  刷新Bim模型信息
@@ -2373,6 +2373,29 @@ odb.plot_plate_element_stress(file_path=r"D:\\图片\\板应力.png",component=0
2373
2373
  ```
2374
2374
  Returns: 无
2375
2375
  ## 获取模型信息
2376
+ ### get_element_by_point
2377
+ 获取某一点指定范围内单元集合,单元中心点为节点平均值
2378
+ > 参数:
2379
+ > x: 坐标x
2380
+ > y: 坐标y
2381
+ > z: 坐标z
2382
+ > tolerance:容许范围,默认为1
2383
+ ```Python
2384
+ # 示例代码
2385
+ from qtmodel import *
2386
+ odb.get_element_by_point(0.5,0.5,0.5,tolerance=1)
2387
+ ```
2388
+ Returns: json字符串,包含信息为list[int]
2389
+ ### get_element_by_material
2390
+ 获取某一材料相应的单元
2391
+ > 参数:
2392
+ > name:材料名称
2393
+ ```Python
2394
+ # 示例代码
2395
+ from qtmodel import *
2396
+ odb.get_element_by_material("材料1")
2397
+ ```
2398
+ Returns: json字符串,包含信息为list[int]
2376
2399
  ### get_overlap_nodes
2377
2400
  获取重合节点
2378
2401
  > 参数:
@@ -3094,7 +3094,6 @@ class Mdb:
3094
3094
  if combine_info is None:
3095
3095
  combine_info = []
3096
3096
  qt_model.AddLoadCombine(name=name, loadCombineType=combine_type, describe=describe, caseAndFactor=combine_info)
3097
- qt_model.UpdateModel()
3098
3097
  except Exception as ex:
3099
3098
  raise Exception(ex)
3100
3099
 
@@ -3117,7 +3116,6 @@ class Mdb:
3117
3116
  if combine_info is None:
3118
3117
  combine_info = []
3119
3118
  qt_model.UpdateLoadCombine(name=name, loadCombineType=combine_type, describe=describe, caseAndFactor=combine_info)
3120
- qt_model.UpdateModel()
3121
3119
  except Exception as ex:
3122
3120
  raise Exception(ex)
3123
3121
 
@@ -3136,7 +3134,6 @@ class Mdb:
3136
3134
  qt_model.DeleteLoadCombine(name=name)
3137
3135
  else:
3138
3136
  qt_model.DeleteAllLoadCombine()
3139
- qt_model.UpdateModel()
3140
3137
  except Exception as ex:
3141
3138
  raise Exception(ex)
3142
3139
 
@@ -26,7 +26,6 @@ class Odb:
26
26
  try:
27
27
  qt_model.SetViewCamera(direction=[camera_point[0], camera_point[1], camera_point[2], focus_point[0], focus_point[1], focus_point[2],
28
28
  camera_rotate[0], camera_rotate[1], camera_rotate[2], scale])
29
- qt_model.UpdateModel()
30
29
  except Exception as ex:
31
30
  raise Exception(ex)
32
31
 
@@ -45,7 +44,6 @@ class Odb:
45
44
  """
46
45
  try:
47
46
  qt_model.SetViewDirection(direction=direction, horizontalDegree=horizontal_degree, verticalDegree=vertical_degree, scale=scale)
48
- qt_model.UpdateModel()
49
47
  except Exception as ex:
50
48
  raise Exception(ex)
51
49
 
@@ -62,7 +60,6 @@ class Odb:
62
60
  """
63
61
  try:
64
62
  qt_model.ActivateStructure(nodeIds=node_ids, elementIds=element_ids)
65
- qt_model.UpdateModel()
66
63
  except Exception as ex:
67
64
  raise Exception(ex)
68
65
 
@@ -79,7 +76,6 @@ class Odb:
79
76
  """
80
77
  try:
81
78
  qt_model.SetUnit(unitForce=unit_force, unit_length=unit_length)
82
- qt_model.UpdateModel()
83
79
  except Exception as ex:
84
80
  raise Exception(ex)
85
81
 
@@ -760,6 +756,43 @@ class Odb:
760
756
  # endregion
761
757
 
762
758
  # region 获取模型信息
759
+ @staticmethod
760
+ def get_element_by_point(x: float = 0, y: float = 0, z: float = 0, tolerance: float = 1):
761
+ """
762
+ 获取某一点指定范围内单元集合,单元中心点为节点平均值
763
+ Args:
764
+ x: 坐标x
765
+ y: 坐标y
766
+ z: 坐标z
767
+ tolerance:容许范围,默认为1
768
+ Example:
769
+ odb.get_element_by_point(0.5,0.5,0.5,tolerance=1)
770
+ Returns: json字符串,包含信息为list[int]
771
+ """
772
+ try:
773
+ qt_result = qt_model.GetElementByPoint(x=x, y=y, z=z, tolerance=tolerance)
774
+ result = list(qt_result)
775
+ return json.dumps(result)
776
+ except Exception as ex:
777
+ raise Exception(ex)
778
+
779
+ @staticmethod
780
+ def get_element_by_material(name: str = ""):
781
+ """
782
+ 获取某一材料相应的单元
783
+ Args:
784
+ name:材料名称
785
+ Example:
786
+ odb.get_element_by_material("材料1")
787
+ Returns: json字符串,包含信息为list[int]
788
+ """
789
+ try:
790
+ qt_result = qt_model.GetElementByMaterial(name=name)
791
+ result = list(qt_result)
792
+ return json.dumps(result)
793
+ except Exception as ex:
794
+ raise Exception(ex)
795
+
763
796
  @staticmethod
764
797
  def get_overlap_nodes(round_num: int = 4):
765
798
  """
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: qtmodel
3
- Version: 0.5.47
4
- Summary: python modeling for qt 2024-12-17
3
+ Version: 0.5.49
4
+ Summary: python modeling for qt 2024-12-18
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.47 - 2024-12-17
15
+ # 最新版本 V0.5.49 - 2024-12-18
16
16
  > pip install --upgrade qtmodel -i https://pypi.org/simple
17
- - 除荷载组合外不自动刷新模型,用户可自行调用update_model刷新模型
17
+ - 增加两个获取单元接口
18
18
  ## 项目管理
19
19
  ### update_bim
20
20
  刷新Bim模型信息
@@ -2387,6 +2387,29 @@ odb.plot_plate_element_stress(file_path=r"D:\\图片\\板应力.png",component=0
2387
2387
  ```
2388
2388
  Returns: 无
2389
2389
  ## 获取模型信息
2390
+ ### get_element_by_point
2391
+ 获取某一点指定范围内单元集合,单元中心点为节点平均值
2392
+ > 参数:
2393
+ > x: 坐标x
2394
+ > y: 坐标y
2395
+ > z: 坐标z
2396
+ > tolerance:容许范围,默认为1
2397
+ ```Python
2398
+ # 示例代码
2399
+ from qtmodel import *
2400
+ odb.get_element_by_point(0.5,0.5,0.5,tolerance=1)
2401
+ ```
2402
+ Returns: json字符串,包含信息为list[int]
2403
+ ### get_element_by_material
2404
+ 获取某一材料相应的单元
2405
+ > 参数:
2406
+ > name:材料名称
2407
+ ```Python
2408
+ # 示例代码
2409
+ from qtmodel import *
2410
+ odb.get_element_by_material("材料1")
2411
+ ```
2412
+ Returns: json字符串,包含信息为list[int]
2390
2413
  ### get_overlap_nodes
2391
2414
  获取重合节点
2392
2415
  > 参数:
File without changes
File without changes
File without changes
File without changes