qtmodel 0.5.42__tar.gz → 0.5.44__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.42 → qtmodel-0.5.44}/PKG-INFO +34 -9
- {qtmodel-0.5.42 → qtmodel-0.5.44}/README.md +32 -7
- {qtmodel-0.5.42 → qtmodel-0.5.44}/qtmodel/qt_mdb.py +37 -41
- {qtmodel-0.5.42 → qtmodel-0.5.44}/qtmodel/qt_odb.py +38 -1
- {qtmodel-0.5.42 → qtmodel-0.5.44}/qtmodel.egg-info/PKG-INFO +34 -9
- {qtmodel-0.5.42 → qtmodel-0.5.44}/setup.py +7 -2
- {qtmodel-0.5.42 → qtmodel-0.5.44}/qtmodel/__init__.py +0 -0
- {qtmodel-0.5.42 → qtmodel-0.5.44}/qtmodel/qt_db.py +0 -0
- {qtmodel-0.5.42 → qtmodel-0.5.44}/qtmodel.egg-info/SOURCES.txt +0 -0
- {qtmodel-0.5.42 → qtmodel-0.5.44}/qtmodel.egg-info/dependency_links.txt +0 -0
- {qtmodel-0.5.42 → qtmodel-0.5.44}/qtmodel.egg-info/top_level.txt +0 -0
- {qtmodel-0.5.42 → qtmodel-0.5.44}/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
|
|
3
|
+
Version: 0.5.44
|
|
4
|
+
Summary: python modeling for qt 2024-12-09
|
|
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.44 - 2024-12-09
|
|
16
16
|
> pip install --upgrade qtmodel -i https://pypi.org/simple
|
|
17
|
-
-
|
|
17
|
+
- 添加视图控制接口
|
|
18
18
|
## 项目管理
|
|
19
19
|
### update_bim
|
|
20
20
|
刷新Bim模型信息
|
|
@@ -119,7 +119,7 @@ Returns: 无
|
|
|
119
119
|
> 参数:
|
|
120
120
|
> file_path:导出文件全路径,支持格式(.mct/.qdat/.obj/.txt/.py)
|
|
121
121
|
> convert_sec_group:是否将变截面组转换为变截面
|
|
122
|
-
> type_kind:输出文件类型 1
|
|
122
|
+
> type_kind:输出文件类型 1-全部模型文件 2-计算相关文件 (py输出时 2-输出截面特性)
|
|
123
123
|
> group_name:obj与 APDL导出时指定结构组导出
|
|
124
124
|
```Python
|
|
125
125
|
# 示例代码
|
|
@@ -626,6 +626,8 @@ Returns: 无
|
|
|
626
626
|
> name:截面名称
|
|
627
627
|
> begin_id:截面始端编号
|
|
628
628
|
> end_id:截面末端编号
|
|
629
|
+
> shear_consider:考虑剪切变形
|
|
630
|
+
> sec_normalize: 开启变截面线圈和线宽自适应排序 (避免两端截面绘制顺序导致的渲染和计算失效)
|
|
629
631
|
```Python
|
|
630
632
|
# 示例代码
|
|
631
633
|
from qtmodel import *
|
|
@@ -1243,7 +1245,7 @@ Returns: 无
|
|
|
1243
1245
|
> num:根数
|
|
1244
1246
|
> line_type:1-导线点 2-折线点
|
|
1245
1247
|
> position_type: 定位方式 1-直线 2-轨迹线
|
|
1246
|
-
> symmetry: 对称点 0
|
|
1248
|
+
> symmetry: 对称点 0-左端点 1-右端点 2-不对称
|
|
1247
1249
|
> control_points: 控制点信息[(x1,z1,r1),(x2,z2,r2)....]
|
|
1248
1250
|
> control_points_lateral: 控制点横弯信息[(x1,y1,r1),(x2,y2,r2)....],无横弯时不必输入
|
|
1249
1251
|
> point_insert: 定位方式
|
|
@@ -1880,15 +1882,15 @@ active_boundaries=[("默认边界组",1)],active_loads=[("默认荷载组1",0)])
|
|
|
1880
1882
|
```
|
|
1881
1883
|
Returns: 无
|
|
1882
1884
|
### update_weight_stage
|
|
1883
|
-
|
|
1885
|
+
更新施工阶段自重
|
|
1884
1886
|
> 参数:
|
|
1885
|
-
>
|
|
1887
|
+
> name:施工阶段信息
|
|
1886
1888
|
> structure_group_name:结构组名
|
|
1887
1889
|
> weight_stage_id: 计自重阶段号 (0-不计自重,1-本阶段 n-第n阶段)
|
|
1888
1890
|
```Python
|
|
1889
1891
|
# 示例代码
|
|
1890
1892
|
from qtmodel import *
|
|
1891
|
-
mdb.update_weight_stage(
|
|
1893
|
+
mdb.update_weight_stage(name="施工阶段1",structure_group_name="默认结构组",weight_stage_id=1)
|
|
1892
1894
|
```
|
|
1893
1895
|
Returns: 无
|
|
1894
1896
|
### remove_construction_stage
|
|
@@ -1943,6 +1945,29 @@ mdb.remove_load_combine(name="荷载组合1")
|
|
|
1943
1945
|
```
|
|
1944
1946
|
Returns: 无
|
|
1945
1947
|
## 视图控制
|
|
1948
|
+
### set_view_camera
|
|
1949
|
+
更改三维显示相机设置
|
|
1950
|
+
> 参数:
|
|
1951
|
+
> camera_point: 相机坐标点
|
|
1952
|
+
> focus_point: 相机焦点
|
|
1953
|
+
> camera_rotate:相机绕XYZ旋转角度
|
|
1954
|
+
> scale: 缩放系数
|
|
1955
|
+
```Python
|
|
1956
|
+
# 示例代码
|
|
1957
|
+
from qtmodel import *
|
|
1958
|
+
odb.set_view_camera(camera_point=(-100,-100,-100),focus_point=(0,0,0))
|
|
1959
|
+
```
|
|
1960
|
+
Returns: 无
|
|
1961
|
+
### set_view_direction
|
|
1962
|
+
更改三维显示默认视图
|
|
1963
|
+
> 参数:
|
|
1964
|
+
> direction: 1-空间视图1 2-前视图 3-三维视图2 4-左视图 5-顶视图 6-右视图 7-空间视图3 8-后视图 9-空间视图4 10-底视图
|
|
1965
|
+
```Python
|
|
1966
|
+
# 示例代码
|
|
1967
|
+
from qtmodel import *
|
|
1968
|
+
odb.set_view_direction(1)
|
|
1969
|
+
```
|
|
1970
|
+
Returns: 无
|
|
1946
1971
|
### activate_structure
|
|
1947
1972
|
激活指定阶段和单元,默认激活所有
|
|
1948
1973
|
> 参数:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# 最新版本 V0.5.
|
|
1
|
+
# 最新版本 V0.5.44 - 2024-12-09
|
|
2
2
|
> pip install --upgrade qtmodel -i https://pypi.org/simple
|
|
3
|
-
-
|
|
3
|
+
- 添加视图控制接口
|
|
4
4
|
## 项目管理
|
|
5
5
|
### update_bim
|
|
6
6
|
刷新Bim模型信息
|
|
@@ -105,7 +105,7 @@ Returns: 无
|
|
|
105
105
|
> 参数:
|
|
106
106
|
> file_path:导出文件全路径,支持格式(.mct/.qdat/.obj/.txt/.py)
|
|
107
107
|
> convert_sec_group:是否将变截面组转换为变截面
|
|
108
|
-
> type_kind:输出文件类型 1
|
|
108
|
+
> type_kind:输出文件类型 1-全部模型文件 2-计算相关文件 (py输出时 2-输出截面特性)
|
|
109
109
|
> group_name:obj与 APDL导出时指定结构组导出
|
|
110
110
|
```Python
|
|
111
111
|
# 示例代码
|
|
@@ -612,6 +612,8 @@ Returns: 无
|
|
|
612
612
|
> name:截面名称
|
|
613
613
|
> begin_id:截面始端编号
|
|
614
614
|
> end_id:截面末端编号
|
|
615
|
+
> shear_consider:考虑剪切变形
|
|
616
|
+
> sec_normalize: 开启变截面线圈和线宽自适应排序 (避免两端截面绘制顺序导致的渲染和计算失效)
|
|
615
617
|
```Python
|
|
616
618
|
# 示例代码
|
|
617
619
|
from qtmodel import *
|
|
@@ -1229,7 +1231,7 @@ Returns: 无
|
|
|
1229
1231
|
> num:根数
|
|
1230
1232
|
> line_type:1-导线点 2-折线点
|
|
1231
1233
|
> position_type: 定位方式 1-直线 2-轨迹线
|
|
1232
|
-
> symmetry: 对称点 0
|
|
1234
|
+
> symmetry: 对称点 0-左端点 1-右端点 2-不对称
|
|
1233
1235
|
> control_points: 控制点信息[(x1,z1,r1),(x2,z2,r2)....]
|
|
1234
1236
|
> control_points_lateral: 控制点横弯信息[(x1,y1,r1),(x2,y2,r2)....],无横弯时不必输入
|
|
1235
1237
|
> point_insert: 定位方式
|
|
@@ -1866,15 +1868,15 @@ active_boundaries=[("默认边界组",1)],active_loads=[("默认荷载组1",0)])
|
|
|
1866
1868
|
```
|
|
1867
1869
|
Returns: 无
|
|
1868
1870
|
### update_weight_stage
|
|
1869
|
-
|
|
1871
|
+
更新施工阶段自重
|
|
1870
1872
|
> 参数:
|
|
1871
|
-
>
|
|
1873
|
+
> name:施工阶段信息
|
|
1872
1874
|
> structure_group_name:结构组名
|
|
1873
1875
|
> weight_stage_id: 计自重阶段号 (0-不计自重,1-本阶段 n-第n阶段)
|
|
1874
1876
|
```Python
|
|
1875
1877
|
# 示例代码
|
|
1876
1878
|
from qtmodel import *
|
|
1877
|
-
mdb.update_weight_stage(
|
|
1879
|
+
mdb.update_weight_stage(name="施工阶段1",structure_group_name="默认结构组",weight_stage_id=1)
|
|
1878
1880
|
```
|
|
1879
1881
|
Returns: 无
|
|
1880
1882
|
### remove_construction_stage
|
|
@@ -1929,6 +1931,29 @@ mdb.remove_load_combine(name="荷载组合1")
|
|
|
1929
1931
|
```
|
|
1930
1932
|
Returns: 无
|
|
1931
1933
|
## 视图控制
|
|
1934
|
+
### set_view_camera
|
|
1935
|
+
更改三维显示相机设置
|
|
1936
|
+
> 参数:
|
|
1937
|
+
> camera_point: 相机坐标点
|
|
1938
|
+
> focus_point: 相机焦点
|
|
1939
|
+
> camera_rotate:相机绕XYZ旋转角度
|
|
1940
|
+
> scale: 缩放系数
|
|
1941
|
+
```Python
|
|
1942
|
+
# 示例代码
|
|
1943
|
+
from qtmodel import *
|
|
1944
|
+
odb.set_view_camera(camera_point=(-100,-100,-100),focus_point=(0,0,0))
|
|
1945
|
+
```
|
|
1946
|
+
Returns: 无
|
|
1947
|
+
### set_view_direction
|
|
1948
|
+
更改三维显示默认视图
|
|
1949
|
+
> 参数:
|
|
1950
|
+
> direction: 1-空间视图1 2-前视图 3-三维视图2 4-左视图 5-顶视图 6-右视图 7-空间视图3 8-后视图 9-空间视图4 10-底视图
|
|
1951
|
+
```Python
|
|
1952
|
+
# 示例代码
|
|
1953
|
+
from qtmodel import *
|
|
1954
|
+
odb.set_view_direction(1)
|
|
1955
|
+
```
|
|
1956
|
+
Returns: 无
|
|
1932
1957
|
### activate_structure
|
|
1933
1958
|
激活指定阶段和单元,默认激活所有
|
|
1934
1959
|
> 参数:
|
|
@@ -168,7 +168,7 @@ class Mdb:
|
|
|
168
168
|
Args:
|
|
169
169
|
file_path:导出文件全路径,支持格式(.mct/.qdat/.obj/.txt/.py)
|
|
170
170
|
convert_sec_group:是否将变截面组转换为变截面
|
|
171
|
-
type_kind:输出文件类型 1
|
|
171
|
+
type_kind:输出文件类型 1-全部模型文件 2-计算相关文件 (py输出时 2-输出截面特性)
|
|
172
172
|
group_name:obj与 APDL导出时指定结构组导出
|
|
173
173
|
Example:
|
|
174
174
|
mdb.export_file(file_path="a.mct")
|
|
@@ -231,15 +231,14 @@ class Mdb:
|
|
|
231
231
|
except Exception as ex:
|
|
232
232
|
raise Exception(ex)
|
|
233
233
|
|
|
234
|
-
|
|
235
234
|
@staticmethod
|
|
236
|
-
def update_live_load_setting(lateral_spacing:float = 0.1, vertical_spacing
|
|
237
|
-
displacement_calc_type
|
|
238
|
-
link_calc_type:int
|
|
239
|
-
displacement_track:bool=False,force_track:bool=False,reaction_track:bool=False,
|
|
240
|
-
link_track:bool=False,constrain_track:bool=False,damper_groups:list[str]=None,
|
|
241
|
-
displacement_groups:list[str]=None,force_groups:list[str]=None,reaction_groups:list[str]=None,
|
|
242
|
-
link_groups:list[str]=None,constrain_groups:list[str]=None):
|
|
235
|
+
def update_live_load_setting(lateral_spacing: float = 0.1, vertical_spacing: float = 1, damper_calc_type: int = -1,
|
|
236
|
+
displacement_calc_type: int = -1, force_calc_type: int = -1, reaction_calc_type: int = -1,
|
|
237
|
+
link_calc_type: int = -1, constrain_calc_type: int = -1, eccentricity: float = 0.0,
|
|
238
|
+
displacement_track: bool = False, force_track: bool = False, reaction_track: bool = False,
|
|
239
|
+
link_track: bool = False, constrain_track: bool = False, damper_groups: list[str] = None,
|
|
240
|
+
displacement_groups: list[str] = None, force_groups: list[str] = None, reaction_groups: list[str] = None,
|
|
241
|
+
link_groups: list[str] = None, constrain_groups: list[str] = None):
|
|
243
242
|
"""
|
|
244
243
|
更新移动荷载分析设置
|
|
245
244
|
Args:
|
|
@@ -271,12 +270,12 @@ class Mdb:
|
|
|
271
270
|
"""
|
|
272
271
|
try:
|
|
273
272
|
qt_model.UpdateLiveLoadSetting(
|
|
274
|
-
lateralSpacing=lateral_spacing, verticalSpacing=vertical_spacing,damperCalcType=damper_calc_type,
|
|
273
|
+
lateralSpacing=lateral_spacing, verticalSpacing=vertical_spacing, damperCalcType=damper_calc_type,
|
|
275
274
|
displacementCalcType=displacement_calc_type, forceCalcType=force_calc_type, reactionCalcType=reaction_calc_type,
|
|
276
|
-
linkCalcType=link_calc_type,constrainCalcType=constrain_calc_type,eccentricity=eccentricity,
|
|
277
|
-
displacementTack=displacement_track,forceTrack=force_track,reactionTrack=reaction_track,
|
|
278
|
-
linkTrack=link_track,constrainTrack=constrain_track,damperGroups=damper_groups,displacementGroups=displacement_groups,
|
|
279
|
-
forceGroups=force_groups,reactionGroups=reaction_groups,linkGroups=link_groups,constrainGroups=constrain_groups)
|
|
275
|
+
linkCalcType=link_calc_type, constrainCalcType=constrain_calc_type, eccentricity=eccentricity,
|
|
276
|
+
displacementTack=displacement_track, forceTrack=force_track, reactionTrack=reaction_track,
|
|
277
|
+
linkTrack=link_track, constrainTrack=constrain_track, damperGroups=damper_groups, displacementGroups=displacement_groups,
|
|
278
|
+
forceGroups=force_groups, reactionGroups=reaction_groups, linkGroups=link_groups, constrainGroups=constrain_groups)
|
|
280
279
|
except Exception as ex:
|
|
281
280
|
raise Exception(ex)
|
|
282
281
|
|
|
@@ -944,7 +943,7 @@ class Mdb:
|
|
|
944
943
|
try:
|
|
945
944
|
if sec_type == "混凝土箱梁":
|
|
946
945
|
qt_model.AddSection(id=index, name=name, secType=sec_type, secInfo=sec_info, charmInfo=charm_info,
|
|
947
|
-
symmetry=symmetry, boxNum=box_num,
|
|
946
|
+
symmetry=symmetry, boxNum=box_num, boxHeight=box_height, charmInfoR=charm_right, secInfoR=sec_right,
|
|
948
947
|
biasType=bias_type, centerType=center_type, shearConsider=shear_consider,
|
|
949
948
|
biasX=bias_x, biasY=bias_y, secProperty=sec_property)
|
|
950
949
|
elif sec_type == "工字钢梁" or sec_type == "箱型钢梁":
|
|
@@ -965,7 +964,7 @@ class Mdb:
|
|
|
965
964
|
biasType=bias_type, centerType=center_type, shearConsider=shear_consider,
|
|
966
965
|
biasX=bias_x, biasY=bias_y, secProperty=sec_property)
|
|
967
966
|
except Exception as ex:
|
|
968
|
-
raise Exception(ex)
|
|
967
|
+
raise Exception(f"添加截面:{name}失败,{ex}")
|
|
969
968
|
|
|
970
969
|
@staticmethod
|
|
971
970
|
def add_single_section(index: int = -1, name: str = "", sec_type: str = "矩形", sec_dict: dict = None):
|
|
@@ -1012,7 +1011,8 @@ class Mdb:
|
|
|
1012
1011
|
raise Exception(ex)
|
|
1013
1012
|
|
|
1014
1013
|
@staticmethod
|
|
1015
|
-
def add_tapper_section_by_id(index: int = -1, name: str = "", begin_id: int = 1, end_id: int = 1
|
|
1014
|
+
def add_tapper_section_by_id(index: int = -1, name: str = "", begin_id: int = 1, end_id: int = 1,
|
|
1015
|
+
shear_consider: bool = True, sec_normalize: bool = False):
|
|
1016
1016
|
"""
|
|
1017
1017
|
添加变截面,需先建立单一截面
|
|
1018
1018
|
Args:
|
|
@@ -1020,12 +1020,15 @@ class Mdb:
|
|
|
1020
1020
|
name:截面名称
|
|
1021
1021
|
begin_id:截面始端编号
|
|
1022
1022
|
end_id:截面末端编号
|
|
1023
|
+
shear_consider:考虑剪切变形
|
|
1024
|
+
sec_normalize: 开启变截面线圈和线宽自适应排序 (避免两端截面绘制顺序导致的渲染和计算失效)
|
|
1023
1025
|
Example:
|
|
1024
1026
|
mdb.add_tapper_section_by_id(name="变截面1",begin_id=1,end_id=2)
|
|
1025
1027
|
Returns: 无
|
|
1026
1028
|
"""
|
|
1027
1029
|
try:
|
|
1028
|
-
qt_model.AddTapperSectionById(id=index, name=name, beginId=begin_id, endId=end_id
|
|
1030
|
+
qt_model.AddTapperSectionById(id=index, name=name, beginId=begin_id, endId=end_id,
|
|
1031
|
+
considerShear=shear_consider, secNormalize=sec_normalize)
|
|
1029
1032
|
except Exception as ex:
|
|
1030
1033
|
raise Exception(ex)
|
|
1031
1034
|
|
|
@@ -1131,9 +1134,8 @@ class Mdb:
|
|
|
1131
1134
|
"""
|
|
1132
1135
|
try:
|
|
1133
1136
|
qt_model.AddTapperSectionGroup(ids=ids, name=name, factorW=factor_w, factorH=factor_h, w=ref_w, h=ref_h, disW=dis_w, disH=dis_h)
|
|
1134
|
-
qt_model.UpdateModel()
|
|
1135
1137
|
except Exception as ex:
|
|
1136
|
-
raise Exception(ex)
|
|
1138
|
+
raise Exception(f"添加变截面组:{name}失败,{ex}")
|
|
1137
1139
|
|
|
1138
1140
|
@staticmethod
|
|
1139
1141
|
def update_section_bias(index: int = 1, bias_type: str = "中心", center_type: str = "质心", shear_consider: bool = True,
|
|
@@ -1999,13 +2001,12 @@ class Mdb:
|
|
|
1999
2001
|
positionType=position_type, controlPoints=control_points,
|
|
2000
2002
|
pointInsert=point_insert, tendonDirection=tendon_direction,
|
|
2001
2003
|
rotationAngle=rotation_angle, trackGroup=track_group, isProject=projection)
|
|
2002
|
-
qt_model.UpdateModel()
|
|
2003
2004
|
except Exception as ex:
|
|
2004
|
-
raise Exception(ex)
|
|
2005
|
+
raise Exception(f"添加三维钢束:{name}失败,{ex}")
|
|
2005
2006
|
|
|
2006
2007
|
@staticmethod
|
|
2007
2008
|
def add_tendon_2d(name: str, property_name: str = "", group_name: str = "默认钢束组",
|
|
2008
|
-
num: int = 1, line_type: int = 1, position_type: int = 1, symmetry: int =
|
|
2009
|
+
num: int = 1, line_type: int = 1, position_type: int = 1, symmetry: int = 2,
|
|
2009
2010
|
control_points: list[tuple[float, float, float]] = None,
|
|
2010
2011
|
control_points_lateral: list[tuple[float, float, float]] = None,
|
|
2011
2012
|
point_insert: tuple[float, float, float] = None,
|
|
@@ -2020,7 +2021,7 @@ class Mdb:
|
|
|
2020
2021
|
num:根数
|
|
2021
2022
|
line_type:1-导线点 2-折线点
|
|
2022
2023
|
position_type: 定位方式 1-直线 2-轨迹线
|
|
2023
|
-
symmetry: 对称点 0
|
|
2024
|
+
symmetry: 对称点 0-左端点 1-右端点 2-不对称
|
|
2024
2025
|
control_points: 控制点信息[(x1,z1,r1),(x2,z2,r2)....]
|
|
2025
2026
|
control_points_lateral: 控制点横弯信息[(x1,y1,r1),(x2,y2,r2)....],无横弯时不必输入
|
|
2026
2027
|
point_insert: 定位方式
|
|
@@ -2050,9 +2051,8 @@ class Mdb:
|
|
|
2050
2051
|
controlPointsLateral=control_points_lateral,
|
|
2051
2052
|
pointInsert=point_insert, tendonDirection=tendon_direction,
|
|
2052
2053
|
rotationAngle=rotation_angle, trackGroup=track_group, isProject=projection)
|
|
2053
|
-
qt_model.UpdateModel()
|
|
2054
2054
|
except Exception as ex:
|
|
2055
|
-
raise Exception(ex)
|
|
2055
|
+
raise Exception(f"添加二维钢束:{name}失败,{ex}")
|
|
2056
2056
|
|
|
2057
2057
|
@staticmethod
|
|
2058
2058
|
def update_tendon_element(ids: list[int] = None):
|
|
@@ -2418,7 +2418,7 @@ class Mdb:
|
|
|
2418
2418
|
if load_type == 2 or load_type == 4:
|
|
2419
2419
|
raise Exception("操作错误,板单元暂不支持弯矩荷载")
|
|
2420
2420
|
if load_type == 1:
|
|
2421
|
-
qt_model.AddPlateElementLoad(elementId=element_id, caseName=case_name, loadType=load_type,
|
|
2421
|
+
qt_model.AddPlateElementLoad(elementId=element_id, caseName=case_name, loadType=load_type, distanceList=list_xy,
|
|
2422
2422
|
coordSystem=coord_system, groupName=group_name, loads=list_load)
|
|
2423
2423
|
elif load_type == 3:
|
|
2424
2424
|
if load_place == 0:
|
|
@@ -2463,7 +2463,7 @@ class Mdb:
|
|
|
2463
2463
|
try:
|
|
2464
2464
|
if parameters is None:
|
|
2465
2465
|
raise Exception("操作错误,制造误差信息不能为空")
|
|
2466
|
-
if len(parameters) != 5
|
|
2466
|
+
if len(parameters) != 5 and len(parameters) != 7:
|
|
2467
2467
|
raise Exception("操作错误,误差列表有误")
|
|
2468
2468
|
qt_model.AddDeviationParameter(name=name, elementType=element_type, parameterInfo=parameters)
|
|
2469
2469
|
qt_model.UpdateModel()
|
|
@@ -2984,9 +2984,8 @@ class Mdb:
|
|
|
2984
2984
|
qt_model.AddConstructionStage(name=name, duration=duration, activeStructures=active_structures, inActiveStructures=delete_structures,
|
|
2985
2985
|
activeBoundaries=active_boundaries, inActiveBoundaries=delete_boundaries, activeLoads=active_loads,
|
|
2986
2986
|
inActiveLoads=delete_loads, tempLoads=temp_loads, id=index)
|
|
2987
|
-
qt_model.UpdateModel()
|
|
2988
2987
|
except Exception as ex:
|
|
2989
|
-
raise Exception(ex)
|
|
2988
|
+
raise Exception(f"添加施工阶段:{name}错误,{ex}")
|
|
2990
2989
|
|
|
2991
2990
|
@staticmethod
|
|
2992
2991
|
def update_construction_stage(name: str = "", duration: int = 0,
|
|
@@ -3023,27 +3022,25 @@ class Mdb:
|
|
|
3023
3022
|
qt_model.UpdateConstructionStage(name=name, duration=duration, activeStructures=active_structures, inActiveStructures=delete_structures,
|
|
3024
3023
|
activeBoundaries=active_boundaries, inActiveBoundaries=delete_boundaries, activeLoads=active_loads,
|
|
3025
3024
|
inActiveLoads=delete_loads, tempLoads=temp_loads)
|
|
3026
|
-
qt_model.UpdateModel()
|
|
3027
3025
|
except Exception as ex:
|
|
3028
|
-
raise Exception(ex)
|
|
3026
|
+
raise Exception(f"更新施工阶段:{name}错误,{ex}")
|
|
3029
3027
|
|
|
3030
3028
|
@staticmethod
|
|
3031
|
-
def update_weight_stage(
|
|
3029
|
+
def update_weight_stage(name: str = "", structure_group_name: str = "", weight_stage_id: int = 1):
|
|
3032
3030
|
"""
|
|
3033
|
-
|
|
3031
|
+
更新施工阶段自重
|
|
3034
3032
|
Args:
|
|
3035
|
-
|
|
3033
|
+
name:施工阶段信息
|
|
3036
3034
|
structure_group_name:结构组名
|
|
3037
3035
|
weight_stage_id: 计自重阶段号 (0-不计自重,1-本阶段 n-第n阶段)
|
|
3038
3036
|
Example:
|
|
3039
|
-
mdb.update_weight_stage(
|
|
3037
|
+
mdb.update_weight_stage(name="施工阶段1",structure_group_name="默认结构组",weight_stage_id=1)
|
|
3040
3038
|
Returns: 无
|
|
3041
3039
|
"""
|
|
3042
3040
|
try:
|
|
3043
|
-
qt_model.UpdateWeightStage(
|
|
3044
|
-
qt_model.UpdateModel()
|
|
3041
|
+
qt_model.UpdateWeightStage(name=name, structureGroupName=structure_group_name, weightStageId=weight_stage_id)
|
|
3045
3042
|
except Exception as ex:
|
|
3046
|
-
raise Exception(ex)
|
|
3043
|
+
raise Exception(f"更新施工阶段自重:{name}错误,{ex}")
|
|
3047
3044
|
|
|
3048
3045
|
@staticmethod
|
|
3049
3046
|
def remove_construction_stage(name: str = ""):
|
|
@@ -3060,9 +3057,8 @@ class Mdb:
|
|
|
3060
3057
|
qt_model.RemoveAllConstructionStage()
|
|
3061
3058
|
else:
|
|
3062
3059
|
qt_model.RemoveConstructionStage(name=name)
|
|
3063
|
-
qt_model.UpdateModel()
|
|
3064
3060
|
except Exception as ex:
|
|
3065
|
-
raise Exception(ex)
|
|
3061
|
+
raise Exception(f"删除施工阶段自重:{name}错误,{ex}")
|
|
3066
3062
|
|
|
3067
3063
|
# endregion
|
|
3068
3064
|
|
|
@@ -9,6 +9,43 @@ class Odb:
|
|
|
9
9
|
"""
|
|
10
10
|
|
|
11
11
|
# region 视图控制
|
|
12
|
+
@staticmethod
|
|
13
|
+
def set_view_camera(camera_point: tuple[float, float, float], focus_point: tuple[float, float, float],
|
|
14
|
+
camera_rotate: tuple[float, float, float] = (45, 45, 0), scale: float = 0.5):
|
|
15
|
+
"""
|
|
16
|
+
更改三维显示相机设置
|
|
17
|
+
Args:
|
|
18
|
+
camera_point: 相机坐标点
|
|
19
|
+
focus_point: 相机焦点
|
|
20
|
+
camera_rotate:相机绕XYZ旋转角度
|
|
21
|
+
scale: 缩放系数
|
|
22
|
+
Example:
|
|
23
|
+
odb.set_view_camera(camera_point=(-100,-100,100),focus_point=(0,0,0))
|
|
24
|
+
Returns: 无
|
|
25
|
+
"""
|
|
26
|
+
try:
|
|
27
|
+
qt_model.SetViewCamera(direction=[camera_point[0], camera_point[1], camera_point[2], focus_point[0], focus_point[1], focus_point[2],
|
|
28
|
+
camera_rotate[0], camera_rotate[1], camera_rotate[2], scale])
|
|
29
|
+
qt_model.UpdateModel()
|
|
30
|
+
except Exception as ex:
|
|
31
|
+
raise Exception(ex)
|
|
32
|
+
|
|
33
|
+
@staticmethod
|
|
34
|
+
def set_view_direction(direction: int = 1):
|
|
35
|
+
"""
|
|
36
|
+
更改三维显示默认视图
|
|
37
|
+
Args:
|
|
38
|
+
direction: 1-空间视图1 2-前视图 3-三维视图2 4-左视图 5-顶视图 6-右视图 7-空间视图3 8-后视图 9-空间视图4 10-底视图
|
|
39
|
+
Example:
|
|
40
|
+
odb.set_view_direction(1)
|
|
41
|
+
Returns: 无
|
|
42
|
+
"""
|
|
43
|
+
try:
|
|
44
|
+
qt_model.SetViewDirection(direction=direction)
|
|
45
|
+
qt_model.UpdateModel()
|
|
46
|
+
except Exception as ex:
|
|
47
|
+
raise Exception(ex)
|
|
48
|
+
|
|
12
49
|
@staticmethod
|
|
13
50
|
def activate_structure(node_ids: list[int] = None, element_ids: list[int] = None):
|
|
14
51
|
"""
|
|
@@ -21,7 +58,7 @@ class Odb:
|
|
|
21
58
|
Returns: 无
|
|
22
59
|
"""
|
|
23
60
|
try:
|
|
24
|
-
qt_model.
|
|
61
|
+
qt_model.ActivateStructure(nodeIds=node_ids, elementIds=element_ids)
|
|
25
62
|
qt_model.UpdateModel()
|
|
26
63
|
except Exception as ex:
|
|
27
64
|
raise Exception(ex)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: qtmodel
|
|
3
|
-
Version: 0.5.
|
|
4
|
-
Summary: python modeling for qt
|
|
3
|
+
Version: 0.5.44
|
|
4
|
+
Summary: python modeling for qt 2024-12-09
|
|
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.44 - 2024-12-09
|
|
16
16
|
> pip install --upgrade qtmodel -i https://pypi.org/simple
|
|
17
|
-
-
|
|
17
|
+
- 添加视图控制接口
|
|
18
18
|
## 项目管理
|
|
19
19
|
### update_bim
|
|
20
20
|
刷新Bim模型信息
|
|
@@ -119,7 +119,7 @@ Returns: 无
|
|
|
119
119
|
> 参数:
|
|
120
120
|
> file_path:导出文件全路径,支持格式(.mct/.qdat/.obj/.txt/.py)
|
|
121
121
|
> convert_sec_group:是否将变截面组转换为变截面
|
|
122
|
-
> type_kind:输出文件类型 1
|
|
122
|
+
> type_kind:输出文件类型 1-全部模型文件 2-计算相关文件 (py输出时 2-输出截面特性)
|
|
123
123
|
> group_name:obj与 APDL导出时指定结构组导出
|
|
124
124
|
```Python
|
|
125
125
|
# 示例代码
|
|
@@ -626,6 +626,8 @@ Returns: 无
|
|
|
626
626
|
> name:截面名称
|
|
627
627
|
> begin_id:截面始端编号
|
|
628
628
|
> end_id:截面末端编号
|
|
629
|
+
> shear_consider:考虑剪切变形
|
|
630
|
+
> sec_normalize: 开启变截面线圈和线宽自适应排序 (避免两端截面绘制顺序导致的渲染和计算失效)
|
|
629
631
|
```Python
|
|
630
632
|
# 示例代码
|
|
631
633
|
from qtmodel import *
|
|
@@ -1243,7 +1245,7 @@ Returns: 无
|
|
|
1243
1245
|
> num:根数
|
|
1244
1246
|
> line_type:1-导线点 2-折线点
|
|
1245
1247
|
> position_type: 定位方式 1-直线 2-轨迹线
|
|
1246
|
-
> symmetry: 对称点 0
|
|
1248
|
+
> symmetry: 对称点 0-左端点 1-右端点 2-不对称
|
|
1247
1249
|
> control_points: 控制点信息[(x1,z1,r1),(x2,z2,r2)....]
|
|
1248
1250
|
> control_points_lateral: 控制点横弯信息[(x1,y1,r1),(x2,y2,r2)....],无横弯时不必输入
|
|
1249
1251
|
> point_insert: 定位方式
|
|
@@ -1880,15 +1882,15 @@ active_boundaries=[("默认边界组",1)],active_loads=[("默认荷载组1",0)])
|
|
|
1880
1882
|
```
|
|
1881
1883
|
Returns: 无
|
|
1882
1884
|
### update_weight_stage
|
|
1883
|
-
|
|
1885
|
+
更新施工阶段自重
|
|
1884
1886
|
> 参数:
|
|
1885
|
-
>
|
|
1887
|
+
> name:施工阶段信息
|
|
1886
1888
|
> structure_group_name:结构组名
|
|
1887
1889
|
> weight_stage_id: 计自重阶段号 (0-不计自重,1-本阶段 n-第n阶段)
|
|
1888
1890
|
```Python
|
|
1889
1891
|
# 示例代码
|
|
1890
1892
|
from qtmodel import *
|
|
1891
|
-
mdb.update_weight_stage(
|
|
1893
|
+
mdb.update_weight_stage(name="施工阶段1",structure_group_name="默认结构组",weight_stage_id=1)
|
|
1892
1894
|
```
|
|
1893
1895
|
Returns: 无
|
|
1894
1896
|
### remove_construction_stage
|
|
@@ -1943,6 +1945,29 @@ mdb.remove_load_combine(name="荷载组合1")
|
|
|
1943
1945
|
```
|
|
1944
1946
|
Returns: 无
|
|
1945
1947
|
## 视图控制
|
|
1948
|
+
### set_view_camera
|
|
1949
|
+
更改三维显示相机设置
|
|
1950
|
+
> 参数:
|
|
1951
|
+
> camera_point: 相机坐标点
|
|
1952
|
+
> focus_point: 相机焦点
|
|
1953
|
+
> camera_rotate:相机绕XYZ旋转角度
|
|
1954
|
+
> scale: 缩放系数
|
|
1955
|
+
```Python
|
|
1956
|
+
# 示例代码
|
|
1957
|
+
from qtmodel import *
|
|
1958
|
+
odb.set_view_camera(camera_point=(-100,-100,-100),focus_point=(0,0,0))
|
|
1959
|
+
```
|
|
1960
|
+
Returns: 无
|
|
1961
|
+
### set_view_direction
|
|
1962
|
+
更改三维显示默认视图
|
|
1963
|
+
> 参数:
|
|
1964
|
+
> direction: 1-空间视图1 2-前视图 3-三维视图2 4-左视图 5-顶视图 6-右视图 7-空间视图3 8-后视图 9-空间视图4 10-底视图
|
|
1965
|
+
```Python
|
|
1966
|
+
# 示例代码
|
|
1967
|
+
from qtmodel import *
|
|
1968
|
+
odb.set_view_direction(1)
|
|
1969
|
+
```
|
|
1970
|
+
Returns: 无
|
|
1946
1971
|
### activate_structure
|
|
1947
1972
|
激活指定阶段和单元,默认激活所有
|
|
1948
1973
|
> 参数:
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
from datetime import datetime
|
|
1
2
|
from setuptools import setup, find_packages
|
|
2
3
|
|
|
3
4
|
# 读取文件内容
|
|
@@ -5,12 +6,16 @@ with open("README.md", "r", encoding="utf-8") as fh:
|
|
|
5
6
|
long_description = fh.read()
|
|
6
7
|
# python setup.py sdist
|
|
7
8
|
# twine upload dist/*
|
|
9
|
+
# 获取当前日期和时间
|
|
10
|
+
now = datetime.now()
|
|
11
|
+
today = now.date()
|
|
12
|
+
|
|
8
13
|
setup(
|
|
9
14
|
name="qtmodel",
|
|
10
|
-
version="0.5.
|
|
15
|
+
version="0.5.44",
|
|
11
16
|
author="dqy-zhj",
|
|
12
17
|
author_email="1105417715@qq.com",
|
|
13
|
-
description="python modeling for qt
|
|
18
|
+
description=f"python modeling for qt {today} ",
|
|
14
19
|
long_description=long_description, # 使用读取的 README.md 文件内容
|
|
15
20
|
long_description_content_type="text/markdown", # 指明内容格式为markdown
|
|
16
21
|
url="https://github.com/Inface0443/pyqt",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|