Compare commits
7 Commits
f7933df5a4
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| ab7fc92e23 | |||
| bde2380490 | |||
| 2767897158 | |||
| 444d643dd3 | |||
| 554e9bee99 | |||
| fe283a0bf3 | |||
| 6bf6b00e13 |
+38
-10
@@ -326,11 +326,13 @@
|
|||||||
|
|
||||||
|
|
||||||
;; --- Bogen-Auswahl-Dialog oeffnen ---
|
;; --- 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)
|
;; 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
|
;; Rueckgabe: (eintrag hoehe drehung) oder nil bei Abbruch
|
||||||
(defun omni:bogen-dialog (winkel init-hoehe init-drehung / dcl-pfad dat boegen-liste
|
(defun omni:bogen-dialog (winkel init-hoehe init-drehung profiltyp / dcl-pfad dat boegen-liste
|
||||||
profil-liste ergebnis dlg-hoehe dlg-drehung)
|
profil-liste ergebnis dlg-hoehe dlg-drehung profil)
|
||||||
(if (null *OMNI-BOEGEN*) (omni:load-data))
|
(if (null *OMNI-BOEGEN*) (omni:load-data))
|
||||||
|
|
||||||
;; Defaults
|
;; Defaults
|
||||||
@@ -339,11 +341,27 @@
|
|||||||
|
|
||||||
;; Boegen nach Winkel filtern
|
;; Boegen nach Winkel filtern
|
||||||
(setq boegen-liste (omni:filter *OMNI-BOEGEN* "KurvenWinkel" winkel))
|
(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)
|
(if (null boegen-liste)
|
||||||
(progn
|
(progn
|
||||||
(alert (strcat "Keine Boegen fuer "
|
(alert (strcat "Keine Boegen fuer "
|
||||||
(if (= (type winkel) 'INT) (itoa winkel) (rtos winkel 2 1))
|
(if (= (type winkel) 'INT) (itoa winkel) (rtos winkel 2 1))
|
||||||
" Grad gefunden."))
|
" Grad"
|
||||||
|
(if profiltyp (strcat " (" profiltyp ")") "")
|
||||||
|
" gefunden."))
|
||||||
nil
|
nil
|
||||||
)
|
)
|
||||||
(progn
|
(progn
|
||||||
@@ -405,8 +423,18 @@
|
|||||||
;; ============================================================
|
;; ============================================================
|
||||||
|
|
||||||
;; --- Omniflo / Boegen ---
|
;; --- 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)
|
(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
|
(if dlg-result
|
||||||
(omni:insert-from-entry dlg-result)
|
(omni:insert-from-entry dlg-result)
|
||||||
(princ "\n[BOGEN] Abgebrochen.")
|
(princ "\n[BOGEN] Abgebrochen.")
|
||||||
@@ -415,7 +443,7 @@
|
|||||||
)
|
)
|
||||||
|
|
||||||
(defun c:OMNI_APB_550_675 ( / dlg-result)
|
(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
|
(if dlg-result
|
||||||
(omni:insert-from-entry dlg-result)
|
(omni:insert-from-entry dlg-result)
|
||||||
(princ "\n[BOGEN] Abgebrochen.")
|
(princ "\n[BOGEN] Abgebrochen.")
|
||||||
@@ -424,7 +452,7 @@
|
|||||||
)
|
)
|
||||||
|
|
||||||
(defun c:OMNI_APB_630_45 ( / dlg-result)
|
(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
|
(if dlg-result
|
||||||
(omni:insert-from-entry dlg-result)
|
(omni:insert-from-entry dlg-result)
|
||||||
(princ "\n[BOGEN] Abgebrochen.")
|
(princ "\n[BOGEN] Abgebrochen.")
|
||||||
@@ -433,7 +461,7 @@
|
|||||||
)
|
)
|
||||||
|
|
||||||
(defun c:OMNI_APB_550_225 ( / dlg-result)
|
(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
|
(if dlg-result
|
||||||
(omni:insert-from-entry dlg-result)
|
(omni:insert-from-entry dlg-result)
|
||||||
(princ "\n[BOGEN] Abgebrochen.")
|
(princ "\n[BOGEN] Abgebrochen.")
|
||||||
@@ -442,7 +470,7 @@
|
|||||||
)
|
)
|
||||||
|
|
||||||
(defun c:OMNI_APB_650_180 ( / dlg-result)
|
(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
|
(if dlg-result
|
||||||
(omni:insert-from-entry dlg-result)
|
(omni:insert-from-entry dlg-result)
|
||||||
(princ "\n[BOGEN] Abgebrochen.")
|
(princ "\n[BOGEN] Abgebrochen.")
|
||||||
@@ -1171,7 +1199,7 @@
|
|||||||
(if (= typ "bogen")
|
(if (= typ "bogen")
|
||||||
(progn
|
(progn
|
||||||
(setq winkel (cdr (assoc "KurvenWinkel" eintrag)))
|
(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
|
(progn
|
||||||
(setq winkel (cdr (assoc "KurvenWinkel" eintrag)))
|
(setq winkel (cdr (assoc "KurvenWinkel" eintrag)))
|
||||||
|
|||||||
@@ -248,6 +248,21 @@ Der Omniflo-CSV-Export (Bogen/Weiche/Gerade, inkl. Merkmale-Aufbau und Sum-Zeile
|
|||||||
seit Entfernung von `c:OMNI_EXPORT` ausschließlich über `c:EXPORTCSV` → `lib/export_csv.py`
|
seit Entfernung von `c:OMNI_EXPORT` ausschließlich über `c:EXPORTCSV` → `lib/export_csv.py`
|
||||||
(`build_bogen_merkmale`, `build_weiche_merkmale`, `build_gerade_merkmale`, `build_omni_sum_merkmale`).
|
(`build_bogen_merkmale`, `build_weiche_merkmale`, `build_gerade_merkmale`, `build_omni_sum_merkmale`).
|
||||||
|
|
||||||
|
**Ausgabeordner:** `c:EXPORTSIVAS`/`c:EXPORTCSV` schreiben immer nach `DXFM_RESULTS`.
|
||||||
|
`TEST_EXPORT_ALL` (siehe `tests/test_export_all.lsp`) leitet waehrend des Testlaufs stattdessen
|
||||||
|
nach `DXFM_TESTOUT` um, über die reine Lisp-Sitzungsvariable `*export-test-override*` (wird von
|
||||||
|
`csv:run-export` zusaetzlich zu `DXFM_RESULTS` abgefragt und danach garantiert wieder auf `nil`
|
||||||
|
zurueckgesetzt, auch bei einem Fehler, ueber `vl-catch-all-apply`).
|
||||||
|
|
||||||
|
**Wichtig:** Der Umweg über `*export-test-override*` ist bewusst gewaehlt und **kein**
|
||||||
|
`(setenv "DXFM_RESULTS" ...)`. In BricsCAD/AutoCAD schreibt `(setenv ...)` nicht nur in den
|
||||||
|
Windows-Prozess, sondern dauerhaft in die Profil-Registry der Anwendung – der Wert überlebt
|
||||||
|
damit jeden Neustart und jedes `setenv.bat`, bis er erneut per `(setenv)` überschrieben wird.
|
||||||
|
Ein einziger `(setenv "DXFM_RESULTS" ...)`-Aufruf (z. B. ein frueherer, unvollstaendiger
|
||||||
|
Testlauf) würde `DXFM_RESULTS` für alle künftigen Sitzungen unwiderruflich auf den Testordner
|
||||||
|
umbiegen. Falls das bereits passiert ist, hilft nur ein manuelles
|
||||||
|
`(setenv "DXFM_RESULTS" "<richtiger Pfad>")` in BricsCAD, um den Profil-Wert zu korrigieren.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
### `tests.lsp` – Testbefehle
|
### `tests.lsp` – Testbefehle
|
||||||
|
|||||||
+25
-3
@@ -41,6 +41,14 @@
|
|||||||
;; Beim Laden des Moduls einmalig einlesen (Lazy-Loading via ssg-ensure "export")
|
;; Beim Laden des Moduls einmalig einlesen (Lazy-Loading via ssg-ensure "export")
|
||||||
(export:load-cfg)
|
(export:load-cfg)
|
||||||
|
|
||||||
|
;; --- Test-Override fuer den Ausgabeordner (nur Lisp-Sitzungsspeicher) ---
|
||||||
|
;; Wird ausschliesslich von TEST_EXPORT_ALL (tests/test_export_all.lsp)
|
||||||
|
;; waehrend des Testlaufs auf DXFM_TESTOUT gesetzt und danach garantiert
|
||||||
|
;; wieder auf nil zurueckgesetzt. Bewusst KEIN (setenv "DXFM_RESULTS" ...):
|
||||||
|
;; (setenv ...) schreibt in BricsCAD dauerhaft in die Profil-Registry und
|
||||||
|
;; ueberlebt damit jeden Neustart.
|
||||||
|
(setq *export-test-override* nil)
|
||||||
|
|
||||||
|
|
||||||
;; --- Feste Datei-/Skriptnamen dieses Moduls (keine Config, direkt im Code) ---
|
;; --- Feste Datei-/Skriptnamen dieses Moduls (keine Config, direkt im Code) ---
|
||||||
(setq *export-filenames*
|
(setq *export-filenames*
|
||||||
@@ -196,7 +204,7 @@
|
|||||||
;; py-name = Python-Skript-Name (z.B. "export_csv.py")
|
;; py-name = Python-Skript-Name (z.B. "export_csv.py")
|
||||||
;; csv-name = Ergebnis-CSV-Name (z.B. "export.csv")
|
;; csv-name = Ergebnis-CSV-Name (z.B. "export.csv")
|
||||||
(defun csv:run-export (label py-name csv-name / ss i ename fh out-pfad
|
(defun csv:run-export (label py-name csv-name / ss i ename fh out-pfad
|
||||||
py-skript ergebnis-pfad cmd first-block count)
|
py-skript ergebnis-pfad cmd first-block count out-dir)
|
||||||
;; Vor dem Export: IDs aller Bloecke sicherstellen und Duplikate korrigieren
|
;; Vor dem Export: IDs aller Bloecke sicherstellen und Duplikate korrigieren
|
||||||
(princ (strcat "\n[" label "] Pruefe und vergebe IDs..."))
|
(princ (strcat "\n[" label "] Pruefe und vergebe IDs..."))
|
||||||
(ssg-id-check-all)
|
(ssg-id-check-all)
|
||||||
@@ -215,8 +223,22 @@
|
|||||||
(setq count (sslength ss))
|
(setq count (sslength ss))
|
||||||
(princ (strcat "\n[" label "] " (itoa count) " Bloecke gefunden."))
|
(princ (strcat "\n[" label "] " (itoa count) " Bloecke gefunden."))
|
||||||
|
|
||||||
|
;; Ausgabeordner: DXFM_RESULTS, ausser *export-test-override* ist gesetzt
|
||||||
|
;; (nur waehrend TEST_EXPORT_ALL, siehe tests/test_export_all.lsp).
|
||||||
|
;; WICHTIG: Hier bewusst KEIN (setenv "DXFM_RESULTS" ...) verwenden!
|
||||||
|
;; (setenv ...) schreibt in BricsCAD dauerhaft in die Profil-Registry
|
||||||
|
;; und ueberlebt damit jeden Neustart - ein einziger Testlauf wuerde
|
||||||
|
;; DXFM_RESULTS fuer alle zukuenftigen Sitzungen unwiderruflich auf den
|
||||||
|
;; Testordner umbiegen. *export-test-override* ist eine reine
|
||||||
|
;; Lisp-Variable (nur Prozess-/Sitzungsspeicher) und daher sicher.
|
||||||
|
(setq out-dir (if *export-test-override*
|
||||||
|
*export-test-override*
|
||||||
|
(getenv "DXFM_RESULTS")))
|
||||||
|
(if (not (vl-file-directory-p out-dir)) (vl-mkdir out-dir))
|
||||||
|
(princ (strcat "\n[" label "] Ausgabeordner: " out-dir))
|
||||||
|
|
||||||
;; JSON-Datei zusammenbauen
|
;; JSON-Datei zusammenbauen
|
||||||
(setq out-pfad (strcat (getenv "DXFM_RESULTS") "/"
|
(setq out-pfad (strcat out-dir "/"
|
||||||
(export:filename "raw_json_datei")))
|
(export:filename "raw_json_datei")))
|
||||||
(setq fh (open out-pfad "w"))
|
(setq fh (open out-pfad "w"))
|
||||||
(if (null fh)
|
(if (null fh)
|
||||||
@@ -244,7 +266,7 @@
|
|||||||
(setq py-skript (strcat (getenv "DXFM_LIB") "/" py-name))
|
(setq py-skript (strcat (getenv "DXFM_LIB") "/" py-name))
|
||||||
(if (findfile py-skript)
|
(if (findfile py-skript)
|
||||||
(progn
|
(progn
|
||||||
(setq ergebnis-pfad (strcat (getenv "DXFM_RESULTS") "/" csv-name))
|
(setq ergebnis-pfad (strcat out-dir "/" csv-name))
|
||||||
(setq cmd (strcat "python \"" py-skript "\""
|
(setq cmd (strcat "python \"" py-skript "\""
|
||||||
" \"" out-pfad "\""
|
" \"" out-pfad "\""
|
||||||
" \"" (getenv "DXFM_DATA") "\""
|
" \"" (getenv "DXFM_DATA") "\""
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user