Skip to content

Commit 79a0c2f

Browse files
Fix tests
1 parent e38e48f commit 79a0c2f

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

src/concreteproperties/pre.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212
from sectionproperties.pre.geometry import Geometry
1313
from sectionproperties.pre.library.primitive_sections import circular_section_by_area
1414
from shapely import LineString, Polygon
15-
from shapely.geometry.base import GeometrySequence
1615
from shapely.ops import split
1716

1817
from concreteproperties.material import Concrete
1918

2019
if TYPE_CHECKING:
2120
import matplotlib.axes
2221
from sectionproperties.pre.geometry import CompoundGeometry
22+
from shapely.geometry.base import GeometrySequence
2323

2424
from concreteproperties.material import Material, SteelBar, SteelStrand
2525

@@ -206,10 +206,6 @@ def split_section(
206206
polys = [self.geom]
207207

208208
# sort geometries
209-
if isinstance(polys, GeometrySequence):
210-
msg = "Geometry split failure."
211-
raise RuntimeError(msg)
212-
213209
top_polys, bot_polys = self.sort_polys(polys=polys, point=point, vector=vector)
214210

215211
# assign material properties and create cp geometry objects
@@ -277,7 +273,7 @@ def create_line_segment(
277273

278274
def sort_polys(
279275
self,
280-
polys: list[Polygon],
276+
polys: list[Polygon] | GeometrySequence,
281277
point: tuple[float, float],
282278
vector: tuple[float, float],
283279
) -> tuple[list[Polygon], list[Polygon]]:

src/concreteproperties/stress_strain_profile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -785,11 +785,11 @@ def __post_init__(self) -> None:
785785
if self.conc_confined:
786786
np_strains = np.linspace(0, eps_c_max, self.n_points)
787787
# add eps_cc point corresponding to max stress point at end
788-
np_strains = np.append(self.strains, eps_cc)
788+
np_strains = np.append(np_strains, eps_cc)
789789
else:
790790
np_strains = np.linspace(0, min(2 * eps_cc, eps_c_max), self.n_points)
791791
# add eps_cc point corresponding to max stress point at end
792-
np_strains = np.append(self.strains, eps_cc)
792+
np_strains = np.append(np_strains, eps_cc)
793793

794794
# sort strains numerically
795795
np_strains.sort()

0 commit comments

Comments
 (0)