Skip to content

Bug: Incorrect triangulation #163

@gkjohnson

Description

@gkjohnson

Hello! I'm using three.js' earcut function (which uses code from this project) and I'm seeing incorrect triangulation on (admittedly complex) cases. Here the black outline represents the shape being triangulated and the pink is the triangulated volume:

image

I'm not seeing the issue when disabling holes so this could be a duplicate of #162:

image

If needed I can export the shape and produce a minimal repro using this earcut code rather than three.js'. And if there are any known trouble cases it would be good to know them. I've seen that cases where line segments intersect, for example, can cause incorrect triangulation - but I've verified that this shape does not have such cases.

Thank you for the great project!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions