public void GetNesting() { foreach (List <Point2d> polygon in Polygons) { PolygonNestingNode nestingNode = new PolygonNestingNode(new Point2dCollection(polygon.ToArray())); Insert(root, nestingNode); } }
private void GetBoundariesWithHoles (Dictionary <Point2dCollection, List <Point2dCollection> > result, PolygonNestingNode nestingNode, bool outerBoundary) { if (outerBoundary) { result.Add(nestingNode.Point2dCollection, nestingNode.NestedNodes.Select(nn => nn.Point2dCollection).ToList()); } foreach (PolygonNestingNode nestedNode in nestingNode.NestedNodes) { GetBoundariesWithHoles(result, nestedNode, !outerBoundary); } }