Control trajectory in case of changed tool length