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

polygon point order #1

Open
DWendou opened this issue Sep 6, 2021 · 1 comment
Open

polygon point order #1

DWendou opened this issue Sep 6, 2021 · 1 comment

Comments

@DWendou
Copy link

DWendou commented Sep 6, 2021

from pypex.poly2d import polygon
a = [[0,1],[1,2],[3,4],[5, 6],[5,3]]
poly = polygon.Polygon(a)
print(a) # [[0,1],[1,2],[3,4],[5, 6],[5,3]]
print(poly) # [[1 2], [0 1], [5 3], [5 6], [3 4]]

Why are the points in different order

@mikecokina
Copy link
Owner

@DWendou , points are automatically sorted in clockwise direction.

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

2 participants