clipper-java icon indicating copy to clipboard operation
clipper-java copied to clipboard

Allow retieving solutions as tree

Open dmac000 opened this issue 9 years ago • 0 comments

To get the results as a tree, then PolyNode and PolyTree should be public.

When I did this, there were some NullPointerExceptions thrown from DefaultClipper. I've change some lines to prevent this:

In buildResult2:

final int cnt = (outRec.getPoints() == null) ? 0 : outRec.getPoints().getPointCount();

In fixupFirstLefts2:

if(outRec == null || outRec.firstLeft == null) continue;

In joinCommonEdges:

if (oRec.getPoints() == null || oRec.firstLeft == null || oRec.firstLeft.parseFirstLeft() != outRec1 || oRec.isHole == outRec1.isHole) {

dmac000 avatar Oct 07 '16 13:10 dmac000