Coder Request: 10W Scanner

I actually managed to get the idea above done and it does work decent. I’ll post more info and things after I get home from work.

EDIT:

Here it is… a bed scanner. It follows the MBL points of an 11x11 matrix (though only 9 points on X due to the laser offset) so 99 points in total.
BedScan.zip (1.0 MB)
There’s the .bat file, replace [IP HERE] with your snapmaker IP, and [TOKEN HERE] with your token. Also included is jq.exe which is version 1.6 for windows x64. It’s just a single exe, no installing, just make sure it’s in the same folder as the .bat. Any other version can be found here Redirecting to jqlang.github.io. This is for parsing the responses from the web api.

Simply connect with either Luban or my keepalive from my drag/drop thread:

Then run the bed scan, and it should take roughly right at 9 minutes to run and it’ll spit out a txt file with your probe info and set all the MBL points on the snapmaker. The resulting text file will look like this:

Bilinear Leveling Grid:
      0      1      2      3      4      5      6      7      8      9     10
 0 +5.187 +5.104 +5.252 +5.422 +5.600 +5.315 +5.233 +0.000 +0.000 +9.000 +9.000
 1 +5.252 +5.223 +5.266 +5.255 +5.404 +5.239 +5.241 +0.000 +0.723 +9.000 +9.000
 2 +0.000 +0.000 +0.000 +0.010 +0.000 +0.184 +0.000 +0.000 +0.361 +9.000 +9.000
 3 +0.000 +0.000 +0.000 +0.000 +0.000 +0.010 +0.010 +0.000 +0.558 +9.000 +9.000
 4 +0.000 +0.000 +0.338 -0.141 +0.000 +0.010 +0.010 +0.000 +0.010 +9.000 +9.000
 5 +0.000 +0.000 +0.000 +0.010 +0.000 +0.010 +7.658 +11.901 +12.077 +9.000 +9.000
 6 +0.000 +0.000 +0.000 -0.350 +0.000 +12.220 +11.960 +12.033 +12.074 +9.000 +9.000
 7 +0.000 +0.000 -87.779 +0.000 +0.000 +12.062 +11.979 +11.763 +11.908 +9.000 +9.000
 8 +0.000 +0.000 +0.000 +0.000 +0.000 +11.795 +11.898 +12.036 +11.911 +9.000 +9.000
 9 +0.000 +0.000 -3.241 +0.010 +0.000 +11.715 +11.727 +11.915 +12.043 +9.000 +9.000
10 +0.000 +0.000 -84.294 +0.000 +0.000 +0.010 +0.010 +0.000 +0.010 +9.000 +9.000

Subdivided with CATMULL ROM Leveling Grid:
        0        1        2        3        4        5        6        7        8        9       10       11       12       13       14       15       16       17       18       19       20       21       22       23       24       25       26       27       28       29       30
 0 +5.18678 +5.15049 +5.11419 +5.10361 +5.13509 +5.19229 +5.25189 +5.30663 +5.36378 +5.42183 +5.49771 +5.57450 +5.59985 +5.53168 +5.41207 +5.31502 +5.46349 +5.63451 +5.23317 +3.67654 +1.54754 +0.00000 -0.72098 -0.86049 +0.00000 +2.66667 +6.33333 +9.00000 +9.66667 +9.33333 +9.00000
 1 +5.40562 +5.37775 +5.34988 +5.34144 +5.36570 +5.40939 +5.45213 +5.48419 +5.51531 +5.55430 +5.62251 +5.69860 +5.72732 +5.66671 +5.55872 +5.47402 +5.64339 +5.83604 +5.43020 +3.80760 +1.58651 +0.00000 -0.64189 -0.64920 +0.28103 +2.88525 +6.42701 +9.00000 +9.64585 +9.32292 +9.00000
 2 +5.62446 +5.60502 +5.58558 +5.57928 +5.59631 +5.62649 +5.65237 +5.66175 +5.66683 +5.68676 +5.74731 +5.82270 +5.85478 +5.80173 +5.70538 +5.63302 +5.82329 +6.03756 +5.62723 +3.93865 +1.62548 +0.00000 -0.56281 -0.43792 +0.56207 +3.10383 +6.52069 +9.00000 +9.62503 +9.31251 +9.00000
 3 +5.25241 +5.24010 +5.22779 +5.22342 +5.23428 +5.25308 +5.26595 +5.26034 +5.24879 +5.25497 +5.30432 +5.37139 +5.40364 +5.36574 +5.29302 +5.23885 +5.42140 +5.62251 +5.24104 +3.66154 +1.49945 +0.00000 -0.48068 -0.29874 +0.72263 +3.22871 +6.57421 +9.00000 +9.61314 +9.30657 +9.00000
 4 +3.70100 +3.69411 +3.68723 +3.68461 +3.69061 +3.70088 +3.70671 +3.69938 +3.68762 +3.68887 +3.71863 +3.76140 +3.78803 +3.78371 +3.76326 +3.74196 +3.85928 +3.97575 +3.68836 +2.56704 +1.04185 +0.00000 -0.38598 -0.28863 +0.66168 +3.18131 +6.55390 +9.00000 +9.61765 +9.30883 +9.00000
 5 +1.55870 +1.55594 +1.55318 +1.55212 +1.55429 +1.55815 +1.56080 +1.55946 +1.55689 +1.55850 +1.56516 +1.57600 +1.59381 +1.63066 +1.67448 +1.69191 +1.71536 +1.71241 +1.55247 +1.06436 +0.41925 +0.00000 -0.28824 -0.35063 +0.48027 +3.04021 +6.49342 +9.00000 +9.63109 +9.31554 +9.00000
 6 +0.00000 +0.00000 +0.00000 +0.00000 -0.00036 -0.00073 +0.00000 +0.00328 +0.00765 +0.00984 +0.00084 -0.01036 +0.00000 +0.06065 +0.14285 +0.18413 +0.14321 +0.06138 +0.00000 -0.02701 -0.03356 +0.00000 -0.21302 -0.38593 +0.36095 +2.94740 +6.45365 +9.00000 +9.63993 +9.31996 +9.00000
 7 -0.38907 -0.50110 -0.61314 -0.38692 +0.62831 +1.98180 +2.65948 +1.98651 +0.63773 -0.37639 -0.61421 -0.51736 -0.40027 -0.34981 -0.27911 -0.24193 -0.28696 -0.36551 -0.38532 -0.29706 -0.15006 +0.00000 -0.16716 -0.33125 +0.41290 +2.98781 +6.47097 +9.00000 +9.63608 +9.31804 +9.00000
 8 -0.19453 -0.41997 -0.64541 -0.19346 +1.83866 +4.54817 +5.90406 +4.55348 +1.84930 -0.18092 -0.64011 -0.42532 -0.20013 -0.17723 -0.14392 -0.12572 -0.14536 -0.18010 -0.18721 -0.15581 -0.09678 +0.00000 -0.14381 -0.24988 +0.52695 +3.07652 +6.50898 +9.00000 +9.62763 +9.31381 +9.00000
 9 +0.00000 +0.00000 +0.00000 +0.00000 +0.00000 +0.00000 +0.00000 +0.00000 +0.00000 +0.00000 -0.00037 -0.00073 +0.00000 +0.00292 +0.00694 +0.00986 +0.01094 +0.01092 +0.00981 -0.01377 -0.03844 +0.00000 -0.14800 -0.23290 +0.55817 +3.10080 +6.51939 +9.00000 +9.62532 +9.31266 +9.00000
10 +0.00000 +1.01652 +2.03303 +0.00000 -9.14686 -21.34327 -27.44593 -21.36285 -9.18600 -0.04804 +1.99578 +1.00073 +0.00000 +0.01264 +0.01960 -0.00306 -0.07696 -0.18049 -0.27273 -0.35746 -0.43091 -0.44077 -0.66817 -0.83199 -0.03664 +2.67082 +6.33745 +9.00000 +9.66938 +9.33469 +9.00000
11 +0.00000 +2.37187 +4.74374 +0.00000 -21.34273 -49.80107 -64.04048 -49.84614 -21.43287 -0.11063 +4.65756 +2.33474 +0.00000 +0.02993 +0.04795 +0.00339 -0.15017 -0.36629 -0.55636 -0.70037 -0.81832 -0.88155 -1.21587 -1.49547 -0.71429 +2.17641 +6.12789 +9.00000 +9.71958 +9.35979 +9.00000
12 +0.00000 +3.04955 +6.09909 +0.00000 -27.44071 -64.03005 +0.33777 -64.08743 -27.55546 -0.14084 +5.98919 +3.00187 +0.00000 +0.01335 +0.01214 +0.00984 +0.01093 +0.01091 +0.00981 +0.00654 +0.00218 +0.00000 -0.33079 -0.65940 +0.00981 +2.67430 +6.33660 +9.00000 +9.66594 +9.33297 +9.00000
13 +0.00000 +2.37187 +4.74374 +0.00000 -21.34338 -49.80236 -64.04049 -49.84037 -21.41940 -0.09332 +4.68754 +2.37353 +0.00000 -0.21894 -0.49741 -0.44239 +0.23104 +1.23795 +2.11661 +2.72150 +3.19813 +3.52130 +3.43029 +3.18581 +3.54485 +5.16294 +7.38453 +9.00000 +9.40409 +9.20204 +9.00000
14 +0.00000 +1.01652 +2.03303 +0.00000 -9.14814 -21.34583 -27.44592 -21.35129 -9.15906 -0.01340 +2.05574 +1.07832 +0.00000 -0.48511 -1.07111 -0.89461 +0.68545 +3.02800 +5.07321 +6.48627 +7.60198 +8.36492 +8.62414 +8.53057 +8.48163 +8.64387 +8.85073 +9.00000 +9.03840 +9.01920 +9.00000
15 +0.00000 +0.00000 +0.00000 +0.00000 -0.00036 -0.00073 +0.00000 +0.00328 +0.00765 +0.00984 +0.00729 +0.00255 +0.00000 -0.28108 -0.55997 +0.00984 +2.11956 +5.07799 +7.65805 +9.47520 +10.91397 +11.90091 +12.38140 +12.41004 +12.07719 +11.17849 +9.91829 +9.00000 +8.77206 +8.88603 +9.00000
16 +0.00000 -0.34630 -0.69261 +0.00000 +3.12037 +7.27964 +9.35017 +7.23955 +3.04018 -0.09841 -0.90372 -0.64826 +0.00000 +0.86666 +2.12611 +3.63352 +5.51706 +7.64857 +9.49871 +10.91536 +12.05064 +12.83165 +13.26860 +13.35128 +12.97612 +11.80871 +10.18346 +9.00000 +8.70547 +8.85274 +9.00000
17 +0.00000 -0.35377 -0.70753 +0.00000 +3.19366 +7.44861 +9.55170 +7.34132 +2.97908 -0.26334 -1.23138 -1.07961 +0.00000 +2.48459 +5.89702 +8.61388 +9.89427 +10.47908 +10.96761 +11.57967 +12.09543 +12.45475 +12.71922 +12.82723 +12.53382 +11.49262 +10.04998 +9.00000 +8.73824 +8.86912 +9.00000
18 +0.00000 +0.00000 +0.00000 +0.00000 +0.01294 +0.02589 +0.00000 -0.11650 -0.27184 -0.34950 -0.72443 -1.02169 +0.00000 +3.65624 +8.63142 +12.21999 +13.04559 +12.48458 +11.96048 +11.96128 +11.99897 +12.03310 +12.16430 +12.29192 +12.07355 +11.16586 +9.91218 +9.00000 +8.77233 +8.88616 +9.00000
19 +0.00000 +1.08369 +2.16739 +0.00000 -9.74314 -22.73736 -29.25971 -22.84841 -9.96523 -0.27256 +1.47067 +0.02340 +0.00000 +3.92759 +9.27905 +13.08747 +13.83230 +13.03409 +12.28754 +12.12639 +12.01691 +11.95260 +12.06101 +12.21458 +12.02418 +11.13343 +9.89870 +9.00000 +8.77599 +8.88799 +9.00000
20 +0.00000 +2.52862 +5.05723 +0.00000 -22.75322 -53.09229 -68.27264 -53.13990 -22.84844 -0.11687 +4.50039 +1.55776 +0.00000 +3.75265 +8.89017 +12.58070 +13.39313 +12.75857 +12.13856 +12.00880 +11.89359 +11.82735 +11.95218 +12.12597 +11.95684 +11.09033 +9.88089 +9.00000 +8.78098 +8.89049 +9.00000
21 +0.00000 +3.25108 +6.50216 +0.00000 -29.25971 -68.27264 -87.77911 -68.27264 -29.25970 +0.00000 +6.05542 +2.35761 +0.00000 +3.57695 +8.49411 +12.06181 +12.93862 +12.46598 +11.97858 +11.90300 +11.81266 +11.76251 +11.89737 +12.07242 +11.90816 +11.05727 +9.86707 +9.00000 +8.78458 +8.89229 +9.00000
22 +0.00000 +2.52417 +5.04834 +0.00000 -22.71848 -53.00948 -68.15261 -52.99908 -22.69768 +0.02553 +4.62472 +1.64573 +0.00000 +3.54634 +8.42595 +11.97384 +12.86234 +12.41911 +11.96225 +11.91921 +11.86253 +11.82788 +11.94395 +12.08204 +11.89174 +11.03966 +9.85918 +9.00000 +8.78580 +8.89290 +9.00000
23 +0.00000 +1.07480 +2.14960 +0.00000 -9.67366 -22.57173 -29.01963 -22.56675 -9.66371 +0.01222 +1.71934 +0.19934 +0.00000 +3.51498 +8.35062 +11.87375 +12.77072 +12.35518 +11.93492 +11.94721 +11.95479 +11.95365 +12.04455 +12.12673 +11.89398 +11.03209 +9.85526 +9.00000 +8.78563 +8.89281 +9.00000
24 +0.00000 +0.00000 +0.00000 +0.00000 +0.00000 +0.00000 +0.00000 +0.00000 +0.00000 +0.00000 -0.43684 -0.87367 +0.00000 +3.49086 +8.29223 +11.79456 +12.69367 +12.29373 +11.89767 +11.95083 +12.00785 +12.03566 +12.11666 +12.16843 +11.91069 +11.03901 +9.85780 +9.00000 +8.78439 +8.89220 +9.00000
25 +0.00000 -0.31644 -0.63288 +0.00000 +2.84783 +6.64498 +8.54385 +6.64631 +2.85049 +0.00327 -1.08162 -1.21793 +0.00000 +3.60673 +8.56770 +12.18484 +13.10731 +12.68596 +12.27525 +12.33953 +12.41444 +12.46140 +12.58155 +12.67374 +12.39589 +11.38485 +10.00376 +9.00000 +8.74846 +8.87423 +9.00000
26 +0.00000 -0.25831 -0.51662 +0.00000 +2.32451 +5.42395 +6.97437 +5.42706 +2.33073 +0.00763 -0.97720 -1.18880 +0.00000 +3.72985 +8.86011 +12.59602 +13.53552 +13.08067 +12.64289 +12.70383 +12.78183 +12.84336 +13.01795 +13.17607 +12.89555 +11.74518 +10.15617 +9.00000 +8.71144 +8.85572 +9.00000
27 +0.00000 +0.12003 +0.24007 +0.00000 -1.08067 -2.52144 -3.24092 -2.51745 -1.07268 +0.00981 -0.18620 -0.74450 +0.00000 +3.47005 +8.24289 +11.71538 +12.57983 +12.14393 +11.72749 +11.77915 +11.85028 +11.91487 +12.07956 +12.23770 +12.04341 +11.15118 +9.90651 +9.00000 +8.77456 +8.88728 +9.00000
28 +0.00000 +0.90721 +1.81443 +0.00000 -8.16523 -19.05210 -24.49479 -19.04884 -8.15871 +0.00799 +1.49936 +0.26731 +0.00000 +2.56962 +6.10399 +8.67474 +9.31280 +8.98724 +8.67698 +8.71428 +8.76688 +8.81688 +8.85932 +8.89915 +8.93343 +8.96179 +8.98459 +9.00000 +9.00493 +9.00247 +9.00000
29 +0.00000 +2.01461 +4.02922 +0.00000 -18.13164 -42.30711 -54.39447 -42.30548 -18.12838 +0.00400 +3.87150 +1.69429 +0.00000 +1.28627 +3.05546 +4.34229 +4.66187 +4.49909 +4.34341 +4.36042 +4.38453 +4.40844 +4.26427 +4.11989 +4.47164 +5.81806 +7.66060 +9.00000 +9.33543 +9.16772 +9.00000
30 +0.00000 +3.12201 +6.24401 +0.00000 -28.09806 -65.56212 -84.29416 -65.56213 -28.09805 +0.00000 +6.24365 +3.12128 +0.00000 +0.00292 +0.00693 +0.00984 +0.01094 +0.01094 +0.00984 +0.00656 +0.00219 +0.00000 -0.33078 -0.65936 +0.00986 +2.67433 +6.33662 +9.00000 +9.66594 +9.33297 +9.00000

echo:Bed Leveling OFF
echo:Fade Height OFF
ok

You can even toss these into a mesh bed visualizer and see the objects on the bed (however, they all seem to max out at 2mm, so anything taller just goes ZOOP.



It does seem to hit the screws in the bed and might cause a wildly negative number (I had a couple -87mm) so keep that in mind. However, making a quick project in Lightburn, I completely ignored setting the thickness, and simply put an M420 S at the end of my header to enable MBL aaand it worked fine. Would I recommend? Nah, especially for flat objects. Was it a fun adventure? Sure. Was it also frustrating trying to parse the results? Definitely.