diff --git a/docs/Bed_Mesh.md b/docs/Bed_Mesh.md
index d2a417dd4..ada3de29d 100644
--- a/docs/Bed_Mesh.md
+++ b/docs/Bed_Mesh.md
@@ -370,14 +370,68 @@ are identified in green.
 
 ![bedmesh_interpolated](img/bedmesh_faulty_regions.svg)
 
+### Adaptive Meshes
+
+Adaptive bed meshing is a way to speed up the bed mesh generation by only probing
+the area of the bed used by the objects being printed. When used, the method will
+automatically adjust the mesh parameters based on the area occupied by the defined
+print objects.
+
+The adapted mesh area will be computed from the area defined by the boundaries of all
+the defined print objects so it covers every object, including any margins defined in
+the configuration. After the area is computed, the number of probe points will be
+scaled down based on the ratio of the default mesh area and the adapted mesh area. To
+illustrate this consider the following example:
+
+For a 150mmx150mm bed with `mesh_min` set to `25,25` and `mesh_max` set to `125,125`,
+the default mesh area is a 100mmx100mm square. An adapted mesh area of `50,50`
+means a ratio of `0.5x0.5` between the adapted area and default mesh area.
+
+If the `bed_mesh` configuration specified `probe_count` as `7x7`, the adapted bed
+mesh will use 4x4 probe points (7 * 0.5 rounded up).
+
+![adaptive_bedmesh](img/adaptive_bed_mesh.svg)
+
+```
+[bed_mesh]
+speed: 120
+horizontal_move_z: 5
+mesh_min: 35, 6
+mesh_max: 240, 198
+probe_count: 5, 3
+adaptive_margin: 5
+```
+
+- `adaptive_margin` \
+  _Default Value: 0_ \
+  Margin (in mm) to add around the area of the bed used by the defined objects. The diagram
+  below shows the adapted bed mesh area with an `adaptive_margin` of 5mm. The adapted mesh
+  area (area in green) is computed as the used bed area (area in blue) plus the defined margin.
+
+  ![adaptive_bedmesh_margin](img/adaptive_bed_mesh_margin.svg)
+
+By nature, adaptive bed meshes use the objects defined by the Gcode file being printed.
+Therefore, it is expected that each Gcode file will generate a mesh that probes a different
+area of the print bed. Therefore, adapted bed meshes should not be re-used. The expectation
+is that a new mesh will be generated for each print if adaptive meshing is used.
+
+It is also important to consider that adaptive bed meshing is best used on machines that can
+normally probe the entire bed and achieve a maximum variance less than or equal to 1 layer
+height. Machines with mechanical issues that a full bed mesh normally compensates for may
+have undesirable results when attempting print moves **outside** of the probed area. If a
+full bed mesh has a variance greater than 1 layer height, caution must be taken when using
+adaptive bed meshes and attempting print moves outside of the meshed area.
+
 ## Bed Mesh Gcodes
 
 ### Calibration
 
 `BED_MESH_CALIBRATE PROFILE=<name> METHOD=[manual | automatic] [<probe_parameter>=<value>]
- [<mesh_parameter>=<value>]`\
+ [<mesh_parameter>=<value>] [ADAPTIVE=[0|1] [ADAPTIVE_MARGIN=<value>]`\
 _Default Profile:  default_\
-_Default Method:  automatic if a probe is detected, otherwise manual_
+_Default Method:  automatic if a probe is detected, otherwise manual_ \
+_Default Adaptive: 0_ \
+_Default Adaptive Margin: 0_
 
 Initiates the probing procedure for Bed Mesh Calibration.
 
@@ -399,6 +453,8 @@ following parameters are available:
   - `ROUND_PROBE_COUNT`
 - All beds:
   - `ALGORITHM`
+  - `ADAPTIVE`
+  - `ADAPTIVE_MARGIN`
 
 See the configuration documentation above for details on how each parameter
 applies to the mesh.
diff --git a/docs/Config_Reference.md b/docs/Config_Reference.md
index 3b2f17709..985408091 100644
--- a/docs/Config_Reference.md
+++ b/docs/Config_Reference.md
@@ -991,6 +991,9 @@ Visual Examples:
 #   Optional points that define a faulty region.  See docs/Bed_Mesh.md
 #   for details on faulty regions.  Up to 99 faulty regions may be added.
 #   By default no faulty regions are set.
+#adaptive_margin:
+#   An optional margin (in mm) to be added around the bed area used by
+#   the defined print objects when generating an adaptive mesh.
 ```
 
 ### [bed_tilt]
diff --git a/docs/img/adaptive_bed_mesh.svg b/docs/img/adaptive_bed_mesh.svg
new file mode 100644
index 000000000..954ca0b32
--- /dev/null
+++ b/docs/img/adaptive_bed_mesh.svg
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Do not edit this file with editors other than draw.io -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="891px" height="719px" viewBox="-0.5 -0.5 891 719" content="&lt;mxfile host=&quot;app.diagrams.net&quot; modified=&quot;2023-11-20T23:21:00.371Z&quot; agent=&quot;Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36&quot; etag=&quot;uzE3l4u1UXjvh0Ybzm1X&quot; version=&quot;22.1.3&quot; type=&quot;device&quot;&gt;&#10;  &lt;diagram name=&quot;Page-1&quot; id=&quot;9aYWBSPtCap1D5Vuddur&quot;&gt;&#10;    &lt;mxGraphModel dx=&quot;2472&quot; dy=&quot;813&quot; grid=&quot;1&quot; gridSize=&quot;10&quot; guides=&quot;1&quot; tooltips=&quot;1&quot; connect=&quot;1&quot; arrows=&quot;1&quot; fold=&quot;1&quot; page=&quot;1&quot; pageScale=&quot;1&quot; pageWidth=&quot;850&quot; pageHeight=&quot;1100&quot; background=&quot;#ffffff&quot; math=&quot;0&quot; shadow=&quot;0&quot;&gt;&#10;      &lt;root&gt;&#10;        &lt;mxCell id=&quot;0&quot; /&gt;&#10;        &lt;mxCell id=&quot;1&quot; parent=&quot;0&quot; /&gt;&#10;        &lt;mxCell id=&quot;sZqi1VJqUI8cdP5_EVks-16&quot; value=&quot;&quot; style=&quot;rounded=0;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;opacity=50;&quot; parent=&quot;1&quot; vertex=&quot;1&quot;&gt;&#10;          &lt;mxGeometry x=&quot;109&quot; y=&quot;241&quot; width=&quot;300&quot; height=&quot;290&quot; as=&quot;geometry&quot; /&gt;&#10;        &lt;/mxCell&gt;&#10;        &lt;mxCell id=&quot;sZqi1VJqUI8cdP5_EVks-2&quot; value=&quot;&amp;lt;b style=&amp;quot;font-size: 20px;&amp;quot;&amp;gt;Origin&amp;lt;br&amp;gt;(0,0)&amp;lt;/b&amp;gt;&quot; style=&quot;text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;&quot; parent=&quot;1&quot; vertex=&quot;1&quot;&gt;&#10;          &lt;mxGeometry x=&quot;-100&quot; y=&quot;730&quot; width=&quot;60&quot; height=&quot;30&quot; as=&quot;geometry&quot; /&gt;&#10;        &lt;/mxCell&gt;&#10;        &lt;mxCell id=&quot;sZqi1VJqUI8cdP5_EVks-13&quot; value=&quot;&quot; style=&quot;group&quot; parent=&quot;1&quot; vertex=&quot;1&quot; connectable=&quot;0&quot;&gt;&#10;          &lt;mxGeometry x=&quot;610&quot; y=&quot;60&quot; width=&quot;180&quot; height=&quot;80&quot; as=&quot;geometry&quot; /&gt;&#10;        &lt;/mxCell&gt;&#10;        &lt;mxCell id=&quot;sZqi1VJqUI8cdP5_EVks-5&quot; value=&quot;&amp;lt;h1&amp;gt;Legend&amp;lt;/h1&amp;gt;&amp;lt;p&amp;gt;&amp;lt;br&amp;gt;&amp;lt;/p&amp;gt;&quot; style=&quot;text;html=1;strokeColor=default;fillColor=none;spacing=5;spacingTop=-20;whiteSpace=wrap;overflow=hidden;rounded=0;&quot; parent=&quot;sZqi1VJqUI8cdP5_EVks-13&quot; vertex=&quot;1&quot;&gt;&#10;          &lt;mxGeometry width=&quot;180&quot; height=&quot;80&quot; as=&quot;geometry&quot; /&gt;&#10;        &lt;/mxCell&gt;&#10;        &lt;mxCell id=&quot;sZqi1VJqUI8cdP5_EVks-6&quot; value=&quot;&quot; style=&quot;rounded=0;whiteSpace=wrap;html=1;fillColor=#f5f5f5;fontColor=#333333;strokeColor=#666666;&quot; parent=&quot;sZqi1VJqUI8cdP5_EVks-13&quot; vertex=&quot;1&quot;&gt;&#10;          &lt;mxGeometry x=&quot;9.473684210526317&quot; y=&quot;44.8&quot; width=&quot;28.42105263157894&quot; height=&quot;8&quot; as=&quot;geometry&quot; /&gt;&#10;        &lt;/mxCell&gt;&#10;        &lt;mxCell id=&quot;sZqi1VJqUI8cdP5_EVks-8&quot; value=&quot;&quot; style=&quot;rounded=0;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;&quot; parent=&quot;sZqi1VJqUI8cdP5_EVks-13&quot; vertex=&quot;1&quot;&gt;&#10;          &lt;mxGeometry x=&quot;9.473684210526317&quot; y=&quot;59.2&quot; width=&quot;28.42105263157894&quot; height=&quot;8&quot; as=&quot;geometry&quot; /&gt;&#10;        &lt;/mxCell&gt;&#10;        &lt;mxCell id=&quot;sZqi1VJqUI8cdP5_EVks-9&quot; value=&quot;Object Polygon&quot; style=&quot;text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;&quot; parent=&quot;sZqi1VJqUI8cdP5_EVks-13&quot; vertex=&quot;1&quot;&gt;&#10;          &lt;mxGeometry x=&quot;37.89473684210527&quot; y=&quot;36.8&quot; width=&quot;85.26315789473684&quot; height=&quot;24&quot; as=&quot;geometry&quot; /&gt;&#10;        &lt;/mxCell&gt;&#10;        &lt;mxCell id=&quot;sZqi1VJqUI8cdP5_EVks-10&quot; value=&quot;Used Bed Area&quot; style=&quot;text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;&quot; parent=&quot;sZqi1VJqUI8cdP5_EVks-13&quot; vertex=&quot;1&quot;&gt;&#10;          &lt;mxGeometry x=&quot;37.89473684210527&quot; y=&quot;51.199999999999996&quot; width=&quot;85.26315789473684&quot; height=&quot;24&quot; as=&quot;geometry&quot; /&gt;&#10;        &lt;/mxCell&gt;&#10;        &lt;mxCell id=&quot;sZqi1VJqUI8cdP5_EVks-1&quot; value=&quot;&quot; style=&quot;whiteSpace=wrap;html=1;aspect=fixed;fillColor=none;strokeWidth=4;strokeColor=#000000;&quot; parent=&quot;1&quot; vertex=&quot;1&quot;&gt;&#10;          &lt;mxGeometry x=&quot;-70&quot; y=&quot;60&quot; width=&quot;660&quot; height=&quot;660&quot; as=&quot;geometry&quot; /&gt;&#10;        &lt;/mxCell&gt;&#10;        &lt;mxCell id=&quot;rSL1Pw579-r8zTYxRfB7-24&quot; value=&quot;&quot; style=&quot;rounded=0;whiteSpace=wrap;html=1;fillColor=#eeeeee;strokeColor=#36393d;opacity=50;&quot; vertex=&quot;1&quot; parent=&quot;1&quot;&gt;&#10;          &lt;mxGeometry x=&quot;109&quot; y=&quot;431.5&quot; width=&quot;40&quot; height=&quot;100&quot; as=&quot;geometry&quot; /&gt;&#10;        &lt;/mxCell&gt;&#10;        &lt;mxCell id=&quot;rSL1Pw579-r8zTYxRfB7-25&quot; value=&quot;&quot; style=&quot;rounded=0;whiteSpace=wrap;html=1;fillColor=#eeeeee;strokeColor=#36393d;opacity=50;&quot; vertex=&quot;1&quot; parent=&quot;1&quot;&gt;&#10;          &lt;mxGeometry x=&quot;308&quot; y=&quot;430.5&quot; width=&quot;100&quot; height=&quot;100&quot; as=&quot;geometry&quot; /&gt;&#10;        &lt;/mxCell&gt;&#10;        &lt;mxCell id=&quot;rSL1Pw579-r8zTYxRfB7-35&quot; style=&quot;edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=1;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;endSize=2;&quot; edge=&quot;1&quot; parent=&quot;1&quot; source=&quot;rSL1Pw579-r8zTYxRfB7-25&quot; target=&quot;sZqi1VJqUI8cdP5_EVks-47&quot;&gt;&#10;          &lt;mxGeometry relative=&quot;1&quot; as=&quot;geometry&quot;&gt;&#10;            &lt;Array as=&quot;points&quot;&gt;&#10;              &lt;mxPoint x=&quot;390&quot; y=&quot;531&quot; /&gt;&#10;            &lt;/Array&gt;&#10;          &lt;/mxGeometry&gt;&#10;        &lt;/mxCell&gt;&#10;        &lt;mxCell id=&quot;sZqi1VJqUI8cdP5_EVks-32&quot; value=&quot;&quot; style=&quot;group&quot; parent=&quot;1&quot; vertex=&quot;1&quot; connectable=&quot;0&quot;&gt;&#10;          &lt;mxGeometry x=&quot;104&quot; y=&quot;320.5&quot; width=&quot;629&quot; height=&quot;427.5&quot; as=&quot;geometry&quot; /&gt;&#10;        &lt;/mxCell&gt;&#10;        &lt;mxCell id=&quot;sZqi1VJqUI8cdP5_EVks-31&quot; value=&quot;&quot; style=&quot;group&quot; parent=&quot;sZqi1VJqUI8cdP5_EVks-32&quot; vertex=&quot;1&quot; connectable=&quot;0&quot;&gt;&#10;          &lt;mxGeometry x=&quot;113&quot; width=&quot;133&quot; height=&quot;60&quot; as=&quot;geometry&quot; /&gt;&#10;        &lt;/mxCell&gt;&#10;        &lt;mxCell id=&quot;sZqi1VJqUI8cdP5_EVks-14&quot; value=&quot;&quot; style=&quot;rounded=0;whiteSpace=wrap;html=1;fillColor=#eeeeee;strokeColor=#36393d;opacity=50;rotation=90;&quot; parent=&quot;sZqi1VJqUI8cdP5_EVks-31&quot; vertex=&quot;1&quot;&gt;&#10;          &lt;mxGeometry x=&quot;84&quot; y=&quot;-95&quot; width=&quot;40&quot; height=&quot;100&quot; as=&quot;geometry&quot; /&gt;&#10;        &lt;/mxCell&gt;&#10;        &lt;mxCell id=&quot;sZqi1VJqUI8cdP5_EVks-26&quot; value=&quot;&quot; style=&quot;group&quot; parent=&quot;sZqi1VJqUI8cdP5_EVks-32&quot; vertex=&quot;1&quot; connectable=&quot;0&quot;&gt;&#10;          &lt;mxGeometry y=&quot;18&quot; width=&quot;629&quot; height=&quot;409.5&quot; as=&quot;geometry&quot; /&gt;&#10;        &lt;/mxCell&gt;&#10;        &lt;mxCell id=&quot;sZqi1VJqUI8cdP5_EVks-3&quot; value=&quot;&quot; style=&quot;rounded=0;whiteSpace=wrap;html=1;fillColor=#eeeeee;strokeColor=#36393d;opacity=50;&quot; parent=&quot;sZqi1VJqUI8cdP5_EVks-26&quot; vertex=&quot;1&quot;&gt;&#10;          &lt;mxGeometry x=&quot;5&quot; y=&quot;-31&quot; width=&quot;40&quot; height=&quot;100&quot; as=&quot;geometry&quot; /&gt;&#10;        &lt;/mxCell&gt;&#10;        &lt;mxCell id=&quot;sZqi1VJqUI8cdP5_EVks-29&quot; value=&quot;&quot; style=&quot;group&quot; parent=&quot;sZqi1VJqUI8cdP5_EVks-26&quot; vertex=&quot;1&quot; connectable=&quot;0&quot;&gt;&#10;          &lt;mxGeometry x=&quot;60&quot; y=&quot;32&quot; width=&quot;569&quot; height=&quot;377.5&quot; as=&quot;geometry&quot; /&gt;&#10;        &lt;/mxCell&gt;&#10;        &lt;mxCell id=&quot;sZqi1VJqUI8cdP5_EVks-15&quot; value=&quot;&quot; style=&quot;rounded=0;whiteSpace=wrap;html=1;fillColor=#eeeeee;strokeColor=#36393d;opacity=50;&quot; parent=&quot;sZqi1VJqUI8cdP5_EVks-29&quot; vertex=&quot;1&quot;&gt;&#10;          &lt;mxGeometry x=&quot;17&quot; y=&quot;-47&quot; width=&quot;100&quot; height=&quot;100&quot; as=&quot;geometry&quot; /&gt;&#10;        &lt;/mxCell&gt;&#10;        &lt;mxCell id=&quot;sZqi1VJqUI8cdP5_EVks-47&quot; value=&quot;&quot; style=&quot;ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#0050ef;strokeColor=#001DBC;fontColor=#ffffff;snapToPoint=1;direction=east;&quot; parent=&quot;sZqi1VJqUI8cdP5_EVks-29&quot; vertex=&quot;1&quot;&gt;&#10;          &lt;mxGeometry x=&quot;238.19075000000004&quot; y=&quot;153.49850000000004&quot; width=&quot;11.811&quot; height=&quot;11.81&quot; as=&quot;geometry&quot; /&gt;&#10;        &lt;/mxCell&gt;&#10;        &lt;mxCell id=&quot;sZqi1VJqUI8cdP5_EVks-45&quot; value=&quot;&quot; style=&quot;ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#0050ef;strokeColor=#001DBC;fontColor=#ffffff;snapToPoint=1;direction=east;&quot; parent=&quot;sZqi1VJqUI8cdP5_EVks-29&quot; vertex=&quot;1&quot;&gt;&#10;          &lt;mxGeometry x=&quot;133.00075000000004&quot; y=&quot;57.498500000000035&quot; width=&quot;11.811&quot; height=&quot;11.81&quot; as=&quot;geometry&quot; /&gt;&#10;        &lt;/mxCell&gt;&#10;        &lt;mxCell id=&quot;sZqi1VJqUI8cdP5_EVks-49&quot; value=&quot;&quot; style=&quot;ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#0050ef;strokeColor=#001DBC;fontColor=#ffffff;snapToPoint=1;direction=east;&quot; parent=&quot;sZqi1VJqUI8cdP5_EVks-26&quot; vertex=&quot;1&quot;&gt;&#10;          &lt;mxGeometry x=&quot;-0.8092499999999632&quot; y=&quot;186.49850000000004&quot; width=&quot;11.811&quot; height=&quot;11.81&quot; as=&quot;geometry&quot; /&gt;&#10;        &lt;/mxCell&gt;&#10;        &lt;mxCell id=&quot;sZqi1VJqUI8cdP5_EVks-44&quot; value=&quot;&quot; style=&quot;ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#0050ef;strokeColor=#001DBC;fontColor=#ffffff;snapToPoint=1;direction=east;&quot; parent=&quot;sZqi1VJqUI8cdP5_EVks-26&quot; vertex=&quot;1&quot;&gt;&#10;          &lt;mxGeometry x=&quot;98.19075000000004&quot; y=&quot;89.49850000000004&quot; width=&quot;11.811&quot; height=&quot;11.81&quot; as=&quot;geometry&quot; /&gt;&#10;        &lt;/mxCell&gt;&#10;        &lt;mxCell id=&quot;sZqi1VJqUI8cdP5_EVks-55&quot; style=&quot;edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;endSize=2;&quot; parent=&quot;sZqi1VJqUI8cdP5_EVks-26&quot; source=&quot;sZqi1VJqUI8cdP5_EVks-45&quot; target=&quot;sZqi1VJqUI8cdP5_EVks-44&quot; edge=&quot;1&quot;&gt;&#10;          &lt;mxGeometry relative=&quot;1&quot; as=&quot;geometry&quot; /&gt;&#10;        &lt;/mxCell&gt;&#10;        &lt;mxCell id=&quot;rSL1Pw579-r8zTYxRfB7-30&quot; value=&quot;&quot; style=&quot;ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#0050ef;strokeColor=#001DBC;fontColor=#ffffff;snapToPoint=1;direction=east;&quot; vertex=&quot;1&quot; parent=&quot;sZqi1VJqUI8cdP5_EVks-26&quot;&gt;&#10;          &lt;mxGeometry x=&quot;-0.8092499999999916&quot; y=&quot;-7.0014999999999645&quot; width=&quot;11.811&quot; height=&quot;11.81&quot; as=&quot;geometry&quot; /&gt;&#10;        &lt;/mxCell&gt;&#10;        &lt;mxCell id=&quot;rSL1Pw579-r8zTYxRfB7-39&quot; style=&quot;edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;endSize=2;&quot; edge=&quot;1&quot; parent=&quot;1&quot; source=&quot;sZqi1VJqUI8cdP5_EVks-41&quot; target=&quot;rSL1Pw579-r8zTYxRfB7-33&quot;&gt;&#10;          &lt;mxGeometry relative=&quot;1&quot; as=&quot;geometry&quot; /&gt;&#10;        &lt;/mxCell&gt;&#10;        &lt;mxCell id=&quot;sZqi1VJqUI8cdP5_EVks-41&quot; value=&quot;&quot; style=&quot;ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#0050ef;strokeColor=#001DBC;fontColor=#ffffff;snapToPoint=1;direction=east;&quot; parent=&quot;1&quot; vertex=&quot;1&quot;&gt;&#10;          &lt;mxGeometry x=&quot;403.19075000000004&quot; y=&quot;331.18850000000003&quot; width=&quot;11.811&quot; height=&quot;11.81&quot; as=&quot;geometry&quot; /&gt;&#10;        &lt;/mxCell&gt;&#10;        &lt;mxCell id=&quot;sZqi1VJqUI8cdP5_EVks-58&quot; style=&quot;edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;endSize=2;entryX=0;entryY=0.5;entryDx=0;entryDy=0;&quot; parent=&quot;1&quot; source=&quot;sZqi1VJqUI8cdP5_EVks-42&quot; target=&quot;sZqi1VJqUI8cdP5_EVks-41&quot; edge=&quot;1&quot;&gt;&#10;          &lt;mxGeometry relative=&quot;1&quot; as=&quot;geometry&quot;&gt;&#10;            &lt;mxPoint x=&quot;-150&quot; y=&quot;355.8837209302326&quot; as=&quot;targetPoint&quot; /&gt;&#10;          &lt;/mxGeometry&gt;&#10;        &lt;/mxCell&gt;&#10;        &lt;mxCell id=&quot;sZqi1VJqUI8cdP5_EVks-42&quot; value=&quot;&quot; style=&quot;ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#0050ef;strokeColor=#001DBC;fontColor=#ffffff;snapToPoint=1;direction=east;&quot; parent=&quot;1&quot; vertex=&quot;1&quot;&gt;&#10;          &lt;mxGeometry x=&quot;296.09075&quot; y=&quot;331.18850000000003&quot; width=&quot;11.811&quot; height=&quot;11.81&quot; as=&quot;geometry&quot; /&gt;&#10;        &lt;/mxCell&gt;&#10;        &lt;mxCell id=&quot;sZqi1VJqUI8cdP5_EVks-57&quot; style=&quot;edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;endSize=2;entryX=0;entryY=0.5;entryDx=0;entryDy=0;&quot; parent=&quot;1&quot; source=&quot;sZqi1VJqUI8cdP5_EVks-43&quot; target=&quot;sZqi1VJqUI8cdP5_EVks-42&quot; edge=&quot;1&quot;&gt;&#10;          &lt;mxGeometry relative=&quot;1&quot; as=&quot;geometry&quot;&gt;&#10;            &lt;mxPoint x=&quot;-190&quot; y=&quot;355.8837209302326&quot; as=&quot;targetPoint&quot; /&gt;&#10;          &lt;/mxGeometry&gt;&#10;        &lt;/mxCell&gt;&#10;        &lt;mxCell id=&quot;sZqi1VJqUI8cdP5_EVks-43&quot; value=&quot;&quot; style=&quot;ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#0050ef;strokeColor=#001DBC;fontColor=#ffffff;snapToPoint=1;direction=east;&quot; parent=&quot;1&quot; vertex=&quot;1&quot;&gt;&#10;          &lt;mxGeometry x=&quot;202.09075&quot; y=&quot;331.18850000000003&quot; width=&quot;11.811&quot; height=&quot;11.81&quot; as=&quot;geometry&quot; /&gt;&#10;        &lt;/mxCell&gt;&#10;        &lt;mxCell id=&quot;sZqi1VJqUI8cdP5_EVks-54&quot; style=&quot;edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;endSize=2;&quot; parent=&quot;1&quot; source=&quot;sZqi1VJqUI8cdP5_EVks-46&quot; target=&quot;sZqi1VJqUI8cdP5_EVks-45&quot; edge=&quot;1&quot;&gt;&#10;          &lt;mxGeometry relative=&quot;1&quot; as=&quot;geometry&quot; /&gt;&#10;        &lt;/mxCell&gt;&#10;        &lt;mxCell id=&quot;sZqi1VJqUI8cdP5_EVks-46&quot; value=&quot;&quot; style=&quot;ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#0050ef;strokeColor=#001DBC;fontColor=#ffffff;snapToPoint=1;direction=east;&quot; parent=&quot;1&quot; vertex=&quot;1&quot;&gt;&#10;          &lt;mxGeometry x=&quot;402.19075000000004&quot; y=&quot;428.34850000000006&quot; width=&quot;11.811&quot; height=&quot;11.81&quot; as=&quot;geometry&quot; /&gt;&#10;        &lt;/mxCell&gt;&#10;        &lt;mxCell id=&quot;sZqi1VJqUI8cdP5_EVks-53&quot; style=&quot;edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;endSize=2;&quot; parent=&quot;1&quot; source=&quot;sZqi1VJqUI8cdP5_EVks-47&quot; target=&quot;sZqi1VJqUI8cdP5_EVks-46&quot; edge=&quot;1&quot;&gt;&#10;          &lt;mxGeometry relative=&quot;1&quot; as=&quot;geometry&quot; /&gt;&#10;        &lt;/mxCell&gt;&#10;        &lt;mxCell id=&quot;rSL1Pw579-r8zTYxRfB7-34&quot; style=&quot;edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;startSize=1;endSize=2;&quot; edge=&quot;1&quot; parent=&quot;1&quot; source=&quot;sZqi1VJqUI8cdP5_EVks-48&quot; target=&quot;rSL1Pw579-r8zTYxRfB7-27&quot;&gt;&#10;          &lt;mxGeometry relative=&quot;1&quot; as=&quot;geometry&quot; /&gt;&#10;        &lt;/mxCell&gt;&#10;        &lt;mxCell id=&quot;sZqi1VJqUI8cdP5_EVks-48&quot; value=&quot;&quot; style=&quot;ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#0050ef;strokeColor=#001DBC;fontColor=#ffffff;snapToPoint=1;direction=east;&quot; parent=&quot;1&quot; vertex=&quot;1&quot;&gt;&#10;          &lt;mxGeometry x=&quot;202.09075&quot; y=&quot;524.9985&quot; width=&quot;11.811&quot; height=&quot;11.81&quot; as=&quot;geometry&quot; /&gt;&#10;        &lt;/mxCell&gt;&#10;        &lt;mxCell id=&quot;sZqi1VJqUI8cdP5_EVks-51&quot; style=&quot;edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;endSize=2;entryX=0;entryY=0.5;entryDx=0;entryDy=0;&quot; parent=&quot;1&quot; source=&quot;sZqi1VJqUI8cdP5_EVks-49&quot; target=&quot;sZqi1VJqUI8cdP5_EVks-48&quot; edge=&quot;1&quot;&gt;&#10;          &lt;mxGeometry relative=&quot;1&quot; as=&quot;geometry&quot;&gt;&#10;            &lt;mxPoint x=&quot;-190&quot; y=&quot;435.79999999999995&quot; as=&quot;targetPoint&quot; /&gt;&#10;          &lt;/mxGeometry&gt;&#10;        &lt;/mxCell&gt;&#10;        &lt;mxCell id=&quot;rSL1Pw579-r8zTYxRfB7-1&quot; value=&quot;&quot; style=&quot;group&quot; vertex=&quot;1&quot; connectable=&quot;0&quot; parent=&quot;1&quot;&gt;&#10;          &lt;mxGeometry x=&quot;96&quot; y=&quot;231.5&quot; width=&quot;133&quot; height=&quot;60&quot; as=&quot;geometry&quot; /&gt;&#10;        &lt;/mxCell&gt;&#10;        &lt;mxCell id=&quot;rSL1Pw579-r8zTYxRfB7-2&quot; value=&quot;&quot; style=&quot;rounded=0;whiteSpace=wrap;html=1;fillColor=#eeeeee;strokeColor=#36393d;opacity=50;rotation=90;&quot; vertex=&quot;1&quot; parent=&quot;rSL1Pw579-r8zTYxRfB7-1&quot;&gt;&#10;          &lt;mxGeometry x=&quot;43&quot; y=&quot;-20&quot; width=&quot;40&quot; height=&quot;100&quot; as=&quot;geometry&quot; /&gt;&#10;        &lt;/mxCell&gt;&#10;        &lt;mxCell id=&quot;rSL1Pw579-r8zTYxRfB7-31&quot; value=&quot;&quot; style=&quot;ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#0050ef;strokeColor=#001DBC;fontColor=#ffffff;snapToPoint=1;direction=east;&quot; vertex=&quot;1&quot; parent=&quot;rSL1Pw579-r8zTYxRfB7-1&quot;&gt;&#10;          &lt;mxGeometry x=&quot;8.00075000000001&quot; y=&quot;4.4985000000000355&quot; width=&quot;11.811&quot; height=&quot;11.81&quot; as=&quot;geometry&quot; /&gt;&#10;        &lt;/mxCell&gt;&#10;        &lt;mxCell id=&quot;rSL1Pw579-r8zTYxRfB7-27&quot; value=&quot;&quot; style=&quot;ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#0050ef;strokeColor=#001DBC;fontColor=#ffffff;snapToPoint=1;direction=east;&quot; vertex=&quot;1&quot; parent=&quot;1&quot;&gt;&#10;          &lt;mxGeometry x=&quot;296.09075&quot; y=&quot;524.9985&quot; width=&quot;11.811&quot; height=&quot;11.81&quot; as=&quot;geometry&quot; /&gt;&#10;        &lt;/mxCell&gt;&#10;        &lt;mxCell id=&quot;rSL1Pw579-r8zTYxRfB7-42&quot; style=&quot;edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;endSize=2;&quot; edge=&quot;1&quot; parent=&quot;1&quot; source=&quot;rSL1Pw579-r8zTYxRfB7-28&quot; target=&quot;rSL1Pw579-r8zTYxRfB7-31&quot;&gt;&#10;          &lt;mxGeometry relative=&quot;1&quot; as=&quot;geometry&quot; /&gt;&#10;        &lt;/mxCell&gt;&#10;        &lt;mxCell id=&quot;rSL1Pw579-r8zTYxRfB7-28&quot; value=&quot;&quot; style=&quot;ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#0050ef;strokeColor=#001DBC;fontColor=#ffffff;snapToPoint=1;direction=east;&quot; vertex=&quot;1&quot; parent=&quot;1&quot;&gt;&#10;          &lt;mxGeometry x=&quot;202.09075&quot; y=&quot;235.99850000000004&quot; width=&quot;11.811&quot; height=&quot;11.81&quot; as=&quot;geometry&quot; /&gt;&#10;        &lt;/mxCell&gt;&#10;        &lt;mxCell id=&quot;rSL1Pw579-r8zTYxRfB7-37&quot; style=&quot;edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;endSize=2;&quot; edge=&quot;1&quot; parent=&quot;1&quot; source=&quot;rSL1Pw579-r8zTYxRfB7-29&quot; target=&quot;rSL1Pw579-r8zTYxRfB7-30&quot;&gt;&#10;          &lt;mxGeometry relative=&quot;1&quot; as=&quot;geometry&quot; /&gt;&#10;        &lt;/mxCell&gt;&#10;        &lt;mxCell id=&quot;rSL1Pw579-r8zTYxRfB7-29&quot; value=&quot;&quot; style=&quot;ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#0050ef;strokeColor=#001DBC;fontColor=#ffffff;snapToPoint=1;direction=east;&quot; vertex=&quot;1&quot; parent=&quot;1&quot;&gt;&#10;          &lt;mxGeometry x=&quot;103.09075000000001&quot; y=&quot;427.99850000000004&quot; width=&quot;11.811&quot; height=&quot;11.81&quot; as=&quot;geometry&quot; /&gt;&#10;        &lt;/mxCell&gt;&#10;        &lt;mxCell id=&quot;rSL1Pw579-r8zTYxRfB7-41&quot; style=&quot;edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;endSize=2;&quot; edge=&quot;1&quot; parent=&quot;1&quot; source=&quot;rSL1Pw579-r8zTYxRfB7-32&quot; target=&quot;rSL1Pw579-r8zTYxRfB7-28&quot;&gt;&#10;          &lt;mxGeometry relative=&quot;1&quot; as=&quot;geometry&quot; /&gt;&#10;        &lt;/mxCell&gt;&#10;        &lt;mxCell id=&quot;rSL1Pw579-r8zTYxRfB7-32&quot; value=&quot;&quot; style=&quot;ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#0050ef;strokeColor=#001DBC;fontColor=#ffffff;snapToPoint=1;direction=east;&quot; vertex=&quot;1&quot; parent=&quot;1&quot;&gt;&#10;          &lt;mxGeometry x=&quot;296.09075&quot; y=&quot;235.99850000000004&quot; width=&quot;11.811&quot; height=&quot;11.81&quot; as=&quot;geometry&quot; /&gt;&#10;        &lt;/mxCell&gt;&#10;        &lt;mxCell id=&quot;rSL1Pw579-r8zTYxRfB7-40&quot; style=&quot;edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;endSize=2;&quot; edge=&quot;1&quot; parent=&quot;1&quot; source=&quot;rSL1Pw579-r8zTYxRfB7-33&quot; target=&quot;rSL1Pw579-r8zTYxRfB7-32&quot;&gt;&#10;          &lt;mxGeometry relative=&quot;1&quot; as=&quot;geometry&quot; /&gt;&#10;        &lt;/mxCell&gt;&#10;        &lt;mxCell id=&quot;rSL1Pw579-r8zTYxRfB7-33&quot; value=&quot;&quot; style=&quot;ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#0050ef;strokeColor=#001DBC;fontColor=#ffffff;snapToPoint=1;direction=east;&quot; vertex=&quot;1&quot; parent=&quot;1&quot;&gt;&#10;          &lt;mxGeometry x=&quot;403.19075&quot; y=&quot;235.99850000000004&quot; width=&quot;11.811&quot; height=&quot;11.81&quot; as=&quot;geometry&quot; /&gt;&#10;        &lt;/mxCell&gt;&#10;        &lt;mxCell id=&quot;rSL1Pw579-r8zTYxRfB7-36&quot; style=&quot;edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;endSize=2;&quot; edge=&quot;1&quot; parent=&quot;1&quot; source=&quot;sZqi1VJqUI8cdP5_EVks-44&quot; target=&quot;rSL1Pw579-r8zTYxRfB7-29&quot;&gt;&#10;          &lt;mxGeometry relative=&quot;1&quot; as=&quot;geometry&quot; /&gt;&#10;        &lt;/mxCell&gt;&#10;        &lt;mxCell id=&quot;rSL1Pw579-r8zTYxRfB7-38&quot; style=&quot;edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;endSize=2;&quot; edge=&quot;1&quot; parent=&quot;1&quot; source=&quot;rSL1Pw579-r8zTYxRfB7-30&quot; target=&quot;sZqi1VJqUI8cdP5_EVks-43&quot;&gt;&#10;          &lt;mxGeometry relative=&quot;1&quot; as=&quot;geometry&quot; /&gt;&#10;        &lt;/mxCell&gt;&#10;      &lt;/root&gt;&#10;    &lt;/mxGraphModel&gt;&#10;  &lt;/diagram&gt;&#10;&lt;/mxfile&gt;&#10;" style="background-color: rgb(255, 255, 255);"><defs/><g><rect x="209" y="191" width="300" height="290" fill-opacity="0.5" fill="#dae8fc" stroke="#6c8ebf" stroke-opacity="0.5" pointer-events="all"/><rect x="0" y="680" width="60" height="30" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 695px; margin-left: 1px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><b style="font-size: 20px;">Origin<br />(0,0)</b></div></div></div></foreignObject><text x="30" y="699" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">Origin...</text></switch></g><rect x="710" y="10" width="180" height="80" fill="none" stroke="rgb(0, 0, 0)" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-start; width: 172px; height: 1px; padding-top: 0px; margin-left: 715px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left; max-height: 90px; overflow: hidden;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><h1>Legend</h1><p><br /></p></div></div></div></foreignObject><text x="715" y="12" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px">Legend&#xa;</text></switch></g><rect x="719.47" y="54.8" width="28.42" height="8" fill="#f5f5f5" stroke="#666666" pointer-events="all"/><rect x="719.47" y="69.2" width="28.42" height="8" fill="#dae8fc" stroke="#6c8ebf" pointer-events="all"/><rect x="747.89" y="46.8" width="85.26" height="24" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 83px; height: 1px; padding-top: 59px; margin-left: 749px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Object Polygon</div></div></div></foreignObject><text x="791" y="62" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">Object Polygon</text></switch></g><rect x="747.89" y="61.2" width="85.26" height="24" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 83px; height: 1px; padding-top: 73px; margin-left: 749px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Used Bed Area</div></div></div></foreignObject><text x="791" y="77" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">Used Bed Area</text></switch></g><rect x="30" y="10" width="660" height="660" fill="none" stroke="#000000" stroke-width="4" pointer-events="all"/><rect x="209" y="381.5" width="40" height="100" fill-opacity="0.5" fill="#eeeeee" stroke="#36393d" stroke-opacity="0.5" pointer-events="all"/><rect x="408" y="380.5" width="100" height="100" fill-opacity="0.5" fill="#eeeeee" stroke="#36393d" stroke-opacity="0.5" pointer-events="all"/><path d="M 408 480.5 L 490 480.5 L 498.83 480.07" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 501.07 479.96 L 498.15 481.6 L 498.83 480.07 L 498 478.61 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><rect x="401" y="175.5" width="40" height="100" fill-opacity="0.5" fill="#eeeeee" stroke="#36393d" stroke-opacity="0.5" transform="rotate(90,421,225.5)" pointer-events="all"/><rect x="209" y="257.5" width="40" height="100" fill-opacity="0.5" fill="#eeeeee" stroke="#36393d" stroke-opacity="0.5" pointer-events="all"/><rect x="281" y="273.5" width="100" height="100" fill-opacity="0.5" fill="#eeeeee" stroke="#36393d" stroke-opacity="0.5" pointer-events="all"/><ellipse cx="508.1" cy="479.9" rx="5.9055" ry="5.905" fill="#0050ef" stroke="#001dbc" pointer-events="all"/><ellipse cx="402.91" cy="383.9" rx="5.9055" ry="5.905" fill="#0050ef" stroke="#001dbc" pointer-events="all"/><ellipse cx="209.1" cy="480.9" rx="5.9055" ry="5.905" fill="#0050ef" stroke="#001dbc" pointer-events="all"/><ellipse cx="308.1" cy="383.9" rx="5.9055" ry="5.905" fill="#0050ef" stroke="#001dbc" pointer-events="all"/><path d="M 397 383.9 L 317.37 383.9" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 315.12 383.9 L 318.12 382.4 L 317.37 383.9 L 318.12 385.4 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><ellipse cx="209.1" cy="287.4" rx="5.9055" ry="5.905" fill="#0050ef" stroke="#001dbc" pointer-events="all"/><path d="M 509.1 281.19 L 509.1 201.18" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 509.1 198.93 L 510.6 201.93 L 509.1 201.18 L 507.6 201.93 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><ellipse cx="509.1" cy="287.09" rx="5.9055" ry="5.905" fill="#0050ef" stroke="#001dbc" pointer-events="all"/><path d="M 407.9 287.09 L 499.82 287.09" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 502.07 287.09 L 499.07 288.59 L 499.82 287.09 L 499.07 285.59 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><ellipse cx="402" cy="287.09" rx="5.9055" ry="5.905" fill="#0050ef" stroke="#001dbc" pointer-events="all"/><path d="M 313.9 287.09 L 392.72 287.09" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 394.97 287.09 L 391.97 288.59 L 392.72 287.09 L 391.97 285.59 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><ellipse cx="308" cy="287.09" rx="5.9055" ry="5.905" fill="#0050ef" stroke="#001dbc" pointer-events="all"/><path d="M 502.19 384.25 L 455.5 384.3 L 412.18 383.93" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 409.93 383.91 L 412.94 382.44 L 412.18 383.93 L 412.92 385.44 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><ellipse cx="508.1" cy="384.25" rx="5.9055" ry="5.905" fill="#0050ef" stroke="#001dbc" pointer-events="all"/><path d="M 508.1 474 L 508.1 393.53" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 508.1 391.28 L 509.6 394.28 L 508.1 393.53 L 506.6 394.28 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><path d="M 313.9 480.9 L 392.72 480.9" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 394.97 480.9 L 391.97 482.4 L 392.72 480.9 L 391.97 479.4 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><ellipse cx="308" cy="480.9" rx="5.9055" ry="5.905" fill="#0050ef" stroke="#001dbc" pointer-events="all"/><path d="M 215 480.9 L 298.72 480.9" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 300.97 480.9 L 297.97 482.4 L 298.72 480.9 L 297.97 479.4 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><rect x="239" y="161.5" width="40" height="100" fill-opacity="0.5" fill="#eeeeee" stroke="#36393d" stroke-opacity="0.5" transform="rotate(90,259,211.5)" pointer-events="all"/><ellipse cx="209.91" cy="191.9" rx="5.9055" ry="5.905" fill="#0050ef" stroke="#001dbc" pointer-events="all"/><ellipse cx="402" cy="480.9" rx="5.9055" ry="5.905" fill="#0050ef" stroke="#001dbc" pointer-events="all"/><path d="M 302.09 191.9 L 219.18 191.9" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 216.93 191.9 L 219.93 190.4 L 219.18 191.9 L 219.93 193.4 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><ellipse cx="308" cy="191.9" rx="5.9055" ry="5.905" fill="#0050ef" stroke="#001dbc" pointer-events="all"/><path d="M 209 378 L 209 335.7 L 209.09 296.68" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 209.09 294.43 L 210.59 297.43 L 209.09 296.68 L 207.59 297.42 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><ellipse cx="209" cy="383.9" rx="5.9055" ry="5.905" fill="#0050ef" stroke="#001dbc" pointer-events="all"/><path d="M 396.09 191.9 L 317.27 191.9" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 315.02 191.9 L 318.02 190.4 L 317.27 191.9 L 318.02 193.4 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><ellipse cx="402" cy="191.9" rx="5.9055" ry="5.905" fill="#0050ef" stroke="#001dbc" pointer-events="all"/><path d="M 503.19 191.9 L 411.27 191.9" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 409.02 191.9 L 412.02 190.4 L 411.27 191.9 L 412.02 193.4 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><ellipse cx="509.1" cy="191.9" rx="5.9055" ry="5.905" fill="#0050ef" stroke="#001dbc" pointer-events="all"/><path d="M 302.19 383.9 L 218.27 383.9" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 216.02 383.9 L 219.02 382.4 L 218.27 383.9 L 219.02 385.4 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><path d="M 215 287.4 L 258.6 287.4 L 298.72 287.12" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 300.97 287.1 L 297.98 288.62 L 298.72 287.12 L 297.96 285.62 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/></g><switch><g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/><a transform="translate(0,-5)" xlink:href="https://www.drawio.com/doc/faq/svg-export-text-problems" target="_blank"><text text-anchor="middle" font-size="10px" x="50%" y="100%">Text is not SVG - cannot display</text></a></switch></svg>
\ No newline at end of file
diff --git a/docs/img/adaptive_bed_mesh_margin.svg b/docs/img/adaptive_bed_mesh_margin.svg
new file mode 100644
index 000000000..6c6216d04
--- /dev/null
+++ b/docs/img/adaptive_bed_mesh_margin.svg
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Do not edit this file with editors other than draw.io -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="901px" height="719px" viewBox="-0.5 -0.5 901 719" content="&lt;mxfile host=&quot;app.diagrams.net&quot; modified=&quot;2023-10-09T16:08:10.185Z&quot; agent=&quot;Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36&quot; etag=&quot;9oU6p2ILMxrigHTZD8KX&quot; version=&quot;22.0.3&quot; type=&quot;device&quot;&gt;&lt;diagram name=&quot;Page-1&quot; id=&quot;9aYWBSPtCap1D5Vuddur&quot;&gt;7Vxbc9o4FP41zKQPYXSxjP0YSPY27bQzabvtvuwYLIwbx6LGNGR//Uq2fEMyKBQDKbgzjX1ky+Z85/vOkWTo4dHj6vfEm8/eMZ9GPQT8VQ/f9hCCtmvzP8LynFssm+SGIAl9eVJluA//o9IIpHUZ+nTRODFlLErDedM4YXFMJ2nD5iUJe2qeNmVR865zL6CK4X7iRar179BPZ7nVIaCy/0HDYFbcGQLZMvYmD0HClrG8Xw/habblzY9e0Zc8fzHzfPZUM+G7Hh4ljKX53uNqRCPh28Jt+XW/tbSWz53QODW5YPHP9xB+/uv7pz+dif+B/Hv3+WFxjfJefnjRkhYfw454f8OxeOT0WbrJ/r4Uzzmcsji9XmQg3vAT+P15IAyrdr4XiL/vkzAI47KvpLBf8WccgTdFA3/acdEkvVTeEqV0Jeyz9DHiBsh3F2nCHuiIRSzhlpjFVDxSGEVrJi8Kg5gfTrhrKLcPf9AkDTnmN7LhMfR9cZvh0yxM6f3cm4h7PvEI57YMUyq8BsrHEh3QVavnYYkn5wlljzRNnvkp8oLrMmYkRwZYHj9VEWdL06wWbMVpnozxoOy6wpnvSKhfADvEGtzX3C9ie9766SUdvXFxOnipV2zYdIqt+gS6GqeUzty7V0grGWawiNK3NKCc8VX8Vk2Fcb5uqMK/dt1857j36dRbZt1oQn/BYzmMA24g1dFHxuP69hqBlohnHOBplInTjDODxruxYEOoqVFwPJjt7bHf/PA6l9XQqaMgkgAR/6RW1uz5pqDJW+xs68TLRTdNqlkq1bAWgo4QcLpFwPeoM51oPT1x6Hh6QE8T57iedhVPvx9/E2UUAh9Y9Byw+DWn3V0AspoAaTKxTo26y8RAQejTgnsBgWH2/01CvTOHyFI5dFiIYMdyRajjWzq5ctAYHzQxDMhx5Qqq45Eb35unNUK8o4vZhRdZwayCBa2DEmM7L7YwwVvM8zH9NFwJ/2kr2gzCYmyu5QnItj0N1gZbhyW2bqxWGvfuZqwWrFdCAEcD8uY1U2AzDhCSZhYoJpqONWbGAxUGKO424qz7hYHAyG4AgRzruEBAFYiTzMdb4ttqxjcGTl8V9DLVNtKvC4tT9+/cjkfHBmMzJiYtUuEWsi8tWdN0rKn6oS6GIUFdqYla6Sh+7noGDgKr6RYENCFoI1d1jIUGnYUgNqgrft41G1DZkJOwGjcYa4qBzrTP6paeNNt09MQ2drGv0jNhqZeGTOQl9+eqX7w5Wi3cCNZrpHJYV/12N4+IdNNY+fyumPrrGayfwLb1kyuIiKgsMKmvleTdvv7lkl3gd1Xq6eB2uxIldZ5mf2C7GdYInD3WxawpPCrWyKAGOnACko6B6lSYPj0Dt7v0fGoZaPcwzIFuX6FsDnyKyamjJRzYZcIRJcvIPR8J2oK9tYa9IfhdSRJUF3L2mH6ySQx8wV5246gzTQdNPzqsD5N+tgni2jBa5QSxNdkID7obLELdSxuvNR25L0pHapFUpp4DDYDaX5jZU03snJEmbQZfyUdYM1VzUJXSzcLuefQLL/CXs8XHzUmWwZw77yacL9ocZbrqly3nEUCnOs0FAN4ORz3l3Sr54i2/IvbmH9kHFmbOFjfzw4TfLJ+got4i7RQlh/ShCwYEyK05vwoR7luuU7YCdSEFwr5TCHtDxIW9K2wNUugFWwf2OWJt0CKniSzWrM0fA1qDUvIcoN1c1mJrI2uJfZKsNVgJuEC7GVobnCRrCVGR9AN6Lw9Zks5YwGIvuqusa4VIdc5blr38LRz/jabps/wGjrdMWTMG6CpMv8jLxf5Xsd8n8uh2VWu6fS4OYv55vxQdiIPaVeKwuiw7qq4rvgmESvTFR9wFe+4ntkwm1CDDpV4S0E095qRSoymhkZeGP5rPt39KGyx8/lqU3vLmieVuYi8GqA+dOn1Pg73OMdkLX8TeOgtLLoOXcdmAvdCUp8iUpy2BY8xTeWkew7UvapG1GS5C+o6DBwi4PNrKN6GKHvPnlJ2shU35VD+hB+iiB3U9QJbVB0IPXoUMDC4ysKsMYFMZQB3JgHtSMmCw4npOMgCx+4pkwFaxOmAtX1L/a535m2v5Gte/1kv7fdXyxjJgmcpAy9cmDlO1E+uoCJ/iaM0YYdsUYXJMhC2D94HOSYC3jctcp4+tmhKrSxdHUWJ8UeJdeTow5WnLbNyBlFhDy0vJbYawY4rwoKOSe23kbWHSH7i1be0Fkq5rboOfKDgnydcPvS3X6runtzRSvD580YGX64BrqgNORzrgHkgH+GH121v56dUPnOG7/wE=&lt;/diagram&gt;&lt;/mxfile&gt;" style="background-color: rgb(255, 255, 255);"><defs/><g><rect x="0" y="680" width="60" height="30" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 695px; margin-left: 1px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><b style="font-size: 20px;">Origin<br />(0,0)</b></div></div></div></foreignObject><text x="30" y="699" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">Origin...</text></switch></g><rect x="710" y="10" width="190" height="100" fill="none" stroke="rgb(0, 0, 0)" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe flex-start; width: 182px; height: 1px; padding-top: 0px; margin-left: 715px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: left; max-height: 110px; overflow: hidden;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><h1>Legend</h1><p><br /></p></div></div></div></foreignObject><text x="715" y="12" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px">Legend&#xa;</text></switch></g><rect x="720" y="50" width="30" height="10" fill="#f5f5f5" stroke="#666666" pointer-events="all"/><rect x="720" y="68" width="30" height="10" fill="#dae8fc" stroke="#6c8ebf" pointer-events="all"/><rect x="750" y="40" width="90" height="30" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 88px; height: 1px; padding-top: 55px; margin-left: 751px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Object Polygon</div></div></div></foreignObject><text x="795" y="59" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">Object Polygon</text></switch></g><rect x="750" y="58" width="90" height="30" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 88px; height: 1px; padding-top: 73px; margin-left: 751px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Used Bed Area</div></div></div></foreignObject><text x="795" y="77" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">Used Bed Area</text></switch></g><rect x="720" y="85" width="30" height="10" fill="#d5e8d4" stroke="#82b366" pointer-events="all"/><rect x="750" y="75" width="140" height="30" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 138px; height: 1px; padding-top: 90px; margin-left: 751px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Adapted Bed Mesh Area</div></div></div></foreignObject><text x="820" y="94" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">Adapted Bed Mesh Area</text></switch></g><rect x="30" y="10" width="660" height="660" fill="none" stroke="#000000" stroke-width="4" pointer-events="all"/><rect x="215" y="446" width="60" height="30" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 461px; margin-left: 216px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">(90,75)</div></div></div></foreignObject><text x="245" y="465" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">(90,75)</text></switch></g><rect x="426" y="234" width="60" height="30" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 249px; margin-left: 427px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">(130,140)</div></div></div></foreignObject><text x="456" y="253" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">(130,140)</text></switch></g><rect x="245" y="258.5" width="210" height="191.5" fill="#d5e8d4" stroke="#82b366" pointer-events="all"/><rect x="270" y="280" width="160" height="152" fill-opacity="0.5" fill="#dae8fc" stroke="#6c8ebf" stroke-opacity="0.5" pointer-events="all"/><rect x="360" y="250.5" width="40" height="100" fill-opacity="0.5" fill="#eeeeee" stroke="#36393d" stroke-opacity="0.5" transform="rotate(90,380,300.5)" pointer-events="all"/><rect x="410" y="270.5" width="40" height="9" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 38px; height: 1px; padding-top: 275px; margin-left: 411px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><font style="font-size: 10px;">(125,135)</font></div></div></div></foreignObject><text x="430" y="279" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">(125,1...</text></switch></g><rect x="317" y="321.5" width="40" height="9" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 38px; height: 1px; padding-top: 326px; margin-left: 318px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><font style="font-size: 10px;">(95,120)</font></div></div></div></foreignObject><text x="337" y="330" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">(95,12...</text></switch></g><rect x="270" y="300.5" width="40" height="100" fill-opacity="0.5" fill="#eeeeee" stroke="#36393d" stroke-opacity="0.5" pointer-events="all"/><rect x="250" y="400.5" width="40" height="9" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 38px; height: 1px; padding-top: 405px; margin-left: 251px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><font style="font-size: 10px;">(60,90)</font></div></div></div></foreignObject><text x="270" y="409" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">(60,90)</text></switch></g><rect x="290" y="288.5" width="40" height="9" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 38px; height: 1px; padding-top: 293px; margin-left: 291px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><font style="font-size: 10px;">(90,130)</font></div></div></div></foreignObject><text x="310" y="297" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">(90,13...</text></switch></g><rect x="330" y="331.5" width="100" height="100" fill-opacity="0.5" fill="#eeeeee" stroke="#36393d" stroke-opacity="0.5" pointer-events="all"/><rect x="310" y="434" width="40" height="9" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 38px; height: 1px; padding-top: 439px; margin-left: 311px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><font style="font-size: 10px;">(95,80)</font></div></div></div></foreignObject><text x="330" y="442" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">(95,80)</text></switch></g><rect x="410" y="320.5" width="40" height="9" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 38px; height: 1px; padding-top: 325px; margin-left: 411px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><font style="font-size: 10px;">(125,110)</font></div></div></div></foreignObject><text x="430" y="329" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">(125,1...</text></switch></g><ellipse cx="455.1" cy="449.9" rx="5.905499999999999" ry="5.905" fill="#0050ef" stroke="#001dbc" pointer-events="all"/><ellipse cx="350.91" cy="354.9" rx="5.905499999999999" ry="5.905" fill="#0050ef" stroke="#001dbc" pointer-events="all"/><ellipse cx="244.1" cy="450.9" rx="5.905499999999999" ry="5.905" fill="#0050ef" stroke="#001dbc" pointer-events="all"/><ellipse cx="244.1" cy="354.9" rx="5.905499999999999" ry="5.905" fill="#0050ef" stroke="#001dbc" pointer-events="all"/><path d="M 345 354.9 L 253.37 354.9" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 251.12 354.9 L 254.12 353.4 L 253.37 354.9 L 254.12 356.4 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><ellipse cx="455.1" cy="258.09" rx="5.905499999999999" ry="5.905" fill="#0050ef" stroke="#001dbc" pointer-events="all"/><path d="M 355.9 258.09 L 445.82 258.09" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 448.07 258.09 L 445.07 259.59 L 445.82 258.09 L 445.07 256.59 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><ellipse cx="350" cy="258.09" rx="5.905499999999999" ry="5.905" fill="#0050ef" stroke="#001dbc" pointer-events="all"/><path d="M 250.9 258.09 L 340.72 258.09" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 342.97 258.09 L 339.97 259.59 L 340.72 258.09 L 339.97 256.59 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><ellipse cx="245" cy="258.09" rx="5.905499999999999" ry="5.905" fill="#0050ef" stroke="#001dbc" pointer-events="all"/><path d="M 244.1 349 L 244.11 306.49 L 244.93 267.37" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 244.97 265.12 L 246.41 268.15 L 244.93 267.37 L 243.41 268.08 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><path d="M 449.19 354.25 L 403.03 354.31 L 360.18 354.86" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 357.93 354.89 L 360.91 353.35 L 360.18 354.86 L 360.95 356.35 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><ellipse cx="455.1" cy="354.25" rx="5.905499999999999" ry="5.905" fill="#0050ef" stroke="#001dbc" pointer-events="all"/><path d="M 455.1 444 L 455.1 363.53" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 455.1 361.28 L 456.6 364.28 L 455.1 363.53 L 453.6 364.28 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><path d="M 355.9 450.9 L 402.57 450.89 L 445.82 449.97" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 448.07 449.93 L 445.11 451.49 L 445.82 449.97 L 445.04 448.49 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><ellipse cx="350" cy="450.9" rx="5.905499999999999" ry="5.905" fill="#0050ef" stroke="#001dbc" pointer-events="all"/><path d="M 250 450.9 L 340.72 450.9" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 342.97 450.9 L 339.97 452.4 L 340.72 450.9 L 339.97 449.4 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/></g><switch><g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/><a transform="translate(0,-5)" xlink:href="https://www.drawio.com/doc/faq/svg-export-text-problems" target="_blank"><text text-anchor="middle" font-size="10px" x="50%" y="100%">Text is not SVG - cannot display</text></a></switch></svg>
\ No newline at end of file
diff --git a/klippy/extras/bed_mesh.py b/klippy/extras/bed_mesh.py
index 6c714304f..9e30846f0 100644
--- a/klippy/extras/bed_mesh.py
+++ b/klippy/extras/bed_mesh.py
@@ -1,6 +1,5 @@
 # Mesh Bed Leveling
 #
-# Copyright (C) 2018  Kevin O'Connor <kevin@koconnor.net>
 # Copyright (C) 2018-2019 Eric Callahan <arksine.code@gmail.com>
 #
 # This file may be distributed under the terms of the GNU GPLv3 license.
@@ -291,6 +290,7 @@ class BedMeshCalibrate:
         self.orig_config = {'radius': None, 'origin': None}
         self.radius = self.origin = None
         self.mesh_min = self.mesh_max = (0., 0.)
+        self.adaptive_margin = config.getfloat('adaptive_margin', 0.0)
         self.zero_ref_pos = config.getfloatlist(
             "zero_reference_position", None, count=2
         )
@@ -573,6 +573,113 @@ class BedMeshCalibrate:
                     "interpolation. Configured Probe Count: %d, %d" %
                     (self.mesh_config['x_count'], self.mesh_config['y_count']))
                 params['algo'] = 'lagrange'
+    def set_adaptive_mesh(self, gcmd):
+        if not gcmd.get_int('ADAPTIVE', 0):
+            return False
+        exclude_objects = self.printer.lookup_object("exclude_object", None)
+        if exclude_objects is None:
+            gcmd.respond_info("Exclude objects not enabled. Using full mesh...")
+            return False
+        objects = exclude_objects.get_status().get("objects", [])
+        if not objects:
+            return False
+        margin = gcmd.get_float('ADAPTIVE_MARGIN', self.adaptive_margin)
+
+        # List all exclude_object points by axis and iterate over
+        # all polygon points, and pick the min and max or each axis
+        list_of_xs = []
+        list_of_ys = []
+        gcmd.respond_info("Found %s objects" % (len(objects)))
+        for obj in objects:
+            for point in obj["polygon"]:
+                list_of_xs.append(point[0])
+                list_of_ys.append(point[1])
+
+        # Define bounds of adaptive mesh area
+        mesh_min = [min(list_of_xs), min(list_of_ys)]
+        mesh_max = [max(list_of_xs), max(list_of_ys)]
+        adjusted_mesh_min = [x - margin for x in mesh_min]
+        adjusted_mesh_max = [x + margin for x in mesh_max]
+
+        # Force margin to respect original mesh bounds
+        adjusted_mesh_min[0] = max(adjusted_mesh_min[0],
+                                   self.orig_config["mesh_min"][0])
+        adjusted_mesh_min[1] = max(adjusted_mesh_min[1],
+                                   self.orig_config["mesh_min"][1])
+        adjusted_mesh_max[0] = min(adjusted_mesh_max[0],
+                                   self.orig_config["mesh_max"][0])
+        adjusted_mesh_max[1] = min(adjusted_mesh_max[1],
+                                   self.orig_config["mesh_max"][1])
+
+        adjusted_mesh_size = (adjusted_mesh_max[0] - adjusted_mesh_min[0],
+                              adjusted_mesh_max[1] - adjusted_mesh_min[1])
+
+        # Compute a ratio between the adapted and original sizes
+        ratio = (adjusted_mesh_size[0] /
+                 (self.orig_config["mesh_max"][0] -
+                  self.orig_config["mesh_min"][0]),
+                 adjusted_mesh_size[1] /
+                 (self.orig_config["mesh_max"][1] -
+                  self.orig_config["mesh_min"][1]))
+
+        gcmd.respond_info("Original mesh bounds: (%s,%s)" %
+                          (self.orig_config["mesh_min"],
+                           self.orig_config["mesh_max"]))
+        gcmd.respond_info("Original probe count: (%s,%s)" %
+                          (self.mesh_config["x_count"],
+                           self.mesh_config["y_count"]))
+        gcmd.respond_info("Adapted mesh bounds: (%s,%s)" %
+                          (adjusted_mesh_min, adjusted_mesh_max))
+        gcmd.respond_info("Ratio: (%s, %s)" % ratio)
+
+        new_x_probe_count = int(
+            math.ceil(self.mesh_config["x_count"] * ratio[0]))
+        new_y_probe_count = int(
+        math.ceil(self.mesh_config["y_count"] * ratio[1]))
+
+        # There is one case, where we may have to adjust the probe counts:
+        # axis0 < 4 and axis1 > 6 (see _verify_algorithm).
+        min_num_of_probes = 3
+        if max(new_x_probe_count, new_y_probe_count) > 6 and \
+           min(new_x_probe_count, new_y_probe_count) < 4:
+            min_num_of_probes = 4
+
+        new_x_probe_count = max(min_num_of_probes, new_x_probe_count)
+        new_y_probe_count = max(min_num_of_probes, new_y_probe_count)
+
+        gcmd.respond_info("Adapted probe count: (%s,%s)" %
+                          (new_x_probe_count, new_y_probe_count))
+
+        # If the adapted mesh size is too small, adjust it to something
+        # useful.
+        adjusted_mesh_size = (max(adjusted_mesh_size[0], new_x_probe_count),
+                              max(adjusted_mesh_size[1], new_y_probe_count))
+
+        if self.radius is not None:
+            adapted_radius = math.sqrt((adjusted_mesh_size[0] ** 2) +
+                                       (adjusted_mesh_size[1] ** 2)) / 2
+            adapted_origin = (adjusted_mesh_min[0] +
+                              (adjusted_mesh_size[0] / 2),
+                              adjusted_mesh_min[1] +
+                              (adjusted_mesh_size[1] / 2))
+            to_adapted_origin = math.sqrt(adapted_origin[0]**2 +
+                                          adapted_origin[1]**2)
+            # If the adapted mesh size is smaller than the default/full
+            # mesh, adjust the parameters. Otherwise, just do the full mesh.
+            if adapted_radius + to_adapted_origin < self.radius:
+                self.radius = adapted_radius
+                self.origin = adapted_origin
+                self.mesh_min = (-self.radius, -self.radius)
+                self.mesh_max = (self.radius, self.radius)
+                self.mesh_config["x_count"] = self.mesh_config["y_count"] = \
+                        max(new_x_probe_count, new_y_probe_count)
+        else:
+            self.mesh_min = adjusted_mesh_min
+            self.mesh_max = adjusted_mesh_max
+            self.mesh_config["x_count"] = new_x_probe_count
+            self.mesh_config["y_count"] = new_y_probe_count
+        self._profile_name = None
+        return True
     def update_config(self, gcmd):
         # reset default configuration
         self.radius = self.orig_config['radius']
@@ -616,6 +723,8 @@ class BedMeshCalibrate:
             self.mesh_config['algo'] = gcmd.get('ALGORITHM').strip().lower()
             need_cfg_update = True
 
+        need_cfg_update |= self.set_adaptive_mesh(gcmd)
+
         if need_cfg_update:
             self._verify_algorithm(gcmd.error)
             self._generate_points(gcmd.error)
@@ -781,7 +890,8 @@ class BedMeshCalibrate:
             z_mesh.set_zero_reference(*self.zero_ref_pos)
         self.bedmesh.set_mesh(z_mesh)
         self.gcode.respond_info("Mesh Bed Leveling Complete")
-        self.bedmesh.save_profile(self._profile_name)
+        if self._profile_name is not None:
+            self.bedmesh.save_profile(self._profile_name)
     def _dump_points(self, probed_pts, corrected_pts, offsets):
         # logs generated points with offset applied, points received
         # from the finalize callback, and the list of corrected points