Skip to content

Add support for z-offset configuration option - #186

Open
anatol wants to merge 8 commits into
QIDITECH:mainfrom
anatol:main
Open

Add support for z-offset configuration option#186
anatol wants to merge 8 commits into
QIDITECH:mainfrom
anatol:main

Conversation

@anatol

@anatol anatol commented Apr 25, 2026

Copy link
Copy Markdown

No description provided.

anatol added 8 commits April 25, 2026 11:13
Implement per-filament Z-offset settings with separate values for initial layer and remaining layers.

Configuration and presets:
- add new nullable float options z_offset_initial_layer and z_offset to GCodeConfig so G-code generation can read both values
- define both options in PrintConfigDef with advanced mode metadata, mm units, defaults of 0.0, and range -2mm to +2mm
- register filament_z_offset_initial_layer and filament_z_offset in filament extruder override keys so prefixed filament options are generated and persisted like other filament overrides
- include the new base options in filament option key sizing and include the prefixed options in filament_options_with_variant so multi-variant and multi-filament sizing works correctly

GUI:
- expose both options in the Filament tab as separate controls for initial layer Z offset and other layers Z offset

G-code behavior:
- apply initial-layer filament Z offset when moving to first-layer height for wipe tower setup
- apply layer-specific Z offset in GCode change_layer: use initial-layer value on layer index 0 and regular value for subsequent layers
- set placeholder parser variable z_offset from the selected initial-layer filament value instead of hard-coded zero

Invalidation wiring:
- mark new Z-offset keys as GCode-export-affecting options in print invalidation so edits trigger correct downstream updates

Implements QIDITECH#13
missing commas in the steps_gcode key list were concatenating string literals, so option invalidation
silently failed for those keys.
Root cause:

The top-level deps CMake file defined project() before cmake_minimum_required() and declared a minimum CMake version of 3.2.

With current CMake releases, compatibility with very old policy versions is removed, so the dependency bootstrap stops immediately during configure before any third-party packages are built.

What was changed:

- move cmake_minimum_required before project to follow required CMake ordering and avoid policy/bootstrap ambiguity

- raise minimum required CMake version from 3.2 to 3.5 in deps/CMakeLists.txt

Why this specific change:

- this is the minimal, targeted compatibility adjustment that unblocks initial deps configuration without changing dependency selection, toolchain behavior, install layout, or build targets

- by fixing the entry-point ordering and baseline version, the deps superbuild can proceed to configure and start external projects instead of failing at the first configure step

Observed impact during verification:

- before fix: configure aborted immediately with a CMake compatibility error

- after fix: deps configure completed and build progressed into external dependency stages
Invoke pack_deps when PACK_DEPS=1 and document -p in help output.
Only resolve and replace Contents/Resources when it is a symlink, avoiding failures when it is already a directory.
Use strict getopts parsing to report unknown flags and missing option arguments instead of silently ignoring them.
Export CMAKE_POLICY_VERSION_MINIMUM (default 3.5) and pass it to configure steps so dependency subprojects with old cmake_minimum_required continue to configure under newer CMake versions.
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