Ejemplo n.º 1
0
  public void updateInitialContext(IGCodeProvider provider, GCodeContext updateContext)
      throws GkException {
    GCodeContextUpdater updater = new GCodeContextUpdater(initialContext, updateContext);
    this.initialContext = updateContext;
    this.context = new GCodeContext(initialContext);
    this.position = new Tuple6b();

    for (GCodeCommandEvaluation evaluation : lstEvaluation) {
      if (!updater.hasMoreUpdate()) {
        break;
      }
      GCodeCommand gCodeCommand = evaluation.getGCodeCommand();
      current = evaluation;
      gCodeCommand.accept(this);
    }
  }