Beispiel #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());
            }
        }
Beispiel #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();
            }
        }