Пример #1
0
        public void BeginAndEndMLine()
        {
            MockGCodeAccumulator mockGCA = new MockGCodeAccumulator();
            GCodeBuilder         gcb     = new GCodeBuilder(mockGCA);

            gcb.BeginMLine(1, "comment");
            Assert.IsTrue(mockGCA.Lines.Count == 0);

            gcb.EndLine();
            Assert.IsTrue(mockGCA.Lines.Count == 1);
            Assert.AreEqual("comment", mockGCA.Lines[0].Comment);
            Assert.AreEqual(LineType.MCode, mockGCA.Lines[0].Type);
            Assert.AreEqual(0, mockGCA.Lines[0].LineNumber);
        }
Пример #2
0
 protected virtual void HeaderCustomF(RepRapAssembler.HeaderState state, GCodeBuilder Builder)
 {
     if (state == RepRapAssembler.HeaderState.AfterComments)
     {
         if (ModelEnum == Prusa.Models.i3_MK3)
         {
             Builder.BeginMLine(201)
             .AppendI("X", 1000).AppendI("Y", 1000).AppendI("Z", 200).AppendI("E", 5000)
             .AppendComment("Set maximum accelleration in mm/sec^2");
             Builder.BeginMLine(203)
             .AppendI("X", 200).AppendI("Y", 200).AppendI("Z", 12).AppendI("E", 120)
             .AppendComment("Set maximum feedrates in mm/sec");
             Builder.BeginMLine(204)
             .AppendI("S", 1250).AppendI("T", 1250)
             .AppendComment("Set acceleration for moves (S) and retract (T)");
             Builder.BeginMLine(205)
             .AppendF("X", 10).AppendF("Y", 10).AppendF("Z", 0.4).AppendF("E", 2.5)
             .AppendComment("Set jerk limits in mm/sec");
             Builder.BeginMLine(205)
             .AppendI("S", 0).AppendI("T", 0)
             .AppendComment("Set minimum extrude and travel feed rate in mm/sec");
         }
     }
 }