Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: The results of pyclipper calculations are inconsistent on x86 and arm architectures #54

Open
GenerallyCovetous opened this issue Aug 19, 2024 · 0 comments

Comments

@GenerallyCovetous
Copy link

As the title suggests, the single-case test is reproduced below:
import numpy as np
import pyclipper
poly = np.array([[632, 970],
[631, 971],
[630, 971],
[630, 973],
[631, 974],
[631, 975],
[632, 975],
[633, 974],
[633, 973],
[634, 972],
[634, 971],
[633, 971]])
distance = 0.9118854184679032
pco = pyclipper.PyclipperOffset()
pco.AddPath(poly, pyclipper.JT_ROUND, pyclipper.ET_CLOSEDPOLYGON)
result = np.array(pco.Execute(distance), dtype=object)
print(result)

numpy == 1.25.2
pyclipper == 1.2.1
the results on arm machine is [[[634 970]
[635 970]
[635 971]
[634 972]
[634 973]
[633 974]
[632 976]
[631 976]
[630 975]
[630 974]
[629 973]
[629 971]
[630 970]
[631 970]
[632 969]]],
while on x86_64 machine is
[[[634 970]
[635 970]
[635 973]
[634 974]
[634 975]
[633 976]
[632 976]
[630 975]
[630 974]
[629 973]
[629 971]
[630 970]
[631 970]
[632 969]]]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant