Hello,
I got a notification from klipper:
Option 'relative_reference_index' in section 'bed_mesh' is deprecated and will be removed in a future release.
Got a Voron 2.4 350. When I installed Adaptiver Meshing and Purge, I couldn't get Kamp to work, so I installed it directly in printer.cfg. Works nicely and I'm very happy with it.
What are the implications of the notification above? I read the discord, but didn't understand it, sorry. Do I have to clean up printer.cfg and retry to install Kamp or should I just replace "relative _reference_index" with zero_reference_position?
Thank you
[bed_mesh]
speed: 300
horizontal_move_z: 10
##--------------------------------------------------------------------
## Uncomment below for 250mm build
#mesh_min: 40, 40
#mesh_max: 210,210
## Uncomment for 300mm build
#mesh_min: 40, 40
#mesh_max: 260,260
## Uncomment for 350mm build
mesh_min: 40, 40
mesh_max: 310,310
##--------------------------------------------------------------------
fade_start: 0.6
fade_end: 10.0
probe_count: 9,9 # Values should be odd, so one point is directly at bed center
algorithm: bicubic
relative_reference_index: 40 # Update when changing probe_count, to ((x points * y points) - 1) / 2. (the center point)
# # # Klipper Adaptive Meshing # # #
# Heads up! If you have any other BED_MESH_CALIBRATE macros defined elsewhere in your config, you will need to comment out / remove them for this to work. (Klicky/Euclid Probe)
# You will also need to be sure that [exclude_object] is defined in printer.cfg, and your slicer is labeling objects.
# This macro will parse information from objects in your gcode to define a min and max mesh area to probe, creating an adaptive mesh!
# This macro will not increase probe_count values in your [bed_mesh] config. If you want richer meshes, be sure to increase probe_count. We recommend at least 5,5.
[gcode_macro BED_MESH_CALIBRATE]
rename_existing: _BED_MESH_CALIBRATE
### This section allows control of status LEDs your printer may have.
variable_led_enable: False # Enables/disables the use of status LEDs in this macro.
variable_status_macro: 'status_meshing' # If you have status LEDs in your printer (StealthBurner), you can use the macro that changes their status here.
### This section configures mesh point fuzzing, which allows probe points to be varied slightly if printing multiples of the same G-code file.
variable_fuzz_enable: False # Enables/disables the use of mesh point fuzzing to slightly randomize probing points to spread out wear on a build surface, default is False.
variable_fuzz_min: 0 # If enabled, the minimum amount in mm a probe point can be randomized, default is 0.
variable_fuzz_max: 4 # If enabled, the maximum amount in mm a probe point can be randomized, default is 4.
### This section is for configuring a mesh margin, which allows the probed mesh to be expanded outwards from the print area.
variable_margin_enable: False # Enables/disables adding a margin to the meshed area to pad a mesh out for specific needs, default is False.
variable_margin_size: 5 # Size in millimeters to expand the mesh outwards from the print area in all directions.
### This section is for those using a dockable probe that is stored outside of the print area. ###
variable_probe_dock_enable: False # Enables/disables the use of a dockable probe that is stored outside of the print area, default is False.
variable_attach_macro: 'Attach_Probe' # Here is where you define the macro that ATTACHES the probe to the printhead. E.g. 'Attach_Probe'
variable_detach_macro: 'Dock_Probe' # Here is where you define the macro that DETACHES the probe from the printhead. E.g. 'Dock_Probe'
### This section is for those who are using Moonraker's Update Manager for KAMP, or want a more verbose macro. ###
variable_display_parameters: True # Display macro paramters in the console, useful for debugging the SETUP_KAMP_MESHING call, or more verbosity.
gcode:
{% if display_parameters == True %}
{ action_respond_info("led_enable : %d" % (led_enable)) }
{ action_respond_info("status_macro: \'%s\'" % (status_macro)) }
{ action_respond_info("fuzz_enable : %d" % (fuzz_enable)) }
{ action_respond_info("fuzz_min : %f" % (fuzz_min)) }
{ action_respond_info("fuzz_max : %f" % (fuzz_max)) }
{ action_respond_info("probe_dock_enable: %d" % (probe_dock_enable)) }
{ action_respond_info("attach_macro: \'%s\'" % (attach_macro)) }
{ action_respond_info("detach_macro: \'%s\'" % (detach_macro)) }
{% endif %}
{% set all_points = printer.exclude_object.objects | map(attribute='polygon') | sum(start=[]) %}
{% set bed_mesh_min = printer.configfile.settings.bed_mesh.mesh_min %}
{% set bed_mesh_max = printer.configfile.settings.bed_mesh.mesh_max %}
{% set probe_count = printer.configfile.settings.bed_mesh.probe_count %}
{% set probe_count = probe_count if probe_count|length > 1 else probe_count * 2 %}
{% set max_probe_point_distance_x = ( bed_mesh_max[0] - bed_mesh_min[0] ) / (probe_count[0] - 1) %}
{% set max_probe_point_distance_y = ( bed_mesh_max[1] - bed_mesh_min[1] ) / (probe_count[1] - 1) %}
{% set x_min = all_points | map(attribute=0) | min | default(bed_mesh_min[0]) %}
{% set y_min = all_points | map(attribute=1) | min | default(bed_mesh_min[1]) %}
{% set x_max = all_points | map(attribute=0) | max | default(bed_mesh_max[0]) %}
{% set y_max = all_points | map(attribute=1) | max | default(bed_mesh_max[1]) %}
{% if margin_enable == False %}
{% set margin_size = 0 %}
{% endif %}
{ action_respond_info("{} object points, clamping to bed mesh [{!r} {!r}]".format(
all_points | count,
bed_mesh_min,
bed_mesh_max,
)) }
{% if fuzz_enable == True %}
{% set fuzz_range = range((fuzz_min * 100) | int, (fuzz_max * 100) | int + 1) %}
{% set x_min = (bed_mesh_min[0] + fuzz_max - margin_size, x_min) | max - (fuzz_range | random / 100.0) %}
{% set y_min = (bed_mesh_min[1] + fuzz_max - margin_size, y_min) | max - (fuzz_range | random / 100.0) %}
{% set x_max = (bed_mesh_max[0] - fuzz_max + margin_size, x_max) | min + (fuzz_range | random / 100.0) %}
{% set y_max = (bed_mesh_max[1] - fuzz_max + margin_size, y_max) | min + (fuzz_range | random / 100.0) %}
{% else %}
{% set x_min = [ bed_mesh_min[0], x_min - margin_size ] | max %}
{% set y_min = [ bed_mesh_min[1], y_min - margin_size ] | max %}
{% set x_max = [ bed_mesh_max[0], x_max + margin_size ] | min %}
{% set y_max = [ bed_mesh_max[1], y_max + margin_size ] | min %}
{% endif %}
{ action_respond_info("Object bounds, clamped to the bed_mesh: {!r}, {!r}".format(
(x_min, y_min),
(x_max, y_max),
)) }
{% set points_x = (((x_max - x_min) / max_probe_point_distance_x) | round(method='ceil') | int) + 1 %}
{% set points_y = (((y_max - y_min) / max_probe_point_distance_y) | round(method='ceil') | int) + 1 %}
{% if (([points_x, points_y]|max) > 6) %}
{% set algorithm = "bicubic" %}
{% set min_points = 4 %}
{% else %}
{% set algorithm = "lagrange" %}
{% set min_points = 3 %}
{% endif %}
{ action_respond_info( "Algorithm: {}".format(algorithm)) }
{% set points_x = [points_x, min_points]|max %}
{% set points_y = [points_y, min_points]|max %}
{ action_respond_info( "Points: x: {}, y: {}".format(points_x, points_y) ) }
{% if printer.configfile.settings.bed_mesh.relative_reference_index is defined %}
{% set ref_index = (points_x * points_y / 2) | int %}
{ action_respond_info( "Reference index: {}".format(ref_index) ) }
{% else %}
{% set ref_index = -1 %}
{% endif %}
{% if probe_dock_enable == True %}
{attach_macro} # Attach/deploy a probe if the probe is stored somewhere outside of the print area
{% endif %}
{% if led_enable == True %}
{status_macro} # Set status LEDs
{% endif %}
_BED_MESH_CALIBRATE mesh_min={x_min},{y_min} mesh_max={x_max},{y_max} ALGORITHM={algorithm} PROBE_COUNT={points_x},{points_y} RELATIVE_REFERENCE_INDEX={ref_index}
{% if probe_dock_enable == True %}
{detach_macro} # Detach/stow a probe if the probe is stored somewhere outside of the print area
{% endif %}