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

Crash with a relatively simple polygon #53

Open
nirvn opened this issue Jul 28, 2023 · 5 comments
Open

Crash with a relatively simple polygon #53

nirvn opened this issue Jul 28, 2023 · 5 comments

Comments

@nirvn
Copy link

nirvn commented Jul 28, 2023

The following polygon crashes poly2try:

image

The polygon is relatively simple. One particularity is the presence of two overlapping vertices here:

image

I'm including a .dat file that triggers the crash using testbed's p2t (i.e. ./p2t crash.dat):

crash.zip

@aismann
Copy link

aismann commented Oct 10, 2023

Have you check this:

  • If you have a cyclic function that generates random points make sure you don't add the same coordinate twice.
  • If you are given input and aren't sure same point exist twice you need to check for this yourself.
  • Only simple polygons are supported. You may add holes or interior Steiner points
  • Interior holes must not touch other holes, nor touch the polyline boundary

@nirvn
Copy link
Author

nirvn commented Oct 10, 2023

@aismann , the polygon has no holes, only an exterior polyline that ends up having two vertices (i.e. vertex #3 and #6) overlapping each other:

image

@aismann
Copy link

aismann commented Oct 10, 2023

If you are given input and aren't sure same point exist twice you need to check for this yourself.

@nirvn
Copy link
Author

nirvn commented Oct 10, 2023

@aismann , in this case, removing one point (either 3 or 6) would dramatically change the shape of the polygon. Is the solution to move the point of a insignificant distance (visually speaking)?

@aismann
Copy link

aismann commented Oct 10, 2023

@aismann , in this case, removing one point (either 3 or 6) would dramatically change the shape of the polygon. Is the solution to move the point of a insignificant distance (visually speaking)?

Take the left/right neighborhood points for each triangle (3/6) => not the same!

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