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

Additional validation checks of triangles #20

Open
4 tasks
Duke-of-Lizard opened this issue Jan 31, 2024 · 0 comments
Open
4 tasks

Additional validation checks of triangles #20

Duke-of-Lizard opened this issue Jan 31, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@Duke-of-Lizard
Copy link
Contributor

Duke-of-Lizard commented Jan 31, 2024

Motivation

I keep having headaches with using emeraldtriangles because I try to run a process that involves adding triangles to an existing mesh, the process fails but does not return an error message. I know that this is the cause in supplant_triangles because the external function triangle.triangulate fails without throwing an error; instead, the inputs are simply returned. (I suspect there may be a similar issue with scipy.spatial.Delaunay in replace_triangles). Almost every time, I find that the error is caused by some issue in the triangulation that I give as input. It might be overlapping triangles, triangles with 0 area, duplicate vertices, and many other things. But it takes me ages to dig and uncover these issues.

goal

make a standard set of validations and checks, and warn users of potential issues with their triangulation.

running list of checks to run and implement

  • triangles with 0 area
  • duplicate vertices
  • overlapping points and vertices
  • overlapping triangles (this one might be hard to implement)

other requirements

  • Rather than throwing a warning at the first validation check, I recommend doing all the tests, then throwing a warning giving details for all the ways the triangulation is invalid. One triangulation can fail multiple validation tests above.
  • Maybe we should have a setting where if there is a cleanup function to address one of the issues above, we run the cleanup on the function?
    • For example, for cases with duplicated vertices and points, we could use the function emeraldtriangles.cleanup.remove_overlapping_points_vertices.
    • one complication: some cleanup functions have keyword parameters whose default value is not always appropriate (e.g., "keep" for remove_overlapping_points_vertices). Where does the user set those parameter values for the auto-run cleanup after validation checks?
@eddjharrison eddjharrison added enhancement New feature or request help wanted Extra attention is needed labels Feb 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants