# Is the SCARA algorithm used in marlin correct?

I noticed that the firmware called the kinematic inverse solution of the SCARA robot before calling the plan_buffer_line function, and then assigns the calculated three joint angle values to the plan_buffer_line function.After reading the plan_buffer_line function in detail, I feel that this is wrong.

This is because all the computational algorithmic processes in the function are directed to Cartesian Cartesian coordinate space, for example:

block->millimeters = sqrt(square(delta_mm[X_HEAD]) + square(delta_mm[Y_HEAD]) + square(delta_mm[Z_AXIS]));

This is to calculate the spatial moving distance through the three target coordinates of Cartesian space. If it is replaced by three joint angle values, is this wrong?

The latter algorithm has similar problems, especially the Breasham algorithm in ISR, which is completely an algorithm of Cartesian space. If the value passed to the algorithm is three joint angle values, I think it should be incorrect.

I looked at the code for the marlin 1.1 version and there are similar issues.

I hope that my doubts can be answered, thank you!
My email address:

dongxvzhou@gmail.com