Пример #1
0
 public void PushData(string code)
 {
     code = code.Replace('\r', '\n');
     string[] lines = code.Split('\n');
     foreach (string line in lines)
     {
         if (line.Length == 0)
         {
             continue;
         }
         GCode gcode = new GCode();
         gcode.Parse(line);
         if (!gcode.comment)
         {
             jobList.AddLast(new GCodeCompressed(gcode));
             totalLines++;
         }
     }
 }
Пример #2
0
 public void PushGCodeShortArray(List <GCodeShort> codes)
 {
     foreach (GCodeShort line in codes)
     {
         if (line.Length == 0)
         {
             continue;
         }
         ana.analyzeShort(line);
         GCode gcode = new GCode();
         gcode.Parse(line.text);
         if (!gcode.comment)
         {
             jobList.AddLast(new GCodeCompressed(gcode));
             totalLines++;
         }
         if (line.hasLayer)
         {
             maxLayer = line.layer;
         }
     }
     computedPrintingTime = ana.printingTime;
 }