Skip to content

Commit 2000e3d

Browse files
Merge branch 'master' into concrete_column_section
2 parents 3f9ebeb + f942d5c commit 2000e3d

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

sectionproperties/pre/geometry.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def __init__(
5353
self,
5454
geom: shapely.geometry.Polygon,
5555
material: pre.Material = pre.DEFAULT_MATERIAL,
56-
control_points: Optional[List[float, float]] = None,
56+
control_points: Optional[Union[Point, List[float, float]]] = None,
5757
tol=12,
5858
):
5959
"""Inits the Geometry class."""
@@ -64,7 +64,9 @@ def __init__(
6464
f"Argument is not a valid shapely.geometry.Polygon object: {repr(geom)}"
6565
)
6666
self.assigned_control_point = None
67-
if control_points is not None and len(control_points) == 2:
67+
if control_points is not None and (
68+
isinstance(control_points, Point) or len(control_points) == 2
69+
):
6870
self.assigned_control_point = Point(control_points)
6971
self.tol = (
7072
tol # Represents num of decimal places of precision for point locations

sectionproperties/pre/library/concrete_sections.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ def concrete_rectangular_section(
2525
) -> geometry.CompoundGeometry:
2626
"""Constructs a concrete rectangular section of width *b* and depth *d*, with
2727
*n_top* top steel bars of diameter *dia_top*, *n_bot* bottom steel bars of diameter
28-
*dia_bot*, discretised with *n_circle* points with equal side and top/bottom
29-
*cover* to the steel.
28+
*dia_bot*, *n_side* left & right side steel bars of diameter *dia_side* discretised
29+
with *n_circle* points with equal side and top/bottom *cover* to the steel.
3030
3131
:param float b: Concrete section width
3232
:param float d: Concrete section depth
@@ -52,7 +52,7 @@ def concrete_rectangular_section(
5252
:param Optional[sectionproperties.pre.pre.Material] steel_mat: Material to
5353
associate with the steel
5454
55-
:raises ValueErorr: If the number of bars is not greater than or equal to 2 in an
55+
:raises ValueError: If the number of bars is not greater than or equal to 2 in an
5656
active layer
5757
5858
The following example creates a 600D x 300W concrete beam with 3N20 bottom steel
@@ -95,7 +95,7 @@ def concrete_rectangular_section(
9595
# create rectangular concrete geometry
9696
geom = primitive_sections.rectangular_section(b=b, d=d, material=conc_mat)
9797

98-
# calculate reinforcing bar dimensions
98+
# calculate reinforcing bar dimensions for top and bottom layers
9999
x_i_top = cover + dia_top / 2
100100
x_i_bot = cover + dia_bot / 2
101101
spacing_top = (b - 2 * cover - dia_top) / (n_top - 1)

0 commit comments

Comments
 (0)