tudelft3d/pprepair

PPRepair crashes due to stack overflow on input dataset

safeBZ opened this issue · 2 comments

Please see the attached dataset.

It appears in PlanarPartition::getBoundary()

It's an interesting case. Apparently, the stack overflow is not caused by a bug in the code, but it's actually a very deep recursion due to the large number of triangles in the same polygon!

I think it can be solved by doing some preprocessing to remove triangles. I'll work on it in the coming weeks.

Another option is using tail recursion, but I'm not sure that it's really possible in this case...

I've incorporated some simple preprocessing before the reconstruction, which solves this problem.