Wrestling with tolerance issue using Polygon2d boolean methods?

I’m wresting with some tolerance issues using Polygon2D boolean operations.

I have a set of Polygon2D elements, and if I use normal GH tools, I can merge them together no problem.

So that’s fine. However, if I use the ladybug_geometry.geometry2d.polygon.Polygon2D.boolean_union_all with the same tolerance as the Rhino document, it raises an error:

Note that if I change the tolerance value, the error appears to resolve:


So: Does anyone understand the polybool methods well enough to recommend a trouble-shooting method? I was starting to look through the code, but got lost pretty quickly.

Is there some way to easily ‘see’ what the issue is or the problem segment is?

While increasing the tolerance in this case seems to fix it, if I raise the tolerance, it breaks other things in other places in my scene. I’d like to figure out what a ‘robust’ solution would be to avoid these tolerance issues in the future.

Should I be setting separate tolerance values for these types of boolean operations perhaps?

any thoughts are much appreciated! Example file attached for reference.
@edpmay

polygon2d_example.gh (17.8 KB)