private List <MachineStep> CreateLoadToolStepSimple(State state, ToolChange.ToolChangeStep toolchangeStepData, bool openToolStore, bool closeToolStore)
        {
            var steps = new List <MachineStep>();

            AddLoadToolSteps(state, toolchangeStepData.SinkPosition, toolchangeStepData.SourcePosition, steps);

            return((steps.Count() > 0) ? steps : null);
        }
        private List <MachineStep> CreateLoadToolStep(State state, ToolChange.ToolChangeStep toolchangeStepData, bool openToolStore, bool closeToolStore)
        {
            bool resetGantry = (state.Axes.GantryY == Gantry.Second) ||
                               ((state.Axes.GantryY == Gantry.First) && (Math.Abs(state.Axes.GantryStepY - _gantryToolchangeDistance) > 0.001));
            bool moveGantry  = resetGantry || (state.Axes.GantryY == Gantry.None);
            bool setGantry   = state.Axes.GantryY != Gantry.First;
            bool moveSynchro = (state.Axes.GantryY == Gantry.First) && (Math.Abs(state.Axes.GantryStepY - _gantryToolchangeDistance) <= 0.001);
            var  steps       = new List <MachineStep>();

            if (resetGantry)
            {
                AddResetGantrySteps(state, steps);
            }
            if (moveGantry)
            {
                AddMoveGantrySteps(state, toolchangeStepData.SourcePosition, steps);
            }
            if (setGantry)
            {
                AddSetGantrySteps(state, steps);
            }
            if (moveSynchro)
            {
                AddMoveSynchroSteps(state, toolchangeStepData.SourcePosition, steps);
            }
            if (openToolStore)
            {
                AddOpenToolstore(state, steps);
            }
            AddPneumaticDown(state, steps);
            AddMoveZDownStep(state, steps);
            AddLoadToolSteps(state, toolchangeStepData.SinkPosition, toolchangeStepData.SourcePosition, steps);
            if (closeToolStore)
            {
                AddCloseToolstore(state, steps);
            }
            AddMoveZUpStep(state, steps);
            AddPneumaticUp(state, steps);

            return((steps.Count() > 0) ? steps : null);
        }