Exemplo n.º 1
0
        // Put the closed path polygons into an enumerable collection of an array of points.
        // Each array of points in a separate convex polygon
        public static IEnumerable <PointF[]> SolutionPolygons_Simple(ClipperLib.PolyTree solution)
        {
            ConvexPolygonSet convexPolygonSet = new ConvexPolygonSet();

            convexPolygonSet.MakeConvextSetFromClipperSolution(solution);

            foreach (var polygon in convexPolygonSet.Polygons)
            {
                var pointfs = polygon.Select(pt => new PointF(pt.Xf, pt.Yf));
                yield return(pointfs.ToArray());
            }
        }
Exemplo n.º 2
0
        // Put the closed path polygons into an enumerable collection of an array of points.
        // Each array of points in a separate convex polygon
        public static IEnumerable<PointF[]> SolutionPolygons_Simple(ClipperLib.PolyTree solution)
        {
            ConvexPolygonSet convexPolygonSet = new ConvexPolygonSet();
            convexPolygonSet.MakeConvextSetFromClipperSolution(solution);

            foreach (var polygon in convexPolygonSet.Polygons)
            {
                var pointfs = polygon.Select(pt => new PointF(pt.Xf, pt.Yf));
                yield return pointfs.ToArray();
            }
        }