示例#1
0
        public bool TryStart(Drawing drawing, Vector offset, MachineProfiles.IProfile machineProfile)
        {
            if (drawing == null)
            {
                return(false);
            }
            if (thread != null)
            {
                return(false);
            }

            paths = new List <Path>();
            foreach (Path path in drawing.Paths)
            {
                paths.Add(Path.Offset(path, offset));
            }
            paths = Clipper.ClipPaths(paths, new Rect(new Point(0.0, 0.0),
                                                      CornerMath.FarExtent(machineProfile.TableSize, machineProfile.Origin)));
            maxFeed = machineProfile.MaxFeedRate;

            stop   = false;
            thread = new Thread(threadStart);
            thread.Start();

            return(true);
        }
示例#2
0
 public Drawing CreateDrawing(System.Windows.Rect clip)
 {
     return(new Drawing(Clipper.ClipPaths(pathBuilder.GetPaths(), clip)));
 }