diff --git a/src/components/common/ScrewsTiltAdjustDialog.vue b/src/components/common/ScrewsTiltAdjustDialog.vue index a64ef60c78..c1ba4e77d9 100644 --- a/src/components/common/ScrewsTiltAdjustDialog.vue +++ b/src/components/common/ScrewsTiltAdjustDialog.vue @@ -26,6 +26,10 @@ {{ `X = ${screw.x}, Y = ${screw.y}` }} + ({{ `${screw.relativeZ < 0 ? '' : '+'}${screw.relativeZ.toFixed(4)}` }}) {{ screw.z.toFixed(4) }} diff --git a/src/store/printer/getters.ts b/src/store/printer/getters.ts index 127372e424..0a95647728 100644 --- a/src/store/printer/getters.ts +++ b/src/store/printer/getters.ts @@ -957,6 +957,14 @@ export const getters = { } } + const baseZ = screws.find(screw => 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 083e10a850..73fd91eccb 100644 --- a/src/store/printer/types.ts +++ b/src/store/printer/types.ts @@ -1532,6 +1532,7 @@ export interface ScrewsTiltAdjustScrew { name: string; prettyName: string; adjustMinutes: number; + relativeZ?: number; x: number; y: number; z: number;