3D-Linienzug (gemischte Gefaellestrecke/VarioFoerderer-Kette, Modus 1: manuelle Eingabe) wurde bei Variofoerder gabaut. Die Block-Attribute für GF und VF wurde angepasst wie erfoerdert bei EXPORT.
This commit is contained in:
+107
-39
@@ -259,7 +259,10 @@
|
||||
;; ============================================================
|
||||
;; TEIL 4: WINKELBERECHNUNG
|
||||
;; ============================================================
|
||||
(defun berechne-alle-winkel (deltaL deltaH richtung /
|
||||
;; feste-hz: horizontales Budget der festen Elemente (Umlenk+Motor+Separatoren).
|
||||
;; nil => Standardwert FESTE_HORIZONTAL (1600, Standard-VF mit 2 Separatoren).
|
||||
;; Der Linienzug uebergibt 1300 (nur 1 Separator am Einlauf, siehe vf_linienzug).
|
||||
(defun berechne-alle-winkel (deltaL deltaH richtung feste-hz /
|
||||
winkel-list ergebnis-liste A B cos3 sin3
|
||||
bogen-x1 bogen-z1 bogen-x2 bogen-z2
|
||||
abs-dz-AUS abs-dz-EIN L_GF L_VF cosα sinα
|
||||
@@ -273,6 +276,7 @@
|
||||
(exit)
|
||||
)
|
||||
)
|
||||
(if (null feste-hz) (setq feste-hz FESTE_HORIZONTAL))
|
||||
|
||||
(setq abs-dz-AUS (abs aus-dz) abs-dz-EIN (abs ein-dz))
|
||||
(setq winkel-list (ssg-cfg-or "vario" "bogen_winkel"
|
||||
@@ -312,16 +316,16 @@
|
||||
(setq cosα (cos (* winkel (/ pi 180.0)))
|
||||
sinα (sin (* winkel (/ pi 180.0))))
|
||||
(setq A (- deltaL aus-dx ein-dx bogen-x1 bogen-x2
|
||||
(* FESTE_HORIZONTAL cos3)))
|
||||
(* feste-hz cos3)))
|
||||
(setq winkel-eff (if (= richtung "Auf") (- winkel 3) (+ winkel 3)))
|
||||
(setq cosEff (cos (* winkel-eff (/ pi 180.0)))
|
||||
sinEff (sin (* winkel-eff (/ pi 180.0))))
|
||||
(if (= richtung "Auf")
|
||||
(setq B (+ deltaH abs-dz-AUS abs-dz-EIN
|
||||
(- bogen-z1) (- bogen-z2)
|
||||
(* FESTE_HORIZONTAL sin3)))
|
||||
(* feste-hz sin3)))
|
||||
(setq B (+ (- deltaH abs-dz-AUS abs-dz-EIN
|
||||
(* FESTE_HORIZONTAL sin3))
|
||||
(* feste-hz sin3))
|
||||
bogen-z1 bogen-z2))
|
||||
)
|
||||
(if (> (abs sinα) 0.0001)
|
||||
@@ -442,7 +446,7 @@
|
||||
(setq FESTE_HORIZONTAL (ssg-cfg-or "vario" "feste_horizontal" 1600))
|
||||
(setq staustrecke-basis (ssg-cfg-or "vario" "staustrecke_basis" 1000))
|
||||
(init-bibliothek)
|
||||
(berechne-alle-winkel deltaL deltaH richtung)
|
||||
(berechne-alle-winkel deltaL deltaH richtung nil)
|
||||
)
|
||||
|
||||
;; ============================================================
|
||||
@@ -453,48 +457,64 @@
|
||||
;; hz: horizontale Fahrtrichtung in Grad (0=Ost/+X, 90=Nord/+Y, 180=West/-X,
|
||||
;; 270=Sued/-Y). Default 0, falls vom Aufrufer nicht mitgegeben (Etage-
|
||||
;; Registry-Kompatibilitaet - siehe c:VarioFoerderer).
|
||||
(defun variofoerderer-einfuegen (deltaL deltaH richtung best-winkel
|
||||
L_GF1 L_GF2 L_VF startpunkt seite hz
|
||||
/ aktueller-punkt bogen-name endpunkt
|
||||
bogen-mass bogen-dx bogen-dz
|
||||
as-block es-block)
|
||||
;; --- Teil 1/3: AS-Element (Kettenanfang) ---
|
||||
;; Eigenstaendig, damit vf-linienzug (Gemischte GF/VF-Kette) ein VF-Segment
|
||||
;; auch OHNE eigenes AS/ES mitten in der Kette einfuegen kann (vfs-mitte-teil
|
||||
;; alleine), waehrend ein normaler Standard-VarioFoerderer weiterhin alle 3
|
||||
;; Teile nacheinander durchlaeuft (siehe variofoerderer-einfuegen unten).
|
||||
(defun vfs-as-teil (startpunkt seite hz / as-block)
|
||||
(if (null hz) (setq hz 0.0))
|
||||
(setq hz (float hz))
|
||||
(setq aktueller-punkt startpunkt)
|
||||
(setq as-block (strcat "AS_Element_90_" seite))
|
||||
(setq es-block (strcat "ES_Element_90_" seite))
|
||||
(if (not *lib-initialized*) (init-bibliothek))
|
||||
|
||||
;; 1. AUS_Element
|
||||
(princ (strcat "\n\n1/11: " as-block " (hz=" (rtos hz 2 1) grad-zeichen ")"))
|
||||
(setq aktueller-punkt (insert-block-by-ks as-block aktueller-punkt hz))
|
||||
(insert-block-by-ks as-block startpunkt hz)
|
||||
)
|
||||
|
||||
;; 2. 1. Gefaellestrecke
|
||||
;; --- Teil 2a: VF-Eingang (GF1 + Separator + Umlenkstation) ---
|
||||
;; Beginnt eine reine VF-Einheit: bringt die Kette von der (3-Grad-geneigten)
|
||||
;; AS-Seite ueber GF1 + Separator bis zur Umlenkstation. Wird pro VF-Einheit
|
||||
;; GENAU EINMAL aufgerufen (auch wenn danach mehrere Sub-Segmente folgen).
|
||||
(defun vfs-vf-entry (aktueller-punkt L_GF1 hz)
|
||||
(if (null hz) (setq hz 0.0))
|
||||
(setq hz (float hz))
|
||||
;; 1. Gefaellestrecke GF1 (verbindet AS-Neigung mit Umlenkstation)
|
||||
(if (> L_GF1 0.1)
|
||||
(progn
|
||||
(princ (strcat "\n\n2/11: Gefaellestrecke (3 Grad, L=" (rtos L_GF1 2 2) " mm)"))
|
||||
(princ (strcat "\n\n[VF-Eingang] Gefaellestrecke GF1 (3 Grad, L=" (rtos L_GF1 2 2) " mm)"))
|
||||
(setq aktueller-punkt
|
||||
(insert-inclined-scaled-block "Staustrecke_SP_1000_mm" aktueller-punkt
|
||||
L_GF1 (ssg-cfg-or "vario" "gefaelle_winkel" 3) hz))
|
||||
)
|
||||
(princ "\n\n2/11: (uebersprungen)")
|
||||
(princ "\n\n[VF-Eingang] Gefaellestrecke GF1 (uebersprungen)")
|
||||
)
|
||||
|
||||
;; 3. Separator
|
||||
(princ "\n\n3/11: Separator (300 mm, 3 Grad geneigt)")
|
||||
;; 2. Separator (am GF1-Ende / vor Umlenkstation)
|
||||
(princ "\n[VF-Eingang] Separator (300 mm, 3 Grad geneigt)")
|
||||
(setq aktueller-punkt
|
||||
(insert-rotated-block-with-ks "Staustrecke_Separator_SP_300_mm" aktueller-punkt
|
||||
(ssg-cfg-or "vario" "gefaelle_winkel" 3)
|
||||
(ssg-cfg-or "vario" "separator_block_dx" 300)
|
||||
(ssg-cfg-or "vario" "separator_block_dz" 0) hz))
|
||||
|
||||
;; 4. Umlenkstation
|
||||
(princ "\n\n4/11: Umlenkstation (500 mm, 3 Grad geneigt)")
|
||||
;; 3. Umlenkstation
|
||||
(princ "\n[VF-Eingang] Umlenkstation (500 mm, 3 Grad geneigt)")
|
||||
(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) hz))
|
||||
aktueller-punkt
|
||||
)
|
||||
|
||||
;; --- Teil 2b: VF-Koerper (Vertikalbogen + L_VF + Vertikalbogen) ---
|
||||
;; EIN reines VF-Sub-Segment. Wichtig: es BEGINNT und ENDET auf der
|
||||
;; 3-Grad-Basisneigung, weil Ein- und Ausgangsbogen denselben Winkel haben.
|
||||
;; Dadurch lassen sich mehrere Sub-Segmente (und Vario-Kurven dazwischen)
|
||||
;; beliebig aneinanderreihen (siehe doc/VarioFoerderer_Linienzug_Prinzipien.md).
|
||||
;; best-winkel=0 => horizontales Sub-Segment (Boegen fest auf_3/ab_3).
|
||||
(defun vfs-vf-koerper (aktueller-punkt richtung best-winkel L_VF hz /
|
||||
bogen-name bogen-mass bogen-dx bogen-dz)
|
||||
(if (null hz) (setq hz 0.0))
|
||||
(setq hz (float hz))
|
||||
|
||||
;; 5. 1. Vertikalbogen
|
||||
;; Sonderfall best-winkel=0 (horizontale Zwischenstrecke, siehe
|
||||
@@ -598,36 +618,84 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; 8. Motorstation
|
||||
(princ "\n\n8/11: Motorstation (500 mm, 3 Grad geneigt)")
|
||||
aktueller-punkt
|
||||
)
|
||||
|
||||
;; --- Teil 2c: VF-Ausgang (Motorstation [+ GF2] [+ Separator]) ---
|
||||
;; Schliesst eine reine VF-Einheit mit der Motorstation.
|
||||
;; L_GF2 > 0.1 => GF2 (3 Grad) wird angehaengt (verbindet Motorstation
|
||||
;; mit der Auslauf-Neigung).
|
||||
;; mit-separator T => Separator (300 mm) am Ende (Standard-VF: vor ES).
|
||||
;; Standard-VF: L_GF2 = L_GF/2, mit-separator = t.
|
||||
;; Linienzug: Separator wird NICHT hier gebaut (er sitzt erst vor dem ES bzw.
|
||||
;; optional zwischen Foerderern) -> mit-separator = nil; GF2 je nach Wahl.
|
||||
(defun vfs-vf-exit (aktueller-punkt L_GF2 hz mit-separator)
|
||||
(if (null hz) (setq hz 0.0))
|
||||
(setq hz (float hz))
|
||||
;; Motorstation
|
||||
(princ "\n\n[VF-Ausgang] Motorstation (500 mm, 3 Grad geneigt)")
|
||||
(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) hz))
|
||||
|
||||
;; 9. 2. Gefaellestrecke
|
||||
;; GF2 (optional, verbindet Motorstation mit der Auslauf-Neigung)
|
||||
(if (> L_GF2 0.1)
|
||||
(progn
|
||||
(princ (strcat "\n\n9/11: Gefaellestrecke (3 Grad, L=" (rtos L_GF2 2 2) " mm)"))
|
||||
(princ (strcat "\n[VF-Ausgang] Gefaellestrecke GF2 (3 Grad, L=" (rtos L_GF2 2 2) " mm)"))
|
||||
(setq aktueller-punkt
|
||||
(insert-inclined-scaled-block "Staustrecke_SP_1000_mm" aktueller-punkt
|
||||
L_GF2 (ssg-cfg-or "vario" "gefaelle_winkel" 3) hz))
|
||||
)
|
||||
(princ "\n\n9/11: (uebersprungen)")
|
||||
(princ "\n[VF-Ausgang] GF2 (kein / uebersprungen)")
|
||||
)
|
||||
;; Separator (optional, nur Standard-VF)
|
||||
(if mit-separator
|
||||
(progn
|
||||
(princ "\n[VF-Ausgang] Separator (300 mm, 3 Grad geneigt)")
|
||||
(setq aktueller-punkt
|
||||
(insert-rotated-block-with-ks "Staustrecke_Separator_SP_300_mm" aktueller-punkt
|
||||
(ssg-cfg-or "vario" "gefaelle_winkel" 3)
|
||||
(ssg-cfg-or "vario" "separator_block_dx" 300)
|
||||
(ssg-cfg-or "vario" "separator_block_dz" 0) hz))
|
||||
)
|
||||
)
|
||||
aktueller-punkt
|
||||
)
|
||||
|
||||
;; 10. Separator 2
|
||||
(princ "\n\n10/11: Separator (300 mm, 3 Grad geneigt)")
|
||||
(setq aktueller-punkt
|
||||
(insert-rotated-block-with-ks "Staustrecke_Separator_SP_300_mm" aktueller-punkt
|
||||
(ssg-cfg-or "vario" "gefaelle_winkel" 3)
|
||||
(ssg-cfg-or "vario" "separator_block_dx" 300)
|
||||
(ssg-cfg-or "vario" "separator_block_dz" 0) hz))
|
||||
;; --- Teil 2 (Zusammensetzung): Kettenmitte fuer den Standard-VF ---
|
||||
;; Entry + EIN Koerper + Exit. Verhalten identisch zur bisherigen Fassung.
|
||||
(defun vfs-mitte-teil (aktueller-punkt richtung best-winkel L_GF1 L_GF2 L_VF hz)
|
||||
(if (null hz) (setq hz 0.0))
|
||||
(setq hz (float hz))
|
||||
(setq aktueller-punkt (vfs-vf-entry aktueller-punkt L_GF1 hz))
|
||||
(setq aktueller-punkt (vfs-vf-koerper aktueller-punkt richtung best-winkel L_VF hz))
|
||||
(setq aktueller-punkt (vfs-vf-exit aktueller-punkt L_GF2 hz t))
|
||||
aktueller-punkt
|
||||
)
|
||||
|
||||
;; 11. EIN_Element
|
||||
;; --- Teil 3/3: ES-Element (Kettenende) ---
|
||||
(defun vfs-es-teil (aktueller-punkt seite hz / es-block)
|
||||
(if (null hz) (setq hz 0.0))
|
||||
(setq hz (float hz))
|
||||
(setq es-block (strcat "ES_Element_90_" seite))
|
||||
(princ (strcat "\n\n11/11: " es-block " (hz=" (rtos hz 2 1) grad-zeichen ")"))
|
||||
(setq endpunkt (insert-block-by-ks es-block aktueller-punkt hz))
|
||||
(insert-block-by-ks es-block aktueller-punkt hz)
|
||||
)
|
||||
|
||||
;; --- Zusammensetzung: kompletter Standard-VarioFoerderer ---
|
||||
;; Reine Verkettung von Teil 1+2+3, Verhalten identisch zur bisherigen
|
||||
;; monolithischen Fassung. deltaL/deltaH werden hier nicht gebraucht (Teil
|
||||
;; der einfuege-fn-Schnittstelle der Typ-Registry, siehe vf-typ-registrieren).
|
||||
(defun variofoerderer-einfuegen (deltaL deltaH richtung best-winkel
|
||||
L_GF1 L_GF2 L_VF startpunkt seite hz
|
||||
/ aktueller-punkt endpunkt)
|
||||
(if (null hz) (setq hz 0.0))
|
||||
(setq hz (float hz))
|
||||
(setq aktueller-punkt (vfs-as-teil startpunkt seite hz))
|
||||
(setq aktueller-punkt
|
||||
(vfs-mitte-teil aktueller-punkt richtung best-winkel L_GF1 L_GF2 L_VF hz))
|
||||
(setq endpunkt (vfs-es-teil aktueller-punkt seite hz))
|
||||
|
||||
(princ "\n\n=========================================")
|
||||
(princ "\n>>> Standard VarioFoerderer eingefuegt!")
|
||||
|
||||
Reference in New Issue
Block a user