From d99bdb10d55f031b0e6ee3f11f63eec0513784cd Mon Sep 17 00:00:00 2001 From: Yuelin Wang Date: Tue, 21 Jul 2026 13:55:51 +0200 Subject: [PATCH] Kreisel-Attributreihenfolge neu (ID/Bezeichnung/Artinr. zuerst), Artinr.=6200 ergaenzt, N_RAMPEN->ANZAHL_RAMPEN (inkl. Export-Fallback) --- Lisp/KreiselInsert.lsp | 29 ++++++++++++++++++++--------- lib/export_csv.py | 2 +- lib/export_sivas.py | 2 +- 3 files changed, 22 insertions(+), 11 deletions(-) diff --git a/Lisp/KreiselInsert.lsp b/Lisp/KreiselInsert.lsp index d4dde50..040c8fd 100644 --- a/Lisp/KreiselInsert.lsp +++ b/Lisp/KreiselInsert.lsp @@ -71,18 +71,24 @@ (setq *kreisel-default-hoehe* (ssg-cfg-or "kreisel" "default_hoehe" 2000.0)) ;; Attribut-Definitionen: ((TAG DEFAULT) ...) +;; Anzeige-/Attributreihenfolge im Block (ID zuerst, dann Bezeichnung, +;; Artinr. fest 6200, Montage-/Hoehendaten, dann Ausstattung). +;; NUMMER steht am Ende (wird intern fuer Nummerierung/Blockname +;; benoetigt; Entfernen erfordert Refactor der Nummernvergabe). (setq *kreisel-attrib-defs* - '(("Bezeichnung" "") - ("DREHRICHTUNG" "UZS") - ("ANZAHL_SEPARATOR" "2") + '(("ID" "") + ("Bezeichnung" "") + ("Artinr." "6200") + ("MONTAGEHOEHE_m" "0.000") + ("HOEHE" "0") ("KREISELART" "STANDARD") + ("ABSTAND" "2300") + ("ANZAHL_SEPARATOR" "2") ("ANZAHL_SCANNER" "0") - ("N_RAMPEN" "0") - ("DREHUNG" "0") - ("ABSTAND" "2300") - ("NUMMER" "0") - ("HOEHE" "0") - ("ID" "")) + ("ANZAHL_RAMPEN" "0") + ("DREHRICHTUNG" "UZS") + ("DREHUNG" "0") + ("NUMMER" "0")) ) ;; Eckrad-Einstellungen @@ -353,6 +359,11 @@ (setq attribs (subst (cons "HOEHE" block-hoehe) (assoc "HOEHE" attribs) attribs)) + ;; Montagehoehe in Metern ableiten (Default = HOEHE / 1000, mm->m). + ;; Bleibt ein normales Attribut und kann vom Benutzer geaendert werden. + (setq attribs (subst (cons "MONTAGEHOEHE_m" (rtos (/ z-hoehe 1000.0) 2 3)) + (assoc "MONTAGEHOEHE_m" attribs) attribs)) + ;; Abgeleitete Masse (setq radius (/ *kreisel-durchmesser* 2.0)) (setq pin-y (- radius *kreisel-pin-abstand*)) diff --git a/lib/export_csv.py b/lib/export_csv.py index 4865dce..d46cfd1 100644 --- a/lib/export_csv.py +++ b/lib/export_csv.py @@ -210,7 +210,7 @@ def build_kreisel_merkmale(block): "Anzahl der Separatoren": attribs.get("ANZAHL_SEPARATOR", attribs.get("N_SEPARATOREN", "2")), "Kreiselart": attribs.get("KREISELART", "STANDARD"), "Anzahl der Scanner": attribs.get("ANZAHL_SCANNER", attribs.get("N_SCANNER", "0")), - "Anzahl der Rampen": attribs.get("N_RAMPEN", "0"), + "Anzahl der Rampen": attribs.get("ANZAHL_RAMPEN", attribs.get("N_RAMPEN", "0")), "Höhe in m": hoehe_m, "Drehrichtung": attribs.get("DREHRICHTUNG", "UZS"), "Drehung": block.get("rotation", 0.0), diff --git a/lib/export_sivas.py b/lib/export_sivas.py index b01fefc..1667539 100644 --- a/lib/export_sivas.py +++ b/lib/export_sivas.py @@ -234,7 +234,7 @@ def build_kreisel_details(block): "Abstand (Kreiselachse A - Kreiselachse) in Meter": abstand_m, "Anzahl der Separatoren": attribs.get("ANZAHL_SEPARATOR", attribs.get("N_SEPARATOREN", "2")), "Anzahl der Scanner": attribs.get("ANZAHL_SCANNER", attribs.get("N_SCANNER", "0")), - "Anzahl der Rampen": attribs.get("N_RAMPEN", "0"), + "Anzahl der Rampen": attribs.get("ANZAHL_RAMPEN", attribs.get("N_RAMPEN", "0")), "Drehrichtung": attribs.get("DREHRICHTUNG", "UZS"), "Drehung": block.get("rotation", 0.0), }