pepr3d icon indicating copy to clipboard operation
pepr3d copied to clipboard

poly2tri is not stable

Open bubnikv opened this issue 6 years ago • 2 comments

Guys,

just a note, that the poly2tri library is not stable and it will make the application crash randomly. We at the Slic3r PE team are using the old C glu tesselator code by SGI from a pure despair of not finding a free stable self-contained triangulator (apart from CGAL).

Here is the tesselator dug out from the glu library. https://github.com/prusa3d/Slic3r/tree/master/src/glu-libtess

bubnikv avatar Apr 01 '19 06:04 bubnikv

Hi Vojta!

Thanks for the issue. How often does it happen? Could it be a problem just with certain too complex fonts? We found out that certain fonts are too "weird" to be triangulated properly, but did not notice any problems with classic fonts.

tomasiser avatar Apr 01 '19 07:04 tomasiser

It is sensitive to the input geometry, and it crashes with stack overflow or whatever. We use it for triangulating holes left after splitting an object with a plane, and it crashes a lot. For fonts it may be all right, but the very old C code by SGI is much more stable (and much better tested I suppose)

For inspiration, this is a simple wrapper around glu tesselator. ExPolygon is just a contour with a vector of holes. https://github.com/prusa3d/Slic3r/blob/master/src/libslic3r/Tesselate.hpp https://github.com/prusa3d/Slic3r/blob/master/src/libslic3r/Tesselate.cpp

On Mon, Apr 1, 2019 at 9:15 AM Tomáš Iser [email protected] wrote:

Hi Vojta!

Thanks for the issue. How often does it happen? Could it be a problem just with certain too complex fonts? We found out that certain fonts are too "weird" to be triangulated properly, but did not notice any problems with classic fonts.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tomasiser/pepr3d/issues/148#issuecomment-478463522, or mute the thread https://github.com/notifications/unsubscribe-auth/AFj5I2qzmNTp6UzAcF1z1eDYhUPyvl9Yks5vcbIggaJpZM4cU-s7 .

bubnikv avatar Apr 01 '19 07:04 bubnikv