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.

@@ -0,0 +1,374 @@
1
+ """HD profiles."""
2
+
3
+ from shapely import (
4
+ Polygon,
5
+ )
6
+
7
+ from ._base_profile import BaseProfile
8
+ from ._common_functions import (
9
+ _create_I_section,
10
+ )
11
+
12
+
13
+ class HD(BaseProfile):
14
+ """Simple class for representing an HD profile.
15
+
16
+ HD A, HD B, HD M 100-1000 in accordance with Standard Euronorm 53-62.
17
+ """
18
+
19
+ parameters = {
20
+ 'HD260x54.1': {
21
+ 'h': 244.0,
22
+ 'b': 260.0,
23
+ 'tw': 6.5,
24
+ 'tf': 9.5,
25
+ 'r': 24.0,
26
+ },
27
+ 'HD260x68.2': {
28
+ 'h': 250.0,
29
+ 'b': 260.0,
30
+ 'tw': 7.5,
31
+ 'tf': 12.5,
32
+ 'r': 24.0,
33
+ },
34
+ 'HD260x93.0': {
35
+ 'h': 260.0,
36
+ 'b': 260.0,
37
+ 'tw': 10.0,
38
+ 'tf': 17.5,
39
+ 'r': 24.0,
40
+ },
41
+ 'HD260x114.0': {
42
+ 'h': 268.0,
43
+ 'b': 262.0,
44
+ 'tw': 12.5,
45
+ 'tf': 21.5,
46
+ 'r': 24.0,
47
+ },
48
+ 'HD260x142.0': {
49
+ 'h': 278.0,
50
+ 'b': 265.0,
51
+ 'tw': 15.5,
52
+ 'tf': 26.5,
53
+ 'r': 24.0,
54
+ },
55
+ 'HD260x172.0': {
56
+ 'h': 290.0,
57
+ 'b': 268.0,
58
+ 'tw': 18.0,
59
+ 'tf': 32.5,
60
+ 'r': 24.0,
61
+ },
62
+ 'HD320x74.2': {
63
+ 'h': 301.0,
64
+ 'b': 300.0,
65
+ 'tw': 8.0,
66
+ 'tf': 11.0,
67
+ 'r': 27.0,
68
+ },
69
+ 'HD320x97.6': {
70
+ 'h': 310.0,
71
+ 'b': 300.0,
72
+ 'tw': 9.0,
73
+ 'tf': 15.5,
74
+ 'r': 27.0,
75
+ },
76
+ 'HD320x127.0': {
77
+ 'h': 320.0,
78
+ 'b': 300.0,
79
+ 'tw': 11.5,
80
+ 'tf': 20.5,
81
+ 'r': 27.0,
82
+ },
83
+ 'HD320x158.0': {
84
+ 'h': 330.0,
85
+ 'b': 303.0,
86
+ 'tw': 14.5,
87
+ 'tf': 25.5,
88
+ 'r': 27.0,
89
+ },
90
+ 'HD320x198.0': {
91
+ 'h': 343.0,
92
+ 'b': 306.0,
93
+ 'tw': 18.0,
94
+ 'tf': 32.0,
95
+ 'r': 27.0,
96
+ },
97
+ 'HD320x245.0': {
98
+ 'h': 359.0,
99
+ 'b': 309.0,
100
+ 'tw': 21.0,
101
+ 'tf': 40.0,
102
+ 'r': 27.0,
103
+ },
104
+ 'HD320x300.0': {
105
+ 'h': 375.0,
106
+ 'b': 313.0,
107
+ 'tw': 27.0,
108
+ 'tf': 48.0,
109
+ 'r': 27.0,
110
+ },
111
+ 'HD360x134.0': {
112
+ 'h': 356.0,
113
+ 'b': 369.0,
114
+ 'tw': 11.2,
115
+ 'tf': 18.0,
116
+ 'r': 15.0,
117
+ },
118
+ 'HD360x147.0': {
119
+ 'h': 360.0,
120
+ 'b': 370.0,
121
+ 'tw': 12.3,
122
+ 'tf': 19.8,
123
+ 'r': 15.0,
124
+ },
125
+ 'HD360x162.0': {
126
+ 'h': 364.0,
127
+ 'b': 371.0,
128
+ 'tw': 13.3,
129
+ 'tf': 21.8,
130
+ 'r': 15.0,
131
+ },
132
+ 'HD360x179.0': {
133
+ 'h': 368.0,
134
+ 'b': 373.0,
135
+ 'tw': 15.0,
136
+ 'tf': 23.9,
137
+ 'r': 15.0,
138
+ },
139
+ 'HD360x196.0': {
140
+ 'h': 372.0,
141
+ 'b': 374.0,
142
+ 'tw': 16.4,
143
+ 'tf': 26.2,
144
+ 'r': 15.0,
145
+ },
146
+ 'HD400x187.0': {
147
+ 'h': 368.0,
148
+ 'b': 391.0,
149
+ 'tw': 15.0,
150
+ 'tf': 24.0,
151
+ 'r': 15.0,
152
+ },
153
+ 'HD400x216.0': {
154
+ 'h': 375.0,
155
+ 'b': 394.0,
156
+ 'tw': 17.3,
157
+ 'tf': 27.7,
158
+ 'r': 15.0,
159
+ },
160
+ 'HD400x237.0': {
161
+ 'h': 380.0,
162
+ 'b': 395.0,
163
+ 'tw': 18.9,
164
+ 'tf': 30.2,
165
+ 'r': 15.0,
166
+ },
167
+ 'HD400x262.0': {
168
+ 'h': 387.0,
169
+ 'b': 398.0,
170
+ 'tw': 21.1,
171
+ 'tf': 33.3,
172
+ 'r': 15.0,
173
+ },
174
+ 'HD400x287.0': {
175
+ 'h': 393.0,
176
+ 'b': 399.0,
177
+ 'tw': 22.6,
178
+ 'tf': 36.6,
179
+ 'r': 15.0,
180
+ },
181
+ 'HD400x314.0': {
182
+ 'h': 399.0,
183
+ 'b': 401.0,
184
+ 'tw': 24.9,
185
+ 'tf': 39.6,
186
+ 'r': 15.0,
187
+ },
188
+ 'HD400x347.0': {
189
+ 'h': 407.0,
190
+ 'b': 404.0,
191
+ 'tw': 27.2,
192
+ 'tf': 43.7,
193
+ 'r': 15.0,
194
+ },
195
+ 'HD400x382.0': {
196
+ 'h': 416.0,
197
+ 'b': 406.0,
198
+ 'tw': 29.8,
199
+ 'tf': 48.0,
200
+ 'r': 15.0,
201
+ },
202
+ 'HD400x421.0': {
203
+ 'h': 425.0,
204
+ 'b': 409.0,
205
+ 'tw': 32.8,
206
+ 'tf': 52.6,
207
+ 'r': 15.0,
208
+ },
209
+ 'HD400x463.0': {
210
+ 'h': 435.0,
211
+ 'b': 412.0,
212
+ 'tw': 35.8,
213
+ 'tf': 57.4,
214
+ 'r': 15.0,
215
+ },
216
+ 'HD400x509.0': {
217
+ 'h': 446.0,
218
+ 'b': 416.0,
219
+ 'tw': 39.1,
220
+ 'tf': 62.7,
221
+ 'r': 15.0,
222
+ },
223
+ 'HD400x551.0': {
224
+ 'h': 455.0,
225
+ 'b': 418.0,
226
+ 'tw': 42.0,
227
+ 'tf': 67.6,
228
+ 'r': 15.0,
229
+ },
230
+ 'HD400x592.0': {
231
+ 'h': 465.0,
232
+ 'b': 421.0,
233
+ 'tw': 45.0,
234
+ 'tf': 72.3,
235
+ 'r': 15.0,
236
+ },
237
+ 'HD400x634.0': {
238
+ 'h': 474.0,
239
+ 'b': 424.0,
240
+ 'tw': 47.6,
241
+ 'tf': 77.1,
242
+ 'r': 15.0,
243
+ },
244
+ 'HD400x677.0': {
245
+ 'h': 483.0,
246
+ 'b': 428.0,
247
+ 'tw': 51.2,
248
+ 'tf': 81.5,
249
+ 'r': 15.0,
250
+ },
251
+ 'HD400x744.0': {
252
+ 'h': 498.0,
253
+ 'b': 432.0,
254
+ 'tw': 55.6,
255
+ 'tf': 88.9,
256
+ 'r': 15.0,
257
+ },
258
+ 'HD400x818.0': {
259
+ 'h': 514.0,
260
+ 'b': 437.0,
261
+ 'tw': 60.5,
262
+ 'tf': 97.0,
263
+ 'r': 15.0,
264
+ },
265
+ 'HD400x900.0': {
266
+ 'h': 531.0,
267
+ 'b': 442.0,
268
+ 'tw': 65.9,
269
+ 'tf': 106.0,
270
+ 'r': 15.0,
271
+ },
272
+ 'HD400x990.0': {
273
+ 'h': 550.0,
274
+ 'b': 448.0,
275
+ 'tw': 71.9,
276
+ 'tf': 115.0,
277
+ 'r': 15.0,
278
+ },
279
+ 'HD400x1086.0': {
280
+ 'h': 569.0,
281
+ 'b': 454.0,
282
+ 'tw': 78.0,
283
+ 'tf': 125.0,
284
+ 'r': 15.0,
285
+ },
286
+ }
287
+
288
+ @classmethod
289
+ def get_polygon(cls, name: str) -> Polygon:
290
+ """Returns a shapely polygon representing an HD section."""
291
+ parameters = cls.parameters.get(name)
292
+ if parameters is None:
293
+ raise ValueError(
294
+ f"Profile '{name}' not found in HD sections. "
295
+ "Select a valid profile (available ones: "
296
+ f"{cls.profiles()})"
297
+ )
298
+ return _create_I_section(**parameters)
299
+
300
+ @classmethod
301
+ def profiles(cls) -> list:
302
+ """Returns a list containing all available profiles."""
303
+ return list(cls.parameters.keys())
304
+
305
+ def __init__(self, name: str) -> None:
306
+ """Creates a new HD object."""
307
+ parameters = self.parameters.get(name)
308
+ if parameters is None:
309
+ raise ValueError(
310
+ f"Profile '{name}' not found in HD sections. "
311
+ "Select a valid profile (available ones: "
312
+ f"{self.profiles()})"
313
+ )
314
+ super().__init__()
315
+ self._h = parameters.get('h')
316
+ self._b = parameters.get('b')
317
+ self._tw = parameters.get('tw')
318
+ self._tf = parameters.get('tf')
319
+ self._r = parameters.get('r')
320
+ self._polygon = _create_I_section(**parameters)
321
+
322
+ @property
323
+ def polygon(self) -> Polygon:
324
+ """Returns shapely Polygon of section.
325
+
326
+ Returns:
327
+ Polygon: THD represention of tHD HD section.
328
+ """
329
+ return self._polygon
330
+
331
+ @property
332
+ def h(self) -> float:
333
+ """Returns Height of HD section.
334
+
335
+ Returns:
336
+ float: Height h of HD section.
337
+ """
338
+ return self._h
339
+
340
+ @property
341
+ def b(self) -> float:
342
+ """Returns width of HD section.
343
+
344
+ Returns:
345
+ float: Width b of HD section.
346
+ """
347
+ return self._b
348
+
349
+ @property
350
+ def tw(self) -> float:
351
+ """Returns thickness of web of HD section.
352
+
353
+ Returns:
354
+ float: Web thickness tw of HD section.
355
+ """
356
+ return self._tw
357
+
358
+ @property
359
+ def tf(self) -> float:
360
+ """Returns thickness of flange of HD section.
361
+
362
+ Returns:
363
+ float: Flange thickness tw of HD section.
364
+ """
365
+ return self._tf
366
+
367
+ @property
368
+ def r(self) -> float:
369
+ """Returns fillet radius of HD section.
370
+
371
+ Returns:
372
+ float: Fillet radius r of HD section.
373
+ """
374
+ return self._r
@@ -0,0 +1,319 @@
1
+ """HP profiles."""
2
+
3
+ from shapely import (
4
+ Polygon,
5
+ )
6
+
7
+ from ._base_profile import BaseProfile
8
+ from ._common_functions import (
9
+ _create_I_section,
10
+ )
11
+
12
+
13
+ class HP(BaseProfile):
14
+ """Simple class for representing an HP profile.
15
+
16
+ HP profiles.
17
+ """
18
+
19
+ parameters = {
20
+ 'HP200x43': {'h': 200.0, 'b': 205.0, 'tw': 9.0, 'tf': 9.0, 'r': 10.0},
21
+ 'HP200x53': {
22
+ 'h': 204.0,
23
+ 'b': 207.0,
24
+ 'tw': 11.3,
25
+ 'tf': 11.3,
26
+ 'r': 10.0,
27
+ },
28
+ 'HP220x57': {
29
+ 'h': 210.0,
30
+ 'b': 224.5,
31
+ 'tw': 11.0,
32
+ 'tf': 11.0,
33
+ 'r': 18.0,
34
+ },
35
+ 'HP260x75': {
36
+ 'h': 249.0,
37
+ 'b': 265.0,
38
+ 'tw': 12.0,
39
+ 'tf': 12.0,
40
+ 'r': 24.0,
41
+ },
42
+ 'HP260x87': {
43
+ 'h': 253.0,
44
+ 'b': 267.0,
45
+ 'tw': 14.0,
46
+ 'tf': 14.0,
47
+ 'r': 24.0,
48
+ },
49
+ 'HP305x79': {
50
+ 'h': 299.3,
51
+ 'b': 306.4,
52
+ 'tw': 11.0,
53
+ 'tf': 11.1,
54
+ 'r': 15.0,
55
+ },
56
+ 'HP305x88': {
57
+ 'h': 301.7,
58
+ 'b': 307.8,
59
+ 'tw': 12.4,
60
+ 'tf': 12.3,
61
+ 'r': 15.0,
62
+ },
63
+ 'HP305x95': {
64
+ 'h': 303.7,
65
+ 'b': 308.7,
66
+ 'tw': 13.3,
67
+ 'tf': 13.3,
68
+ 'r': 15.0,
69
+ },
70
+ 'HP305x110': {
71
+ 'h': 307.9,
72
+ 'b': 310.7,
73
+ 'tw': 15.3,
74
+ 'tf': 15.4,
75
+ 'r': 15.0,
76
+ },
77
+ 'HP305x126': {
78
+ 'h': 312.3,
79
+ 'b': 312.9,
80
+ 'tw': 17.5,
81
+ 'tf': 17.6,
82
+ 'r': 15.0,
83
+ },
84
+ 'HP305x149': {
85
+ 'h': 318.5,
86
+ 'b': 316.0,
87
+ 'tw': 20.6,
88
+ 'tf': 20.7,
89
+ 'r': 15.0,
90
+ },
91
+ 'HP305x180': {
92
+ 'h': 326.7,
93
+ 'b': 319.7,
94
+ 'tw': 24.8,
95
+ 'tf': 24.8,
96
+ 'r': 15.0,
97
+ },
98
+ 'HP305x186': {
99
+ 'h': 328.3,
100
+ 'b': 320.9,
101
+ 'tw': 25.5,
102
+ 'tf': 25.6,
103
+ 'r': 15.0,
104
+ },
105
+ 'HP305x223': {
106
+ 'h': 337.9,
107
+ 'b': 325.7,
108
+ 'tw': 30.3,
109
+ 'tf': 30.4,
110
+ 'r': 15.0,
111
+ },
112
+ 'HP320x88': {
113
+ 'h': 303.0,
114
+ 'b': 304.0,
115
+ 'tw': 12.0,
116
+ 'tf': 12.0,
117
+ 'r': 27.0,
118
+ },
119
+ 'HP320x103': {
120
+ 'h': 307.0,
121
+ 'b': 306.0,
122
+ 'tw': 14.0,
123
+ 'tf': 14.0,
124
+ 'r': 27.0,
125
+ },
126
+ 'HP320x117': {
127
+ 'h': 311.0,
128
+ 'b': 308.0,
129
+ 'tw': 16.0,
130
+ 'tf': 16.0,
131
+ 'r': 27.0,
132
+ },
133
+ 'HP320x147': {
134
+ 'h': 319.0,
135
+ 'b': 312.0,
136
+ 'tw': 20.0,
137
+ 'tf': 20.0,
138
+ 'r': 27.0,
139
+ },
140
+ 'HP320x184': {
141
+ 'h': 329.0,
142
+ 'b': 317.0,
143
+ 'tw': 25.0,
144
+ 'tf': 25.0,
145
+ 'r': 27.0,
146
+ },
147
+ 'HP360x109': {
148
+ 'h': 346.4,
149
+ 'b': 371.0,
150
+ 'tw': 12.8,
151
+ 'tf': 12.9,
152
+ 'r': 15.0,
153
+ },
154
+ 'HP360x133': {
155
+ 'h': 352.0,
156
+ 'b': 373.8,
157
+ 'tw': 15.6,
158
+ 'tf': 15.7,
159
+ 'r': 15.0,
160
+ },
161
+ 'HP360x152': {
162
+ 'h': 356.4,
163
+ 'b': 376.0,
164
+ 'tw': 17.8,
165
+ 'tf': 17.9,
166
+ 'r': 15.0,
167
+ },
168
+ 'HP360x174': {
169
+ 'h': 361.4,
170
+ 'b': 378.5,
171
+ 'tw': 20.3,
172
+ 'tf': 20.4,
173
+ 'r': 15.0,
174
+ },
175
+ 'HP360x180': {
176
+ 'h': 362.9,
177
+ 'b': 378.8,
178
+ 'tw': 21.1,
179
+ 'tf': 21.1,
180
+ 'r': 15.0,
181
+ },
182
+ 'HP400x122': {
183
+ 'h': 348.0,
184
+ 'b': 390.0,
185
+ 'tw': 14.0,
186
+ 'tf': 14.0,
187
+ 'r': 15.0,
188
+ },
189
+ 'HP400x140': {
190
+ 'h': 352.0,
191
+ 'b': 392.0,
192
+ 'tw': 16.0,
193
+ 'tf': 16.0,
194
+ 'r': 15.0,
195
+ },
196
+ 'HP400x158': {
197
+ 'h': 356.0,
198
+ 'b': 394.0,
199
+ 'tw': 18.0,
200
+ 'tf': 18.0,
201
+ 'r': 15.0,
202
+ },
203
+ 'HP400x176': {
204
+ 'h': 360.0,
205
+ 'b': 396.0,
206
+ 'tw': 20.0,
207
+ 'tf': 20.0,
208
+ 'r': 15.0,
209
+ },
210
+ 'HP400x194': {
211
+ 'h': 364.0,
212
+ 'b': 398.0,
213
+ 'tw': 22.0,
214
+ 'tf': 22.0,
215
+ 'r': 15.0,
216
+ },
217
+ 'HP400x213': {
218
+ 'h': 368.0,
219
+ 'b': 400.0,
220
+ 'tw': 24.0,
221
+ 'tf': 24.0,
222
+ 'r': 15.0,
223
+ },
224
+ 'HP400x231': {
225
+ 'h': 372.0,
226
+ 'b': 402.0,
227
+ 'tw': 26.0,
228
+ 'tf': 26.0,
229
+ 'r': 15.0,
230
+ },
231
+ }
232
+
233
+ @classmethod
234
+ def get_polygon(cls, name: str) -> Polygon:
235
+ """Returns a shapely polygon representing an HP section."""
236
+ parameters = cls.parameters.get(name)
237
+ if parameters is None:
238
+ raise ValueError(
239
+ f"Profile '{name}' not found in HP sections. "
240
+ "Select a valid profile (available ones: "
241
+ f"{cls.profiles()})"
242
+ )
243
+ return _create_I_section(**parameters)
244
+
245
+ @classmethod
246
+ def profiles(cls) -> list:
247
+ """Returns a list containing all available profiles."""
248
+ return list(cls.parameters.keys())
249
+
250
+ def __init__(self, name: str) -> None:
251
+ """Creates a new HP object."""
252
+ parameters = self.parameters.get(name)
253
+ if parameters is None:
254
+ raise ValueError(
255
+ f"Profile '{name}' not found in HP sections. "
256
+ "Select a valid profile (available ones: "
257
+ f"{self.profiles()})"
258
+ )
259
+ super().__init__()
260
+ self._h = parameters.get('h')
261
+ self._b = parameters.get('b')
262
+ self._tw = parameters.get('tw')
263
+ self._tf = parameters.get('tf')
264
+ self._r = parameters.get('r')
265
+ self._polygon = _create_I_section(**parameters)
266
+
267
+ @property
268
+ def polygon(self) -> Polygon:
269
+ """Returns shapely Polygon of section.
270
+
271
+ Returns:
272
+ Polygon: The represention of the HP section.
273
+ """
274
+ return self._polygon
275
+
276
+ @property
277
+ def h(self) -> float:
278
+ """Returns height of HP section.
279
+
280
+ Returns:
281
+ float: Height h of HP section.
282
+ """
283
+ return self._h
284
+
285
+ @property
286
+ def b(self) -> float:
287
+ """Returns width of HP section.
288
+
289
+ Returns:
290
+ float: Width b of HP section.
291
+ """
292
+ return self._b
293
+
294
+ @property
295
+ def tw(self) -> float:
296
+ """Returns thickness of web of HP section.
297
+
298
+ Returns:
299
+ float: Web thickness tw of HP section.
300
+ """
301
+ return self._tw
302
+
303
+ @property
304
+ def tf(self) -> float:
305
+ """Returns thickness of flange of HP section.
306
+
307
+ Returns:
308
+ float: Flange thickness tw of HP section.
309
+ """
310
+ return self._tf
311
+
312
+ @property
313
+ def r(self) -> float:
314
+ """Returns fillet radius of HP section.
315
+
316
+ Returns:
317
+ float: Fillet radius r of HP section.
318
+ """
319
+ return self._r