From 3d944f85dc397cd5b252d569d2c4fdb9e9af19ed Mon Sep 17 00:00:00 2001 From: Yuelin Wang Date: Mon, 11 May 2026 12:03:59 +0200 Subject: [PATCH] fassung gemerged --- Lisp/KreiselInsert.lsp | 48 +++++++++++++++++++++++++----------------- 1 file changed, 29 insertions(+), 19 deletions(-) diff --git a/Lisp/KreiselInsert.lsp b/Lisp/KreiselInsert.lsp index eb11f14..9214faa 100644 --- a/Lisp/KreiselInsert.lsp +++ b/Lisp/KreiselInsert.lsp @@ -10,14 +10,24 @@ (if (getenv "DXFM_BLOCKS") (setq modul-pfad (strcat (getenv "DXFM_BLOCKS") "/")) (progn - (alert "DXFM_BLOCKS nicht gesetzt!\nBitte zuerst bin\\setenv.bat ausfuehren.") + (alert "Umgebungsvariable DXFM_BLOCKS nicht gesetzt!\nBitte zuerst bin\\setenv.bat ausfuehren.") + (exit) + ) + + (progn + (alert + "DXFM_BLOCKS nicht gesetzt!\n\n" + "Bitte fuehren Sie zuerst bin\\setenv.bat aus,\n" + "oder setzen Sie den Pfad manuell mit:\n" + "(setenv \"DXFM_BLOCKS\" \"C:/Users/y.wang/Documents/dxfmakros/Blocks/")" + ) (exit) ) ) ;; block-pfad neu setzen (setq *block-path* (getenv "DXFM_BLOCKS")) -(princ (strcat "\nBlock-Pfad: " *block-path*)) +(princ (strcat "\n✅ Block-Pfad: " block-pfad)) ;; Basispunkt: Linker Kreis, linkester Tangentenpunkt (links Mitte) ;; ============================================ @@ -140,43 +150,43 @@ ;; Verbindungspunkte pruefen (cond ;; T_O (Mittelpunkt obere Tangente) - ((and (< (abs (- pickX (+ x 400.0 (/ abstand 2.0)))) tolerance) - (< (abs (- pickY (+ y 400.0))) tolerance)) + ((and (<= (abs (- pickX (+ x 400.0 (/ abstand 2.0)))) tolerance) + (<= (abs (- pickY (+ y 400.0))) tolerance)) (setq type "T_O")) ;; T_U (Mittelpunkt untere Tangente) - ((and (< (abs (- pickX (+ x 400.0 (/ abstand 2.0)))) tolerance) - (< (abs (- pickY (- y 400.0))) tolerance)) + ((and (<= (abs (- pickX (+ x 400.0 (/ abstand 2.0)))) tolerance) + (<= (abs (- pickY (- y 400.0))) tolerance)) (setq type "T_U")) ;; M_O (Linker Kreis, oberer Rand) - ((and (< (abs (- pickX (+ x 400.0))) tolerance) - (< (abs (- pickY (+ y 400.0))) tolerance)) + ((and (<= (abs (- pickX (+ x 400.0))) tolerance) + (<= (abs (- pickY (+ y 400.0))) tolerance)) (setq type "M_O")) ;; M_U (Linker Kreis, unterer Rand) - ((and (< (abs (- pickX (+ x 400.0))) tolerance) - (< (abs (- pickY (- y 400.0))) tolerance)) + ((and (<= (abs (- pickX (+ x 400.0))) tolerance) + (<= (abs (- pickY (- y 400.0))) tolerance)) (setq type "M_U")) ;; M_L (Linker Kreis, linker Rand) - ((and (< (abs (- pickX x)) tolerance) - (< (abs (- pickY y)) tolerance)) + ((and (<= (abs (- pickX x)) tolerance) + (<= (abs (- pickY y)) tolerance)) (setq type "M_L")) ;; S_O (Rechter Kreis, oberer Rand) - ((and (< (abs (- pickX (+ x 400.0 abstand))) tolerance) - (< (abs (- pickY (+ y 400.0))) tolerance)) + ((and (<= (abs (- pickX (+ x 400.0 abstand))) tolerance) + (<= (abs (- pickY (+ y 400.0))) tolerance)) (setq type "S_O")) ;; S_U (Rechter Kreis, unterer Rand) - ((and (< (abs (- pickX (+ x 400.0 abstand))) tolerance) - (< (abs (- pickY (- y 400.0))) tolerance)) + ((and (<= (abs (- pickX (+ x 400.0 abstand))) tolerance) + (<= (abs (- pickY (- y 400.0))) tolerance)) (setq type "S_U")) ;; S_R (Rechter Kreis, rechter Rand) - ((and (< (abs (- pickX (+ x 800.0 abstand))) tolerance) - (< (abs (- pickY y)) tolerance)) + ((and (<= (abs (- pickX (+ x 800.0 abstand))) tolerance) + (<= (abs (- pickY y)) tolerance)) (setq type "S_R")) (t (setq type "UNKNOWN")) @@ -322,4 +332,4 @@ (princ "\nKreiselInsert.lsp geladen (Version 4.0 - Smart Connect)!") (princ "\nBefehle: KreiselInsert, KreiselConnect, KreiselQuick, KreiselParams") -(princ) \ No newline at end of file +(princ)