MarlinFirmware / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
https://marlinfw.org
GNU General Public License v3.0
16.04k stars 19.15k forks source link

[FR] Pass Z homing (Z0) point to bed leveling if bed leveling requires the same point to be sampled #22519

Open Wallby opened 2 years ago

Wallby commented 2 years ago

Is your feature request related to a problem? Please describe.

No response

Are you looking for hardware support?

No response

Describe the feature you want

Hello,

I thought it might be nice if bed leveling (e.g. bilinear) would reuse the "Z homing sample" if the z homing sample is the same as a point that should be sampled for bed leveling. E.g. is a 3x3 grid is sampled, and z homing samples the center point, then bed leveling only needs to sample 8 points (instead of 9).

Additional context

No response

thinkyhead commented 2 years ago

Note that the Z homing point, where Z0 is established, is rarely coincident with the center of the mesh. Moreover, it is most common to home Z with a cold bed, whereas G29 should be done on a heated bed.

Wallby commented 2 years ago

I've reformatted this request (changed title and description). I.e. if one of the points required for bed leveling is already known from z homing.. skip the point in bed leveling.

Wallby commented 2 years ago

Note that the Z homing point, where Z0 is established, is rarely coincident with the center of the mesh. Moreover, it is most common to home Z with a cold bed, whereas G29 should be done on a heated bed.

I personally use bed leveling to do homing as well (i.e. the option on the LCD menu always homes and then levels).

Wallby commented 2 years ago

What I would like to be able to do (not sure if it makes sense though) is..

#define OVERRIDE_GRID_POINT_WITH_Z0 { 1,1 } //< i.e. instead of sampling to figure out "grid point @ {1,1}", read Z0

Wallby commented 2 years ago

This feature (or something alike) actually became a requirement instead of a "would be nice" when my IR probe no longer detected the bed "at the right time" (i.e. now.. it crashes into the bed, because there is a hole for a thermistor at the center of the bed).

I changed where Z0 samples (-10mm offset on the X axis now), but bed leveling still samples the same point.

Wallby commented 2 years ago

@thinkyhead Perhaps..

/**
 * If performing automatic bed leveling via LCD skip point GRID_POINT_TO_OVERRIDE_WITH_Z0
 * Instead use Z0 that was sampled during G28 prior to G29 (G28 is always prior to G29 when bed leveling via LCD) 
 * If Z0 does not directly coincide with GRID_POINT_TO_OVERRIDE_WITH_Z0, bed leveling will first sample all other points and then interpolate to approximate the Z for GRID_POINT_TO_OVERRIDE_WITH_Z0
 * There may not be another grid point inbetween Z0 and GRID_POINT_TO_OVERRIDE_WITH_Z0
 */
//#define GRID_POINT_TO_OVERRIDE_WITH_Z0 {0,0}

?