Klipper Adaptive Bed Mesh for Voron — Exclude Objects and Smart Probing
Klipper 校准 固件
A flat bed is the foundation of a successful first layer, and on a Voron that means using Klipper's bed mesh compensation. But running a full bed mesh before every print takes time and can sometimes probe points that fall off the bed or hit already-printed parts. Klipper's adaptive bed mesh features — ADAPTIVE probing, mesh_min/mesh_radius, exclude_object, and bed mesh profiles — solve these problems. This guide covers how to configure and use each one on your Voron. 最后更新:2025 年 5 月。
为什么需要自适应调平网格?
标准的 BED_MESH_CALIBRATION 会探测整个打印平台,无论您的零件实际位于何处。在 350mm 的 Voron V2.4 上,7x7 网格意味着 49 个探测点。每次打印前执行此操作,每个任务将增加 90 秒——时间累积起来很快。
自适应调平网格通过仅探测对象所在区域来解决此问题。其优势包括:
- 更少的探测点: A part sitting in the center of a 350mm bed might only need a 3x3 or 4x4 grid over its footprint, reducing probe time by 60-80%
- 更好的第一层: By focusing probe density on the area that actually matters, you get a more accurate local mesh rather than averaging across the whole plate
- 更少的探测错误: Probing near the bed edges is risky — probes can miss the build plate or trigger on clips. Adaptive probing stays safely inside the print area
ADAPTIVE=1 探测
启用自适应探测的最简单方法是将 ADAPTIVE=1 传递给 BED_MESH_CALIBRATION。Klipper 会自动计算 G-code 文件中所有对象的边界框,并仅探测该区域。
在您的 PRINT_START 宏中:
[gcode_macro PRINT_START]
gcode:
# Heat the bed and nozzle
M140 S{params.BED|default(100)}
M104 S{params.EXTRUDER|default(250)}
M190 S{params.BED|default(100)}
G28
BED_MESH_CALIBRATION ADAPTIVE=1
M109 S{params.EXTRUDER|default(250)}
# Continue with print
When ADAPTIVE=1 is set, Klipper reads the G-code file loaded via virtual_sdcard, finds all G1 moves, and computes a bounding box that covers every object. It then probes a mesh over that bounding box with the probe_count scaled proportionally.
重要提示: ADAPTIVE=1 only works when printing from virtual_sdcard (the standard SD card mode in Fluidd/Mainsail). It does not work with direct serial G-code streaming.
Mesh Min 与 Mesh Radius
如果您希望手动控制探测区域,请使用 mesh_min 和 mesh_radius(或 mesh_min 和 mesh_max)参数:
BED_MESH_CALIBRATION mesh_min=100,100 mesh_max=250,250 probe_count=5,5
Or with a circular radius centered on the nozzle:
BED_MESH_CALIBRATION mesh_radius=100 mesh_origin=175,175
mesh_radius is particularly useful for delta and SCARA printers, but on a Voron Cartesian system, mesh_min/mesh_max gives you more intuitive rectangular regions.
Exclude Objects 集成
Klipper 中的 [exclude_object] 模块与自适应网格密切相关。启用后,Klipper 会跟踪打印平台上的各个对象,并允许您取消或跳过特定零件,而无需停止整个打印。自适应网格系统使用相同的对象数据来确定探测位置。
将此添加到您的 printer.cfg 中:
[exclude_object]
That's it. Once enabled, any G-code that contains EXCLUDE_OBJECT_START and EXCLUDE_OBJECT_END markers will be tracked by Klipper. The EXCLUDE_OBJECT commands you can use during a print:
EXCLUDE_OBJECT_START name=part1— marks the beginning of an objectEXCLUDE_OBJECT_END name=part1— marks the end of an objectEXCLUDE_OBJECT name=part1— cancels that specific object (remaining objects continue printing)EXCLUDE_OBJECT_DEFINE name=part1 center=150,150— pre-defines an object with its center position
OrcaSlicer 中 Exclude Objects 的设置
OrcaSlicer 内置了对排除对象标记的支持。在打印设置的“其他”选项卡中,启用“输出选项”下的“标记对象”和“排除对象”。这会指示 OrcaSlicer 在生成的 G-code 中插入 EXCLUDE_OBJECT_START/END 标记。
启用后,您可以在 Fluidd 或 Mainsail 的网页界面中点击单个对象,选择“排除对象”来取消该部分的打印,而其余部分继续打印。
SuperSlicer 和 PrusaSlicer 支持类似功能。在 SuperSlicer 中,启用“输出选项”下的“完成单个对象”和“标记对象”选项。
不同打印尺寸的调平网格配置文件
另一种智能探测策略是定义多个热床网格配置文件,并根据打印尺寸选择合适的配置文件。这对于 Voron 构建尤其有用,因为您可能某天打印微小的 V0 零件,第二天又打印全尺寸的 350mm 面板。
在 printer.cfg 中定义配置文件:
[bed_mesh]
speed: 120
horizontal_move_z: 5
mesh_min: 35, 35
mesh_max: 315, 315
probe_count: 7, 7
fade_start: 1.0
fade_end: 10.0
fade_target: 0
# Small part profile (center only)
# Use: BED_MESH_CALIBRATION mesh_min=130,130 mesh_max=220,220 probe_count=3,3
# Medium part profile
# Use: BED_MESH_CALIBRATION mesh_min=80,80 mesh_max=270,270 probe_count=5,5
# Full bed profile (default)
# Use: BED_MESH_CALIBRATION
In your PRINT_START macro, you can determine the print size from the G-code file and select the appropriate profile:
[gcode_macro PRINT_START]
gcode:
{% set BED_TEMP = params.BED|default(100) %}
{% set EXTRUDER_TEMP = params.EXTRUDER|default(250) %}
M140 S{BED_TEMP}
M104 S{EXTRUDER_TEMP}
G28
G29 # Probe bed screws
# Use adaptive mesh by default
BED_MESH_CALIBRATION ADAPTIVE=1
# Fall back to standard mesh if adaptive fails
# (e.g., printing from direct serial)
M109 S{EXTRUDER_TEMP}
自适应网格故障排除
探测点超出边界
If you see "Probe points out of bounds" errors during adaptive probing, Klipper is trying to probe outside the physical limits defined in your stepper configuration. This usually happens when:
- 对象边界框将探测点推得太靠近打印床边缘
- 您的mesh_min/mesh_max超出了步进电机配置中的position_min/position_max
- 您的探针与喷嘴偏移过大(x_offset或y_offset较大)
解决方案:减少 probe_count 参数,或在步进电机配置中增加 position_max。对于标准运动学的 Voron V2.4 350mm:
[stepper_x]
position_min: -5
position_max: 355
Exclude Object 不工作
If EXCLUDE_OBJECT commands fail silently, check these common issues:
- printer.cfg中未启用[exclude_object]模块
- G-code文件不包含EXCLUDE_OBJECT_START/END标记——请启用“Label object”后重新切片
- 您使用的Klipper版本较旧,不支持排除对象(请更新至最新版本)
- 您通过直接串行流而非virtual_sdcard进行打印
自适应网格导致首层质量差
如果启用自适应网格后第一层不均匀,请尝试增加 probe_count 或完全禁用 fade。自适应网格默认使用较少的探测点,可能会遗漏表面不平整:
BED_MESH_CALIBRATION ADAPTIVE=1 PROBE_COUNT=5,5
You can pass PROBE_COUNT alongside ADAPTIVE to override the automatic probe density calculation.
结合自适应网格与 Bed Screw Adjust
为获得最佳效果,请在网格校准前使用 Klipper 的热床螺丝调整(或对于带多个 Z 电机的 Voron,使用 Z_TILT_ADJUST / QUAD_GANTRY_LEVEL)。这确保热床首先机械调平,然后网格处理微小的表面不平整。
[gcode_macro PRINT_START]
gcode:
{% set BED_TEMP = params.BED|default(100) %}
{% set EXTRUDER_TEMP = params.EXTRUDER|default(250) %}
M140 S{BED_TEMP}
G28
QUAD_GANTRY_LEVEL # Or Z_TILT_ADJUST for Trident
G28 Z
BED_MESH_CALIBRATION ADAPTIVE=1
M190 S{BED_TEMP}
M109 S{EXTRUDER_TEMP}
性能对比
Here's the real-world time difference on a Voron V2.4 350mm with a standard probe speed of 10mm/s:
- 完整 7x7 网格: ~60-80 seconds, 49 points, covers entire 350x350mm plate
- 自适应 4x4 网格(小零件): ~15-20 seconds, 16 points, covers 100x100mm print area
- 自适应 5x5 网格(中等零件): ~25-35 seconds, 25 points, covers 200x200mm print area
在包含多个零件的 10 小时打印会话中,可节省 10 分钟以上——这些时间直接用于打印。
最终建议
对于大多数 Voron 用户,最佳设置是:
- 在printer.cfg中启用[exclude_object]
- 在切片软件(OrcaSlicer、SuperSlicer或PrusaSlicer)中启用“Label object”
- 在PRINT_START中使用BED_MESH_CALIBRATION ADAPTIVE=1
- 在网格校准前运行QUAD_GANTRY_LEVEL或Z_TILT_ADJUST
- 保留一个完整的7x7网格配置文件,以便在需要探测整个打印床时使用
自适应热床网格是一种看似不起眼但用过后就再也回不去的功能——您再也不会每次打印都进行全床探测。结合排除对象功能,它使您的 Voron 多零件打印更快、更安全、更可靠。