<p>A Marlin developer confirmed that <a href="https://github.com/MarlinFirmware/Marlin/issues/9507#issuecomment-363423032" rel="noreferrer">bed-leveling and probing are now performed entirely in the machine coordinate space</a>.</p>

<p>To clarify further, if one has a non-zero home offset enabled, the following commands refer to different physical locations despite the supplied parameters being the same:</p>

<pre><code>M206  X10  Y10 ;  Set a home offset in X and Y
G30  X100 Y100 ;  Probe (100, 100) in machine space
G0   X100 Y100 ;  Move to (100, 100) in print space, ie. (90, 90) in machine coordinate space
</code></pre>

<p>I was able to correctly align the bed-leveling grid by altering header files in the source code. I defined the XY offset using two new macros <code>BED_OFFSET_X</code> and <code>BED_OFFSET_Y</code> in <code>Configuraion.h</code> and altered the following lines in <code>Conditionals_post.h</code>.</p>

<pre><code>#define X_CENTER ((X_BED_SIZE) / 2) + BED_OFFSET_X
#define Y_CENTER ((Y_BED_SIZE) / 2) + BED_OFFSET_Y
</code></pre>

<p>The mesh is now physically aligned with the bed and I have not observed any adverse effects.</p>

CC BY-SA 4.0
2023-03-15T09:49:46.690Z
I have this problem too - but how would i know what the value is for the bed offset macros?  I haven't conciously changed the home offset - yet the validate mesh is printing relative to the centre of the bed instead of the bottom left corner. See: https://3dprinting.stackexchange.com/questions/20685/validate-mesh-in-marlin-causes-whole-test-print-to-be-offset-from-the-bed-hom
NickG
CC BY-SA 3.0
2018-02-07T11:10:48.820Z
2018-02-07T11:10:48.820Z
Ian Mackinnon
<p>I'm using a Prusa clone with Ramps 1.4, Marlin 1.1.5 and an inductive proximity sensor Z-probe. Due to the design of the printer, the X and Y end-stops and the Z-probe are not exactly aligned with the heated bed, so I must use Marlin's <a href="http://marlinfw.org/docs/gcode/M206.html" rel="noreferrer">Home Offset</a> feature to align the coordinate space to the print area, using the G-code command <code>M206 X-18.5 Y-2.5 Z1.1</code>.</p>

<p>I am now attempting to use Marlin's <a href="http://marlinfw.org/docs/features/unified_bed_leveling.html" rel="noreferrer">Unified Bed Leveling</a> feature to compensate for a slight but significant curvature of the bed.</p>

<p>Unfortunately, it appears that the <a href="http://marlinfw.org/docs/gcode/G026.html" rel="noreferrer">Mesh Validation Pattern command (G26)</a> is not taking the Home Offset into account when printing a test pattern. The printed pattern hangs off the left side of the bed and the center printed circle is clearly misaligned with the center of the print bed by the bed offset amount.</p>

<p>Does this suggest that my firmware is misconfigured? Or is there an alternative method for aligning the mesh validation test pattern with an offset print bed?</p>

CC BY-SA 4.0
2018-07-08T11:27:26.667Z
which Prusa-i3 clone?
Trish
<prusa-i3><marlin><calibration><z-probe><bed-leveling>
Marlin's bed leveling Mesh Validation Pattern ignoring home offset
Ian Mackinnon
# Marlin's bed leveling Mesh Validation Pattern ignoring home offset

(Asked by: username_0 on 2018-02-05)

I'm using a Prusa clone with Ramps 1.4, Marlin 1.1.5 and an inductive proximity sensor Z-probe. Due to the design of the printer, the X and Y end-stops and the Z-probe are not exactly aligned with the heated bed, so I must use Marlin's [Home Offset](http://marlinfw.org/docs/gcode/M206.html) feature to align the coordinate space to the print area, using the G-code command `M206 X-18.5 Y-2.5 Z1.1`.

I am now attempting to use Marlin's [Unified Bed Leveling](http://marlinfw.org/docs/features/unified_bed_leveling.html) feature to compensate for a slight but significant curvature of the bed.

Unfortunately, it appears that the [Mesh Validation Pattern command (G26)](http://marlinfw.org/docs/gcode/G026.html) is not taking the Home Offset into account when printing a test pattern. The printed pattern hangs off the left side of the bed and the center printed circle is clearly misaligned with the center of the print bed by the bed offset amount.

Does this suggest that my firmware is misconfigured? Or is there an alternative method for aligning the mesh validation test pattern with an offset print bed?

**Tags:** prusa-i3, marlin, calibration, z-probe, bed-leveling
> **Comments:**
> **username_1**: which Prusa-i3 clone?  

---

## 1 answers

### Answer by username_0 on 2018-02-07. Score: 5 | Accepted answer

A Marlin developer confirmed that bed-leveling and probing are now performed entirely in the machine coordinate space.
To clarify further, if one has a non-zero home offset enabled, the following commands refer to different physical locations despite the supplied parameters being the same:
M206  X10  Y10 ;  Set a home offset in X and Y
G30  X100 Y100 ;  Probe (100, 100) in machine space
G0   X100 Y100 ;  Move to (100, 100) in print space, ie. (90, 90) in machine coordinate space

I was able to correctly align the bed-leveling grid by altering header files in the source code. I defined the XY offset using two new macros BED_OFFSET_X and BED_OFFSET_Y in Configuraion.h and altered the following lines in Conditionals_post.h.
#define X_CENTER ((X_BED_SIZE) / 2) + BED_OFFSET_X
#define Y_CENTER ((Y_BED_SIZE) / 2) + BED_OFFSET_Y

The mesh is now physically aligned with the bed and I have not observed any adverse effects.

> **Comments:**
> **username_2**: I have this problem too - but how would i know what the value is for the bed offset macros?  I haven't conciously changed the home offset - yet the validate mesh is printing relative to the centre of the bed instead of the bottom left corner. See: https://3dprinting.stackexchange.com/questions/20685/validate-mesh-in-marlin-causes-whole-test-print-to-be-offset-from-the-bed-hom  

---

