Exemplo n.º 1
0
  @Override
  public void visit(MotionCommand command) throws GkException {
    visit((SettingCommand) command);
    current.setStart(new Tuple6b(position));
    current.setEnd(new Tuple6b(position));
    current.getEnd().add(command.getCoordinates());

    position = current.getEnd();
  }
Exemplo n.º 2
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);
    }
  }
Exemplo n.º 3
0
 @Override
 public void visit(SettingCommand command) throws GkException {
   current.setDistanceMode(context.getDistanceMode());
   current.setFeedrate(context.getFeedrate());
   current.setMotionMode(context.getMotionMode());
   current.setMotionType(context.getMotionType());
   current.setUnit(context.getUnit());
   current.setPlane(context.getPlane());
   current.setCoordinateSystem(context.getCoordinateSystem());
 }