Skip to content

Add kinematic_offset mode#175

Open
ssendev wants to merge 1 commit intoprotoloft:masterfrom
ssendev:kinematic-position
Open

Add kinematic_offset mode#175
ssendev wants to merge 1 commit intoprotoloft:masterfrom
ssendev:kinematic-position

Conversation

@ssendev
Copy link
Copy Markdown

@ssendev ssendev commented Feb 22, 2026

This adds a mode that doesn't use switch_offset to hard code the print thickness and instead stores it in ["stepper_z"].endstop_z_offset.

Calibration results are no longer stored in GCODE_OFFSET and instead modify the kinematic position directly.

The positive effect is that gcode adjustment and saving now works again to change the print thickness.

The negative effect is that the kinematic position is now anchored to the bed position instead of the z_endstop. Which means macros that rely on specific heights might need adjustments.

In the config set

[z_calibration]
kinematic_offset: true
# Enable kinematic z shift in order to be able to use the gcode_offset # like it is intended for z height adjustments that can be persisted. endstop_z_offset: 0
# With kinematic_offset enabled the kinematic coordinate system is no longer # relative to the z-endstop but to the printer bed. # That means a macro like:
# [gcode_macro MOVE_TO_Z_TEN]
# gcode:
#   G0 Z10
# is suddenly dependent on the bed height. in order to go to the same
# position as without kinematic_offset: true the macro must now be:
# [gcode_macro MOVE_TO_Z_TEN]
# gcode:
#   G0 Z{printer["z_calibration"].adjusted_z_endstop + 10}
# ["stepper_z"].endstop_z_offset now plays the role that switch_offset had
# and this config endstop_z_offset is always added to the dynamic
# adjusted_z_endstop variable.
# z limits are adjusted so they stay physically the same although the
# absolute number changes with bed height

in the config set
[z_calibration]
kinematic_offset: true
# Enable kinematic z shift in order to be able to use the gcode_offset
# like it is intended for z height adjustments that can be persisted.
endstop_z_offset: 0
# With kinematic_offset enabled the kinematic coordinate system is no longer
# relative to the z-endstop but to the printer bed.
# That means a macro like:
# [gcode_macro MOVE_TO_Z_TEN]
# gcode:
#   G0 Z10
# is suddenly dependent on the bed height. in order to go to the same
# position as without kinematic_offset: true the macro must now be:
# [gcode_macro MOVE_TO_Z_TEN]
# gcode:
#   G0 Z{printer["z_calibration"].adjusted_z_endstop + 10}
# ["stepper_z"].endstop_z_offset now plays the role that switch_offset had
# and this config endstop_z_offset is always added to the dynamic
# adjusted_z_endstop variable.
# z limits are adjusted so they stay physically the same although the
# absolute number changes with bed height
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.

1 participant