qtmodel 0.6.1__tar.gz → 0.6.3__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.6.1 → qtmodel-0.6.3}/PKG-INFO +29 -6
- {qtmodel-0.6.1 → qtmodel-0.6.3}/README.md +27 -4
- {qtmodel-0.6.1 → qtmodel-0.6.3}/qtmodel/qt_mdb.py +23 -7
- {qtmodel-0.6.1 → qtmodel-0.6.3}/qtmodel/qt_odb.py +22 -0
- {qtmodel-0.6.1 → qtmodel-0.6.3}/qtmodel.egg-info/PKG-INFO +29 -6
- {qtmodel-0.6.1 → qtmodel-0.6.3}/setup.py +1 -1
- {qtmodel-0.6.1 → qtmodel-0.6.3}/qtmodel/__init__.py +0 -0
- {qtmodel-0.6.1 → qtmodel-0.6.3}/qtmodel/qt_db.py +0 -0
- {qtmodel-0.6.1 → qtmodel-0.6.3}/qtmodel.egg-info/SOURCES.txt +0 -0
- {qtmodel-0.6.1 → qtmodel-0.6.3}/qtmodel.egg-info/dependency_links.txt +0 -0
- {qtmodel-0.6.1 → qtmodel-0.6.3}/qtmodel.egg-info/top_level.txt +0 -0
- {qtmodel-0.6.1 → qtmodel-0.6.3}/setup.cfg +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: qtmodel
|
|
3
|
-
Version: 0.6.
|
|
4
|
-
Summary: python modeling for qt 2025-01-
|
|
3
|
+
Version: 0.6.3
|
|
4
|
+
Summary: python modeling for qt 2025-01-17
|
|
5
5
|
Home-page: https://github.com/Inface0443/pyqt
|
|
6
6
|
Author: dqy-zhj
|
|
7
7
|
Author-email: 1105417715@qq.com
|
|
@@ -12,17 +12,27 @@ Classifier: Programming Language :: Python :: 3
|
|
|
12
12
|
Classifier: Operating System :: OS Independent
|
|
13
13
|
Description-Content-Type: text/markdown
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
> 最新版本 V0.6.3 - 2025-01-17
|
|
16
16
|
> pip install --upgrade qtmodel -i https://pypi.org/simple
|
|
17
17
|
- 修改部分接口
|
|
18
|
+
# 建模操作
|
|
18
19
|
## 项目管理
|
|
19
|
-
###
|
|
20
|
-
|
|
20
|
+
### undo_model
|
|
21
|
+
撤销模型上次操作
|
|
21
22
|
> 参数:
|
|
22
23
|
```Python
|
|
23
24
|
# 示例代码
|
|
24
25
|
from qtmodel import *
|
|
25
|
-
mdb.
|
|
26
|
+
mdb.undo_model()
|
|
27
|
+
```
|
|
28
|
+
Returns: 无
|
|
29
|
+
### redo_model
|
|
30
|
+
重做上次撤销
|
|
31
|
+
> 参数:
|
|
32
|
+
```Python
|
|
33
|
+
# 示例代码
|
|
34
|
+
from qtmodel import *
|
|
35
|
+
mdb.redo_model()
|
|
26
36
|
```
|
|
27
37
|
Returns: 无
|
|
28
38
|
### update_model
|
|
@@ -2669,6 +2679,7 @@ Returns: 无
|
|
|
2669
2679
|
更新荷载组合
|
|
2670
2680
|
> 参数:
|
|
2671
2681
|
> name:荷载组合名
|
|
2682
|
+
> new_name:新荷载组合名,默认不修改
|
|
2672
2683
|
> combine_type:荷载组合类型 (1-叠加 2-判别 3-包络)
|
|
2673
2684
|
> describe:描述
|
|
2674
2685
|
> combine_info:荷载组合信息 [(荷载工况类型,工况名,系数)...] 工况类型如下
|
|
@@ -2690,6 +2701,7 @@ from qtmodel import *
|
|
|
2690
2701
|
mdb.remove_load_combine(name="荷载组合1")
|
|
2691
2702
|
```
|
|
2692
2703
|
Returns: 无
|
|
2704
|
+
# 视图与结果提取
|
|
2693
2705
|
## 视图控制
|
|
2694
2706
|
### display_node_id
|
|
2695
2707
|
设置节点号显示
|
|
@@ -2866,6 +2878,17 @@ odb.get_node_displacement(node_id=[1,2,3],stage_id=1)
|
|
|
2866
2878
|
odb.get_node_displacement(node_id=1,stage_id=-1,case_name="工况名")
|
|
2867
2879
|
```
|
|
2868
2880
|
Returns: json字符串,包含信息为list[dict] or dict
|
|
2881
|
+
### get_vibration_node_displacement
|
|
2882
|
+
获取指定节点指定模态的振型向量
|
|
2883
|
+
> 参数:
|
|
2884
|
+
> node_id: 节点号
|
|
2885
|
+
> mode: 模态号
|
|
2886
|
+
```Python
|
|
2887
|
+
# 示例代码
|
|
2888
|
+
from qtmodel import *
|
|
2889
|
+
odb.get_vibration_node_displacement(node_id=1,mode=1)
|
|
2890
|
+
```
|
|
2891
|
+
Returns: json字符串,包含信息为list[dict] or dict
|
|
2869
2892
|
## 绘制模型结果
|
|
2870
2893
|
### plot_reaction_result
|
|
2871
2894
|
保存结果图片到指定文件甲
|
|
@@ -1,14 +1,24 @@
|
|
|
1
|
-
|
|
1
|
+
> 最新版本 V0.6.3 - 2025-01-17
|
|
2
2
|
> pip install --upgrade qtmodel -i https://pypi.org/simple
|
|
3
3
|
- 修改部分接口
|
|
4
|
+
# 建模操作
|
|
4
5
|
## 项目管理
|
|
5
|
-
###
|
|
6
|
-
|
|
6
|
+
### undo_model
|
|
7
|
+
撤销模型上次操作
|
|
7
8
|
> 参数:
|
|
8
9
|
```Python
|
|
9
10
|
# 示例代码
|
|
10
11
|
from qtmodel import *
|
|
11
|
-
mdb.
|
|
12
|
+
mdb.undo_model()
|
|
13
|
+
```
|
|
14
|
+
Returns: 无
|
|
15
|
+
### redo_model
|
|
16
|
+
重做上次撤销
|
|
17
|
+
> 参数:
|
|
18
|
+
```Python
|
|
19
|
+
# 示例代码
|
|
20
|
+
from qtmodel import *
|
|
21
|
+
mdb.redo_model()
|
|
12
22
|
```
|
|
13
23
|
Returns: 无
|
|
14
24
|
### update_model
|
|
@@ -2655,6 +2665,7 @@ Returns: 无
|
|
|
2655
2665
|
更新荷载组合
|
|
2656
2666
|
> 参数:
|
|
2657
2667
|
> name:荷载组合名
|
|
2668
|
+
> new_name:新荷载组合名,默认不修改
|
|
2658
2669
|
> combine_type:荷载组合类型 (1-叠加 2-判别 3-包络)
|
|
2659
2670
|
> describe:描述
|
|
2660
2671
|
> combine_info:荷载组合信息 [(荷载工况类型,工况名,系数)...] 工况类型如下
|
|
@@ -2676,6 +2687,7 @@ from qtmodel import *
|
|
|
2676
2687
|
mdb.remove_load_combine(name="荷载组合1")
|
|
2677
2688
|
```
|
|
2678
2689
|
Returns: 无
|
|
2690
|
+
# 视图与结果提取
|
|
2679
2691
|
## 视图控制
|
|
2680
2692
|
### display_node_id
|
|
2681
2693
|
设置节点号显示
|
|
@@ -2852,6 +2864,17 @@ odb.get_node_displacement(node_id=[1,2,3],stage_id=1)
|
|
|
2852
2864
|
odb.get_node_displacement(node_id=1,stage_id=-1,case_name="工况名")
|
|
2853
2865
|
```
|
|
2854
2866
|
Returns: json字符串,包含信息为list[dict] or dict
|
|
2867
|
+
### get_vibration_node_displacement
|
|
2868
|
+
获取指定节点指定模态的振型向量
|
|
2869
|
+
> 参数:
|
|
2870
|
+
> node_id: 节点号
|
|
2871
|
+
> mode: 模态号
|
|
2872
|
+
```Python
|
|
2873
|
+
# 示例代码
|
|
2874
|
+
from qtmodel import *
|
|
2875
|
+
odb.get_vibration_node_displacement(node_id=1,mode=1)
|
|
2876
|
+
```
|
|
2877
|
+
Returns: json字符串,包含信息为list[dict] or dict
|
|
2855
2878
|
## 绘制模型结果
|
|
2856
2879
|
### plot_reaction_result
|
|
2857
2880
|
保存结果图片到指定文件甲
|
|
@@ -9,16 +9,30 @@ class Mdb:
|
|
|
9
9
|
|
|
10
10
|
# region 项目管理
|
|
11
11
|
@staticmethod
|
|
12
|
-
def
|
|
12
|
+
def undo_model():
|
|
13
13
|
"""
|
|
14
|
-
|
|
15
|
-
Args
|
|
14
|
+
撤销模型上次操作
|
|
15
|
+
Args:无
|
|
16
|
+
Example:
|
|
17
|
+
mdb.undo_model()
|
|
18
|
+
Returns: 无
|
|
19
|
+
"""
|
|
20
|
+
try:
|
|
21
|
+
qt_model.Undo()
|
|
22
|
+
except Exception as ex:
|
|
23
|
+
raise Exception(ex)
|
|
24
|
+
|
|
25
|
+
@staticmethod
|
|
26
|
+
def redo_model():
|
|
27
|
+
"""
|
|
28
|
+
重做上次撤销
|
|
29
|
+
Args:无
|
|
16
30
|
Example:
|
|
17
|
-
|
|
31
|
+
mdb.redo_model()
|
|
18
32
|
Returns: 无
|
|
19
33
|
"""
|
|
20
34
|
try:
|
|
21
|
-
qt_model.
|
|
35
|
+
qt_model.Redo()
|
|
22
36
|
except Exception as ex:
|
|
23
37
|
raise Exception(ex)
|
|
24
38
|
|
|
@@ -4207,11 +4221,13 @@ class Mdb:
|
|
|
4207
4221
|
raise Exception(ex)
|
|
4208
4222
|
|
|
4209
4223
|
@staticmethod
|
|
4210
|
-
def update_load_combine(name: str = "", combine_type: int = 1, describe: str = "",
|
|
4224
|
+
def update_load_combine(name: str = "", new_name: str = "", combine_type: int = 1, describe: str = "",
|
|
4225
|
+
combine_info: list[tuple[str, str, float]] = None):
|
|
4211
4226
|
"""
|
|
4212
4227
|
更新荷载组合
|
|
4213
4228
|
Args:
|
|
4214
4229
|
name:荷载组合名
|
|
4230
|
+
new_name:新荷载组合名,默认不修改
|
|
4215
4231
|
combine_type:荷载组合类型 (1-叠加 2-判别 3-包络)
|
|
4216
4232
|
describe:描述
|
|
4217
4233
|
combine_info:荷载组合信息 [(荷载工况类型,工况名,系数)...] 工况类型如下
|
|
@@ -4224,7 +4240,7 @@ class Mdb:
|
|
|
4224
4240
|
try:
|
|
4225
4241
|
if combine_info is None:
|
|
4226
4242
|
combine_info = []
|
|
4227
|
-
qt_model.UpdateLoadCombine(name=name, loadCombineType=combine_type, describe=describe, caseAndFactor=combine_info)
|
|
4243
|
+
qt_model.UpdateLoadCombine(name=name, newName=new_name, loadCombineType=combine_type, describe=describe, caseAndFactor=combine_info)
|
|
4228
4244
|
except Exception as ex:
|
|
4229
4245
|
raise Exception(ex)
|
|
4230
4246
|
|
|
@@ -343,6 +343,28 @@ class Odb:
|
|
|
343
343
|
except Exception as ex:
|
|
344
344
|
raise Exception(ex)
|
|
345
345
|
|
|
346
|
+
@staticmethod
|
|
347
|
+
def get_vibration_node_displacement(node_id: (Union[int, List[int]]) = None, mode: int = 1):
|
|
348
|
+
"""
|
|
349
|
+
获取指定节点指定模态的振型向量
|
|
350
|
+
Args:
|
|
351
|
+
node_id: 节点号
|
|
352
|
+
mode: 模态号
|
|
353
|
+
Example:
|
|
354
|
+
odb.get_vibration_node_displacement(node_id=1,mode=1)
|
|
355
|
+
Returns: json字符串,包含信息为list[dict] or dict
|
|
356
|
+
"""
|
|
357
|
+
try:
|
|
358
|
+
bf_list = qt_model.GetVibrationNodeDisplacement(nodeIds=node_id, mode=mode)
|
|
359
|
+
list_res = []
|
|
360
|
+
for item in bf_list:
|
|
361
|
+
displacements = [item.Displacement.Dx, item.Displacement.Dy, item.Displacement.Dz,
|
|
362
|
+
item.Displacement.Rx, item.Displacement.Ry, item.Displacement.Rz]
|
|
363
|
+
list_res.append(str(NodeDisplacement(item.NodeId, displacements)))
|
|
364
|
+
return json.dumps(list_res) if len(list_res) > 1 else list_res[0]
|
|
365
|
+
except Exception as ex:
|
|
366
|
+
raise Exception(ex)
|
|
367
|
+
|
|
346
368
|
# endregion
|
|
347
369
|
|
|
348
370
|
# region 绘制模型结果
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: qtmodel
|
|
3
|
-
Version: 0.6.
|
|
4
|
-
Summary: python modeling for qt 2025-01-
|
|
3
|
+
Version: 0.6.3
|
|
4
|
+
Summary: python modeling for qt 2025-01-17
|
|
5
5
|
Home-page: https://github.com/Inface0443/pyqt
|
|
6
6
|
Author: dqy-zhj
|
|
7
7
|
Author-email: 1105417715@qq.com
|
|
@@ -12,17 +12,27 @@ Classifier: Programming Language :: Python :: 3
|
|
|
12
12
|
Classifier: Operating System :: OS Independent
|
|
13
13
|
Description-Content-Type: text/markdown
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
> 最新版本 V0.6.3 - 2025-01-17
|
|
16
16
|
> pip install --upgrade qtmodel -i https://pypi.org/simple
|
|
17
17
|
- 修改部分接口
|
|
18
|
+
# 建模操作
|
|
18
19
|
## 项目管理
|
|
19
|
-
###
|
|
20
|
-
|
|
20
|
+
### undo_model
|
|
21
|
+
撤销模型上次操作
|
|
21
22
|
> 参数:
|
|
22
23
|
```Python
|
|
23
24
|
# 示例代码
|
|
24
25
|
from qtmodel import *
|
|
25
|
-
mdb.
|
|
26
|
+
mdb.undo_model()
|
|
27
|
+
```
|
|
28
|
+
Returns: 无
|
|
29
|
+
### redo_model
|
|
30
|
+
重做上次撤销
|
|
31
|
+
> 参数:
|
|
32
|
+
```Python
|
|
33
|
+
# 示例代码
|
|
34
|
+
from qtmodel import *
|
|
35
|
+
mdb.redo_model()
|
|
26
36
|
```
|
|
27
37
|
Returns: 无
|
|
28
38
|
### update_model
|
|
@@ -2669,6 +2679,7 @@ Returns: 无
|
|
|
2669
2679
|
更新荷载组合
|
|
2670
2680
|
> 参数:
|
|
2671
2681
|
> name:荷载组合名
|
|
2682
|
+
> new_name:新荷载组合名,默认不修改
|
|
2672
2683
|
> combine_type:荷载组合类型 (1-叠加 2-判别 3-包络)
|
|
2673
2684
|
> describe:描述
|
|
2674
2685
|
> combine_info:荷载组合信息 [(荷载工况类型,工况名,系数)...] 工况类型如下
|
|
@@ -2690,6 +2701,7 @@ from qtmodel import *
|
|
|
2690
2701
|
mdb.remove_load_combine(name="荷载组合1")
|
|
2691
2702
|
```
|
|
2692
2703
|
Returns: 无
|
|
2704
|
+
# 视图与结果提取
|
|
2693
2705
|
## 视图控制
|
|
2694
2706
|
### display_node_id
|
|
2695
2707
|
设置节点号显示
|
|
@@ -2866,6 +2878,17 @@ odb.get_node_displacement(node_id=[1,2,3],stage_id=1)
|
|
|
2866
2878
|
odb.get_node_displacement(node_id=1,stage_id=-1,case_name="工况名")
|
|
2867
2879
|
```
|
|
2868
2880
|
Returns: json字符串,包含信息为list[dict] or dict
|
|
2881
|
+
### get_vibration_node_displacement
|
|
2882
|
+
获取指定节点指定模态的振型向量
|
|
2883
|
+
> 参数:
|
|
2884
|
+
> node_id: 节点号
|
|
2885
|
+
> mode: 模态号
|
|
2886
|
+
```Python
|
|
2887
|
+
# 示例代码
|
|
2888
|
+
from qtmodel import *
|
|
2889
|
+
odb.get_vibration_node_displacement(node_id=1,mode=1)
|
|
2890
|
+
```
|
|
2891
|
+
Returns: json字符串,包含信息为list[dict] or dict
|
|
2869
2892
|
## 绘制模型结果
|
|
2870
2893
|
### plot_reaction_result
|
|
2871
2894
|
保存结果图片到指定文件甲
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|