qtmodel 1.1.4__tar.gz → 1.1.5__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.

Files changed (39) hide show
  1. {qtmodel-1.1.4/qtmodel.egg-info → qtmodel-1.1.5}/PKG-INFO +129 -17
  2. qtmodel-1.1.4/PKG-INFO → qtmodel-1.1.5/README.md +128 -35
  3. {qtmodel-1.1.4 → qtmodel-1.1.5}/qtmodel/core/data_helper.py +2 -2
  4. {qtmodel-1.1.4 → qtmodel-1.1.5}/qtmodel/mdb/mdb_boundary.py +19 -13
  5. {qtmodel-1.1.4 → qtmodel-1.1.5}/qtmodel/mdb/mdb_section.py +14 -12
  6. {qtmodel-1.1.4 → qtmodel-1.1.5}/qtmodel/odb/odb_result.py +14 -14
  7. qtmodel-1.1.4/README.md → qtmodel-1.1.5/qtmodel.egg-info/PKG-INFO +147 -16
  8. {qtmodel-1.1.4 → qtmodel-1.1.5}/qtmodel.egg-info/SOURCES.txt +1 -2
  9. {qtmodel-1.1.4 → qtmodel-1.1.5}/setup.py +1 -1
  10. qtmodel-1.1.4/test/test.py +0 -164
  11. {qtmodel-1.1.4 → qtmodel-1.1.5}/qtmodel/__init__.py +0 -0
  12. {qtmodel-1.1.4 → qtmodel-1.1.5}/qtmodel/core/__init__.py +0 -0
  13. {qtmodel-1.1.4 → qtmodel-1.1.5}/qtmodel/core/model_db.py +0 -0
  14. {qtmodel-1.1.4 → qtmodel-1.1.5}/qtmodel/core/qt_server.py +0 -0
  15. {qtmodel-1.1.4 → qtmodel-1.1.5}/qtmodel/core/result_db.py +0 -0
  16. {qtmodel-1.1.4 → qtmodel-1.1.5}/qtmodel/mdb/__init__.py +0 -0
  17. {qtmodel-1.1.4 → qtmodel-1.1.5}/qtmodel/mdb/mdb_analysis_setting.py +0 -0
  18. {qtmodel-1.1.4 → qtmodel-1.1.5}/qtmodel/mdb/mdb_assistant.py +0 -0
  19. {qtmodel-1.1.4 → qtmodel-1.1.5}/qtmodel/mdb/mdb_construction_stage.py +0 -0
  20. {qtmodel-1.1.4 → qtmodel-1.1.5}/qtmodel/mdb/mdb_dynamic_load.py +0 -0
  21. {qtmodel-1.1.4 → qtmodel-1.1.5}/qtmodel/mdb/mdb_live_load.py +0 -0
  22. {qtmodel-1.1.4 → qtmodel-1.1.5}/qtmodel/mdb/mdb_load.py +0 -0
  23. {qtmodel-1.1.4 → qtmodel-1.1.5}/qtmodel/mdb/mdb_project.py +0 -0
  24. {qtmodel-1.1.4 → qtmodel-1.1.5}/qtmodel/mdb/mdb_property.py +0 -0
  25. {qtmodel-1.1.4 → qtmodel-1.1.5}/qtmodel/mdb/mdb_sink_load.py +0 -0
  26. {qtmodel-1.1.4 → qtmodel-1.1.5}/qtmodel/mdb/mdb_static_load.py +0 -0
  27. {qtmodel-1.1.4 → qtmodel-1.1.5}/qtmodel/mdb/mdb_structure.py +0 -0
  28. {qtmodel-1.1.4 → qtmodel-1.1.5}/qtmodel/mdb/mdb_temperature_load.py +0 -0
  29. {qtmodel-1.1.4 → qtmodel-1.1.5}/qtmodel/mdb/mdb_tendon.py +0 -0
  30. {qtmodel-1.1.4 → qtmodel-1.1.5}/qtmodel/odb/__init__.py +0 -0
  31. {qtmodel-1.1.4 → qtmodel-1.1.5}/qtmodel/odb/odb_model.py +0 -0
  32. {qtmodel-1.1.4 → qtmodel-1.1.5}/qtmodel/odb/odb_model_boundary.py +0 -0
  33. {qtmodel-1.1.4 → qtmodel-1.1.5}/qtmodel/odb/odb_model_load.py +0 -0
  34. {qtmodel-1.1.4 → qtmodel-1.1.5}/qtmodel/odb/odb_model_section.py +0 -0
  35. {qtmodel-1.1.4 → qtmodel-1.1.5}/qtmodel/odb/odb_result_plot.py +0 -0
  36. {qtmodel-1.1.4 → qtmodel-1.1.5}/qtmodel/odb/odb_view.py +0 -0
  37. {qtmodel-1.1.4 → qtmodel-1.1.5}/qtmodel.egg-info/dependency_links.txt +0 -0
  38. {qtmodel-1.1.4 → qtmodel-1.1.5}/qtmodel.egg-info/top_level.txt +0 -0
  39. {qtmodel-1.1.4 → qtmodel-1.1.5}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: qtmodel
3
- Version: 1.1.4
3
+ Version: 1.1.5
4
4
  Summary: python modeling for qt 2025-09-27
5
5
  Home-page: https://github.com/Inface0443/pyqt
6
6
  Author: dqy-zhj
@@ -17,7 +17,7 @@ Dynamic: description-content-type
17
17
  Dynamic: home-page
18
18
  Dynamic: summary
19
19
 
20
- > 最新版本 V1.1.4 - 2025-09-27
20
+ > 最新版本 V1.1.5 - 2025-09-27
21
21
  > pip install --upgrade qtmodel -i https://pypi.org/simple
22
22
  - 新增更新结构组接口
23
23
  # 建模操作
@@ -903,13 +903,14 @@ mdb.add_general_elastic_support(node_id=1, property_name = "特性1",group_name=
903
903
  添加一般支承
904
904
  > 参数:
905
905
  > node_id:节点编号,支持整数或整数型列表且支持XtoYbyN形式字符串
906
- > boundary_info:边界信息 [X,Y,Z,Rx,Ry,Rz] ture-固定 false-自由
906
+ > boundary_info:边界信息 [X,Y,Z,Rx,Ry,Rz] ture-固定 false-自由,也可传数值列表(0-自由 1-固定)
907
907
  > group_name:边界组名,默认为默认边界组
908
908
  ```Python
909
909
  # 示例代码
910
910
  from qtmodel import *
911
911
  mdb.add_general_support(node_id=1, boundary_info=[True,True,True,False,False,False])
912
912
  mdb.add_general_support(node_id="1to100", boundary_info=[True,True,True,False,False,False])
913
+ mdb.add_general_support(node_id="1to100", boundary_info=[1,1,1,0,0,0])
913
914
  #Returns: 无
914
915
  ```
915
916
  ### add_elastic_support
@@ -3433,7 +3434,7 @@ odb.get_reaction(ids=1,stage_id=1)
3433
3434
  odb.get_reaction(ids=[1,2,3],stage_id=1)
3434
3435
  odb.get_reaction(ids="1to3",stage_id=1)
3435
3436
  odb.get_reaction(ids=1,stage_id=-1,case_name="工况名")
3436
- #Returns: 包含信息为list[dict] or dict
3437
+ #Returns: 返回json字符串, 内部为list[dict]
3437
3438
  ```
3438
3439
  ### get_deformation
3439
3440
  获取节点变形结果,支持单个节点和节点列表
@@ -3452,7 +3453,7 @@ odb.get_deformation(ids=1,stage_id=1)
3452
3453
  odb.get_deformation(ids=[1,2,3],stage_id=1)
3453
3454
  odb.get_deformation(ids="1to3",stage_id=1)
3454
3455
  odb.get_deformation(ids=1,stage_id=-1,case_name="工况名")
3455
- #Returns: 多结果获取时返回list[dict] 单一结果获取时返回dict
3456
+ #Returns: 返回json字符串, 内部为list[dict]
3456
3457
  ```
3457
3458
  ### get_element_stress
3458
3459
  获取单元应力,支持单个单元和单元列表
@@ -3469,7 +3470,7 @@ from qtmodel import *
3469
3470
  odb.get_element_stress(ids=1,stage_id=1)
3470
3471
  odb.get_element_stress(ids=[1,2,3],stage_id=1)
3471
3472
  odb.get_element_stress(ids=1,stage_id=-1,case_name="工况名")
3472
- #Returns: 包含信息为list[dict] or dict
3473
+ #Returns: 返回json字符串, 内部为list[dict]
3473
3474
  ```
3474
3475
  ### get_element_force
3475
3476
  获取单元内力,支持单个单元和单元列表
@@ -3488,7 +3489,7 @@ from qtmodel import *
3488
3489
  odb.get_element_force(ids=1,stage_id=1)
3489
3490
  odb.get_element_force(ids=[1,2,3],stage_id=1)
3490
3491
  odb.get_element_force(ids=1,stage_id=-1,case_name="工况名")
3491
- #Returns: 包含信息为list[dict] or dict
3492
+ #Returns: 返回json字符串, 内部为list[dict]
3492
3493
  ```
3493
3494
  ### get_self_concurrent_reaction
3494
3495
  获取自并发反力
@@ -3499,7 +3500,7 @@ odb.get_element_force(ids=1,stage_id=-1,case_name="工况名")
3499
3500
  # 示例代码
3500
3501
  from qtmodel import *
3501
3502
  odb.get_self_concurrent_reaction(node_id=1,case_name="工况1_Fx最大")
3502
- #Returns: 返回该节点并发反力值dict
3503
+ #Returns: 返回json字符串, 内部为list[dict]
3503
3504
  ```
3504
3505
  ### get_all_concurrent_reaction
3505
3506
  获取完全并发反力
@@ -3510,7 +3511,7 @@ odb.get_self_concurrent_reaction(node_id=1,case_name="工况1_Fx最大")
3510
3511
  # 示例代码
3511
3512
  from qtmodel import *
3512
3513
  odb.get_all_concurrent_reaction(node_id=1,case_name="工况1_Fx最大")
3513
- #Returns: 包含信息为list[dict]
3514
+ #Returns: 返回json字符串, 包含信息为list[dict]
3514
3515
  ```
3515
3516
  ### get_concurrent_force
3516
3517
  获取单元并发内力
@@ -3522,7 +3523,7 @@ odb.get_all_concurrent_reaction(node_id=1,case_name="工况1_Fx最大")
3522
3523
  from qtmodel import *
3523
3524
  odb.get_concurrent_force(ids=1,case_name="工况1_Fx最大")
3524
3525
  odb.get_concurrent_force(ids="1to19",case_name="工况1_Fx最大")
3525
- #Returns: 包含信息为list[dict]
3526
+ #Returns: 返回json字符串, 包含信息为list[dict]
3526
3527
  ```
3527
3528
  ### get_elastic_link_force
3528
3529
  获取弹性连接内力
@@ -3537,7 +3538,7 @@ odb.get_concurrent_force(ids="1to19",case_name="工况1_Fx最大")
3537
3538
  # 示例代码
3538
3539
  from qtmodel import *
3539
3540
  odb.get_elastic_link_force(ids=[1,2,3], result_kind=1, stage_id=1)
3540
- #Returns: 返回弹性连接内力列表list[dict] 或 dict(单一结果)
3541
+ #Returns: 返回json字符串, 内部为list[dict]
3541
3542
  ```
3542
3543
  ### get_constrain_equation_force
3543
3544
  查询约束方程内力
@@ -3552,7 +3553,7 @@ odb.get_elastic_link_force(ids=[1,2,3], result_kind=1, stage_id=1)
3552
3553
  # 示例代码
3553
3554
  from qtmodel import *
3554
3555
  odb.get_constrain_equation_force(ids=[1,2,3], result_kind=1, stage_id=1)
3555
- #Returns: 返回约束方程内力列表list[dict] 或 dict(单一结果)
3556
+ #Returns: 返回json字符串, 内部为list[dict]
3556
3557
  ```
3557
3558
  ### get_cable_element_length
3558
3559
  查询无应力索长
@@ -3564,7 +3565,7 @@ odb.get_constrain_equation_force(ids=[1,2,3], result_kind=1, stage_id=1)
3564
3565
  # 示例代码
3565
3566
  from qtmodel import *
3566
3567
  odb.get_cable_element_length(ids=[1,2,3], stage_id=1)
3567
- #Returns: 返回无应力索长列表list[dict] 或 dict(单一结果)
3568
+ #Returns: 返回json字符串, 内部为list[dict]
3568
3569
  ```
3569
3570
  ### get_period_and_vibration_results
3570
3571
  获取自振分析角频率和振型参与质量等结果
@@ -3573,7 +3574,7 @@ odb.get_cable_element_length(ids=[1,2,3], stage_id=1)
3573
3574
  # 示例代码
3574
3575
  from qtmodel import *
3575
3576
  odb.get_period_and_vibration_results()
3576
- #Returns:list[dict]包含各模态周期和频率的列表
3577
+ #Returns: 返回json字符串,list[dict]包含各模态周期和频率的列表
3577
3578
  ```
3578
3579
  ### get_vibration_modal_results
3579
3580
  获取自振分析振型向量
@@ -3583,7 +3584,7 @@ odb.get_period_and_vibration_results()
3583
3584
  # 示例代码
3584
3585
  from qtmodel import *
3585
3586
  odb.get_vibration_modal_results(mode=1)
3586
- #Returns:list[dict]包含该模态下节点位移向量列表
3587
+ #Returns: 返回json字符串,list[dict]包含该模态下节点位移向量列表
3587
3588
  ```
3588
3589
  ### get_buckling_eigenvalue
3589
3590
  获取屈曲分析特征值
@@ -3592,7 +3593,7 @@ odb.get_vibration_modal_results(mode=1)
3592
3593
  # 示例代码
3593
3594
  from qtmodel import *
3594
3595
  odb.get_buckling_eigenvalue()
3595
- #Returns: list[dict]包含各模态下特征值
3596
+ #Returns: 返回json字符串, list[dict]包含各模态下特征值
3596
3597
  ```
3597
3598
  ### get_buckling_modal_results
3598
3599
  获取屈曲模态向量
@@ -3602,7 +3603,7 @@ odb.get_buckling_eigenvalue()
3602
3603
  # 示例代码
3603
3604
  from qtmodel import *
3604
3605
  odb.get_buckling_modal_results(mode=1)
3605
- #Returns:list[dict]包含该模态下屈曲模态向量列表
3606
+ #Returns: 返回json字符串,list[dict]包含该模态下屈曲模态向量列表
3606
3607
  ```
3607
3608
  ## 绘制模型结果
3608
3609
  ### plot_reaction_result
@@ -3925,3 +3926,114 @@ from qtmodel import *
3925
3926
  odb.get_current_png()
3926
3927
  #Returns: Base64格式(图形)字符串
3927
3928
  ```
3929
+ ## 视图控制
3930
+ ### display_node_id
3931
+ 设置节点号显示
3932
+ > 参数:
3933
+ > show_id:是否打开节点号显示
3934
+ ```Python
3935
+ # 示例代码
3936
+ from qtmodel import *
3937
+ odb.display_node_id()
3938
+ odb.display_node_id(False)
3939
+ #Returns: 无
3940
+ ```
3941
+ ### display_element_id
3942
+ 设置单元号显示
3943
+ > 参数:
3944
+ > show_id:是否打开单元号显示
3945
+ ```Python
3946
+ # 示例代码
3947
+ from qtmodel import *
3948
+ odb.display_element_id()
3949
+ odb.display_element_id(False)
3950
+ #Returns: 无
3951
+ ```
3952
+ ### set_view_camera
3953
+ 更改三维显示相机设置
3954
+ > 参数:
3955
+ > camera_point: 相机坐标点
3956
+ > focus_point: 相机焦点
3957
+ > camera_rotate:相机绕XYZ旋转角度
3958
+ > scale: 缩放系数
3959
+ ```Python
3960
+ # 示例代码
3961
+ from qtmodel import *
3962
+ odb.set_view_camera(camera_point=(-100,-100,100),focus_point=(0,0,0))
3963
+ #Returns: 无
3964
+ ```
3965
+ ### set_view_direction
3966
+ 更改三维显示默认视图
3967
+ > 参数:
3968
+ > direction: 1-空间视图1 2-前视图 3-三维视图2 4-左视图 5-顶视图 6-右视图 7-空间视图3 8-后视图 9-空间视图4 10-底视图
3969
+ > horizontal_degree:水平向旋转角度
3970
+ > vertical_degree:竖向旋转角度
3971
+ > scale:缩放系数
3972
+ ```Python
3973
+ # 示例代码
3974
+ from qtmodel import *
3975
+ odb.set_view_direction(direction=1,scale=1.2)
3976
+ #Returns: 无
3977
+ ```
3978
+ ### activate_structure
3979
+ 激活指定阶段和单元,默认激活所有
3980
+ > 参数:
3981
+ > node_ids: 节点集合支持XtoYbyN形式字符串
3982
+ > element_ids: 单元集合支持XtoYbyN形式字符串
3983
+ ```Python
3984
+ # 示例代码
3985
+ from qtmodel import *
3986
+ odb.activate_structure(node_ids=[1,2,3],element_ids=[1,2,3])
3987
+ #Returns: 无
3988
+ ```
3989
+ ### set_unit
3990
+ 修改视图显示时单位制,不影响建模
3991
+ > 参数:
3992
+ > unit_force: 支持 N KN TONF KIPS LBF
3993
+ > unit_length: 支持 M MM CM IN FT
3994
+ ```Python
3995
+ # 示例代码
3996
+ from qtmodel import *
3997
+ odb.set_unit(unit_force="N",unit_length="M")
3998
+ #Returns: 无
3999
+ ```
4000
+ ### remove_display
4001
+ 删除当前所有显示,包括边界荷载钢束等全部显示
4002
+ > 参数:
4003
+ ```Python
4004
+ # 示例代码
4005
+ from qtmodel import *
4006
+ odb.remove_display()
4007
+ #Returns: 无
4008
+ ```
4009
+ ### save_png
4010
+ 保存当前模型窗口图形信息
4011
+ > 参数:
4012
+ > file_path: 文件全路径
4013
+ ```Python
4014
+ # 示例代码
4015
+ from qtmodel import *
4016
+ odb.save_png(file_path=r"D:\\QT\\aa.png")
4017
+ #Returns: 无
4018
+ ```
4019
+ ### set_render
4020
+ 消隐设置开关
4021
+ > 参数:
4022
+ > flag: 默认设置打开消隐
4023
+ ```Python
4024
+ # 示例代码
4025
+ from qtmodel import *
4026
+ odb.set_render(flag=True)
4027
+ #Returns: 无
4028
+ ```
4029
+ ### change_construct_stage
4030
+ 消隐设置开关
4031
+ > 参数:
4032
+ > stage: 施工阶段名称或施工阶段号 0-基本
4033
+ ```Python
4034
+ # 示例代码
4035
+ from qtmodel import *
4036
+ odb.change_construct_stage(0)
4037
+ odb.change_construct_stage(stage=1)
4038
+ #Returns: 无
4039
+ ```
@@ -1,23 +1,4 @@
1
- Metadata-Version: 2.4
2
- Name: qtmodel
3
- Version: 1.1.4
4
- Summary: python modeling for qt 2025-09-27
5
- Home-page: https://github.com/Inface0443/pyqt
6
- Author: dqy-zhj
7
- Author-email: 1105417715@qq.com
8
- Classifier: License :: OSI Approved :: MIT License
9
- Classifier: Programming Language :: Python :: 3
10
- Classifier: Operating System :: OS Independent
11
- Description-Content-Type: text/markdown
12
- Dynamic: author
13
- Dynamic: author-email
14
- Dynamic: classifier
15
- Dynamic: description
16
- Dynamic: description-content-type
17
- Dynamic: home-page
18
- Dynamic: summary
19
-
20
- > 最新版本 V1.1.4 - 2025-09-27
1
+ > 最新版本 V1.1.5 - 2025-09-27
21
2
  > pip install --upgrade qtmodel -i https://pypi.org/simple
22
3
  - 新增更新结构组接口
23
4
  # 建模操作
@@ -903,13 +884,14 @@ mdb.add_general_elastic_support(node_id=1, property_name = "特性1",group_name=
903
884
  添加一般支承
904
885
  > 参数:
905
886
  > node_id:节点编号,支持整数或整数型列表且支持XtoYbyN形式字符串
906
- > boundary_info:边界信息 [X,Y,Z,Rx,Ry,Rz] ture-固定 false-自由
887
+ > boundary_info:边界信息 [X,Y,Z,Rx,Ry,Rz] ture-固定 false-自由,也可传数值列表(0-自由 1-固定)
907
888
  > group_name:边界组名,默认为默认边界组
908
889
  ```Python
909
890
  # 示例代码
910
891
  from qtmodel import *
911
892
  mdb.add_general_support(node_id=1, boundary_info=[True,True,True,False,False,False])
912
893
  mdb.add_general_support(node_id="1to100", boundary_info=[True,True,True,False,False,False])
894
+ mdb.add_general_support(node_id="1to100", boundary_info=[1,1,1,0,0,0])
913
895
  #Returns: 无
914
896
  ```
915
897
  ### add_elastic_support
@@ -3433,7 +3415,7 @@ odb.get_reaction(ids=1,stage_id=1)
3433
3415
  odb.get_reaction(ids=[1,2,3],stage_id=1)
3434
3416
  odb.get_reaction(ids="1to3",stage_id=1)
3435
3417
  odb.get_reaction(ids=1,stage_id=-1,case_name="工况名")
3436
- #Returns: 包含信息为list[dict] or dict
3418
+ #Returns: 返回json字符串, 内部为list[dict]
3437
3419
  ```
3438
3420
  ### get_deformation
3439
3421
  获取节点变形结果,支持单个节点和节点列表
@@ -3452,7 +3434,7 @@ odb.get_deformation(ids=1,stage_id=1)
3452
3434
  odb.get_deformation(ids=[1,2,3],stage_id=1)
3453
3435
  odb.get_deformation(ids="1to3",stage_id=1)
3454
3436
  odb.get_deformation(ids=1,stage_id=-1,case_name="工况名")
3455
- #Returns: 多结果获取时返回list[dict] 单一结果获取时返回dict
3437
+ #Returns: 返回json字符串, 内部为list[dict]
3456
3438
  ```
3457
3439
  ### get_element_stress
3458
3440
  获取单元应力,支持单个单元和单元列表
@@ -3469,7 +3451,7 @@ from qtmodel import *
3469
3451
  odb.get_element_stress(ids=1,stage_id=1)
3470
3452
  odb.get_element_stress(ids=[1,2,3],stage_id=1)
3471
3453
  odb.get_element_stress(ids=1,stage_id=-1,case_name="工况名")
3472
- #Returns: 包含信息为list[dict] or dict
3454
+ #Returns: 返回json字符串, 内部为list[dict]
3473
3455
  ```
3474
3456
  ### get_element_force
3475
3457
  获取单元内力,支持单个单元和单元列表
@@ -3488,7 +3470,7 @@ from qtmodel import *
3488
3470
  odb.get_element_force(ids=1,stage_id=1)
3489
3471
  odb.get_element_force(ids=[1,2,3],stage_id=1)
3490
3472
  odb.get_element_force(ids=1,stage_id=-1,case_name="工况名")
3491
- #Returns: 包含信息为list[dict] or dict
3473
+ #Returns: 返回json字符串, 内部为list[dict]
3492
3474
  ```
3493
3475
  ### get_self_concurrent_reaction
3494
3476
  获取自并发反力
@@ -3499,7 +3481,7 @@ odb.get_element_force(ids=1,stage_id=-1,case_name="工况名")
3499
3481
  # 示例代码
3500
3482
  from qtmodel import *
3501
3483
  odb.get_self_concurrent_reaction(node_id=1,case_name="工况1_Fx最大")
3502
- #Returns: 返回该节点并发反力值dict
3484
+ #Returns: 返回json字符串, 内部为list[dict]
3503
3485
  ```
3504
3486
  ### get_all_concurrent_reaction
3505
3487
  获取完全并发反力
@@ -3510,7 +3492,7 @@ odb.get_self_concurrent_reaction(node_id=1,case_name="工况1_Fx最大")
3510
3492
  # 示例代码
3511
3493
  from qtmodel import *
3512
3494
  odb.get_all_concurrent_reaction(node_id=1,case_name="工况1_Fx最大")
3513
- #Returns: 包含信息为list[dict]
3495
+ #Returns: 返回json字符串, 包含信息为list[dict]
3514
3496
  ```
3515
3497
  ### get_concurrent_force
3516
3498
  获取单元并发内力
@@ -3522,7 +3504,7 @@ odb.get_all_concurrent_reaction(node_id=1,case_name="工况1_Fx最大")
3522
3504
  from qtmodel import *
3523
3505
  odb.get_concurrent_force(ids=1,case_name="工况1_Fx最大")
3524
3506
  odb.get_concurrent_force(ids="1to19",case_name="工况1_Fx最大")
3525
- #Returns: 包含信息为list[dict]
3507
+ #Returns: 返回json字符串, 包含信息为list[dict]
3526
3508
  ```
3527
3509
  ### get_elastic_link_force
3528
3510
  获取弹性连接内力
@@ -3537,7 +3519,7 @@ odb.get_concurrent_force(ids="1to19",case_name="工况1_Fx最大")
3537
3519
  # 示例代码
3538
3520
  from qtmodel import *
3539
3521
  odb.get_elastic_link_force(ids=[1,2,3], result_kind=1, stage_id=1)
3540
- #Returns: 返回弹性连接内力列表list[dict] 或 dict(单一结果)
3522
+ #Returns: 返回json字符串, 内部为list[dict]
3541
3523
  ```
3542
3524
  ### get_constrain_equation_force
3543
3525
  查询约束方程内力
@@ -3552,7 +3534,7 @@ odb.get_elastic_link_force(ids=[1,2,3], result_kind=1, stage_id=1)
3552
3534
  # 示例代码
3553
3535
  from qtmodel import *
3554
3536
  odb.get_constrain_equation_force(ids=[1,2,3], result_kind=1, stage_id=1)
3555
- #Returns: 返回约束方程内力列表list[dict] 或 dict(单一结果)
3537
+ #Returns: 返回json字符串, 内部为list[dict]
3556
3538
  ```
3557
3539
  ### get_cable_element_length
3558
3540
  查询无应力索长
@@ -3564,7 +3546,7 @@ odb.get_constrain_equation_force(ids=[1,2,3], result_kind=1, stage_id=1)
3564
3546
  # 示例代码
3565
3547
  from qtmodel import *
3566
3548
  odb.get_cable_element_length(ids=[1,2,3], stage_id=1)
3567
- #Returns: 返回无应力索长列表list[dict] 或 dict(单一结果)
3549
+ #Returns: 返回json字符串, 内部为list[dict]
3568
3550
  ```
3569
3551
  ### get_period_and_vibration_results
3570
3552
  获取自振分析角频率和振型参与质量等结果
@@ -3573,7 +3555,7 @@ odb.get_cable_element_length(ids=[1,2,3], stage_id=1)
3573
3555
  # 示例代码
3574
3556
  from qtmodel import *
3575
3557
  odb.get_period_and_vibration_results()
3576
- #Returns:list[dict]包含各模态周期和频率的列表
3558
+ #Returns: 返回json字符串,list[dict]包含各模态周期和频率的列表
3577
3559
  ```
3578
3560
  ### get_vibration_modal_results
3579
3561
  获取自振分析振型向量
@@ -3583,7 +3565,7 @@ odb.get_period_and_vibration_results()
3583
3565
  # 示例代码
3584
3566
  from qtmodel import *
3585
3567
  odb.get_vibration_modal_results(mode=1)
3586
- #Returns:list[dict]包含该模态下节点位移向量列表
3568
+ #Returns: 返回json字符串,list[dict]包含该模态下节点位移向量列表
3587
3569
  ```
3588
3570
  ### get_buckling_eigenvalue
3589
3571
  获取屈曲分析特征值
@@ -3592,7 +3574,7 @@ odb.get_vibration_modal_results(mode=1)
3592
3574
  # 示例代码
3593
3575
  from qtmodel import *
3594
3576
  odb.get_buckling_eigenvalue()
3595
- #Returns: list[dict]包含各模态下特征值
3577
+ #Returns: 返回json字符串, list[dict]包含各模态下特征值
3596
3578
  ```
3597
3579
  ### get_buckling_modal_results
3598
3580
  获取屈曲模态向量
@@ -3602,7 +3584,7 @@ odb.get_buckling_eigenvalue()
3602
3584
  # 示例代码
3603
3585
  from qtmodel import *
3604
3586
  odb.get_buckling_modal_results(mode=1)
3605
- #Returns:list[dict]包含该模态下屈曲模态向量列表
3587
+ #Returns: 返回json字符串,list[dict]包含该模态下屈曲模态向量列表
3606
3588
  ```
3607
3589
  ## 绘制模型结果
3608
3590
  ### plot_reaction_result
@@ -3925,3 +3907,114 @@ from qtmodel import *
3925
3907
  odb.get_current_png()
3926
3908
  #Returns: Base64格式(图形)字符串
3927
3909
  ```
3910
+ ## 视图控制
3911
+ ### display_node_id
3912
+ 设置节点号显示
3913
+ > 参数:
3914
+ > show_id:是否打开节点号显示
3915
+ ```Python
3916
+ # 示例代码
3917
+ from qtmodel import *
3918
+ odb.display_node_id()
3919
+ odb.display_node_id(False)
3920
+ #Returns: 无
3921
+ ```
3922
+ ### display_element_id
3923
+ 设置单元号显示
3924
+ > 参数:
3925
+ > show_id:是否打开单元号显示
3926
+ ```Python
3927
+ # 示例代码
3928
+ from qtmodel import *
3929
+ odb.display_element_id()
3930
+ odb.display_element_id(False)
3931
+ #Returns: 无
3932
+ ```
3933
+ ### set_view_camera
3934
+ 更改三维显示相机设置
3935
+ > 参数:
3936
+ > camera_point: 相机坐标点
3937
+ > focus_point: 相机焦点
3938
+ > camera_rotate:相机绕XYZ旋转角度
3939
+ > scale: 缩放系数
3940
+ ```Python
3941
+ # 示例代码
3942
+ from qtmodel import *
3943
+ odb.set_view_camera(camera_point=(-100,-100,100),focus_point=(0,0,0))
3944
+ #Returns: 无
3945
+ ```
3946
+ ### set_view_direction
3947
+ 更改三维显示默认视图
3948
+ > 参数:
3949
+ > direction: 1-空间视图1 2-前视图 3-三维视图2 4-左视图 5-顶视图 6-右视图 7-空间视图3 8-后视图 9-空间视图4 10-底视图
3950
+ > horizontal_degree:水平向旋转角度
3951
+ > vertical_degree:竖向旋转角度
3952
+ > scale:缩放系数
3953
+ ```Python
3954
+ # 示例代码
3955
+ from qtmodel import *
3956
+ odb.set_view_direction(direction=1,scale=1.2)
3957
+ #Returns: 无
3958
+ ```
3959
+ ### activate_structure
3960
+ 激活指定阶段和单元,默认激活所有
3961
+ > 参数:
3962
+ > node_ids: 节点集合支持XtoYbyN形式字符串
3963
+ > element_ids: 单元集合支持XtoYbyN形式字符串
3964
+ ```Python
3965
+ # 示例代码
3966
+ from qtmodel import *
3967
+ odb.activate_structure(node_ids=[1,2,3],element_ids=[1,2,3])
3968
+ #Returns: 无
3969
+ ```
3970
+ ### set_unit
3971
+ 修改视图显示时单位制,不影响建模
3972
+ > 参数:
3973
+ > unit_force: 支持 N KN TONF KIPS LBF
3974
+ > unit_length: 支持 M MM CM IN FT
3975
+ ```Python
3976
+ # 示例代码
3977
+ from qtmodel import *
3978
+ odb.set_unit(unit_force="N",unit_length="M")
3979
+ #Returns: 无
3980
+ ```
3981
+ ### remove_display
3982
+ 删除当前所有显示,包括边界荷载钢束等全部显示
3983
+ > 参数:
3984
+ ```Python
3985
+ # 示例代码
3986
+ from qtmodel import *
3987
+ odb.remove_display()
3988
+ #Returns: 无
3989
+ ```
3990
+ ### save_png
3991
+ 保存当前模型窗口图形信息
3992
+ > 参数:
3993
+ > file_path: 文件全路径
3994
+ ```Python
3995
+ # 示例代码
3996
+ from qtmodel import *
3997
+ odb.save_png(file_path=r"D:\\QT\\aa.png")
3998
+ #Returns: 无
3999
+ ```
4000
+ ### set_render
4001
+ 消隐设置开关
4002
+ > 参数:
4003
+ > flag: 默认设置打开消隐
4004
+ ```Python
4005
+ # 示例代码
4006
+ from qtmodel import *
4007
+ odb.set_render(flag=True)
4008
+ #Returns: 无
4009
+ ```
4010
+ ### change_construct_stage
4011
+ 消隐设置开关
4012
+ > 参数:
4013
+ > stage: 施工阶段名称或施工阶段号 0-基本
4014
+ ```Python
4015
+ # 示例代码
4016
+ from qtmodel import *
4017
+ odb.change_construct_stage(0)
4018
+ odb.change_construct_stage(stage=1)
4019
+ #Returns: 无
4020
+ ```
@@ -86,8 +86,8 @@ class QtDataHelper:
86
86
  return s
87
87
 
88
88
  @staticmethod
89
- def get_str_by_data(s: str, sec_type: str, sec_data: dict):
90
- s += QtDataHelper.str_section(
89
+ def get_str_by_data(sec_type: str, sec_data: dict):
90
+ s = QtDataHelper.str_section(
91
91
  sec_type=sec_type,
92
92
  sec_info=sec_data.get("sec_info", []),
93
93
  symmetry=sec_data.get("symmetry", True),
@@ -8,6 +8,7 @@ class MdbBoundary:
8
8
  """
9
9
  用于边界操作
10
10
  """
11
+
11
12
  # region 边界操作
12
13
  @staticmethod
13
14
  def add_effective_width(element_ids, factor_i: float, factor_j: float, dz_i: float, dz_j: float,
@@ -32,7 +33,7 @@ class MdbBoundary:
32
33
  else:
33
34
  id_str = str(element_ids)
34
35
  s = "*EFCFACTOR\r\n" + f"{id_str},{factor_i},{factor_j},{dz_i},{dz_j},{group_name}\r\n"
35
- # print(s)
36
+
36
37
  QtServer.post_command(s, "QDAT")
37
38
  except Exception as ex:
38
39
  raise Exception(ex)
@@ -49,7 +50,7 @@ class MdbBoundary:
49
50
  """
50
51
  try:
51
52
  s = "*BNDRGROUP\r\n" + f"{name}\r\n"
52
- # print(s)
53
+
53
54
  QtServer.post_command(s, "QDAT")
54
55
  except Exception as ex:
55
56
  raise Exception(ex)
@@ -69,7 +70,7 @@ class MdbBoundary:
69
70
  raise Exception("添加一般弹性支承失败,矩阵参数有误(数据需按列输入至列表)")
70
71
  try:
71
72
  s = "*GSPRTYPE\r\n" + f"{name}," + ",".join(f"{x:g}" for x in data_matrix) + "\r\n"
72
- # print(s)
73
+
73
74
  QtServer.post_command(s, "QDAT")
74
75
  except Exception as ex:
75
76
  raise Exception(ex)
@@ -92,34 +93,39 @@ class MdbBoundary:
92
93
  else:
93
94
  id_str = str(node_id)
94
95
  s = "*GSPRING\r\n" + f"{id_str},{property_name},{group_name}\r\n"
95
- # print(s)
96
+
96
97
  QtServer.post_command(s, "QDAT")
97
98
  except Exception as ex:
98
99
  raise Exception(ex)
99
100
 
100
101
  @staticmethod
101
- def add_general_support(node_id: Union[int, str, list[int]] = 1, boundary_info: list[bool] = None,
102
+ def add_general_support(node_id: Union[int, str, list[int]] = 1, boundary_info: Union[list[bool], list[int]] = None,
102
103
  group_name: str = "默认边界组"):
103
104
  """
104
105
  添加一般支承
105
106
  Args:
106
107
  node_id:节点编号,支持整数或整数型列表且支持XtoYbyN形式字符串
107
- boundary_info:边界信息 [X,Y,Z,Rx,Ry,Rz] ture-固定 false-自由
108
+ boundary_info:边界信息 [X,Y,Z,Rx,Ry,Rz] ture-固定 false-自由,也可传数值列表(0-自由 1-固定)
108
109
  group_name:边界组名,默认为默认边界组
109
110
  Example:
110
111
  mdb.add_general_support(node_id=1, boundary_info=[True,True,True,False,False,False])
111
112
  mdb.add_general_support(node_id="1to100", boundary_info=[True,True,True,False,False,False])
113
+ mdb.add_general_support(node_id="1to100", boundary_info=[1,1,1,0,0,0])
112
114
  Returns: 无
113
115
  """
114
116
  try:
115
117
  if boundary_info is None or len(boundary_info) != 6:
116
118
  raise Exception("操作错误,要求输入一般支承列表长度为6")
119
+ # 若是数值列表(int/float),先按阈值转换为 bool
120
+ if all(isinstance(x, (int, float, bool)) for x in boundary_info) and \
121
+ any(isinstance(x, (int, float)) and not isinstance(x, bool) for x in boundary_info):
122
+ boundary_info = [bool(x > 0.5) for x in boundary_info]
117
123
  if isinstance(node_id, list):
118
124
  id_str = QtDataHelper.parse_int_list_to_str(node_id)
119
125
  else:
120
126
  id_str = str(node_id)
121
127
  s = "*GSUPPORT\r\n" + f"{id_str}," + "".join(str(int(x)) for x in boundary_info) + f",{group_name}\r\n"
122
- # print(s)
128
+
123
129
  QtServer.post_command(s, "QDAT")
124
130
  except Exception as ex:
125
131
  raise Exception(ex)
@@ -152,7 +158,7 @@ class MdbBoundary:
152
158
  raise Exception("操作错误,要求输入弹性支承边界信息长度为2")
153
159
  else:
154
160
  s += f"{support_type},{group_name}," + ",".join(f"{x:g}" for x in boundary_info) + "\r\n"
155
- # print(s)
161
+
156
162
  QtServer.post_command(s, "QDAT")
157
163
  except Exception as ex:
158
164
  raise Exception(ex)
@@ -221,7 +227,7 @@ class MdbBoundary:
221
227
  for master_id, slave_ids in master_slave_dict.items():
222
228
  ids_str = QtDataHelper.parse_int_list_to_str(slave_ids)
223
229
  s += f"{master_id},{ids_str}," + "".join(str(int(x)) for x in boundary_info) + f",{group_name}\r\n"
224
- # print(s)
230
+
225
231
  QtServer.post_command(s, "QDAT")
226
232
  except Exception as ex:
227
233
  raise Exception(ex)
@@ -248,7 +254,7 @@ class MdbBoundary:
248
254
  id_str = str(slave_id)
249
255
  s = "*MSLINK\r\n" + f"{master_id},{id_str}," + "".join(
250
256
  str(int(x)) for x in boundary_info) + f",{group_name}\r\n"
251
- # print(s)
257
+
252
258
  QtServer.post_command(s, "QDAT")
253
259
  except Exception as ex:
254
260
  raise Exception(ex)
@@ -274,7 +280,7 @@ class MdbBoundary:
274
280
  raise Exception("操作错误,要求输入J端约束列表长度为6")
275
281
  s = "*RESTRAINTS\r\n" + f"{beam_id}," + "".join(str(int(x)) for x in info_i) + "," + "".join(
276
282
  str(int(y)) for y in info_j) + f",{group_name}\r\n"
277
- # print(s)
283
+
278
284
  QtServer.post_command(s, "QDAT")
279
285
  except Exception as ex:
280
286
  raise Exception(ex)
@@ -297,7 +303,7 @@ class MdbBoundary:
297
303
  try:
298
304
  s = "*EQUATION\r\n" + f"{name},{group_name},{sec_node},{sec_dof}," + ",".join(
299
305
  f"{tuples}" for tuples in master_info) + "\r\n"
300
- # print(s)
306
+
301
307
  QtServer.post_command(s, "QDAT")
302
308
  except Exception as ex:
303
309
  raise Exception(ex)
@@ -326,7 +332,7 @@ class MdbBoundary:
326
332
  elif input_type == 2:
327
333
  tran_info = QtDataHelper.convert_three_points_to_vectors(coord_info)
328
334
  s += f"V1({','.join(f'{axis:g}' for axis in tran_info[0])}),V2({','.join(f'{axis:g}' for axis in tran_info[1])})\r\n"
329
- # print(s)
335
+
330
336
  QtServer.post_command(s, "QDAT")
331
337
  except Exception as ex:
332
338
  pass