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

Overlaping Polygons Issue #58

Open
Zeres-Engel opened this issue Jul 8, 2024 · 7 comments
Open

Overlaping Polygons Issue #58

Zeres-Engel opened this issue Jul 8, 2024 · 7 comments

Comments

@Zeres-Engel
Copy link

Why is this polygon of mine overlapping? I'm sure the start point is also the endpoint and is arranged clockwise.
[[ 79.3 173.1]
[ 88.1 173.1]
[ 88.1 181.5]
[107.3 181.5]
[107.3 172.7]
[115.9 172.7]
[115.9 133.5]
[107.3 133.5]
[107.3 125.1]
[ 87.9 125.1]
[ 87.9 133.7]
[ 79.3 133.7]
[ 79.3 173.1]]
out

@Zeres-Engel Zeres-Engel changed the title Geometry Issue Overlaping Polygons Issue Jul 8, 2024
@chnadell
Copy link

chnadell commented Jul 22, 2024

Different geometry, but I'm having a similar problem where the packed shapes unexpectedly overlap, and also don't respect the minimum distance constraint. Do you have any further insight on this? If you find anything, I'd be interested to know.

@Zeres-Engel
Copy link
Author

@chnadell After carefully reading libnest2D's source code, I realized that their code can only be used for convex polygons. If you want to use a concave polygon, use a convex hull or write more in the source code.

@chnadell
Copy link

Ah that is good to know. I am even having trouble with convex polygons, e.g., here is a 2d projection where packed hexagons overlap:
packed_polygons_001

@shirishd27
Copy link

shirishd27 commented Sep 9, 2024

Screenshot 2024-09-09 100504
Screenshot 2024-09-06 163558

The same problem is occurring. If you have any solution, please let me know.

@Zeres-Engel
Copy link
Author

I think your polygons are not convex polygons

@shirishd27
Copy link

Yes

@shirishd27
Copy link

any solution for concave polygons?

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

3 participants