From fe283a0bf31025355f6df467792bf934f4a152bd Mon Sep 17 00:00:00 2001 From: Michael Stangl Date: Fri, 10 Jul 2026 13:32:52 +0200 Subject: [PATCH] =?UTF-8?q?ABP=2060=20und=20APB=20100=20als=20eigenes=20AU?= =?UTF-8?q?swahlkriterium=20in=20die=20Oberfl=C3=A4che=20der=2090Grad=20B?= =?UTF-8?q?=C3=B6gen=20hinzugef=C3=BCgt.=20Beide=20APB60=20B=C3=B6gen=20un?= =?UTF-8?q?d=20die=20Sternweiche=20dazu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Lisp/OmniModulInsert.lsp | 48 +++++++++++++++++++++++++++------- data/json/omniflo_boegen.json | 20 ++++++++++++++ data/json/omniflo_weichen.json | 11 ++++++++ menu/SSG_LIB.mnu | 4 ++- 4 files changed, 72 insertions(+), 11 deletions(-) diff --git a/Lisp/OmniModulInsert.lsp b/Lisp/OmniModulInsert.lsp index bf09020..c9d0c9e 100644 --- a/Lisp/OmniModulInsert.lsp +++ b/Lisp/OmniModulInsert.lsp @@ -326,11 +326,13 @@ ;; --- Bogen-Auswahl-Dialog oeffnen --- -;; winkel = KurvenWinkel (90, 67.5, 45, 22.5, 180) +;; winkel = KurvenWinkel (90, 67.5, 45, 22.5, 180) ;; init-hoehe / init-drehung = Vorbelegung (optional, fuer Edit-Modus) +;; profiltyp = optionales Praefix zum Filtern des ProfilTyp-Textes, +;; z.B. "APB 60" oder "APB 110" (nil = keine Einschraenkung) ;; Rueckgabe: (eintrag hoehe drehung) oder nil bei Abbruch -(defun omni:bogen-dialog (winkel init-hoehe init-drehung / dcl-pfad dat boegen-liste - profil-liste ergebnis dlg-hoehe dlg-drehung) +(defun omni:bogen-dialog (winkel init-hoehe init-drehung profiltyp / dcl-pfad dat boegen-liste + profil-liste ergebnis dlg-hoehe dlg-drehung profil) (if (null *OMNI-BOEGEN*) (omni:load-data)) ;; Defaults @@ -339,11 +341,27 @@ ;; Boegen nach Winkel filtern (setq boegen-liste (omni:filter *OMNI-BOEGEN* "KurvenWinkel" winkel)) + + ;; Optional zusaetzlich nach ProfilTyp-Praefix filtern (z.B. "APB 60") + (if profiltyp + (setq boegen-liste + (vl-remove-if-not + '(lambda (e) + (setq profil (cdr (assoc "ProfilTyp" e))) + (and profil (= (vl-string-search profiltyp profil) 0)) + ) + boegen-liste + ) + ) + ) + (if (null boegen-liste) (progn (alert (strcat "Keine Boegen fuer " (if (= (type winkel) 'INT) (itoa winkel) (rtos winkel 2 1)) - " Grad gefunden.")) + " Grad" + (if profiltyp (strcat " (" profiltyp ")") "") + " gefunden.")) nil ) (progn @@ -405,8 +423,18 @@ ;; ============================================================ ;; --- Omniflo / Boegen --- +(defun c:OMNI_APB60_90 ( / dlg-result) + (setq dlg-result (omni:bogen-dialog 90 nil nil "APB 60")) + (if dlg-result + (omni:insert-from-entry dlg-result) + (princ "\n[BOGEN] Abgebrochen.") + ) + (princ) +) + + (defun c:OMNI_APB_630_90 ( / dlg-result) - (setq dlg-result (omni:bogen-dialog 90 nil nil)) + (setq dlg-result (omni:bogen-dialog 90 nil nil "APB 110")) (if dlg-result (omni:insert-from-entry dlg-result) (princ "\n[BOGEN] Abgebrochen.") @@ -415,7 +443,7 @@ ) (defun c:OMNI_APB_550_675 ( / dlg-result) - (setq dlg-result (omni:bogen-dialog 67.5 nil nil)) + (setq dlg-result (omni:bogen-dialog 67.5 nil nil nil)) (if dlg-result (omni:insert-from-entry dlg-result) (princ "\n[BOGEN] Abgebrochen.") @@ -424,7 +452,7 @@ ) (defun c:OMNI_APB_630_45 ( / dlg-result) - (setq dlg-result (omni:bogen-dialog 45 nil nil)) + (setq dlg-result (omni:bogen-dialog 45 nil nil nil)) (if dlg-result (omni:insert-from-entry dlg-result) (princ "\n[BOGEN] Abgebrochen.") @@ -433,7 +461,7 @@ ) (defun c:OMNI_APB_550_225 ( / dlg-result) - (setq dlg-result (omni:bogen-dialog 22.5 nil nil)) + (setq dlg-result (omni:bogen-dialog 22.5 nil nil nil)) (if dlg-result (omni:insert-from-entry dlg-result) (princ "\n[BOGEN] Abgebrochen.") @@ -442,7 +470,7 @@ ) (defun c:OMNI_APB_650_180 ( / dlg-result) - (setq dlg-result (omni:bogen-dialog 180 nil nil)) + (setq dlg-result (omni:bogen-dialog 180 nil nil nil)) (if dlg-result (omni:insert-from-entry dlg-result) (princ "\n[BOGEN] Abgebrochen.") @@ -1171,7 +1199,7 @@ (if (= typ "bogen") (progn (setq winkel (cdr (assoc "KurvenWinkel" eintrag))) - (setq dlg-result (omni:bogen-dialog winkel hoehe drehung)) + (setq dlg-result (omni:bogen-dialog winkel hoehe drehung nil)) ) (progn (setq winkel (cdr (assoc "KurvenWinkel" eintrag))) diff --git a/data/json/omniflo_boegen.json b/data/json/omniflo_boegen.json index 873b492..6211977 100644 --- a/data/json/omniflo_boegen.json +++ b/data/json/omniflo_boegen.json @@ -172,6 +172,26 @@ "SivasnrTEF": null, "Antriebsart": 0 }, + { + "Sivasnr": 821094101, + "ProfilTyp": "APB 60 R 515/90° – 135/135", + "Radius": 515, + "KurvenWinkel": 90, + "Breite": 650, + "Länge": 650, + "SivasnrTEF": null, + "Antriebsart": 0 + }, + { + "Sivasnr": 821094040, + "ProfilTyp": "APB 60 R 515/90° – 295/295", + "Radius": 515, + "KurvenWinkel": 90, + "Breite": 810, + "Länge": 810, + "SivasnrTEF": null, + "Antriebsart": 0 + }, { "Sivasnr": 821104022, "ProfilTyp": "APB 110 R 400/90° – 500/500", diff --git a/data/json/omniflo_weichen.json b/data/json/omniflo_weichen.json index 7b4b09f..fbfb5ce 100644 --- a/data/json/omniflo_weichen.json +++ b/data/json/omniflo_weichen.json @@ -824,6 +824,17 @@ "KurvenRichtung": 3, "SivasnrTEF": null }, + { + "Sivasnr": 834372421, + "ProfilTyp": "WEICHE S C STAR 1400/1400, KPL. P plus Steuerung", + "WeichenTyp": "Sternweiche", + "KurvenWinkel": 0, + "Schaltungstyp": "P", + "Breite": 1400, + "Länge": 1400, + "KurvenRichtung": 3, + "SivasnrTEF": null + }, { "Sivasnr": 834342011, "ProfilTyp": "WEICHENKOERPER S L, KPL. MIT M", diff --git a/menu/SSG_LIB.mnu b/menu/SSG_LIB.mnu index 0c1f2e3..13cd065 100644 --- a/menu/SSG_LIB.mnu +++ b/menu/SSG_LIB.mnu @@ -40,12 +40,14 @@ [<-30 Kurve rechts Gefaellestrecke]^C^C(ssg-ensure "SSG_LIB_Commands") ILS_GK30R [<-ILS Schliessen]^C^C [->Omniflo] -[->Boegen] +[->Boegen APB110] [90]^C^C(ssg-ensure "OmniModulInsert") OMNI_APB_630_90 [67.5]^C^C(ssg-ensure "OmniModulInsert") OMNI_APB_550_675 [45]^C^C(ssg-ensure "OmniModulInsert") OMNI_APB_630_45 [22.5]^C^C(ssg-ensure "OmniModulInsert") OMNI_APB_550_225 [<-180 ]^C^C(ssg-ensure "OmniModulInsert") OMNI_APB_650_180 +[->Boegen APB60] +[<-90]^C^C(ssg-ensure "OmniModulInsert") OMNI_APB60_90 [->Aluprofil Gerade] [AP 60]^C^C(ssg-ensure "OmniModulInsert") OMNI_AP60 [AP 110]^C^C(ssg-ensure "OmniModulInsert") OMNI_AP110