Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions structuralcodes/core/_section_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
from numpy.typing import ArrayLike, NDArray
from shapely import Point

from .base import Geometry, Section


@dataclass
class SectionProperties:
Expand Down Expand Up @@ -154,7 +156,7 @@ def isclose(self, other, rtol=1e-5, atol=1e-8):


def _matching_geometries(
section, # For now we can't type hint the Section or even GenericSection due to circular import. #noqa: E501
section: Section,
name: t.Optional[str] = None,
group_label: t.Optional[str] = None,
case_sensitive: bool = True,
Expand Down Expand Up @@ -186,7 +188,7 @@ def _strain_from_kinematics(eps_a, chi_y, chi_z, y: float, z: float):
return eps_a - chi_z * y + chi_y * z


def _point_inside_geometry_surface(geo, y: float, z: float) -> bool:
def _point_inside_geometry_surface(geo: Geometry, y: float, z: float) -> bool:
"""Check if a point is inside or on the boundary of a surface geometry."""
p = Point(y, z)
return geo.polygon.contains(p) or geo.polygon.touches(p)
Expand All @@ -205,7 +207,7 @@ def _point_matches_geometry_point(gp, y: float, z: float) -> bool:


def _get_point_response(
section, # For now we can't type hint the Section or even GenericSection due to circular import. #noqa: E501
section: Section,
eps_a: float,
chi_y: float,
chi_z: float,
Expand Down Expand Up @@ -282,7 +284,7 @@ class MomentCurvatureResults:
m_y: ArrayLike = None # the moment
m_z: ArrayLike = None # the moment

section = None
section: Section = None

detailed_result: SectionDetailedResultState = None
seed: int = None
Expand Down
Loading
Loading