Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

basicNew
Copy link

@basicNew basicNew commented Dec 7, 2018

When loading large concave polygons (with triangulation enabled) I found that the resulting mesh was sometimes missing triangles. The issue seems to be the hard stop on 10 max iterations over the face vertices.

The change introduced here relaxes that constraint but avoids an endless loop in case no progress is made after a complete iteration through all the vertices. It should be noted however that the time bound for the worst case after this change is higher than with the 10 iterations constraint.

If you think this change is worth considering I can add a test case that doesn't pass with current implementation and is fixed by this change.

@syoyo syoyo merged commit aa90b54 into tinyobjloader:master Dec 8, 2018
@syoyo
Copy link
Collaborator

syoyo commented Dec 8, 2018

Awesome! Thanks!

I can add a test case that doesn't pass with current implementation and is fixed by this change.

Yes, it would be nice if we have an uint test for regression.

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

Successfully merging this pull request may close these issues.

2 participants