Closed defl closed 2 years ago
Thank you for such a detailed explanation of your trouble. This is in fact why those flip and rotate options are there, because not every firmware reports the same way and provided in the same format. The way the plugin works is once the triggering flag (@BEDLEVELVISUALIZER) is seen it starts analyzing every line received from the printer looking for mesh data. If it detects it as mesh data it will then append/push that data to an internal array until the plugin receives an ok from the printer; confirming the collection of data. There is then other logic that will manipulate that array once collected based on configured options and other variations created from different firmware reports, etc. and send that collected data to the web interface for graphing.
Your approach for determining the bed orientation is spot on as well, using an obstacle to trigger earlier in order to show higher. I like the idea of changing the options to "y=0 is bottom" and "y=0 is top" but I fear that would also confuse people as much as the "flip Y" checkbox is now and depending on the firmware's mesh report may actually not match that text.
What I could do however is add some additional information to the readme/gcode examples to give user's a heads up that if they are using Klipper they would want to enable that option. Long term goals for this plugin is utilize firmware detection and just have a lot of this stuff pre-configured for you, but I haven got much time these days to work on this stuff.
This might also be covered by #263, which crosslink said he was going to do a YouTube video but has still not come through yet.
Thanks for the quick reply! 👍
In the end I think this plugin is one of the most used plugins for 3d bed leveling. (The other main one (AFAIK) is Duet where the firm controls both the hw and the software so this never occurs). You can see that by firmware designers copying what others are doing just to make sure this plugin doesn't break. IMHO an argument can be made for either direction (lower lines are higher/lower Y) so trying to set a standard based on that won't get far I guess... In stead of you trying to guess firmware who are guessing at what you want, how about you add support for firmware to tell you their direction? (If that doesn't already exist in some way, did a quick search but could not find it) Sure it'll take a ton of time to get it in everywhere but eventually we'll get there.
I've literally been spending hours messing with this and am so confused on what I am actually seeing, which corner is which, etc. I know it is probably a lot of work but having presets for known setups might be helpful to people. There are probably only a few main setups out there.
That credit card trick is gold though! Going to do that right now and maybe I'll finally understand what I'm seeing.
That credit card trick is gold though! Going to do that right now and maybe I'll finally understand what I'm seeing.
I totally agree. Thanks for the tip!!
When trying to configure my Ender3Pro (running Klipper) I was confused about the visualization of the bed.
For testing I've put a credit card sized object on the bed, top left corner (x low, y high). klipper does a zig-zag pattern when probing points and from that I get:
So far so good. bed mesh output
Here you can see that the higher y is lower down the output (so inverted from human view), this is as expected. However then we get to the output which is used to plot the bed (note that there are 2 interpolation points between every measurement):
There he output is inverted from the machine stored output (so human view, with earlier lines being higher x). Using this out of the box mis renders the bump to be bottom left, not top left.
My visualizer config to fix this is as follows. Key thing to note is that I need to "flip y axis".
And that leads to the following image (which is correct)
Now, what I can gather from the Klipper developers is that they do this inverse ordering because of you guys mostly. See https://github.com/KevinOConnor/klipper/issues/2490 for the discussion, but here's the key snip:
Now it seems that the reason why this is inverted (and confusing) needs further config to unconfuse it. So either we need to rename the "flip y axis" to something that describes the expected inputs like "y=0 is bottom" and "Y=0 is top". Even better would be some documentation on what you expect as an input so Klipper and co can start to flip their ordering.