Skip to content

Commit faba5b7

Browse files
Handle points outside section
1 parent 5599d71 commit faba5b7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sectionproperties/analysis/section.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2177,6 +2177,10 @@ def get_stress_at_point(
21772177
for (idx, tri) in enumerate(self.elements):
21782178
if tri.point_within_element(pt):
21792179
tri_id = idx
2180+
2181+
if tri_id is None:
2182+
raise ValueError(f"The point {pt} is outside of the section boundary.")
2183+
21802184
tri = self.elements[tri_id]
21812185

21822186
# get the stess at the point

0 commit comments

Comments
 (0)