1
1
from typing import Union , Optional
2
2
import numpy as np
3
- from shapely .geometry import Polygon
4
3
import sectionproperties .pre .pre as pre
5
4
import sectionproperties .pre .geometry as geometry
6
5
import sectionproperties .pre .library .primitive_sections as primitive_sections
@@ -15,11 +14,11 @@ def concrete_rectangular_section(
15
14
n_bot : int ,
16
15
n_circle : int ,
17
16
cover : float ,
18
- dia_side : float = None ,
17
+ dia_side : Optional [ float ] = None ,
19
18
n_side : int = 0 ,
20
- area_top : float = None ,
21
- area_bot : float = None ,
22
- area_side : float = None ,
19
+ area_top : Optional [ float ] = None ,
20
+ area_bot : Optional [ float ] = None ,
21
+ area_side : Optional [ float ] = None ,
23
22
conc_mat : pre .Material = pre .DEFAULT_MATERIAL ,
24
23
steel_mat : pre .Material = pre .DEFAULT_MATERIAL ,
25
24
) -> geometry .CompoundGeometry :
@@ -47,10 +46,8 @@ def concrete_rectangular_section(
47
46
:param float area_side: If provided, constructs side reinforcing bars based on
48
47
their area rather than diameter (prevents the underestimation of steel area due
49
48
to circle discretisation)
50
- :param Optional[sectionproperties.pre.pre.Material] conc_mat: Material to
51
- associate with the concrete
52
- :param Optional[sectionproperties.pre.pre.Material] steel_mat: Material to
53
- associate with the steel
49
+ :param conc_mat: Material to associate with the concrete
50
+ :param steel_mat: Material to associate with the steel
54
51
55
52
:raises ValueError: If the number of bars is not greater than or equal to 2 in an
56
53
active layer
@@ -181,11 +178,11 @@ def concrete_column_section(
181
178
:param int n_bars_d: Number of bars placed across the depth of the section, minimum 2.
182
179
:param float dia_bar: Diameter of reinforcing bars. Used for calculating bar placement and,
183
180
optionally, for calculating the bar area for section capacity calculations.
184
- :param Optional[ float] bar_area: Area of reinforcing bars. Used for section capacity calculations.
181
+ :param float bar_area: Area of reinforcing bars. Used for section capacity calculations.
185
182
If not provided, then dia_bar will be used to calculate the bar area.
186
- :param Optional[ sectionproperties.pre.pre.Material] conc_mat: Material to
183
+ :param sectionproperties.pre.pre.Material conc_mat: Material to
187
184
associate with the concrete
188
- :param Optional[ sectionproperties.pre.pre.Material] steel_mat: Material to
185
+ :param sectionproperties.pre.pre.Material steel_mat: Material to
189
186
associate with the reinforcing steel
190
187
:param bool filled: When True, will populate the concrete section with an equally
191
188
spaced 2D array of reinforcing bars numbering 'n_bars_b' by 'n_bars_d'.
@@ -290,8 +287,8 @@ def concrete_tee_section(
290
287
n_bot : int ,
291
288
n_circle : int ,
292
289
cover : float ,
293
- area_top : float = None ,
294
- area_bot : float = None ,
290
+ area_top : Optional [ float ] = None ,
291
+ area_bot : Optional [ float ] = None ,
295
292
conc_mat : pre .Material = pre .DEFAULT_MATERIAL ,
296
293
steel_mat : pre .Material = pre .DEFAULT_MATERIAL ,
297
294
) -> geometry .CompoundGeometry :
@@ -316,10 +313,8 @@ def concrete_tee_section(
316
313
:param float area_bot: If provided, constructs bottom reinforcing bars based on
317
314
their area rather than diameter (prevents the underestimation of steel area due
318
315
to circle discretisation)
319
- :param Optional[sectionproperties.pre.pre.Material] conc_mat: Material to associate
320
- with the concrete
321
- :param Optional[sectionproperties.pre.pre.Material] steel_mat: Material to
322
- associate with the steel
316
+ :param conc_mat: Material to associatewith the concrete
317
+ :param steel_mat: Material toassociate with the steel
323
318
324
319
:raises ValueErorr: If the number of bars is not greater than or equal to 2 in an
325
320
active layer
@@ -407,8 +402,8 @@ def concrete_circular_section(
407
402
n_bar : int ,
408
403
n_circle : int ,
409
404
cover : float ,
410
- area_conc : float = None ,
411
- area_bar : float = None ,
405
+ area_conc : Optional [ float ] = None ,
406
+ area_bar : Optional [ float ] = None ,
412
407
conc_mat : pre .Material = pre .DEFAULT_MATERIAL ,
413
408
steel_mat : pre .Material = pre .DEFAULT_MATERIAL ,
414
409
) -> geometry .CompoundGeometry :
@@ -427,10 +422,8 @@ def concrete_circular_section(
427
422
circle discretisation)
428
423
:param float area_bar: If provided, constructs reinforcing bars based on their area
429
424
rather than diameter (prevents the underestimation of steel area due to
430
- :param Optional[sectionproperties.pre.pre.Material] conc_mat: Material to associate
431
- with the concrete
432
- :param Optional[sectionproperties.pre.pre.Material] steel_mat: Material to
433
- associate with the steel
425
+ :param conc_mat: Material to associate with the concrete
426
+ :param steel_mat: Material to associate with the steel
434
427
435
428
:raises ValueErorr: If the number of bars is not greater than or equal to 2
436
429
0 commit comments