From 714dc65f4543fa3946aa92393eff5abe328795b7 Mon Sep 17 00:00:00 2001 From: Yuelin Wang Date: Thu, 18 Jun 2026 09:45:43 +0200 Subject: [PATCH] Alle Objekte sind Ende-an-Anfang miteinander verbunden. --- Lisp/VarioFoerderer.lsp | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/Lisp/VarioFoerderer.lsp b/Lisp/VarioFoerderer.lsp index a5d8c83..56d7f72 100644 --- a/Lisp/VarioFoerderer.lsp +++ b/Lisp/VarioFoerderer.lsp @@ -20,6 +20,18 @@ ;; Pfad zu den Einzelblock-DXF-Dateien (zeigt auf 2D oder 3D Unterverzeichnis) (setq block-pfad modul-pfad) +;; Kern-Abhaengigkeiten sicherstellen (fuer direktes Laden ohne Menu-System) +(if (not *ssg-core-loaded*) + (if (getenv "DXFM_LISP") + (progn + (load (strcat (getenv "DXFM_LISP") "/ssg_core.lsp")) + (ssg-load-config) + (setq *ssg-core-loaded* t) + ) + (alert "DXFM_LISP nicht gesetzt! Bitte zuerst bin\\setenv.bat ausfuehren.") + ) +) + (setq doc (vla-get-ActiveDocument (vlax-get-acad-object))) (setq modelspace (vla-get-ModelSpace doc)) @@ -29,8 +41,8 @@ (setq aus-dx nil aus-dy nil aus-dz nil) (setq ein-dx nil ein-dy nil ein-dz nil) (setq separator-laenge nil umlenk-laenge nil motorstation-laenge nil) -(setq staustrecke-basis (ssg-cfg-or "vario" "staustrecke_basis" 1000)) -(setq FESTE_HORIZONTAL (ssg-cfg-or "vario" "feste_horizontal" 1600)) +(setq staustrecke-basis 1000) ;; Standardwert; wird in c:FOERDERANLAGE via ssg-cfg-or ueberschrieben +(setq FESTE_HORIZONTAL 1600) ;; Bogen-Tabellen (werden aus Bibliothek befüllt) (setq bogen-auf '()) ;; Format: ((winkel dx dy dz) ...) @@ -834,9 +846,9 @@ ;; 4. Umlenkstation – Rotation um 3° um Y-Achse (princ "\n\n4/11: Umlenkstation (500mm, 3° geneigt)") - (setq aktueller-punkt (insert-rotated-block-with-ks "Vario_Umlenkstation_500mm" aktueller-punkt 0 - (ssg-cfg-or "vario" "station_block_dx" 499) - (ssg-cfg-or "vario" "station_block_dz" -26))) + (setq aktueller-punkt (insert-rotated-block-with-ks "Vario_Umlenkstation_500mm" aktueller-punkt (ssg-cfg-or "vario" "gefaelle_winkel" 3) + (ssg-cfg-or "vario" "station_block_dx" 500) + (ssg-cfg-or "vario" "station_block_dz" 0))) ;; 5. 1. Vertikalbogen (if (= richtung "Auf") @@ -895,9 +907,9 @@ ;; 8. Motorstation – Rotation um 3° um Y-Achse (princ "\n\n8/11: Motorstation (500mm, 3° geneigt)") - (setq aktueller-punkt (insert-rotated-block-with-ks "Vario_Motorstation_500mm" aktueller-punkt 0 - (ssg-cfg-or "vario" "station_block_dx" 499) - (ssg-cfg-or "vario" "station_block_dz" -26))) + (setq aktueller-punkt (insert-rotated-block-with-ks "Vario_Motorstation_500mm" aktueller-punkt (ssg-cfg-or "vario" "gefaelle_winkel" 3) + (ssg-cfg-or "vario" "station_block_dx" 500) + (ssg-cfg-or "vario" "station_block_dz" 0))) ;; 9. 2. Gefällestrecke (if (> L_GF2 0.1) @@ -948,7 +960,11 @@ (exit) ) ) - + + ;; Konfigurationswerte laden (ssg-core muss bereits geladen sein) + (setq staustrecke-basis (ssg-cfg-or "vario" "staustrecke_basis" 1000)) + (setq FESTE_HORIZONTAL (ssg-cfg-or "vario" "feste_horizontal" 1600)) + (princ "\n\nEingabemodus wählen:") (princ "\n 1 - 3D-Linie auswählen (Start- und Endpunkt mit Höhe)") (princ "\n 2 - Werte manuell eingeben")