Yisaer / Nest4J

an open source nest algorithm by java based on SVGNest
MIT License
75 stars 35 forks source link

it occurs error, if null returned. #13

Open copycd opened 4 years ago

copycd commented 4 years ago

public static int toTree(List list , int idstart) { // I changed the code below; Boolean isInside = GeometryUtil.pointInPolygon(p.getSegments().get(0) , list.get(j)); if( isInside != null && isInside == true ){ list.get(j).getChildren().add(p); p.setParent(list.get(j)); isChild = true; break; } }