Bugfix: when ForceSimplePolygons is enabled, the PolyTree structure could be...
Boolean operations and offsetting library in Javascript
Brought to you by:
timo23414
Related to r471 Bugfix: when ForceSimplePolygons is enabled, the PolyTree structure could be incorrect.
Fix is relatively simple. Under Clipper
doSimplePolygons
, add FixupFirstLefts
for all three conditions (like in JoinCommonEdges
) (roughly beginning around lines 5023):
if (this.m_UsingPolyTree) this.FixupFirstLefts2(outRec2, outrec); ⋮ if (this.m_UsingPolyTree) this.FixupFirstLefts2(outrec, outrec2); ⋮ if (this.m_UsingPolyTree) this.FixupFirstLefts1(outrec, outrec2);
Can see original fix near bottom of this diff:
http://sourceforge.net/p/polyclipping/code/471/tree//trunk/cpp/clipper.cpp?diff=504b9404fd48f873331e913b:470
This is fixed in 6.2.1.0.