gmshairfoil2d 0.1.4__py3-none-any.whl → 0.2.1__py3-none-any.whl
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.
- gmshairfoil2d/airfoil_func.py +12 -2
- gmshairfoil2d/geometry_def.py +588 -86
- gmshairfoil2d/gmshairfoil2d.py +158 -24
- gmshairfoil2d-0.2.1.dist-info/METADATA +139 -0
- gmshairfoil2d-0.2.1.dist-info/RECORD +13 -0
- {gmshairfoil2d-0.1.4.dist-info → gmshairfoil2d-0.2.1.dist-info}/WHEEL +1 -1
- {gmshairfoil2d-0.1.4.dist-info → gmshairfoil2d-0.2.1.dist-info}/top_level.txt +1 -0
- tests/__init__.py +0 -0
- tests/test_airfoil_func.py +77 -0
- tests/test_geometry_def.py +41 -0
- gmshairfoil2d-0.1.4.dist-info/METADATA +0 -106
- gmshairfoil2d-0.1.4.dist-info/RECORD +0 -10
- {gmshairfoil2d-0.1.4.dist-info → gmshairfoil2d-0.2.1.dist-info}/entry_points.txt +0 -0
- {gmshairfoil2d-0.1.4.dist-info → gmshairfoil2d-0.2.1.dist-info/licenses}/LICENSE +0 -0
gmshairfoil2d/airfoil_func.py
CHANGED
|
@@ -2,6 +2,7 @@ from pathlib import Path
|
|
|
2
2
|
|
|
3
3
|
import numpy as np
|
|
4
4
|
import requests
|
|
5
|
+
import sys
|
|
5
6
|
|
|
6
7
|
import gmshairfoil2d.__init__
|
|
7
8
|
|
|
@@ -49,8 +50,17 @@ def get_airfoil_file(airfoil_name):
|
|
|
49
50
|
|
|
50
51
|
r = requests.get(url)
|
|
51
52
|
|
|
52
|
-
|
|
53
|
-
|
|
53
|
+
try:
|
|
54
|
+
r = requests.get(url, timeout=10) # Aggiungi sempre un timeout
|
|
55
|
+
if r.status_code != 200:
|
|
56
|
+
# Invece di raise Exception, print e exit pulito
|
|
57
|
+
print(f"❌ Error: Could not find airfoil '{airfoil_name}' on UIUC database.")
|
|
58
|
+
import sys
|
|
59
|
+
sys.exit(1)
|
|
60
|
+
except requests.exceptions.RequestException as e:
|
|
61
|
+
print(f"❌ Network Error: Could not connect to the database. Check your internet.")
|
|
62
|
+
import sys
|
|
63
|
+
sys.exit(1)
|
|
54
64
|
|
|
55
65
|
file_path = Path(database_dir, f"{airfoil_name}.dat")
|
|
56
66
|
|