dirtdigger / fleur_de_cali

Tool for calibrating dimensionality and skew of a 3D printer
GNU General Public License v3.0
31 stars 3 forks source link

CoreXY steps calculation wrongly the same for X and Y #10

Open AlejandroRivera opened 1 week ago

AlejandroRivera commented 1 week ago

When importing the spreadsheet into Google Sheets, after entering all the measurements, i noticed that the suggested rotation_distance (for Klipper with a CoreXY) returned are the same for X and Y. Given that I was clearly having different measurements, i was puzzled. Looking at the formula, it seems like the formula was wrong

image

Looking at the Helper sheet, i noticed that the two rows for X and Y (G43/G44) have the same formula:

=SUMPRODUCT(E4:E23*D4:D23)/(SUM(F4:F23))

image

This formula seems to not distinguish between X and Y values and that this is a mistake.

I think G43 should have the following formula (which only considers the values from X)

=SUMPRODUCT(E4:E13*D4:D13)/(SUM(F4:F13))

image

and G44 should have:

=SUMPRODUCT(E14:E23*D14:D23)/(SUM(F14:F23))

image

I'm attaching here two exported files containing all my values in case it helps:

dirtdigger commented 1 week ago

Hi Alejandro,

This behavior is intentional for CoreXY. The Klipper documentation (link) is somewhat vague about how printer.cfg rotation_distances are set for the A/B motors.

image

The comments in the image above indicate that stepper_x refers to both the x-direction and the A = X + Y direction, and similarly, stepper_y refers to the B = X - Y direction, which doesn't make sense to me.

When I first realized the ambiguity (and found this Reddit post which confirms it), my quick fix was to simply average the movements.

I agree that this doesn't quite fix any print issues where one dimension is larger than the other. I'm sure one can correct more accurately using A = X + Y and B = X - Y, but I have not done detailed testing to verify the results. I'll keep this issue open as a reminder to go revisit the matter.