Skip to content

Commit

Permalink
bed_mesh_fast: Disable on RELATIVE_REFERENCE_INDEX
Browse files Browse the repository at this point in the history
  • Loading branch information
jschuh committed Oct 26, 2022
1 parent a252570 commit 650e0ea
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ with g-code targeting Marlin printers. However, there are also some nice extras:
provided a much easier way to customize materials in the LCD menu (or at least
I think so). I've also added confirmation dialogs for commands that would
abort an active print.
* **[Optimized mesh bed leveling](#bed-mesh-improvements)** - Probes only within the
printed area, which can save a lot of time on smaller prints.
* **[Optimized mesh bed leveling](#bed-mesh-improvements)** - Probes only within
the printed area, which can save a lot of time on smaller prints.

## A few warnings...

Expand Down Expand Up @@ -267,6 +267,11 @@ The following additional configuration options are available from

> **Note:** See the [optional section](#bed-mesh) for additional macros.
> **Note:** The bed mesh optimizations are silently disabled for delta printers
(because jinja2 lacks the necessary math support) and when the mesh parameters
include a [`RELATIVE_REFERENCE_INDEX`](https://www.klipper3d.org/Bed_Mesh.html#the-relative-reference-index)
(which is cinompatible with dynamic mesh generation).

`BED_MESH_CHECK`

Checks the `[bed_mesh]` config and warns if `mesh_min` or `mesh_max` could allow
Expand Down
8 changes: 6 additions & 2 deletions bed_mesh_fast.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@ gcode:
{% set probe_count_scale = km.probe_count_scale %}
{% set bed_mesh = printer.configfile.config.bed_mesh %}

# Don't have the math functions available to work on a delta bed.
{%if "mesh_radius" not in bed_mesh %}
# Don't have the math functions available to work on a delta bed, and
# not sure how to make relative reference index work.
{%if "mesh_radius" not in bed_mesh and
"MESH_RADIUS" not in params and
"relative_reference_index" not in bed_mesh and
"RELATIVE_REFERENCE_INDEX" not in params %}
{% set safe_min_x = bed_mesh.mesh_min.split(",")[0]|float %}
{% set safe_min_y = bed_mesh.mesh_min.split(",")[1]|float %}
{% set safe_max_x = bed_mesh.mesh_max.split(",")[0]|float %}
Expand Down

0 comments on commit 650e0ea

Please sign in to comment.