You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But this operation fails: combined = reduce(lambda x,y: x|y, shapes)
Traceback (most recent call last):
File "/snap/pycharm-community/439/plugins/python-ce/helpers/pydev/pydevconsole.py", line 364, in runcode
coro = func()
File "", line 1, in
File "", line 1, in
File "/mypath/.venv/lib/python3.10/site-packages/shapepy/shape.py", line 560, in or
new_jordans = FollowPath.or_shapes(self, other)
File "/mypath/.venv/lib/python3.10/site-packages/shapepy/shape.py", line 337, in or_shapes
new_jordans = FollowPath.follow_path(all_jordans, indexs)
File "/mypath/.venv/lib/python3.10/site-packages/shapepy/shape.py", line 279, in follow_path
jordan = FollowPath.indexs_to_jordan(jordans, indices_matrix)
File "/mypath/.venv/lib/python3.10/site-packages/shapepy/shape.py", line 259, in indexs_to_jordan
new_jordan = JordanCurve.from_segments(beziers)
File "/mypath/.venv/lib/python3.10/site-packages/shapepy/jordancurve.py", line 132, in from_segments
assert prev_end_point == next_start_point
AssertionError
Closer inspection reveals some strange things are going on:
For example the following produces a correct result, however there are extra points in the shape.
s = reduce(lambda x,y:x|y,shapes[3:5])
print(s)
Simple Shape of area 352750.00 with vertices:
[[1360. -10.] [1360. 325.]
[1360. 725.] [ 910. 725.]
[ 855. 725.]
[ 855. 325.]
[ 910. 325.]
[ 910. -10.]]
I have a set of rectangles that I want to convert into a single polygon
But this operation fails:
combined = reduce(lambda x,y: x|y, shapes)
Closer inspection reveals some strange things are going on:
For example the following produces a correct result, however there are extra points in the shape.
This one produces a loop in the outline:
And sometimes it does not even detect the rectangles are overlapping:
The text was updated successfully, but these errors were encountered: