Skip to content

Probe points alternating order#882

Open
HjortCreations wants to merge 19 commits intoKalicoCrew:mainfrom
HjortCreations:probe-points-alternating-order
Open

Probe points alternating order#882
HjortCreations wants to merge 19 commits intoKalicoCrew:mainfrom
HjortCreations:probe-points-alternating-order

Conversation

@HjortCreations
Copy link
Copy Markdown

@HjortCreations HjortCreations commented Apr 29, 2026

Adds optional alternating probe order support to ProbePointsHelper.

This allows probing workflows that use ProbePointsHelper, such as QGL, Z_TILT, and other multi-point probing routines, to alternate the physical travel direction between full probing passes while still returning probe results in the original logical point order.

Example config:

alternate_probe_direction: True
# start_reverse: False

When enabled, full probing passes alternate like this:

Pass 1: 0 -> 1 -> 2 -> 3
Pass 2: 3 -> 2 -> 1 -> 0
Pass 3: 0 -> 1 -> 2 -> 3

When probing in reverse order, the measured results are inserted at the front of the result list. This means callers still receive results in the same logical order as before, so existing leveling math does not need special handling.

The main benefit is on large-format machines where repeated retries can otherwise make the toolhead travel around the bed in the same direction over and over again. Alternating the order reduces accumulated twist in Bowden tubes, filament paths, umbilicals, CAN cables, and other cable bundles.

It also avoids an unnecessary travel move between retry passes. With the current fixed order, a new pass starts again at point 0 after the previous pass ended at the last point, for example:

Pass 1: 0 -> 1 -> 2 -> 3
Extra travel: 3 -> 0
Pass 2: 0 -> 1 -> 2 -> 3

With alternating order, the next pass starts where the previous pass ended:

Pass 1: 0 -> 1 -> 2 -> 3
Pass 2: 3 -> 2 -> 1 -> 0

This makes the travel path shorter and more natural, especially on machines with large beds.

The feature is disabled by default and should preserve existing behavior unless explicitly enabled in config.

The implementation is inspired by Lazar at Modix3D and his RepRapFirmware approach.

Test video

QGL alternating probe direction test

Tested on a QGL machine with alternate_probe_direction enabled.

Checklist

  • PR title makes sense
  • Added a test case if possible
  • If new feature, added to the README / docs
  • CI is happy and green

Moves alternating probe order support into ProbePointsHelper so the behavior can be reused by QGL, Z_TILT, and other probing workflows.

When enabled, full probing passes alternate physical travel direction:

Pass 1: 0 -> 1 -> 2 -> 3
Pass 2: 3 -> 2 -> 1 -> 0
Pass 3: 0 -> 1 -> 2 -> 3

When probing in reverse order, results are inserted at the front of the result list so callers still receive probe results in the original logical point order.

This avoids special handling in quad_gantry_level.py and reduces repeated cable, Bowden tube, umbilical, and filament path twisting on large-format machines during repeated retries.

The implementation is inspired by Lazar at Modix3D and his RepRapFirmware approach.
Comment thread klippy/extras/probe.py Outdated
Comment thread klippy/extras/probe.py Outdated
Comment thread klippy/extras/probe.py Outdated
Comment thread klippy/extras/probe.py Outdated
Comment thread klippy/extras/probe.py Outdated
Comment thread klippy/extras/probe.py Outdated
Comment thread klippy/extras/probe.py Outdated
@HjortCreations HjortCreations marked this pull request as ready for review May 2, 2026 08:07
@HjortCreations
Copy link
Copy Markdown
Author

Everything should be fixed now and the code is working with both QGL and Bed Mesh

@HjortCreations HjortCreations requested a review from dalegaard May 5, 2026 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants