-
Notifications
You must be signed in to change notification settings - Fork 86
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
MeshClean stack overflow #110
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello everybody,
This C# port of Poly2Tri is not up to date ; indeed, Java version of Poly2Tri contains several bug fixes.
As reported here (#12) the most important update you should made is to replace MeshClean by a non recursive version in the DTSweepContext.cs file, as follow :
This update will solve the stack overflow problem when you try to triangulate polygons with a lot of holes that contains a hight number of points :-)
But it's very important to understand that Poly2Tri still don't manage 100% of polygons generated with Clipper, because poly2tri does not support vertices with same coordinates (coincident).
So if you use Clipper to make polygons data and then Poly2Tri to get triangulation, your software is not robust because there are still some cases that you get a "Edge Event" exeption. Unfortunatelly, there is no easy way to deal with these cases. Clipper "strictly simple" does NOT give us a solution.
The problem is that you can't tranform any possible 2D shape in polygon tree structure without coincident points. It's not possible, so poly2tri cannot be used if your software needs to deals with any possible 2D shape.
Also, poly2tri is a good library to triangulate polygons if you are 100% sure that your data imput have not coincident points.
Another important point : this "poly2tri" project is not the same and not inherits from this project : http://sites-final.uclouvain.be/mema/Poly2Tri/
You can find here another interesting new triangulation project in .NET : https://github.com/speps/LibTessDotNet and it's fork https://github.com/Pro100AlexHell/LibTessDotNet
Thanks
The text was updated successfully, but these errors were encountered: