From 4cfa989b30e448a47bbb071e866a309ee4e9842e Mon Sep 17 00:00:00 2001 From: Pedro Lamas Date: Sun, 24 Aug 2025 22:59:42 +0100 Subject: [PATCH] feat: show relative Z in Screws Tilt Adjust dialog Signed-off-by: Pedro Lamas --- src/components/common/ScrewsTiltAdjustDialog.vue | 4 ++++ src/store/printer/getters.ts | 8 ++++++++ src/store/printer/types.ts | 1 + 3 files changed, 13 insertions(+) diff --git a/src/components/common/ScrewsTiltAdjustDialog.vue b/src/components/common/ScrewsTiltAdjustDialog.vue index a64ef60c78..100f824e1f 100644 --- a/src/components/common/ScrewsTiltAdjustDialog.vue +++ b/src/components/common/ScrewsTiltAdjustDialog.vue @@ -27,6 +27,10 @@ {{ screw.z.toFixed(4) }} + ({{ screw.relativeZ.toFixed(4) }}) screw.is_base)?.z + + if (baseZ != null) { + for (const screw of screws) { + screw.relativeZ = screw.z - baseZ + } + } + return { ...rest, screws diff --git a/src/store/printer/types.ts b/src/store/printer/types.ts index 0c786b9a6e..5bdfdbe80f 100644 --- a/src/store/printer/types.ts +++ b/src/store/printer/types.ts @@ -1516,6 +1516,7 @@ export interface ScrewsTiltAdjustScrew { name: string; prettyName: string; adjustMinutes: number; + relativeZ?: number; x: number; y: number; z: number;