fix: flache Schleife am selben Kreisel im Hoehen-Check einzeln fragen

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-26 11:27:13 +01:00
parent 35339b270a
commit 0dfea8754d
4 changed files with 21 additions and 1 deletions
+12 -1
View File
@@ -401,6 +401,13 @@
(cons "innen" (cadddr fs))
(ch-kreuz-abzug (cadddr fs) (cadddr fe) (caddr fs) (caddr fe) maxdiff))
)
;;; Flache Schleife (reiner Kern): Strecke startet und endet am SELBEN Kreisel
;;; (h1 = h2) und hat gleiche Anfangs-/Endhoehe (|z1 - z2| <= tol, mm). Ihre
;;; Buehne laesst sich nicht aus der Familie ableiten und wird einzeln gefragt.
(defun ch-schleife-p (h1 h2 z1 z2 tol)
(and h1 h2 (= h1 h2) (<= (abs (- z1 z2)) tol))
)
;;; ID-Nummer eines Elements (999999 ohne gueltige ID).
(defun ch-id-nummer (id)
(if (and id (/= id "") (> (atoi id) 0)) (atoi id) 999999)
@@ -519,6 +526,10 @@
fe (ch-kreisel-finden (nth 5 rec) (caddr (nth 5 rec)) elems
*ch-zuordnung-xy-mm* *ch-zuordnung-z-mm*))
(if (and fs fe)
(if (ch-schleife-p fs fe (caddr (nth 4 rec)) (caddr (nth 5 rec)) 1.0)
;; Flache Schleife am selben Kreisel: Buehne nicht ableitbar ->
;; bleibt unentschieden und wird im Rest einzeln gefragt
(princ (ssg-textf "chh-schleife" (list lbl)))
(progn
(setq fs (assoc (cdr (assoc fs h2f)) famdat)
fe (assoc (cdr (assoc fe h2f)) famdat)
@@ -543,7 +554,7 @@
(setq n-kreuz (1+ n-kreuz))))
(princ (ssg-textf "chh-strecke-neg"
(list lbl (rtos (cdr kr) 2 3) (rtos (nth 3 rec) 2 3))))))
)))))))
))))))))
(princ (ssg-text "chh-kein-kreisel")))
;; --- Rest: blockweise wie bisher ---
+1
View File
@@ -1172,6 +1172,7 @@
"chh-start": "\n--- Phase 3: Buehnen-Familien ---",
"chh-kein-kreisel": "\n Hinweis: Kreisel-Modul nicht verfuegbar - nur blockweise Abfrage.",
"chh-fam-frage": "\n Familie %1 (%2, %3 Kreisel, Montagehoehe %4 m): liegt auf einer Buehne?",
"chh-schleife": "\n %1: flache Schleife am selben Kreisel (VON = BIS) - wird einzeln gefragt.",
"chh-buehne-hoehe": "Buehnenhoehe in m",
"chh-buehne-ungueltig": "\n ! Buehnenhoehe muss > 0 und < %1 m sein.",
"chh-kreuz-konflikt": "\n ! %1: Enden in Familien mit verschiedener Buehnenhoehe (%2 / %3 m) - nicht geaendert.",
+1
View File
@@ -1172,6 +1172,7 @@
"chh-start": "\n--- Phase 3: platform families ---",
"chh-kein-kreisel": "\n Note: Kreisel module not available - per-block questions only.",
"chh-fam-frage": "\n Family %1 (%2, %3 Kreisel, mounting height %4 m): is it on a platform?",
"chh-schleife": "\n %1: flat loop on the same Kreisel (VON = BIS) - asked individually.",
"chh-buehne-hoehe": "Platform height in m",
"chh-buehne-ungueltig": "\n ! Platform height must be > 0 and < %1 m.",
"chh-kreuz-konflikt": "\n ! %1: ends in families with different platform heights (%2 / %3 m) - unchanged.",
+7
View File
@@ -2811,6 +2811,13 @@
'("abzug" . 1.5)
(ch-strecke-abzug '(1 ("a") 5000.0 1.5) '(2 ("b") 5400.0 1.5) 1500.0))
;; --- ch-schleife-p: gleicher Kreisel + gleiche Hoehe ---
(tu-true "ch-schleife-p/gleicher-kreisel-flach" (ch-schleife-p "K1" "K1" 5000.0 5000.0 1.0))
(tu-true "ch-schleife-p/toleranz" (ch-schleife-p "K1" "K1" 5000.0 5000.8 1.0))
(tu-nil "ch-schleife-p/hoehenunterschied" (ch-schleife-p "K1" "K1" 5000.0 4800.0 1.0))
(tu-nil "ch-schleife-p/anderer-kreisel" (ch-schleife-p "K1" "K2" 5000.0 5000.0 1.0))
(tu-nil "ch-schleife-p/kein-kreisel" (ch-schleife-p nil nil 5000.0 5000.0 1.0))
;; --- ch-abzug-anwenden ---
(tu-eqf "ch-abzug-anwenden/normal" 2.5 (ch-abzug-anwenden 3.5 1.0))
(tu-nil "ch-abzug-anwenden/gleich" (ch-abzug-anwenden 3.5 3.5))