Esempio n. 1
0
        public void ToString1()
        {
            var source = new List <ValuePosition>();
            var result = OutputGCode.ToString(source);

            Assert.AreEqual(result.Length, 0);
        }
Esempio n. 2
0
        public void ToString4()
        {
            var source = new List <ValuePosition>();
            var result = OutputGCode.ToString(source, " ;hoge");

            Assert.AreEqual(result, "; ;hoge");
        }
Esempio n. 3
0
        public void ToString10()
        {
            var    source = new LineCommand();
            string line   = "G1.1 A2.22 Z-3;comment";

            source.Parse(line);

            var result = OutputGCode.ToString(source, false);

            Assert.AreEqual(result, "G1.1 A2.22 Z-3");
        }
Esempio n. 4
0
        public void ToString5()
        {
            var source = new List <ValuePosition>();

            source.Add(new ValuePosition('G')
            {
                Value = 1.1, FP = 1, Position = 2
            });
            var result = OutputGCode.ToString(source);

            Assert.AreEqual(result, "G1.1");
        }
Esempio n. 5
0
        public void ToString8()
        {
            var source = new List <ValuePosition>();

            source.Add(new ValuePosition('G')
            {
                Value = 1.1, FP = 1, Position = 2
            });
            source.Add(new ValuePosition('A')
            {
                Value = 2.222, FP = 2, Position = 0
            });
            source.Add(new ValuePosition('Z')
            {
                Value = -3.33, FP = 0, Position = 1
            });
            var result = OutputGCode.ToString(source, "comment");

            Assert.AreEqual(result, "G1.1 A2.22 Z-3;comment");
        }
 public bool ActionLine(LineCommand line)
 {
     values.Add(OutputGCode.ToString(line));
     return(false);
 }