Skew compensation in the Bambu X1C Firmware

@Nebur Yes, I see what you’re saying. But we use measurements of a side and the diagonals to calculate the parameter for In where they’re probably using the nominal value of the sides of a rhombus and measurements of the diagonals. So our results will differ for the Xn Yn method. Which is more accurate? I think our’s would be if we measure accurately.

EDIT:

BTW the length of side AD that I used in my calculations for the example I asked @EdStreet to try was 78.83

1 Like

Anyone want to post some of that fancy math we see above that ONLY uses 2 sets of numbers? I am very curious what math they are using for the angle.

1 Like

Bambu’s M1005 X Y command likely uses a simple form of linear regression to make the calibration easier for the user. I don’t think they’ve revealed to anyone what the exact calculation method is, but if we’re guessing, they use linear regression in every other calibration procedure so that would be a safe guess.

I think we all see the flaw with the “easy” method. The important thing is we know we’re using the correct units for the final skew values that are applied with the gcode command.

For x1plus users, a temporary solution for skew correction persistence:
Modified syslog_shim.py

After overwriting this script in /opt/, save your skew value (units=radians) to a text file at /mnt/sdcard/skew.txt. Every time you reboot, the value you’ve saved in skew.txt will be applied. You can also see your skew values in /tmp/x1plus_data.log

2 Likes

I’m going to install x1plus soon and will try that.
Thanks.

I added a place in the UI to display and change the current skew factor. I just need to test it on my printer and then I can share it. I haven’t PRed it yet but I’m hoping to have it ready for 1.2

3 Likes

One part teasing and 1 part sarcasm but yes all in good fun.

1 Like


So … I ask copilot the problem and it gave me the answer yet it also listed another problem to.

@Nebur using X120.77 Y101.34 (the values I asked @EdStreet to check the syslog output from) I get an angle of 88.25469° degrees using your equation.

The diagonals are from this diagram which is a rhombus with a skew angle of 10°:

image

Humor me, plug in the values I listed 119.63 and 119.66. Lets se the angle your formula gives in radians.

@EdStreet using X119.63 Y119.66 I get an angle of 88.42945°
from @Nebur 's equation.

1.54339 radians

So here is the thing.

Bambu shows this

Apr 29 16:04:50 info forward[1033]: [MCU][BMC]M1005:new XY_comp_ang = -0.00200

copilot shows this.

Calculating this expression, we find that the skew angle is approximately 0.0025 radians

The formula from Nebur should show 0.0025 if it is correct.

so not 0.14 degrees / 0.0025 radians?

parenthesis ok but when I convert the result of ACOS function to degrees I get:

0.01437°
0.00025 radians

EDIT: added excel formula

=90-DEGREES(ACOS((2-2*(P59/P60)^2)/(2+2*(P59/P60)^2)))

ok that’s what I got as well, same as copilot. Yet Bambu states 0.00200. My initial thoughts were this is a rounding error but I am not to sure now.

1 Like

Is the rhombus assumption valid? would your equation work with a parallelogram?

I get this, which is correct. Am trying to figure out how bambu is coming up with 0.00200 instead of 0.00250. Also I am wondering if that is large enough difference to show up in a print.

square = parallelgram = rhombus because it’s a square we are printing in some form.

yes, six of one, half a dozen of the other case. since we are printing a squre then all of these are the same and can be treated as equal.

At that point I was using the input’s @EdStreet asked for.

After I converted the result of ACOS function to degrees I got the same result as you got here (but rounded to 5 decimals):

image