We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 2c17c6e + 0396543 commit 8d2646fCopy full SHA for 8d2646f
3 files changed
src/load_distribution/__init__.py
@@ -3,6 +3,6 @@
3
loads on beams or other linear elements.
4
"""
5
6
-__version__ = "0.1.3"
+__version__ = "0.1.4"
7
8
from load_distribution.load_distribution import *
src/load_distribution/load_distribution.py
@@ -202,7 +202,9 @@ def singularities_to_polygon(los: list[Singularity], xy: bool = False) -> Polygo
202
if prev_x is not None and not math.isclose(prev_x, sing.x0):
203
x_acc.append(sing.x0)
204
x_acc.append(sing.x0 + eps)
205
- x_acc.append(sing.x1 - 10 * eps)
+ x_acc.append(sing.x1 - eps)
206
+ x_acc.append(sing.x1)
207
+ x_acc.append(sing.x1 + eps)
208
prev_x = sing.x1
209
210
# There are two scenarios: sing functions that describe trapezoids/triangles
tests/test_load_distribution.py
@@ -175,8 +175,7 @@ def test_singularities_to_polygon():
175
176
assert (
177
ld.singularities_to_polygon(square_45_sings[0] + square_45_sings[1]).wkt
178
- == "POLYGON ((0 0, 0 0, 5 10, 5 10, 10 0, 0 0))"
179
- # == "POLYGON ((0 0, 5 10, 5 10, 10 0, 10 0, 0 0))"
+ == "POLYGON ((0 0, 0 0, 5 10, 5 10, 10 0, 10 0, 0 0))"
180
)
181
182
ld.singularities_to_polygon(
@@ -202,7 +201,13 @@ def test_singularities_to_polygon():
201
).wkt
== "POLYGON ((1 0, 1 10, 3 10, 3 0, 1 0))"
-
+ assert (
+ ld.singularities_to_polygon([
+ ld.Singularity(x0=0, x1=4, m=0.0, y0=5, precision=6, eps=1e-12),
+ ld.Singularity(x0=0, x1=2.5, m=0.0, y0=40, precision=6, eps=1e-12)
+ ]).wkt
+ == "POLYGON ((0 0, 0 45, 2.5 45, 2.5 5, 4 5, 4 0, 0 0))"
+ )
211
212
def test_overlap_region_to_singularity():
213
assert ld.overlap_region_to_singularity(
0 commit comments