Heightmap, fill in missing data and interpolation
-
Due to the position of my probe the height map is missing some areas of the bed. And although I understand the data should be interpolated to the missing regions which are populated with '0' in the heightmap file. Unfortunately that doesn't seem to have compensated enough for that area.
My question is what is the best way to fill in the missing data?
So far I've been printing some bed levelling test prints, measuring and adding the data to my heightmap file. It helps but I worry about how the interpolation is filling in the area between the measurements I've taken.
RepRapFirmware height map file v2 generated at 2022-06-13 16:32, min error -0.362, max error 0.025, mean -0.091, deviation 0.069 axis0,axis1,min0,max0,min1,max1,radius,spacing0,spacing1,num0,num1 X,Y,0.00,200.00,0.00,200.00,-1.00,10.00,10.00,21,21 0, -0.50, -0.50, 0, 0, 0, 0, 0, 0, -0.25, -0.25, 0, 0, 0, 0, 0, 0, 0, -0.32, -0.37, 0 0, -0.50, -0.55, 0, 0, 0, 0, 0, 0, -0.25, -0.25, 0, 0, 0, 0, 0, 0, 0, -0.32, -0.37, 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 -0.230, -0.218, -0.184, -0.155, -0.154, -0.148, -0.124, -0.118, -0.127, -0.122, -0.102, -0.092, -0.108, -0.110, -0.088, -0.072, -0.072, 0, 0, 0, 0 -0.222, -0.209, -0.174, -0.142, -0.149, -0.143, -0.122, -0.112, -0.122, -0.117, -0.093, -0.081, -0.100, -0.104, -0.088, -0.067, -0.078, 0, 0, 0, 0 -0.208, -0.197, -0.162, -0.137, -0.146, -0.142, -0.114, -0.108, -0.118, -0.115, -0.090, -0.082, -0.102, -0.114, -0.093, -0.076, -0.077, 0, 0, 0, 0 -0.169, -0.157, -0.115, -0.088, -0.099, -0.093, -0.065, -0.049, -0.063, -0.054, -0.034, -0.022, -0.044, -0.057, -0.037, -0.017, -0.029, 0, 0, 0, 0 -0.147, -0.137, -0.093, -0.065, -0.073, -0.067, -0.040, -0.029, -0.040, -0.039, -0.017, -0.006, -0.032, -0.043, -0.024, -0.002, -0.008, 0, 0, 0, 0 -0.158, -0.147, -0.102, -0.069, -0.083, -0.079, -0.048, -0.028, -0.039, -0.035, -0.016, -0.006, -0.033, -0.048, -0.021, 0.003, -0.000, 0, 0, 0, 0 -0.172, -0.162, -0.115, -0.088, -0.097, -0.093, -0.065, -0.048, -0.062, -0.058, -0.035, -0.029, -0.050, -0.067, -0.038, -0.008, -0.017, 0, 0, 0, 0 -0.155, -0.139, -0.095, -0.059, -0.076, -0.065, -0.033, -0.014, -0.027, -0.028, -0.007, 0.010, -0.021, -0.035, -0.013, 0.012, 0.002, 0, 0, 0, 0 -0.134, -0.117, -0.073, -0.037, -0.047, -0.040, -0.011, 0.006, -0.011, -0.009, 0.017, 0.025, -0.002, -0.022, 0.002, 0.023, 0.013, 0, 0, 0, 0 -0.158, -0.139, -0.087, -0.052, -0.065, -0.054, -0.021, -0.006, -0.021, -0.022, 0.001, -0.002, -0.004, -0.023, -0.007, 0.013, 0.003, 0, 0, 0, 0 -0.197, -0.177, -0.125, -0.093, -0.103, -0.095, -0.063, -0.048, -0.064, -0.062, -0.032, -0.021, -0.045, -0.059, -0.038, -0.016, -0.023, 0, 0, 0, 0 -0.198, -0.179, -0.123, -0.088, -0.099, -0.086, -0.050, -0.035, -0.050, -0.047, -0.017, -0.002, -0.030, -0.045, -0.030, -0.009, -0.019, 0, 0, 0, 0 -0.194, -0.165, -0.114, -0.076, -0.082, -0.072, -0.035, -0.024, -0.037, -0.037, -0.012, 0.001, -0.025, -0.042, -0.028, -0.012, -0.028, 0, 0, 0, 0 -0.225, -0.199, -0.144, -0.108, -0.113, -0.097, -0.059, -0.045, -0.059, -0.058, -0.030, -0.022, -0.045, -0.062, -0.044, -0.035, -0.052, 0, 0, 0, 0 -0.298, -0.266, -0.214, -0.183, -0.184, -0.168, -0.132, -0.123, -0.132, -0.128, -0.102, -0.088, -0.113, -0.125, -0.109, -0.097, -0.112, 0, 0, 0, 0 -0.319, -0.283, -0.232, -0.196, -0.198, -0.175, -0.137, -0.122, -0.132, -0.127, -0.094, -0.086, -0.110, -0.124, -0.110, -0.103, -0.123, 0, 0, 0, 0 -0.313, -0.271, -0.218, -0.180, -0.179, -0.155, -0.117, -0.103, -0.108, -0.105, -0.077, -0.069, -0.097, -0.115, -0.107, -0.102, -0.125, 0, 0, 0, 0 -0.362, -0.318, -0.249, -0.220, -0.218, -0.187, -0.146, -0.128, -0.136, -0.125, -0.103, -0.095, -0.122, -0.136, -0.133, -0.132, -0.158, 0, 0, 0, 0
-
Simply adjust the settings in the M557 command so that the probe can reach all the points.
Then the height map won't have any missing data.
If you are not in a big hurry I can find the macro I have that will tell you what values to use in the M557.
Assuming you are using Duet firmware 3.3 or later, that is.
Frederick
-
@fcwilt thanks, the issue come from the position of the probe relative to the nozzle (about -35X 25Y) and the travel limits of the gantry. The probe can’t physically get to those regions.
-
@virtualbrown said in Heightmap, fill in missing data and interpolation:
@fcwilt thanks, the issue come from the position of the probe relative to the nozzle (about -35X 25Y) and the travel limits of the gantry. The probe can’t physically get to those regions.
Yes, I know that.
Nothing you can do about that except to probe the points you can reach.
Here is code that will compute and set M557 for you.
At the start of the file you set 5 values. Edit the file then run it and the code does the rest.
Frederick
-
Are you asking how to fill in the blanks?
One way would be to determine the offset for those areas using a different probe method, like the manual probe option, which lets you manually jog the nozzle down to touch. This will let you probe anywhere the nozzle itself can reach. The downside is the amount of time it takes to probe multiple points. It also depends on the accuracy of your measured probing offset, and how accurately you can get the nozzle to just touch the bed. But if you did a manual probing at those missing locations you could edit the full heightmap file and add your manually gathered data. Or at least a few points at the corners and edges to help the interpolation.
-
@fcwilt this is my M557 line in my config:
M557 X0:200 Y0:200 S10 ; define mesh grid
What will your macro do? Will it interpolate to missing data? Sorry, I’m only a couple weeks into all of this.
-
@phaedrux thanks, so are the edges better to concentrate on getting right rather than the patches I’ve done so fare, for the interpretation?
-
@virtualbrown said in Heightmap, fill in missing data and interpolation:
@phaedrux thanks, so are the edges better to concentrate on getting right rather than the patches I’ve done so fare, for the interpretation?
That would really depend on how locally flat the bed actually is in the unprobed area. Interpolation will only be able to assume there is a fairly similar grade between the points. If you know you have a lumpy section, get actual values for there. If it's pretty flat, get a few points at the corners and edges and let the interpolation fill in the blanks.
-
@virtualbrown said in Heightmap, fill in missing data and interpolation:
@fcwilt this is my M557 line in my config:
M557 X0:200 Y0:200 S10 ; define mesh grid
What will your macro do? Will it interpolate to missing data? Sorry, I’m only a couple weeks into all of this.
It will take the values you enter and set M557 to the best values it can given the limits of the area you can probe.
The code does make an assumption that your M208 command has specified the printable area of the bed. In some printers the M208 min/max values actually are outside the printable area to allow certain movements, such as changing a tool on a multi-tool printer.
Here is a version that allows for that:
As to interpolation I know of no reasonable and accurate way to do that.
There are some systems that have a probe that is in the exact same XY location as the nozzle. These, of course, don't have the issue of not being able to reach all points.
You can "probe" with the nozzle but the results are very unlikely to be accurate, and it would be tedious in the extreme.
Frederick