VF-Linienzug/Edit: Praeambel, Debug-Session und Edit-Attributleser buendeln
Punkt 2 (vf_linienzug.lsp) - die drei Modi teilen jetzt zwei Praeambel-Helfer statt sie wortgleich auszuschreiben: - vfl-dbg-session-start (schalter datei funcname sessiontext): oeffnet die dbg-Datei + schreibt Kopf/Session-Start. M1 haengt seinen Replay-Queue- Diagnose-Zusatz danach an (M1-spezifisch). - vfl-dbg-hook-installieren: der fruehe duenne dbg-*error*-Hook (M2/M3), Lambda mit dynamic-scope-Vertrag wie vfl-abbruch-handler-installieren. - vfl-frage-punkt-hoehe (punkt-key hoehe-key abbruch-key wizard-prompt): Startpunkt/Hoehe-Praeambel (Wizard-Hook + vfl-in-point + vfl-in-real + Z uebernehmen, (exit) bei Abbruch). Genutzt fuer Startpunkt in M1/M2/M3 UND den Endpunkt in M2 (vier Aufrufstellen, vorher 4x strukturgleich). Punkt 3 (vf_standard.lsp / vf_etage.lsp) - der wortgleiche Attribut-Lese- + prefill-basis-Aufbau der beiden Edit-Bodies (c:VARIOFOERDERER_EDIT, vfe-edit-ent) in vfs-edit-basis-lesen (ent xd default-deltah default-seite) zusammengefasst; die zwei abweichenden Defaults sind Parameter. Gibt eine Alist (prefill-basis + Rohwerte attribs/startpunkt/hz/z-start) zurueck. vf-konvertiere-ent BEWUSST nicht mit zusammengelegt - andere Zielstruktur (Einzelwerte + L_VF/L_GF fuer den Batch-Konverter), Zusammenfuehrung wuerde beide verkomplizieren. 243/243 LISP-Unit-Tests gruen; Python-Suite unveraendert zur Baseline (11 failed); Klammerbalance geprueft. Verhaltensneutrale Extraktionen. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
+45
-19
@@ -810,6 +810,42 @@
|
||||
;; unveraendert interaktiv (siehe Verzweigung in c:VarioFoerderer).
|
||||
;; ============================================================
|
||||
|
||||
;; Bau-Parameter eines bestehenden VF_n-Blocks aus XDATA + Attributen lesen -
|
||||
;; gemeinsame Leseroutine fuer den Standard-Edit-Body (c:VARIOFOERDERER_EDIT)
|
||||
;; und den Etage-Edit-Body (vfe-edit-ent), die frueher denselben Attribut-Lese-
|
||||
;; + prefill-basis-Aufbau fast wortgleich ausgeschrieben hatten. Einzige
|
||||
;; Unterschiede waren zwei Defaults (deltaH, seite) - daher Parameter.
|
||||
;; NICHT zusammengelegt mit vf-konvertiere-ent: das liest dieselben Attribute,
|
||||
;; liefert aber eine andere Struktur (Einzelwerte + L_VF/L_GF1/L_GF2/hoehe-von/
|
||||
;; bis fuer den Batch-Konverter statt einer Dialog-prefill-Alist) - eine
|
||||
;; erzwungene Zusammenfuehrung wuerde beide verkomplizieren.
|
||||
;; Rueckgabe: Alist mit "prefill-basis" (fuer vfs-dialog-eingabe-basis) plus den
|
||||
;; Rohwerten "attribs" "startpunkt" "hz" "z-start", die der Aufrufer danach noch
|
||||
;; fuer prefill-winkel/Neubau braucht.
|
||||
(defun vfs-edit-basis-lesen (ent xd default-deltah default-seite /
|
||||
ed attribs startpunkt hz deltaL deltaH richtung seite z-start)
|
||||
(setq ed (entget ent))
|
||||
(setq attribs (ssg-attrib-read ent))
|
||||
(setq startpunkt (cdr (assoc 10 ed)))
|
||||
(setq hz (atof (nth 1 xd)))
|
||||
(setq deltaL (atof (cond ((cdr (assoc "DELTA_L_mm" attribs))) ("15000"))))
|
||||
(setq deltaH (atof (cond ((cdr (assoc "DELTA_H_mm" attribs))) (default-deltah))))
|
||||
(setq richtung (cond ((cdr (assoc "ANTRIEBFAHRTRICHTUNG" attribs))) ("Auf")))
|
||||
(setq seite (cond ((cdr (assoc "SEITE_AS" attribs))) (default-seite)))
|
||||
(setq z-start (caddr startpunkt))
|
||||
(list
|
||||
(cons "prefill-basis"
|
||||
(list (cons "deltaL" deltaL) (cons "deltaH" deltaH) (cons "richtung" richtung)
|
||||
(cons "einfuegehoehe" z-start) (cons "hz" hz) (cons "seite" seite)
|
||||
(cons "dim" (cond ((ssg-dim-xdata-lesen ent)) ("3D")))
|
||||
(cons "geruest-einzelmodul" (cond ((cdr (assoc "GERUEST_EINZELMODUL" attribs))) ("1")))
|
||||
(cons "geruest-typ" (cdr (assoc "GERUEST_TYP" attribs)))
|
||||
(cons "motorseite" (cond ((cdr (assoc "MOTORSEITE" attribs))) ("rechts")))))
|
||||
(cons "attribs" attribs)
|
||||
(cons "startpunkt" startpunkt)
|
||||
(cons "hz" hz)
|
||||
(cons "z-start" z-start)))
|
||||
|
||||
;; Basis-Eingabe (Dialog 1): deltaL, deltaH, Richtung, Einfuegehoehe,
|
||||
;; Fahrtrichtung, Seite, Geruest fuer Einzelmodul, Geruestoption.
|
||||
;; prefill: Assoziationsliste zur Vorbelegung (fuer VARIOFOERDERER_EDIT) mit
|
||||
@@ -1171,7 +1207,7 @@
|
||||
(defun c:VARIOFOERDERER_EDIT ( / ss ent ed bname startpunkt attribs xd
|
||||
deltaL deltaH richtung z-start hz seite dim
|
||||
eingabe vf-nummer best-winkel-attr L_GF_m-teile
|
||||
prefill-basis prefill-winkel
|
||||
prefill-basis prefill-winkel basis-lesung
|
||||
geruest-einzelmodul geruest-typ motorseite)
|
||||
;; Implied Selection VOR ssg-start pruefen (ssg-start hebt Selektion auf)
|
||||
(setq ss (ssget "I"))
|
||||
@@ -1214,24 +1250,14 @@
|
||||
(if (/= (car xd) "standard")
|
||||
(progn (alert (ssg-textf "vfs-edit-keine-xdata" (list bname))) (ssg-end) (exit)))
|
||||
|
||||
(setq startpunkt (cdr (assoc 10 ed)))
|
||||
(setq attribs (ssg-attrib-read ent))
|
||||
(setq hz (atof (nth 1 xd)))
|
||||
(setq deltaL (atof (cond ((cdr (assoc "DELTA_L_mm" attribs))) ("15000"))))
|
||||
(setq deltaH (atof (cond ((cdr (assoc "DELTA_H_mm" attribs))) ("3000"))))
|
||||
(setq richtung (cond ((cdr (assoc "ANTRIEBFAHRTRICHTUNG" attribs))) ("Auf")))
|
||||
(setq seite (cond ((cdr (assoc "SEITE_AS" attribs))) ("rechts")))
|
||||
(setq z-start (caddr startpunkt))
|
||||
|
||||
(setq prefill-basis
|
||||
(list (cons "deltaL" deltaL) (cons "deltaH" deltaH) (cons "richtung" richtung)
|
||||
(cons "einfuegehoehe" z-start) (cons "hz" hz) (cons "seite" seite)
|
||||
;; Dimension aus XDATA erkennen (Default 3D, falls Alt-Block ohne Eintrag)
|
||||
(cons "dim" (cond ((ssg-dim-xdata-lesen ent)) ("3D")))
|
||||
(cons "geruest-einzelmodul" (cond ((cdr (assoc "GERUEST_EINZELMODUL" attribs))) ("1")))
|
||||
(cons "geruest-typ" (cdr (assoc "GERUEST_TYP" attribs)))
|
||||
;; Motorseite aus Attribut (Default rechts, falls Alt-Block ohne Eintrag)
|
||||
(cons "motorseite" (cond ((cdr (assoc "MOTORSEITE" attribs))) ("rechts")))))
|
||||
;; Bau-Parameter + prefill-basis lesen (gemeinsame Leseroutine, siehe
|
||||
;; vfs-edit-basis-lesen). Standard-Defaults: deltaH "3000", Seite "rechts".
|
||||
(setq basis-lesung (vfs-edit-basis-lesen ent xd "3000" "rechts"))
|
||||
(setq prefill-basis (cdr (assoc "prefill-basis" basis-lesung)))
|
||||
(setq attribs (cdr (assoc "attribs" basis-lesung)))
|
||||
(setq startpunkt (cdr (assoc "startpunkt" basis-lesung)))
|
||||
(setq hz (cdr (assoc "hz" basis-lesung)))
|
||||
(setq z-start (cdr (assoc "z-start" basis-lesung)))
|
||||
|
||||
(setq eingabe (vfs-dialog-eingabe-basis prefill-basis))
|
||||
(if (null eingabe)
|
||||
|
||||
Reference in New Issue
Block a user