[ADD] Kreisel-Drehrichtung (DREHRICHTUNG) per JSON steuerbar: kreisel-insert-script bekommt optionalen 6. Parameter drehrichtung (GUZ/UZS), hundm05:bau-kreisel liest ihn aus dem Testdaten-JSON aus. Showroom ILS: Kreisel_Showroom_02/03/05 GUZ, Kreisel_Showroom_01/06 UZS eingetragen. Doku (lisp_methods.md, json-input-lisp.md) nachgezogen.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-10-07 20:55:58 +02:00
parent 9b831a55c8
commit 46afb33b0b
5 changed files with 29 additions and 15 deletions
+5 -4
View File
@@ -78,14 +78,15 @@
;; Rueckgabe: Ergebnis-Record in derselben Form wie die Ketten, damit
;; vsp-results-schreiben beide in EINE Datei schreibt (unterschieden ueber
;; das Feld "kind").
(defun hundm05:bau-kreisel (obj / id x y z abstand rotation typ pt ent ed rec)
(defun hundm05:bau-kreisel (obj / id x y z abstand rotation typ drehrichtung pt ent ed rec)
(setq id (ssg-val obj "id"))
(setq x (ssg-val obj "x")
y (ssg-val obj "y")
z (ssg-val obj "z")
abstand (ssg-val obj "abstand")
rotation (ssg-val obj "rotation")
typ (ssg-val obj "typ"))
typ (ssg-val obj "typ")
drehrichtung (ssg-val obj "drehrichtung"))
(if (numberp x) (setq x (float x)))
(if (numberp y) (setq y (float y)))
(if (numberp z) (setq z (float z)))
@@ -106,9 +107,9 @@
(princ (strcat "\n [KREISEL] " id " -> (" (rtos x 2 0) ", "
(rtos y 2 0) ", " (rtos (if z z 0.0) 2 0) ") A="
(rtos abstand 2 0) " R=" (rtos (if rotation rotation 0.0) 2 1)
" " typ))
" " typ (if drehrichtung (strcat " " drehrichtung) "")))
(setq ent (kreisel-insert-script pt abstand
(if rotation rotation 0.0) typ z))
(if rotation rotation 0.0) typ z drehrichtung))
(if ent
(progn
(setq ed (entget ent))