Skip to content

triangulate: duplicate input points produce zero-area, overlapping triangles instead of being merged or refused #300

Description

@GeneralPawz

Found while fixing #268. With duplicate input points, axiolid-triangulate output already contains zero-area and overlapping triangles. For example, in a 3×3 grid with duplicated points, the directed edge (3,10) appears twice. That is not a valid triangulation, and nothing reports it. The #268 debug adjacency check has to skip such meshes, because the full rebuild has no unique answer.

Needed

Pick one and state it in the crate docs:

  • merge exactly coincident input points up front, and report the merge (input index → kept vertex), so the output is a valid triangulation; or
  • refuse duplicate points by name, as constrained input already refuses some degeneracies.

Done when

  • Grids and random sets with exact duplicates either triangulate validly with the merge reported (no zero-area triangles, every directed edge used once, the debug check no longer skipped), or are refused by name.
  • A test covers duplicates in the outline, in holes and in constraints.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

needs-triageFiled but not yet accepted, sized, or scheduled

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions