Beispiel #1
0
        /// <summary>
        /// In this class the second parameter is the number of paths
        /// </summary>
        /// <param name="pathdata"></param>
        /// <param name="increment"></param>
        /// <returns></returns>
        public ShapeCollection CreatePaths(PathData pathdata, double increment)
        {
            ShapeCollection pc = new ShapeCollection();

            pc.PatternName = pathdata.Name;
            if (pathdata.PathType == PatternType.barrel)
            {
                Barrel           b    = pathdata as Barrel;
                RadialOffsetPath path = b.OutlineAsOffsets((int)(1 / increment));
                Polygon          poly = CreatePolygonFrom(path, b.ToolPosition);
                (poly.RenderTransform as CompositeTransform).Rotation = b.Phase;
                pc.AddShape(poly);
            }
            return(pc);
        }