qtmodel 2.2.5__tar.gz → 2.2.7__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.
Files changed (47) hide show
  1. {qtmodel-2.2.5 → qtmodel-2.2.7}/PKG-INFO +4 -4
  2. {qtmodel-2.2.5 → qtmodel-2.2.7}/README.md +3 -3
  3. {qtmodel-2.2.5 → qtmodel-2.2.7}/pyproject.toml +4 -1
  4. {qtmodel-2.2.5 → qtmodel-2.2.7}/src/qtmodel/core/qt_server.py +14 -7
  5. {qtmodel-2.2.5 → qtmodel-2.2.7}/src/qtmodel/mdb/mdb_project.py +2 -4
  6. {qtmodel-2.2.5 → qtmodel-2.2.7}/src/qtmodel/mdb/mdb_structure.py +1 -1
  7. {qtmodel-2.2.5 → qtmodel-2.2.7}/src/qtmodel.egg-info/PKG-INFO +4 -4
  8. {qtmodel-2.2.5 → qtmodel-2.2.7}/src/qtmodel.egg-info/SOURCES.txt +1 -3
  9. qtmodel-2.2.5/test/test.py +0 -6
  10. qtmodel-2.2.5/test/test2.py +0 -4
  11. {qtmodel-2.2.5 → qtmodel-2.2.7}/setup.cfg +0 -0
  12. {qtmodel-2.2.5 → qtmodel-2.2.7}/src/qtmodel/__init__.py +0 -0
  13. {qtmodel-2.2.5 → qtmodel-2.2.7}/src/qtmodel/cdb/__init__.py +0 -0
  14. {qtmodel-2.2.5 → qtmodel-2.2.7}/src/qtmodel/cdb/cdb_anti_overturn_check.py +0 -0
  15. {qtmodel-2.2.5 → qtmodel-2.2.7}/src/qtmodel/cdb/cdb_concrete_check.py +0 -0
  16. {qtmodel-2.2.5 → qtmodel-2.2.7}/src/qtmodel/cdb/cdb_steel_box_check.py +0 -0
  17. {qtmodel-2.2.5 → qtmodel-2.2.7}/src/qtmodel/cdb/cdb_steel_truss_check.py +0 -0
  18. {qtmodel-2.2.5 → qtmodel-2.2.7}/src/qtmodel/core/__init__.py +0 -0
  19. {qtmodel-2.2.5 → qtmodel-2.2.7}/src/qtmodel/core/data_helper.py +0 -0
  20. {qtmodel-2.2.5 → qtmodel-2.2.7}/src/qtmodel/core/model_db.py +0 -0
  21. {qtmodel-2.2.5 → qtmodel-2.2.7}/src/qtmodel/core/result_db.py +0 -0
  22. {qtmodel-2.2.5 → qtmodel-2.2.7}/src/qtmodel/mdb/__init__.py +0 -0
  23. {qtmodel-2.2.5 → qtmodel-2.2.7}/src/qtmodel/mdb/mdb_analysis_setting.py +0 -0
  24. {qtmodel-2.2.5 → qtmodel-2.2.7}/src/qtmodel/mdb/mdb_assistant.py +0 -0
  25. {qtmodel-2.2.5 → qtmodel-2.2.7}/src/qtmodel/mdb/mdb_boundary.py +0 -0
  26. {qtmodel-2.2.5 → qtmodel-2.2.7}/src/qtmodel/mdb/mdb_construction_stage.py +0 -0
  27. {qtmodel-2.2.5 → qtmodel-2.2.7}/src/qtmodel/mdb/mdb_dynamic_load.py +0 -0
  28. {qtmodel-2.2.5 → qtmodel-2.2.7}/src/qtmodel/mdb/mdb_live_load.py +0 -0
  29. {qtmodel-2.2.5 → qtmodel-2.2.7}/src/qtmodel/mdb/mdb_load.py +0 -0
  30. {qtmodel-2.2.5 → qtmodel-2.2.7}/src/qtmodel/mdb/mdb_property.py +0 -0
  31. {qtmodel-2.2.5 → qtmodel-2.2.7}/src/qtmodel/mdb/mdb_section.py +0 -0
  32. {qtmodel-2.2.5 → qtmodel-2.2.7}/src/qtmodel/mdb/mdb_sink_load.py +0 -0
  33. {qtmodel-2.2.5 → qtmodel-2.2.7}/src/qtmodel/mdb/mdb_static_load.py +0 -0
  34. {qtmodel-2.2.5 → qtmodel-2.2.7}/src/qtmodel/mdb/mdb_temperature_load.py +0 -0
  35. {qtmodel-2.2.5 → qtmodel-2.2.7}/src/qtmodel/mdb/mdb_tendon.py +0 -0
  36. {qtmodel-2.2.5 → qtmodel-2.2.7}/src/qtmodel/odb/__init__.py +0 -0
  37. {qtmodel-2.2.5 → qtmodel-2.2.7}/src/qtmodel/odb/odb_model_boundary.py +0 -0
  38. {qtmodel-2.2.5 → qtmodel-2.2.7}/src/qtmodel/odb/odb_model_load.py +0 -0
  39. {qtmodel-2.2.5 → qtmodel-2.2.7}/src/qtmodel/odb/odb_model_material.py +0 -0
  40. {qtmodel-2.2.5 → qtmodel-2.2.7}/src/qtmodel/odb/odb_model_section.py +0 -0
  41. {qtmodel-2.2.5 → qtmodel-2.2.7}/src/qtmodel/odb/odb_model_stage.py +0 -0
  42. {qtmodel-2.2.5 → qtmodel-2.2.7}/src/qtmodel/odb/odb_model_structure.py +0 -0
  43. {qtmodel-2.2.5 → qtmodel-2.2.7}/src/qtmodel/odb/odb_result_data.py +0 -0
  44. {qtmodel-2.2.5 → qtmodel-2.2.7}/src/qtmodel/odb/odb_result_plot.py +0 -0
  45. {qtmodel-2.2.5 → qtmodel-2.2.7}/src/qtmodel/odb/odb_view.py +0 -0
  46. {qtmodel-2.2.5 → qtmodel-2.2.7}/src/qtmodel.egg-info/dependency_links.txt +0 -0
  47. {qtmodel-2.2.5 → qtmodel-2.2.7}/src/qtmodel.egg-info/top_level.txt +0 -0
@@ -1,14 +1,14 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: qtmodel
3
- Version: 2.2.5
3
+ Version: 2.2.7
4
4
  Summary: qtmodel package
5
5
  Author: Your Name
6
6
  Requires-Python: >=3.9
7
7
  Description-Content-Type: text/markdown
8
8
 
9
- > 最新qtmodel版本 V2.2.5 - 2026-03-18
9
+ > 最新qtmodel版本 V2.2.7 - 2026-04-16
10
10
  > pip install --upgrade qtmodel -i https://pypi.org/simple
11
- - 新增检算荷载组合,检算材料,检算钢筋信息
11
+ - 更新2.2.6版本,优化帮助文档
12
12
  # 建模操作
13
13
  ## 节点操作
14
14
  ### add_nodes
@@ -209,7 +209,7 @@ mdb.update_frame_section(ids=1,sec_id=2)
209
209
  #Returns: 无
210
210
  ```
211
211
  ### update_plate_thick
212
- 更新杆系单元截面
212
+ 更新板单元截面
213
213
  > 参数:
214
214
  > ids: 单元编号,支持整形、列表、XtoYbyZ形式字符串
215
215
  > thick_id: 板厚号
@@ -1,6 +1,6 @@
1
- > 最新qtmodel版本 V2.2.5 - 2026-03-18
1
+ > 最新qtmodel版本 V2.2.7 - 2026-04-16
2
2
  > pip install --upgrade qtmodel -i https://pypi.org/simple
3
- - 新增检算荷载组合,检算材料,检算钢筋信息
3
+ - 更新2.2.6版本,优化帮助文档
4
4
  # 建模操作
5
5
  ## 节点操作
6
6
  ### add_nodes
@@ -201,7 +201,7 @@ mdb.update_frame_section(ids=1,sec_id=2)
201
201
  #Returns: 无
202
202
  ```
203
203
  ### update_plate_thick
204
- 更新杆系单元截面
204
+ 更新板单元截面
205
205
  > 参数:
206
206
  > ids: 单元编号,支持整形、列表、XtoYbyZ形式字符串
207
207
  > thick_id: 板厚号
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "qtmodel"
7
- version = "2.2.5"
7
+ version = "2.2.7"
8
8
  description = "qtmodel package"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
@@ -16,6 +16,9 @@ package-dir = {"" = "src"}
16
16
  [tool.setuptools.packages.find]
17
17
  where = ["src"]
18
18
 
19
+ # $env:HTTP_PROXY=""
20
+ # $env:HTTPS_PROXY=""
21
+ # $env:NO_PROXY="*"
19
22
  # py -m pip install -U pip build twine
20
23
  # py -m build
21
24
  # py -m twine check dist/*
@@ -3,21 +3,26 @@ import threading
3
3
  from typing import Optional
4
4
  import requests
5
5
 
6
+ import json
7
+ import threading
8
+ from typing import Optional
9
+ import requests
10
+
6
11
  class QtServer:
7
12
  URL: str = "http://localhost:55125/pythonForQt/"
8
- QT_VERSION: str = "2.2.5"
13
+ QT_VERSION: str = "2.2.6"
9
14
  _session = requests.Session()
10
15
  _lock = threading.Lock()
11
16
 
12
17
  @staticmethod
13
- def send_command(command: str = "", header: str = ""):
18
+ def send_command(command: str = "", header: str = "", read_timeout: int = 600):
14
19
  try:
15
20
  with QtServer._lock:
16
21
  response = QtServer._session.post(
17
22
  QtServer.URL,
18
- headers={'Content-Type': f'{header}'},
23
+ headers={'Content-Type': header},
19
24
  data=command.encode('utf-8'),
20
- timeout=(3, 60)
25
+ timeout=(3, read_timeout)
21
26
  )
22
27
 
23
28
  if response.status_code == 200:
@@ -30,18 +35,20 @@ class QtServer:
30
35
  raise Exception("服务端处理超时,请增加最大等待时间")
31
36
  else:
32
37
  raise Exception(f"连接错误,请重新尝试。HTTP {response.status_code}: {response.text}")
38
+ except requests.exceptions.ReadTimeout as ex:
39
+ raise Exception(f"请求超时:服务端处理超过 {read_timeout} 秒仍未返回") from ex
33
40
  except requests.exceptions.RequestException as ex:
34
41
  raise Exception(f"请求失败: {ex}") from ex
35
42
 
36
43
  @staticmethod
37
- def send_dict(header: str, payload: Optional[dict] = None):
44
+ def send_dict(header: str, payload: Optional[dict] = None, read_timeout: int = 600):
38
45
  try:
39
46
  if not payload:
40
- return QtServer.send_command(header=header, command="")
47
+ return QtServer.send_command(header=header, command="", read_timeout=read_timeout)
41
48
  payload = dict(payload)
42
49
  if "version" not in payload:
43
50
  payload["version"] = QtServer.QT_VERSION
44
51
  json_string = json.dumps(payload, ensure_ascii=False)
45
- return QtServer.send_command(header=header, command=json_string)
52
+ return QtServer.send_command(header=header, command=json_string, read_timeout=read_timeout)
46
53
  except Exception as ex:
47
54
  raise Exception(str(ex)) from ex
@@ -50,11 +50,9 @@ class MdbProject:
50
50
  current = _parse_version(QtServer.QT_VERSION)
51
51
  target = _parse_version(version)
52
52
 
53
- # 如果版本大于当前版本,直接报错
53
+ # 如果版本大于当前版本,直接按照当前版本导入
54
54
  if target > current:
55
- raise ValueError(
56
- f"不允许设置到更高版本:当前最高版本 {QtServer.QT_VERSION}"
57
- )
55
+ return
58
56
  QtServer.QT_VERSION = version
59
57
 
60
58
  @staticmethod
@@ -316,7 +316,7 @@ class MdbStructure:
316
316
  @staticmethod
317
317
  def update_plate_thick(ids, thick_id: int = 1):
318
318
  """
319
- 更新杆系单元截面
319
+ 更新板单元截面
320
320
  Args:
321
321
  ids: 单元编号,支持整形、列表、XtoYbyZ形式字符串
322
322
  thick_id: 板厚号
@@ -1,14 +1,14 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: qtmodel
3
- Version: 2.2.5
3
+ Version: 2.2.7
4
4
  Summary: qtmodel package
5
5
  Author: Your Name
6
6
  Requires-Python: >=3.9
7
7
  Description-Content-Type: text/markdown
8
8
 
9
- > 最新qtmodel版本 V2.2.5 - 2026-03-18
9
+ > 最新qtmodel版本 V2.2.7 - 2026-04-16
10
10
  > pip install --upgrade qtmodel -i https://pypi.org/simple
11
- - 新增检算荷载组合,检算材料,检算钢筋信息
11
+ - 更新2.2.6版本,优化帮助文档
12
12
  # 建模操作
13
13
  ## 节点操作
14
14
  ### add_nodes
@@ -209,7 +209,7 @@ mdb.update_frame_section(ids=1,sec_id=2)
209
209
  #Returns: 无
210
210
  ```
211
211
  ### update_plate_thick
212
- 更新杆系单元截面
212
+ 更新板单元截面
213
213
  > 参数:
214
214
  > ids: 单元编号,支持整形、列表、XtoYbyZ形式字符串
215
215
  > thick_id: 板厚号
@@ -40,6 +40,4 @@ src/qtmodel/odb/odb_model_stage.py
40
40
  src/qtmodel/odb/odb_model_structure.py
41
41
  src/qtmodel/odb/odb_result_data.py
42
42
  src/qtmodel/odb/odb_result_plot.py
43
- src/qtmodel/odb/odb_view.py
44
- test/test.py
45
- test/test2.py
43
+ src/qtmodel/odb/odb_view.py
@@ -1,6 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- # from qtmodel import *
3
- from src.qtmodel import *
4
- mdb.set_url("http://10.33.176.44:61076/")
5
- mdb.remove_beam_element_load(element_id=1,case_name="二恒",load_type=3,group_name="二恒")
6
- mdb.update_model()
@@ -1,4 +0,0 @@
1
- from src.qtmodel import *
2
- mdb.set_url("http://10.33.176.44:61076/")
3
- # print(odb.get_element_force(ids=1,stage_id=-1,case_name="ST:时变荷载"))
4
- print(odb.get_initial_tension_load(case_name="初拉力荷载"))
File without changes
File without changes