[CHANGE] VF Standard/Etage 3D-Linie-Eingabemodus per Dialog statt Konsole (Teil A der GUI-Umstellung)

Neuer Dialog vfc_eingabemodus (dcl/variofoerderer.dcl) + vfc-dialog-eingabemodus-waehlen (Lisp/vf_core.lsp), analog zum bestehenden vfc_typ-Muster: Radio-Buttons "3D-Linie auswaehlen" / "Werte manuell eingeben" ersetzen die fruehere getstring-Konsolenabfrage in vf-dialog-ablauf. Betrifft StandardVarioFoerderer3D und EtageVarioFoerderer3D (beide rufen denselben Ablauf).

Die 3D-Linie-Objektauswahl selbst (vfc-3dlinie-erfassen) bleibt bewusst Zeichnung/Konsole - eine Linie laesst sich nicht durch ein Formularfeld ersetzen. Alle daraus abgeleiteten Werte (deltaL/deltaH/hz/Einfuegehoehe) gehen als Prefill in den bereits bestehenden Basis-Dialog (variofoerderer_basis), der sie ueberschreibbar anzeigt - identisch zum "Werte manuell"-Pfad.

Rueckfall auf die alte Konsolenabfrage bleibt erhalten (GUI abgeschaltet, DXFM_LANG=en_GB), wie bei vfc_typ. doc/variofoerderer.md (Abschnitt 2, 8, Entscheidungsbaum) und CLAUDE.md entsprechend aktualisiert.

Manuell in BricsCAD getestet (StandardVarioFoerderer3D + EtageVarioFoerderer3D, beide Dialogzweige inkl. Abbruch) - laeuft.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-10-09 11:38:15 +02:00
parent 2ef8f319ab
commit 9a7907ab00
4 changed files with 139 additions and 57 deletions
+71 -29
View File
@@ -1088,42 +1088,53 @@
(defun vf-dialog-ablauf (typ vf-nummer horizontal-p / eingabe deltaL deltaH richtung
z-start hz seite startpunkt startpunkt-xy dim
geruest-einzelmodul geruest-typ motorseite
antwort linie-erg basis-prefill abbruch)
antwort dlg-modus linie-erg basis-prefill abbruch)
(setq abbruch nil)
(if *vf-vorauswahl-eingabemodus*
(setq antwort *vf-vorauswahl-eingabemodus*
*vf-vorauswahl-eingabemodus* nil)
(progn
(princ (ssg-text "vfc-eingabemodus-header"))
(princ (ssg-text "vfc-eingabemodus-3dlinie"))
(princ (ssg-text "vfc-eingabemodus-werte"))
(setq antwort (getstring (ssg-text "vfc-prompt-wahl-1-2-ohne-default")))
)
)
(setq abbruch nil)
(if (= antwort "1")
(progn
(setq linie-erg (vfc-3dlinie-erfassen))
(if (null linie-erg)
(setq abbruch t)
(progn
(setq deltaL (nth 0 linie-erg)
deltaH (nth 1 linie-erg)
richtung (nth 2 linie-erg)
startpunkt (nth 3 linie-erg)
hz (nth 4 linie-erg))
(setq basis-prefill
(list (cons "deltaL" deltaL) (cons "deltaH" deltaH) (cons "richtung" richtung)
(cons "einfuegehoehe" (caddr startpunkt)) (cons "hz" hz)))
(setq dlg-modus (vfc-dialog-eingabemodus-waehlen))
(cond
((eq dlg-modus 'ABBRUCH) (setq antwort "2" abbruch t))
(dlg-modus (setq antwort dlg-modus))
(t
;; Dialog nicht verfuegbar/nicht erlaubt (GUI aus, andere Sprache)
;; - alte Konsolen-Abfrage unveraendert.
(princ (ssg-text "vfc-eingabemodus-header"))
(princ (ssg-text "vfc-eingabemodus-3dlinie"))
(princ (ssg-text "vfc-eingabemodus-werte"))
(setq antwort (getstring (ssg-text "vfc-prompt-wahl-1-2-ohne-default")))
)
)
)
(progn
(setq startpunkt-xy (vfc-dialog-startpunkt-waehlen "vfc-prompt-startpunkt-aus"))
(if (null startpunkt-xy)
(setq startpunkt-xy (getpoint (ssg-text "vfc-prompt-startpunkt-aus"))))
(if (null startpunkt-xy) (setq startpunkt-xy '(0 0 0)))
(setq startpunkt startpunkt-xy)
(setq basis-prefill nil)
)
(if (not abbruch)
(if (= antwort "1")
(progn
(setq linie-erg (vfc-3dlinie-erfassen))
(if (null linie-erg)
(setq abbruch t)
(progn
(setq deltaL (nth 0 linie-erg)
deltaH (nth 1 linie-erg)
richtung (nth 2 linie-erg)
startpunkt (nth 3 linie-erg)
hz (nth 4 linie-erg))
(setq basis-prefill
(list (cons "deltaL" deltaL) (cons "deltaH" deltaH) (cons "richtung" richtung)
(cons "einfuegehoehe" (caddr startpunkt)) (cons "hz" hz)))
)
)
)
(progn
(setq startpunkt-xy (vfc-dialog-startpunkt-waehlen "vfc-prompt-startpunkt-aus"))
(if (null startpunkt-xy)
(setq startpunkt-xy (getpoint (ssg-text "vfc-prompt-startpunkt-aus"))))
(if (null startpunkt-xy) (setq startpunkt-xy '(0 0 0)))
(setq startpunkt startpunkt-xy)
(setq basis-prefill nil)
)
)
)
(if abbruch
@@ -1233,6 +1244,37 @@
)
)
;; Eingabemodus (3D-Linie / Werte manuell) per Dialog waehlen - ersetzt die
;; fruehere getstring-Konsolenabfrage in vf-dialog-ablauf. Gleiches Muster/
;; gleiche Einschraenkung wie vfc-dialog-typ-waehlen: nur bei aktiver GUI und
;; Deutsch, sonst nil (Aufrufer faellt dann auf die alte Konsolen-Abfrage
;; zurueck). Keine "Zurueck"-Taste noetig (direkt nach der Typ-Wahl, die
;; selbst schon ein "Zurueck" hat). Rueckgabe: "1" (3D-Linie), "2" (Werte)
;; oder 'ABBRUCH.
(defun vfc-dialog-eingabemodus-waehlen ( / dcl-pfad dat gmodus ergebnis)
(if (and (or (not (car (atoms-family 1 '("SSG-GUI-P")))) (ssg-gui-p))
(= *ssg-lang* "de_DE"))
(progn
(setq dcl-pfad (strcat (getenv "DXFM_DCL") "/variofoerderer.dcl"))
(setq dat (load_dialog dcl-pfad))
(if (not (new_dialog "vfc_eingabemodus" dat))
(progn (if (and dat (>= dat 0)) (unload_dialog dat)) nil)
(progn
(set_tile "modus_3dlinie" "1")
(action_tile "accept"
"(setq gmodus (if (= (get_tile \"modus_werte\") \"1\") \"2\" \"1\"))
(done_dialog 1)")
(action_tile "cancel" "(done_dialog 0)")
(setq ergebnis (start_dialog))
(unload_dialog dat)
(if (= ergebnis 1) gmodus 'ABBRUCH)
)
)
)
nil
)
)
;; ============================================================
;; TEIL 12: DISPATCHER c:VarioFoerderer
;; ============================================================