VF-Linienzug: VF-Lauf-Grenze als Alert-Box + toten Etage-Code entfernen

Zwei kleine Aenderungen am VF-Linienzug-Cluster:

1. Modus-2-Abweisung "nur EIN VF-Lauf moeglich" jetzt als sichtbare Meldung.
   Bislang ging die Grenze (vf-count != 1 -> M3b spaeter) nur ueber drei
   princ-Zeilen in die Konsole und war dort leicht zu uebersehen. Neuer
   zweisprachiger Text vfl-m3-vf-lauf-alert, gezeigt ueber vfl-meldung (alert-
   Box bei erlaubter GUI, headless nur princ - blockiert also keinen Batch).
   Die [M3a]-Konsolendiagnose bleibt zusaetzlich fuer den Log.

2. insert-hz-incl-scaled-block (vf_etage.lsp) entfernt - toter Code, kein
   Aufrufer im gesamten Repo (byte-genaue Pruefung + grep). Der zugehoerige,
   nur dort genutzte i18n-Key vfe-hz-incl-status ebenfalls aus de/en entfernt.
   Die anderen drei insert-hz-*-Funktionen BLEIBEN bewusst: sie unterscheiden
   sich in Platzierungssemantik (KS_EIN vs. Block-Ursprung) bzw. der
   Skalierung+KS+Vertikale-Kombination von den ssg_ks_insert-Primitiven, ein
   Ersatz wuerde die Geometrie verschieben (Kommentar an der Fundstelle).

243/243 LISP-Unit-Tests gruen; JSON valide + de/en-Paritaet geprueft.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Michael Stangl
2026-09-18 17:08:25 +02:00
co-authored by Claude Opus 4.8
parent 8ccec9dea7
commit 255707f136
4 changed files with 12 additions and 36 deletions
+5 -34
View File
@@ -138,40 +138,11 @@
;; [ sin(hz)*cos(vert) cos(hz) sin(hz)*sin(vert) ]
;; [ -sin(vert) 0 cos(vert) ]
(defun insert-hz-incl-scaled-block (blockname startpunkt laenge hz-winkel vert-winkel /
rad-hz rad-vert chz shz cv sv scale
matrix block-obj endpunkt)
(setq scale (/ (float laenge) 1000.0))
(setq rad-hz (* (float hz-winkel) (/ pi 180.0)))
(setq rad-vert (* (float vert-winkel) (/ pi 180.0)))
(setq chz (cos rad-hz) shz (sin rad-hz))
(setq cv (cos rad-vert) sv (sin rad-vert))
(setq blockname (ensure-block-loaded blockname))
(if (not (tblsearch "BLOCK" blockname))
(progn
(princ (ssg-textf "vfe-block-fehlt-abbruch" (list blockname)))
(exit)
)
)
(setq block-obj (vla-InsertBlock modelspace
(vlax-3D-point '(0 0 0)) blockname scale 1.0 1.0 0))
;; Einzelteil auf die eigene Ebene der Blockdefinition legen - wie in den
;; Zwillingen in ssg_ks_insert.lsp; hier fehlte der Aufruf bisher.
(ssg-ils-block-auf-ebene block-obj blockname)
(setq matrix (vf-rot-matrix chz shz cv sv))
(vla-TransformBy block-obj (vlax-tmatrix matrix))
(vla-Move block-obj (vlax-3D-point '(0 0 0)) (vlax-3D-point startpunkt))
(setq endpunkt (list
(+ (car startpunkt) (* laenge chz cv))
(+ (cadr startpunkt) (* laenge shz cv))
(+ (caddr startpunkt) (* (- sv) laenge))))
(princ (ssg-textf "vfe-hz-incl-status"
(list blockname (rtos laenge 2 0)
(strcat (rtos hz-winkel 2 0) (chr 176))
(strcat (rtos vert-winkel 2 0) (chr 176))
(rtos (caddr endpunkt) 2 1))))
endpunkt
)
;; HINWEIS: insert-hz-incl-scaled-block wurde entfernt (2026-09-18) - toter Code,
;; kein Aufrufer im Repo. Die verbleibenden drei insert-hz-*-Funktionen bleiben,
;; weil sie sich in der Platzierungssemantik (KS_EIN vs. Block-Ursprung) bzw. der
;; Skalierung+KS+Vertikale-Kombination von den ssg_ks_insert-Primitiven
;; unterscheiden und ein Ersatz die Geometrie verschoebe (byte-genaue Pruefung).
(defun insert-hz-rotated-block-with-ks (blockname startpunkt hz-winkel vert-winkel block-dx block-dz /
rad-hz rad-vert chz shz cv sv
+5
View File
@@ -9651,9 +9651,14 @@
(if (/= vf-count 1)
(progn
;; Konsolen-Diagnose (fuer den Log / dbg-Nachvollzug) ...
(princ (ssg-textf "vfl-m3-vf-laeufe" (list (itoa vf-count))))
(princ (ssg-text "vfl-m3-vf-lauf-noetig"))
(princ (ssg-text "vfl-m3-vf-lauf-m3b"))
;; ... UND als sichtbare Meldung, damit die Abweisung nicht in der
;; Konsole untergeht (vfl-meldung zeigt bei erlaubter GUI ein alert,
;; headless nur princ - blockiert also einen Batch-Lauf nicht).
(vfl-meldung (ssg-textf "vfl-m3-vf-lauf-alert" (list (itoa vf-count))))
(exit)))
;; Traeger-Stueck = laengste VF-Gerade im Lauf (traegt die ganze Hoehe).
(setq carrier-idx -1 i vf-start)
+1 -1
View File
@@ -184,6 +184,7 @@
"vfl-m3-vf-laeufe": "\n\n[M3a] Gefundene VF-Laeufe: %1",
"vfl-m3-vf-lauf-noetig": "\n[M3a] Genau EIN VF-Lauf noetig (GF...VF...GF; Vario-Kurven duerfen im Lauf liegen).",
"vfl-m3-vf-lauf-m3b": "\n[M3a] Mehrere/keine VF-Laeufe -> M3b spaeter.",
"vfl-m3-vf-lauf-alert": "VF-Linienzug Modus 2 kann diese Kette nicht bauen.\n\nGefunden: %1 VarioFoerderer-Laeufe.\nModus 2 baut zurzeit nur Ketten mit GENAU EINEM VF-Lauf (GF...VF...GF; Vario-Kurven duerfen innerhalb des Laufs liegen).\n\nBitte den Pfad so aufteilen, dass nur ein zusammenhaengender VF-Bereich entsteht.",
"vfl-m3-vf-lauf-ohne-gerade": "\n[M3a] VF-Lauf ohne VF-Gerade - Abbruch.",
"vfl-m3-anker-vorschau-header": "\n M3a ANKER-VORSCHAU (grob geschaetzt; exakte Werte beim Bau)",
"vfl-m3-start-hoehe": "\n Start-Hoehe Z: %1 mm",
@@ -351,7 +352,6 @@
"vfe-gefaellebogen-links-mass": "\n Gefaellebogen links: dx=%1 dz=%2 mm",
"vfe-gefaellebogen-rechts-mass": "\n Gefaellebogen rechts: dx=%1 dz=%2 mm",
"vfe-gefaellebogen-seite-dx": "\n Gefaellebogen %1: dx=%2 mm",
"vfe-hz-incl-status": "\n HzIncl %1 L=%2 hz=%3 v=%4 -> Z=%5",
"vfe-hz-rot-status": "\n HzRot %1 hz=%2 v=%3 -> Z=%4",
"vfe-hz-rotks-status": "\n HzRotKS %1 hz=%2 -> Z=%3",
"vfe-hz-scaleks-status": "\n HzScaleKS %1 %2mm hz=%3 -> Z=%4",
+1 -1
View File
@@ -184,6 +184,7 @@
"vfl-m3-vf-laeufe": "\n\n[M3a] VF runs found: %1",
"vfl-m3-vf-lauf-noetig": "\n[M3a] Exactly ONE VF run required (GF...VF...GF; Vario curves may lie within the run).",
"vfl-m3-vf-lauf-m3b": "\n[M3a] Several/no VF runs -> M3b later.",
"vfl-m3-vf-lauf-alert": "VF line path mode 2 cannot build this chain.\n\nFound: %1 VarioFoerderer runs.\nMode 2 currently builds only chains with EXACTLY ONE VF run (GF...VF...GF; Vario curves may lie within the run).\n\nPlease split the path so that only one contiguous VF section remains.",
"vfl-m3-vf-lauf-ohne-gerade": "\n[M3a] VF run without a VF straight - aborting.",
"vfl-m3-anker-vorschau-header": "\n M3a ANCHOR PREVIEW (rough estimate; exact values during build)",
"vfl-m3-start-hoehe": "\n Start height Z: %1 mm",
@@ -351,7 +352,6 @@
"vfe-gefaellebogen-links-mass": "\n Slope arc left: dx=%1 dz=%2 mm",
"vfe-gefaellebogen-rechts-mass": "\n Slope arc right: dx=%1 dz=%2 mm",
"vfe-gefaellebogen-seite-dx": "\n Slope arc %1: dx=%2 mm",
"vfe-hz-incl-status": "\n HzIncl %1 L=%2 hz=%3 v=%4 -> Z=%5",
"vfe-hz-rot-status": "\n HzRot %1 hz=%2 v=%3 -> Z=%4",
"vfe-hz-rotks-status": "\n HzRotKS %1 hz=%2 -> Z=%3",
"vfe-hz-scaleks-status": "\n HzScaleKS %1 %2mm hz=%3 -> Z=%4",