qtmodel 0.5.48__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,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: qtmodel
3
- Version: 0.5.48
3
+ Version: 0.5.49
4
4
  Summary: python modeling for qt 2024-12-18
5
5
  Home-page: https://github.com/Inface0443/pyqt
6
6
  Author: dqy-zhj
@@ -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.48 - 2024-12-18
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.48 - 2024-12-18
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
  > 参数:
@@ -756,6 +756,43 @@ class Odb:
756
756
  # endregion
757
757
 
758
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
+
759
796
  @staticmethod
760
797
  def get_overlap_nodes(round_num: int = 4):
761
798
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: qtmodel
3
- Version: 0.5.48
3
+ Version: 0.5.49
4
4
  Summary: python modeling for qt 2024-12-18
5
5
  Home-page: https://github.com/Inface0443/pyqt
6
6
  Author: dqy-zhj
@@ -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.48 - 2024-12-18
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
File without changes