From e4512627b7e069f962a5b31e220bcf982910d04d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Tue, 8 Oct 2024 01:31:29 +0200 Subject: [PATCH] Fix cut test by forcing focus on material surface --- examples/Schnittdaten-Skripte/Schnitttest.ls | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/examples/Schnittdaten-Skripte/Schnitttest.ls b/examples/Schnittdaten-Skripte/Schnitttest.ls index 52fb142..b876022 100644 --- a/examples/Schnittdaten-Skripte/Schnitttest.ls +++ b/examples/Schnittdaten-Skripte/Schnitttest.ls @@ -164,9 +164,6 @@ function setMarkProfile() { function focusTest(x, y) { setMarkProfile(); - // store to reset - var oldFocus = get("focus"); - // focus on the material surface set("focus", 0); @@ -210,6 +207,9 @@ function focusTest(x, y) { line(xCoord, y + maxLineHeight - currentLineHeight); } + // focus on the material surface + set("focus", 0); + // draw minimum and maximum values on the edges as well as a zero marker var yTextOffset = maxLineHeight + 1 * spacing; @@ -231,11 +231,6 @@ function focusTest(x, y) { move(roofX, y + yTextOffset); line(roofX + sign * fontWidth * 1.5, y + yTextOffset + fontWidth * 1.5); } - - // finally, restore focus - // for our marks, the negative focus won't have much of an impact, and I really don't feel like setting and resetting it for every single rectangle - // it's most relevant for the focus test - var oldFocus = set("focus", oldFocus); }