Skip to content

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

@GenerallyCovetous

Description

@GenerallyCovetous

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]]]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions