structuralcodes 0.6.0__py3-none-any.whl → 0.6.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.
Potentially problematic release.
This version of structuralcodes might be problematic. Click here for more details.
- structuralcodes/__init__.py +1 -1
- structuralcodes/codes/ec2_2004/shear.py +3 -2
- structuralcodes/core/base.py +23 -8
- structuralcodes/geometry/_geometry.py +98 -3
- structuralcodes/geometry/profiles/__init__.py +14 -0
- structuralcodes/geometry/profiles/_common_functions.py +114 -1
- structuralcodes/geometry/profiles/_hd.py +374 -0
- structuralcodes/geometry/profiles/_hp.py +319 -0
- structuralcodes/geometry/profiles/_l.py +528 -0
- structuralcodes/geometry/profiles/_li.py +217 -0
- structuralcodes/geometry/profiles/_u.py +173 -0
- structuralcodes/geometry/profiles/_ub.py +1214 -122
- structuralcodes/geometry/profiles/_upe.py +133 -0
- structuralcodes/geometry/profiles/_w.py +2157 -0
- structuralcodes/materials/concrete/_concreteEC2_2004.py +1 -1
- structuralcodes/materials/concrete/_concreteEC2_2023.py +1 -1
- structuralcodes/materials/concrete/_concreteMC2010.py +1 -1
- {structuralcodes-0.6.0.dist-info → structuralcodes-0.6.1.dist-info}/METADATA +1 -1
- {structuralcodes-0.6.0.dist-info → structuralcodes-0.6.1.dist-info}/RECORD +21 -14
- {structuralcodes-0.6.0.dist-info → structuralcodes-0.6.1.dist-info}/WHEEL +0 -0
- {structuralcodes-0.6.0.dist-info → structuralcodes-0.6.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"""UPE profiles."""
|
|
2
|
+
|
|
3
|
+
from shapely import (
|
|
4
|
+
Polygon,
|
|
5
|
+
)
|
|
6
|
+
|
|
7
|
+
from ._base_profile import BaseProfile
|
|
8
|
+
from ._common_functions import _create_parallel_U_section
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class UPE(BaseProfile):
|
|
12
|
+
"""Simple class for representing an UPE profile.
|
|
13
|
+
|
|
14
|
+
European Parallel flange channels UPE 80 - 400.
|
|
15
|
+
|
|
16
|
+
Dimensions: EN 10 365:2017
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
parameters = {
|
|
20
|
+
'UPE80': {'h': 80.0, 'b': 50.0, 'tw': 4.0, 'tf': 7.0, 'r': 10.0},
|
|
21
|
+
'UPE100': {'h': 100.0, 'b': 55.0, 'tw': 4.5, 'tf': 7.5, 'r': 10.0},
|
|
22
|
+
'UPE120': {'h': 120.0, 'b': 60.0, 'tw': 5.0, 'tf': 8.0, 'r': 12.0},
|
|
23
|
+
'UPE140': {'h': 140.0, 'b': 65.0, 'tw': 5.0, 'tf': 9.0, 'r': 12.0},
|
|
24
|
+
'UPE160': {'h': 160.0, 'b': 70.0, 'tw': 5.5, 'tf': 9.5, 'r': 12.0},
|
|
25
|
+
'UPE180': {'h': 180.0, 'b': 75.0, 'tw': 5.5, 'tf': 10.5, 'r': 12.0},
|
|
26
|
+
'UPE200': {'h': 200.0, 'b': 80.0, 'tw': 6.0, 'tf': 11.0, 'r': 13.0},
|
|
27
|
+
'UPE220': {'h': 220.0, 'b': 85.0, 'tw': 6.5, 'tf': 12.0, 'r': 13.0},
|
|
28
|
+
'UPE240': {'h': 240.0, 'b': 90.0, 'tw': 7.0, 'tf': 12.5, 'r': 15.0},
|
|
29
|
+
'UPE270': {'h': 270.0, 'b': 95.0, 'tw': 7.5, 'tf': 13.5, 'r': 15.0},
|
|
30
|
+
'UPE300': {'h': 300.0, 'b': 100.0, 'tw': 9.5, 'tf': 15.0, 'r': 15.0},
|
|
31
|
+
'UPE330': {'h': 330.0, 'b': 105.0, 'tw': 11.0, 'tf': 16.0, 'r': 18.0},
|
|
32
|
+
'UPE360': {'h': 360.0, 'b': 110.0, 'tw': 12.0, 'tf': 17.0, 'r': 18.0},
|
|
33
|
+
'UPE400': {'h': 400.0, 'b': 115.0, 'tw': 13.5, 'tf': 18.0, 'r': 18.0},
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@classmethod
|
|
37
|
+
def get_polygon(cls, name: str) -> Polygon:
|
|
38
|
+
"""Returns a shapely polygon representing an UPE section."""
|
|
39
|
+
if isinstance(name, (float, int)):
|
|
40
|
+
name = f'UPE{int(name):0d}'
|
|
41
|
+
parameters = cls.parameters.get(name)
|
|
42
|
+
if parameters is None:
|
|
43
|
+
raise ValueError(
|
|
44
|
+
f"Profile '{name}' not found in UPE sections. "
|
|
45
|
+
"Select a valid profile (available ones: "
|
|
46
|
+
f"{cls.profiles()})"
|
|
47
|
+
)
|
|
48
|
+
return _create_parallel_U_section(**parameters)
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def profiles(cls) -> list:
|
|
52
|
+
"""Returns a list containing all available profiles."""
|
|
53
|
+
return list(cls.parameters.keys())
|
|
54
|
+
|
|
55
|
+
def __init__(self, name: str) -> None:
|
|
56
|
+
"""Creates a new UPE object."""
|
|
57
|
+
if isinstance(name, (float, int)):
|
|
58
|
+
name = f'UPE{int(name):0d}'
|
|
59
|
+
parameters = self.parameters.get(name)
|
|
60
|
+
if parameters is None:
|
|
61
|
+
raise ValueError(
|
|
62
|
+
f"Profile '{name}' not found in UPE sections. "
|
|
63
|
+
"Select a valid profile (available ones: "
|
|
64
|
+
f"{self.profiles()})"
|
|
65
|
+
)
|
|
66
|
+
super().__init__()
|
|
67
|
+
self._h = parameters.get('h')
|
|
68
|
+
self._b = parameters.get('b')
|
|
69
|
+
self._tw = parameters.get('tw')
|
|
70
|
+
self._tf = parameters.get('tf')
|
|
71
|
+
self._r = parameters.get('r')
|
|
72
|
+
|
|
73
|
+
self._polygon = _create_parallel_U_section(
|
|
74
|
+
h=self._h,
|
|
75
|
+
b=self._b,
|
|
76
|
+
tw=self._tw,
|
|
77
|
+
tf=self._tf,
|
|
78
|
+
r=self._r,
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
@property
|
|
82
|
+
def polygon(self) -> Polygon:
|
|
83
|
+
"""Returns shapely Polygon of section.
|
|
84
|
+
|
|
85
|
+
Returns:
|
|
86
|
+
Polygon: The represention of the UPE section.
|
|
87
|
+
"""
|
|
88
|
+
return self._polygon
|
|
89
|
+
|
|
90
|
+
@property
|
|
91
|
+
def h(self) -> float:
|
|
92
|
+
"""Returns height of UPE section.
|
|
93
|
+
|
|
94
|
+
Returns:
|
|
95
|
+
float: Height h of UPE section.
|
|
96
|
+
"""
|
|
97
|
+
return self._h
|
|
98
|
+
|
|
99
|
+
@property
|
|
100
|
+
def b(self) -> float:
|
|
101
|
+
"""Returns width of UPE section.
|
|
102
|
+
|
|
103
|
+
Returns:
|
|
104
|
+
float: Width b of UPE section.
|
|
105
|
+
"""
|
|
106
|
+
return self._b
|
|
107
|
+
|
|
108
|
+
@property
|
|
109
|
+
def tw(self) -> float:
|
|
110
|
+
"""Returns thickness of web of UPE section.
|
|
111
|
+
|
|
112
|
+
Returns:
|
|
113
|
+
float: Web thickness tw of UPE section.
|
|
114
|
+
"""
|
|
115
|
+
return self._tw
|
|
116
|
+
|
|
117
|
+
@property
|
|
118
|
+
def tf(self) -> float:
|
|
119
|
+
"""Returns thickness of flange of UPE section.
|
|
120
|
+
|
|
121
|
+
Returns:
|
|
122
|
+
float: Flange thickness tw of UPE section.
|
|
123
|
+
"""
|
|
124
|
+
return self._tf
|
|
125
|
+
|
|
126
|
+
@property
|
|
127
|
+
def r(self) -> float:
|
|
128
|
+
"""Returns fillet radius of UPE section.
|
|
129
|
+
|
|
130
|
+
Returns:
|
|
131
|
+
float: Fillet radius r1 of UPE section.
|
|
132
|
+
"""
|
|
133
|
+
return self._r
|