Ejemplo n.º 1
0
        // TODO: Implement with V2GMovement
        public void AppendAsMovementPath(List <V2GPrintPosition> pl)
        {
            V2GPath path = new V2GPath();

            foreach (V2GPrintPosition p in pl)
            {
                V2GInstruction seg;
                seg = new PrintMovementOld();
                (seg as PrintMovementOld).p = p;
                path.Segments.Add(seg);
            }
            Paths.Add(path);
        }
Ejemplo n.º 2
0
        // TODO: Implement with V2GMovement
        public void AppendAsRelativeMovement(V2GPrintPosition p)
        {
            V2GPath path = new V2GPath();

            V2GInstruction seg;

            seg = new PrintMovementOld();
            (seg as PrintMovementOld).p          = p;
            (seg as PrintMovementOld).IsRelative = true;
            (seg as PrintMovementOld).speed      = 2400;
            path.Segments.Add(seg);

            Paths.Add(path);
        }
Ejemplo n.º 3
0
        public void AppendAsRelativeMovement(V2GPrintPosition p, double Retraction, double Speed = 2400)
        {
            V2GPath path = new V2GPath();

            V2GInstruction seg;

            seg = new PrintMovementOld();
            (seg as PrintMovementOld).p          = p;
            (seg as PrintMovementOld).IsRelative = true;
            (seg as PrintMovementOld).ForceFilamentOperations = true;
            (seg as PrintMovementOld).FilamentRetract         = Retraction; // mm
            (seg as PrintMovementOld).speed = Speed;
            path.Segments.Add(seg);

            Paths.Add(path);
        }
Ejemplo n.º 4
0
        /*
         * // TODO
         * public void AppendAsPath(Printable printable)
         * {
         *  this.Paths.Add(printable.GetPath());
         *
         *  or
         *
         *  this.Path.Add(Printable.GenerateInstructions())
         * }
         */

        /// <summary>
        /// Append a PrintPolyline as a path.
        /// </summary>
        /// <param name="ppl"></param>
        public void AppendAsPath(V2GPrintPolyline ppl)
        {
            V2GPath path = new V2GPath();

            foreach (V2GPrintPosition PrintPosition in ppl.PrintPositions)
            {
                V2GInstruction seg;
                if (path.Segments.Count == 0)
                {
                    seg = new V2GMovement(PrintPosition, 7200.0); // First: PrintMovement
                }
                else
                {
                    seg = new V2GPrintSegment(PrintPosition); // Others: PrintSegment
                }
                path.Segments.Add(seg);
            }
            Paths.Add(path);
        }