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

IncrementalDelaunayTriangulator needs logic to handle frame #1002

Closed
dr-jts opened this issue Aug 21, 2023 · 0 comments · Fixed by #1004
Closed

IncrementalDelaunayTriangulator needs logic to handle frame #1002

dr-jts opened this issue Aug 21, 2023 · 0 comments · Fixed by #1004

Comments

@dr-jts
Copy link
Contributor

dr-jts commented Aug 21, 2023

The IncrementalDelaunayTriangulator is missing some key logic to handle the "frame" correctly.

This bug results in non-convex triangulations being produced for some situations where the convex hull of the input points has a narrow width relative to the frame size. #477 contains examples of this.

The bug also causes failure cases in the ConcaveHull algorithm, which relies on the input triangulation being convex:

PR #931 was an attempt to handle this by increasing the frame size. But it is inherently limited, since no fixed frame size works in all situations.

Required Logic

The logic required is some additional checks when determining whether to flip an edge to maintain the Delaunay condition (at this point in algorithm):

  1. If the edge is part of a frame triangle, do not flip it (a frame triangle is one of the 3 containing a frame edge)
  2. If the edge contains a frame vertex AND it creates a concavity in the triangulation boundary, flip it
  3. If an edge separates the newly inserted point from a frame vertex, do not flip it.

The reason this code was not included in the original development of IncrementalDelaunayTriangulator is that it is not mentioned in most descriptions of the algorithm. The logic is described in this blog post, and also appears in the triangle code (lines 8592-8614).

@dr-jts dr-jts changed the title IncrementalDelaunayTriangulator is missing logic to handle frame IncrementalDelaunayTriangulator needs logic to handle frame Aug 21, 2023
@jodygarnett jodygarnett added this to the 1.20.0 milestone Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants